diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
index 04c31e51d3..e8a505802e 100644
|
a
|
b
|
function wp_ajax_add_meta() { |
| 1381 | 1381 | wp_die( 1 ); |
| 1382 | 1382 | } |
| 1383 | 1383 | |
| | 1384 | // If meta key is empty, return error. |
| | 1385 | if ( isset( $_POST['metakeyinput'] ) && empty( $_POST['metakeyinput'] ) ) { |
| | 1386 | wp_die( __( 'Please provide a custom field name.' ) ); |
| | 1387 | } |
| | 1388 | |
| 1384 | 1389 | // If the post is an autodraft, save the post as a draft and then attempt to save the meta. |
| 1385 | 1390 | if ( $post->post_status == 'auto-draft' ) { |
| 1386 | 1391 | $post_data = array(); |