Ticket #40115: 40115.diff
File 40115.diff, 718 bytes (added by , 8 years ago) |
---|
-
wp-admin/includes/ajax-actions.php
1261 1261 $x->send(); 1262 1262 } 1263 1263 1264 if ( !$mid = add_meta( $pid ) ) 1264 // Check if the `add_meta` call from `edit_post` was successful (e.g. the value is not empty). 1265 $mid = $wpdb->get_var( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s", $pid, wp_unslash( trim( $_POST['metakeyinput'] ) ) ) ); 1266 1267 if ( empty( $mid ) ) { 1265 1268 wp_die( __( 'Please provide a custom field value.' ) ); 1269 } 1266 1270 } else { 1267 1271 wp_die( 0 ); 1268 1272 }