Do not output empty name and id HTML attributes in get_submit_button().
Props afercia. Fixes #31749. Built from https://develop.svn.wordpress.org/trunk@31880 git-svn-id: http://core.svn.wordpress.org/trunk@31859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2c45fd7ed7
commit
f5e6f92174
|
@ -1908,7 +1908,11 @@ function get_submit_button( $text = '', $type = 'primary large', $name = 'submit
|
|||
$attributes = $other_attributes;
|
||||
}
|
||||
|
||||
$button = '<input type="submit" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" class="' . esc_attr( $class );
|
||||
// Don't output empty name and id attributes.
|
||||
$name_attr = $name ? ' name="' . esc_attr( $name ) . '"' : '';
|
||||
$id_attr = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
|
||||
$button = '<input type="submit"' . $name_attr . $id_attr . ' class="' . esc_attr( $class );
|
||||
$button .= '" value="' . esc_attr( $text ) . '" ' . $attributes . ' />';
|
||||
|
||||
if ( $wrap ) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-beta2-31879';
|
||||
$wp_version = '4.2-beta2-31880';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue