From 48db986c36745265a87e42fb5c79a94adc7463be Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 25 Mar 2008 01:42:38 +0000 Subject: [PATCH] Fix addition of new meta keys when no meta keys currently exist. Props DD32. fixes #6343 git-svn-id: http://svn.automattic.com/wordpress/trunk@7509 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index b3c7ce2c60..13a869e840 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -371,7 +371,7 @@ case 'add-meta' : check_ajax_referer( 'add-meta' ); $c = 0; $pid = (int) $_POST['post_id']; - if ( isset($_POST['metakeyselect']) ) { + if ( isset($_POST['metakeyselect']) || isset($_POST['metakeyinput']) ) { if ( !current_user_can( 'edit_post', $pid ) ) die('-1'); if ( '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) )