mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-20 15:21:28 +01:00
Customizer: when available, show the description
when rendering the dropdown-pages
Control.
Props downstairsdev, MikeHansenMe, _smartik_. Fixes #31540. Built from https://develop.svn.wordpress.org/trunk@35275 git-svn-id: http://core.svn.wordpress.org/trunk@35241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a92d4f6fcb
commit
4f16590e8e
@ -474,7 +474,16 @@ class WP_Customize_Control {
|
|||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
case 'dropdown-pages':
|
case 'dropdown-pages':
|
||||||
$dropdown = wp_dropdown_pages(
|
?>
|
||||||
|
<label>
|
||||||
|
<?php if ( ! empty( $this->label ) ) : ?>
|
||||||
|
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
|
||||||
|
<?php endif;
|
||||||
|
if ( ! empty( $this->description ) ) : ?>
|
||||||
|
<span class="description customize-control-description"><?php echo $this->description; ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php $dropdown = wp_dropdown_pages(
|
||||||
array(
|
array(
|
||||||
'name' => '_customize-dropdown-pages-' . $this->id,
|
'name' => '_customize-dropdown-pages-' . $this->id,
|
||||||
'echo' => 0,
|
'echo' => 0,
|
||||||
@ -486,12 +495,10 @@ class WP_Customize_Control {
|
|||||||
|
|
||||||
// Hackily add in the data link parameter.
|
// Hackily add in the data link parameter.
|
||||||
$dropdown = str_replace( '<select', '<select ' . $this->get_link(), $dropdown );
|
$dropdown = str_replace( '<select', '<select ' . $this->get_link(), $dropdown );
|
||||||
|
echo $dropdown;
|
||||||
printf(
|
?>
|
||||||
'<label class="customize-control-select"><span class="customize-control-title">%s</span> %s</label>',
|
</label>
|
||||||
$this->label,
|
<?php
|
||||||
$dropdown
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
?>
|
?>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-35274';
|
$wp_version = '4.4-alpha-35275';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user