Don't show error message when updating a custom field without changing its value. see #10254
git-svn-id: https://develop.svn.wordpress.org/trunk@11644 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
efcea18935
commit
ffef1c0d4c
|
@ -814,8 +814,10 @@ case 'add-meta' :
|
|||
die('0'); // if meta doesn't exist
|
||||
if ( !current_user_can( 'edit_post', $meta->post_id ) )
|
||||
die('-1');
|
||||
if ( $meta->meta_value != stripslashes($value) ) {
|
||||
if ( !$u = update_meta( $mid, $key, $value ) )
|
||||
die('0'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
|
||||
}
|
||||
|
||||
$key = stripslashes($key);
|
||||
$value = stripslashes($value);
|
||||
|
|
Loading…
Reference in New Issue