Proper IDs for the custom fields box.
props SergeyBiryukov. fixes #14376. Built from https://develop.svn.wordpress.org/trunk@27776 git-svn-id: http://core.svn.wordpress.org/trunk@27613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ce1ace6347
commit
bec78b5e11
|
@ -566,7 +566,7 @@ function _list_meta_row( $entry, &$count ) {
|
|||
$delete_nonce = wp_create_nonce( 'delete-meta_' . $entry['meta_id'] );
|
||||
|
||||
$r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>";
|
||||
$r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta[{$entry['meta_id']}][key]'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' type='text' size='20' value='{$entry['meta_key']}' />";
|
||||
$r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta-{$entry['meta_id']}-key'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta-{$entry['meta_id']}-key' type='text' size='20' value='{$entry['meta_key']}' />";
|
||||
|
||||
$r .= "\n\t\t<div class='submit'>";
|
||||
$r .= get_submit_button( __( 'Delete' ), 'deletemeta small', "deletemeta[{$entry['meta_id']}]", false, array( 'data-wp-lists' => "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce" ) );
|
||||
|
@ -576,7 +576,7 @@ function _list_meta_row( $entry, &$count ) {
|
|||
$r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
|
||||
$r .= "</td>";
|
||||
|
||||
$r .= "\n\t\t<td><label class='screen-reader-text' for='meta[{$entry['meta_id']}][value]'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
|
||||
$r .= "\n\t\t<td><label class='screen-reader-text' for='meta-{$entry['meta_id']}-value'>" . __( 'Value' ) . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta-{$entry['meta_id']}-value' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
@ -607,14 +607,18 @@ function meta_form( $post = null ) {
|
|||
HAVING meta_key NOT LIKE '\_%'
|
||||
ORDER BY meta_key
|
||||
LIMIT $limit" );
|
||||
if ( $keys )
|
||||
natcasesort($keys);
|
||||
if ( $keys ) {
|
||||
natcasesort( $keys );
|
||||
$meta_key_input_id = 'metakeyselect';
|
||||
} else {
|
||||
$meta_key_input_id = 'metakeyinput';
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Add New Custom Field:' ) ?></strong></p>
|
||||
<table id="newmeta">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="left"><label for="metakeyselect"><?php _ex( 'Name', 'meta name' ) ?></label></th>
|
||||
<th class="left"><label for="<?php echo $meta_key_input_id; ?>"><?php _ex( 'Name', 'meta name' ) ?></label></th>
|
||||
<th><label for="metavalue"><?php _e( 'Value' ) ?></label></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
Loading…
Reference in New Issue