Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
|
@ -20,8 +20,6 @@ class WP_Customize_Control {
|
|||
* Used when sorting two instances whose priorities are equal.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @static
|
||||
* @var int
|
||||
*/
|
||||
protected static $instance_count = 0;
|
||||
|
|
@ -213,7 +211,7 @@ class WP_Customize_Control {
|
|||
}
|
||||
|
||||
$this->manager = $manager;
|
||||
$this->id = $id;
|
||||
$this->id = $id;
|
||||
if ( empty( $this->active_callback ) ) {
|
||||
$this->active_callback = array( $this, 'active_callback' );
|
||||
}
|
||||
|
|
@ -230,8 +228,8 @@ class WP_Customize_Control {
|
|||
foreach ( $this->settings as $key => $setting ) {
|
||||
$settings[ $key ] = $this->manager->get_setting( $setting );
|
||||
}
|
||||
} else if ( is_string( $this->settings ) ) {
|
||||
$this->setting = $this->manager->get_setting( $this->settings );
|
||||
} elseif ( is_string( $this->settings ) ) {
|
||||
$this->setting = $this->manager->get_setting( $this->settings );
|
||||
$settings['default'] = $this->setting;
|
||||
}
|
||||
$this->settings = $settings;
|
||||
|
|
@ -253,7 +251,7 @@ class WP_Customize_Control {
|
|||
*/
|
||||
final public function active() {
|
||||
$control = $this;
|
||||
$active = call_user_func( $this->active_callback, $this );
|
||||
$active = call_user_func( $this->active_callback, $this );
|
||||
|
||||
/**
|
||||
* Filters response of WP_Customize_Control::active().
|
||||
|
|
@ -308,13 +306,13 @@ class WP_Customize_Control {
|
|||
$this->json['settings'][ $key ] = $setting->id;
|
||||
}
|
||||
|
||||
$this->json['type'] = $this->type;
|
||||
$this->json['priority'] = $this->priority;
|
||||
$this->json['active'] = $this->active();
|
||||
$this->json['section'] = $this->section;
|
||||
$this->json['content'] = $this->get_content();
|
||||
$this->json['label'] = $this->label;
|
||||
$this->json['description'] = $this->description;
|
||||
$this->json['type'] = $this->type;
|
||||
$this->json['priority'] = $this->priority;
|
||||
$this->json['active'] = $this->active();
|
||||
$this->json['section'] = $this->section;
|
||||
$this->json['content'] = $this->get_content();
|
||||
$this->json['label'] = $this->label;
|
||||
$this->json['description'] = $this->description;
|
||||
$this->json['instanceNumber'] = $this->instance_number;
|
||||
|
||||
if ( 'dropdown-pages' === $this->type ) {
|
||||
|
|
@ -385,8 +383,9 @@ class WP_Customize_Control {
|
|||
* @uses WP_Customize_Control::render()
|
||||
*/
|
||||
final public function maybe_render() {
|
||||
if ( ! $this->check_capabilities() )
|
||||
if ( ! $this->check_capabilities() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires just before the current Customizer control is rendered.
|
||||
|
|
@ -480,8 +479,8 @@ class WP_Customize_Control {
|
|||
* @since 3.4.0
|
||||
*/
|
||||
protected function render_content() {
|
||||
$input_id = '_customize-input-' . $this->id;
|
||||
$description_id = '_customize-description-' . $this->id;
|
||||
$input_id = '_customize-input-' . $this->id;
|
||||
$description_id = '_customize-description-' . $this->id;
|
||||
$describedby_attr = ( ! empty( $this->description ) ) ? ' aria-describedby="' . esc_attr( $description_id ) . '" ' : '';
|
||||
switch ( $this->type ) {
|
||||
case 'checkbox':
|
||||
|
|
@ -513,7 +512,7 @@ class WP_Customize_Control {
|
|||
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! empty( $this->description ) ) : ?>
|
||||
<span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description ; ?></span>
|
||||
<span id="<?php echo esc_attr( $description_id ); ?>" class="description customize-control-description"><?php echo $this->description; ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php foreach ( $this->choices as $value => $label ) : ?>
|
||||
|
|
@ -567,9 +566,8 @@ class WP_Customize_Control {
|
|||
rows="5"
|
||||
<?php echo $describedby_attr; ?>
|
||||
<?php $this->input_attrs(); ?>
|
||||
<?php $this->link(); ?>>
|
||||
<?php echo esc_textarea( $this->value() ); ?>
|
||||
</textarea>
|
||||
<?php $this->link(); ?>
|
||||
><?php echo esc_textarea( $this->value() ); ?></textarea>
|
||||
<?php
|
||||
break;
|
||||
case 'dropdown-pages':
|
||||
|
|
@ -582,10 +580,10 @@ class WP_Customize_Control {
|
|||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$dropdown_name = '_customize-dropdown-pages-' . $this->id;
|
||||
$show_option_none = __( '— Select —' );
|
||||
$dropdown_name = '_customize-dropdown-pages-' . $this->id;
|
||||
$show_option_none = __( '— Select —' );
|
||||
$option_none_value = '0';
|
||||
$dropdown = wp_dropdown_pages(
|
||||
$dropdown = wp_dropdown_pages(
|
||||
array(
|
||||
'name' => $dropdown_name,
|
||||
'echo' => 0,
|
||||
|
|
@ -595,7 +593,7 @@ class WP_Customize_Control {
|
|||
)
|
||||
);
|
||||
if ( empty( $dropdown ) ) {
|
||||
$dropdown = sprintf( '<select id="%1$s" name="%1$s">', esc_attr( $dropdown_name ) );
|
||||
$dropdown = sprintf( '<select id="%1$s" name="%1$s">', esc_attr( $dropdown_name ) );
|
||||
$dropdown .= sprintf( '<option value="%1$s">%2$s</option>', esc_attr( $option_none_value ), esc_html( $show_option_none ) );
|
||||
$dropdown .= '</select>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue