From 626a4b2a56a62dc5470d3883dfed064f70a6aafd Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 7 Sep 2012 15:49:20 +0000 Subject: [PATCH] Fix adding and updating from the Custom Fields meta box. Broken in [21205]. props SergeyBiryukov. see #21829 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@21781 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/css/wp-admin.css | 2 +- wp-admin/includes/template.php | 4 ++-- wp-includes/js/wp-lists.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/css/wp-admin.css b/wp-admin/css/wp-admin.css index 89f4797840..90adf711c1 100644 --- a/wp-admin/css/wp-admin.css +++ b/wp-admin/css/wp-admin.css @@ -3200,7 +3200,7 @@ td.plugin-title p { } #postcustomstuff .submit input, -#postcustomstuff table #addmetasub { +#postcustomstuff table #newmeta-submit { width: auto; } diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index d3cd3e4f3d..efc04704bd 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -493,7 +493,7 @@ function _list_meta_row( $entry, &$count ) { $r .= "\n\t\t
"; $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 .= 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 .= "
"; $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); $r .= ""; @@ -554,7 +554,7 @@ function meta_form() { - 'addmetasub' ) ); ?> + 'newmeta-submit' ) ); ?> diff --git a/wp-includes/js/wp-lists.js b/wp-includes/js/wp-lists.js index 3954c3055e..da227b1e42 100644 --- a/wp-includes/js/wp-lists.js +++ b/wp-includes/js/wp-lists.js @@ -78,7 +78,7 @@ wpList = { if ( !s ) return false; - if ( !e.is('[id="' + s.what + '-add-submit"]') ) + if ( !e.is('[id="' + s.element + '-submit"]') ) return !wpList.add.call( list, e, s ); if ( !s.element )