Customizer: Add panel/section type as CSS class to the HTML container.
see #28709. Built from https://develop.svn.wordpress.org/trunk@30714 git-svn-id: http://core.svn.wordpress.org/trunk@30704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c2d9591122
commit
0826f8ede2
|
@ -7,11 +7,11 @@
|
||||||
* preview loads and we know whether the sidebars are used in the template.
|
* preview loads and we know whether the sidebars are used in the template.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.control-section[id^="accordion-section-sidebar-widgets-"],
|
.control-section.control-section-sidebar,
|
||||||
.customize-control-sidebar_widgets label,
|
.customize-control-sidebar_widgets label,
|
||||||
.customize-control-sidebar_widgets .hide-if-js {
|
.customize-control-sidebar_widgets .hide-if-js {
|
||||||
/* The link in .customize-control-sidebar_widgets .hide-if-js will fail if it ever gets used. */
|
/* The link in .customize-control-sidebar_widgets .hide-if-js will fail if it ever gets used. */
|
||||||
display:none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.customize-control-widget_form .widget-top {
|
.customize-control-widget_form .widget-top {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,11 +7,11 @@
|
||||||
* preview loads and we know whether the sidebars are used in the template.
|
* preview loads and we know whether the sidebars are used in the template.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.control-section[id^="accordion-section-sidebar-widgets-"],
|
.control-section.control-section-sidebar,
|
||||||
.customize-control-sidebar_widgets label,
|
.customize-control-sidebar_widgets label,
|
||||||
.customize-control-sidebar_widgets .hide-if-js {
|
.customize-control-sidebar_widgets .hide-if-js {
|
||||||
/* The link in .customize-control-sidebar_widgets .hide-if-js will fail if it ever gets used. */
|
/* The link in .customize-control-sidebar_widgets .hide-if-js will fail if it ever gets used. */
|
||||||
display:none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.customize-control-widget_form .widget-top {
|
.customize-control-widget_form .widget-top {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -103,11 +103,13 @@ class WP_Customize_Panel {
|
||||||
public $sections;
|
public $sections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Type of this panel.
|
||||||
|
*
|
||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
* @access public
|
* @access public
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $type;
|
public $type = 'default';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Active callback.
|
* Active callback.
|
||||||
|
@ -285,8 +287,9 @@ class WP_Customize_Panel {
|
||||||
* @access protected
|
* @access protected
|
||||||
*/
|
*/
|
||||||
protected function render() {
|
protected function render() {
|
||||||
|
$classes = 'accordion-section control-section control-panel control-panel-' . $this->type;
|
||||||
?>
|
?>
|
||||||
<li id="accordion-panel-<?php echo esc_attr( $this->id ); ?>" class="control-section control-panel accordion-section">
|
<li id="accordion-panel-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
|
||||||
<h3 class="accordion-section-title" tabindex="0">
|
<h3 class="accordion-section-title" tabindex="0">
|
||||||
<?php echo esc_html( $this->title ); ?>
|
<?php echo esc_html( $this->title ); ?>
|
||||||
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel' ); ?></span>
|
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel' ); ?></span>
|
||||||
|
|
|
@ -112,11 +112,13 @@ class WP_Customize_Section {
|
||||||
public $controls;
|
public $controls;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Type of this section.
|
||||||
|
*
|
||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
* @access public
|
* @access public
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $type;
|
public $type = 'default';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Active callback.
|
* Active callback.
|
||||||
|
@ -292,7 +294,7 @@ class WP_Customize_Section {
|
||||||
* @since 3.4.0
|
* @since 3.4.0
|
||||||
*/
|
*/
|
||||||
protected function render() {
|
protected function render() {
|
||||||
$classes = 'control-section accordion-section';
|
$classes = 'accordion-section control-section control-section-' . $this->type;
|
||||||
?>
|
?>
|
||||||
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
|
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">
|
||||||
<h3 class="accordion-section-title" tabindex="0">
|
<h3 class="accordion-section-title" tabindex="0">
|
||||||
|
@ -324,6 +326,8 @@ class WP_Customize_Section {
|
||||||
class WP_Customize_Sidebar_Section extends WP_Customize_Section {
|
class WP_Customize_Sidebar_Section extends WP_Customize_Section {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Type of this section.
|
||||||
|
*
|
||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
* @access public
|
* @access public
|
||||||
* @var string
|
* @var string
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-beta2-30713';
|
$wp_version = '4.1-beta2-30714';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue