Ticket #15064: 15064.dupe-ids.diff
File 15064.dupe-ids.diff, 1.2 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/template.php
2120 2120 endswitch; 2121 2121 $text = ( NULL == $text ) ? __( 'Save Changes' ) : $text; 2122 2122 2123 // Default the id attribute to $name unless an id was specifically provided in $other_attributes 2124 $id = $name; 2125 if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) ) { 2126 $id = $other_attributes['id']; 2127 unset( $other_attributes['id'] ); 2128 } 2129 2123 2130 $attributes = ''; 2124 2131 if ( is_array( $other_attributes ) ) { 2125 2132 foreach ( $other_attributes as $attribute => $value ) { … … 2129 2136 $attributes = $other_attributes; 2130 2137 } 2131 2138 2132 // Default the id attribute to $name unless an id was specifically provided in $other_attributes2133 $id = $name;2134 if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) )2135 $id = $other_attributes['id'];2136 2137 2139 $button = '<input type="submit" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ); 2138 2140 $button .= '" value="' . esc_attr( $text ) . '" ' . $attributes . ' />'; 2139 2141