From 37d6416d2f1ee68a49f86b710637fdfbf8fa133b Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 5 Nov 2012 17:47:55 +0000 Subject: [PATCH] Fix ajax adding of custom fields and link categories. props SergeyBiryukov. for the 3.4 branch. see #21829. git-svn-id: https://develop.svn.wordpress.org/branches/3.4@22371 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/meta-boxes.php | 2 +- wp-admin/includes/template.php | 4 ++-- wp-includes/js/wp-lists.dev.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index fde0af8c76..4e38f3b260 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -688,7 +688,7 @@ function link_categories_meta_box($link) { diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 383487458a..39f085a0db 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -494,7 +494,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, array( 'tabindex' => '6' ) ); $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, array( 'tabindex' => '6' ) ); + $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, array( 'tabindex' => '6' ) ); $r .= "
"; $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); $r .= ""; @@ -555,7 +555,7 @@ function meta_form() { - 'addmetasub', 'tabindex' => '9' ) ); ?> + 'newmeta-submit', 'tabindex' => '9' ) ); ?> diff --git a/wp-includes/js/wp-lists.dev.js b/wp-includes/js/wp-lists.dev.js index 3954c3055e..da227b1e42 100644 --- a/wp-includes/js/wp-lists.dev.js +++ b/wp-includes/js/wp-lists.dev.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 )