Make WordPress Core

Changeset 41822


Ignore:
Timestamp:
10/11/2017 04:25:57 AM (9 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-control.php

    r41771 r41822  
    650650                                        <?php echo $describedby_attr; ?>
    651651                                        <?php $this->input_attrs(); ?>
    652                                         value="<?php echo esc_attr( $this->value() ); ?>"
     652                                        <?php if ( ! isset( $this->input_attrs['value'] ) ) : ?>
     653                                                value="<?php echo esc_attr( $this->value() ); ?>"
     654                                        <?php endif; ?>
    653655                                        <?php $this->link(); ?>
    654656                                        />
Note: See TracChangeset for help on using the changeset viewer.