Customize: Prevent outputting `value` attribute if already supplied among `input_attrs`.

This allows for `input[type=button]` controls to be added without producing illegal HTML.

Amends [41740].
See #30738, #33085.

Built from https://develop.svn.wordpress.org/trunk@41822


git-svn-id: http://core.svn.wordpress.org/trunk@41656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-10-11 04:26:48 +00:00
parent b35cf2f529
commit 36f8e77b49
2 changed files with 4 additions and 2 deletions

View File

@ -649,7 +649,9 @@ class WP_Customize_Control {
type="<?php echo esc_attr( $this->type ); ?>"
<?php echo $describedby_attr; ?>
<?php $this->input_attrs(); ?>
value="<?php echo esc_attr( $this->value() ); ?>"
<?php if ( ! isset( $this->input_attrs['value'] ) ) : ?>
value="<?php echo esc_attr( $this->value() ); ?>"
<?php endif; ?>
<?php $this->link(); ?>
/>
<?php

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta1-41821';
$wp_version = '4.9-beta1-41822';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.