Fix adding and updating from the Custom Fields meta box. Broken in [21205]. props SergeyBiryukov. see #21829 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a282823b17
commit
aa543734b8
|
@ -3200,7 +3200,7 @@ td.plugin-title p {
|
||||||
}
|
}
|
||||||
|
|
||||||
#postcustomstuff .submit input,
|
#postcustomstuff .submit input,
|
||||||
#postcustomstuff table #addmetasub {
|
#postcustomstuff table #newmeta-submit {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -493,7 +493,7 @@ function _list_meta_row( $entry, &$count ) {
|
||||||
$r .= "\n\t\t<div class='submit'>";
|
$r .= "\n\t\t<div class='submit'>";
|
||||||
$r .= get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false );
|
$r .= get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false );
|
||||||
$r .= "\n\t\t";
|
$r .= "\n\t\t";
|
||||||
$r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , 'updatemeta', false );
|
$r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , "meta-{$entry['meta_id']}-submit", false );
|
||||||
$r .= "</div>";
|
$r .= "</div>";
|
||||||
$r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
|
$r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
|
||||||
$r .= "</td>";
|
$r .= "</td>";
|
||||||
|
@ -554,7 +554,7 @@ function meta_form() {
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr><td colspan="2" class="submit">
|
<tr><td colspan="2" class="submit">
|
||||||
<?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'addmetasub' ) ); ?>
|
<?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'newmeta-submit' ) ); ?>
|
||||||
<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
|
<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -78,7 +78,7 @@ wpList = {
|
||||||
if ( !s )
|
if ( !s )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( !e.is('[id="' + s.what + '-add-submit"]') )
|
if ( !e.is('[id="' + s.element + '-submit"]') )
|
||||||
return !wpList.add.call( list, e, s );
|
return !wpList.add.call( list, e, s );
|
||||||
|
|
||||||
if ( !s.element )
|
if ( !s.element )
|
||||||
|
|
Loading…
Reference in New Issue