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:
Scott Taylor 2015-10-20 03:48:26 +00:00
parent a92d4f6fcb
commit 4f16590e8e
2 changed files with 15 additions and 8 deletions

View File

@ -474,7 +474,16 @@ class WP_Customize_Control {
<?php
break;
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(
'name' => '_customize-dropdown-pages-' . $this->id,
'echo' => 0,
@ -486,12 +495,10 @@ class WP_Customize_Control {
// Hackily add in the data link parameter.
$dropdown = str_replace( '<select', '<select ' . $this->get_link(), $dropdown );
printf(
'<label class="customize-control-select"><span class="customize-control-title">%s</span> %s</label>',
$this->label,
$dropdown
);
echo $dropdown;
?>
</label>
<?php
break;
default:
?>

View File

@ -4,7 +4,7 @@
*
* @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.