Permalink
Browse files

Remove delete all param of meta data api.

  • Loading branch information...
Jonny Harris
Jonny Harris committed May 8, 2018
1 parent 5684cbc commit 3e480f43008b398da1a352ed059754a315312776
@@ -91,16 +91,11 @@ protected function get_metadata( $object_id, $meta_key = '', $single = false ) {
* this check. For backward compatibility, it is
* not possible to pass an empty string to delete
* those entries with an empty string for a value.
* @param bool $delete_all Optional, default is false. If true, delete
* matching metadata entries for all objects,
* ignoring the specified object_id. Otherwise,
* only delete matching metadata entries for the
* specified object_id.
*
* @return bool True on successful delete, false on failure.
*/
protected function delete_metadata( $object_id, $meta_key, $meta_value = '', $delete_all = false ) {
return delete_comment_meta( $object_id, $meta_key, $meta_value, $delete_all );
protected function delete_metadata( $object_id, $meta_key, $meta_value = '' ) {
return delete_comment_meta( $object_id, $meta_key, $meta_value );
}
/**
@@ -102,15 +102,10 @@ protected function get_metadata( $object_id, $meta_key = '', $single = false ) {
* this check. For backward compatibility, it is
* not possible to pass an empty string to delete
* those entries with an empty string for a value.
* @param bool $delete_all Optional, default is false. If true, delete
* matching metadata entries for all objects,
* ignoring the specified object_id. Otherwise,
* only delete matching metadata entries for the
* specified object_id.
*
* @return bool True on successful delete, false on failure.
*/
protected function delete_metadata( $object_id, $meta_key, $meta_value = '', $delete_all = false ) {
return delete_post_meta( $object_id, $meta_key, $meta_value, $delete_all );
protected function delete_metadata( $object_id, $meta_key, $meta_value = '' ) {
return delete_post_meta( $object_id, $meta_key, $meta_value );
}
}
@@ -104,15 +104,10 @@ protected function get_metadata( $object_id, $meta_key = '', $single = false ) {
* this check. For backward compatibility, it is
* not possible to pass an empty string to delete
* those entries with an empty string for a value.
* @param bool $delete_all Optional, default is false. If true, delete
* matching metadata entries for all objects,
* ignoring the specified object_id. Otherwise,
* only delete matching metadata entries for the
* specified object_id.
*
* @return bool True on successful delete, false on failure.
*/
protected function delete_metadata( $object_id, $meta_key, $meta_value = '', $delete_all = false ) {
return delete_term_meta( $object_id, $meta_key, $meta_value, $delete_all );
protected function delete_metadata( $object_id, $meta_key, $meta_value = '' ) {
return delete_term_meta( $object_id, $meta_key, $meta_value );
}
}
@@ -293,16 +293,11 @@ protected function get_metadata( $object_id, $meta_key = '', $single = false ) {
* this check. For backward compatibility, it is
* not possible to pass an empty string to delete
* those entries with an empty string for a value.
* @param bool $delete_all Optional, default is false. If true, delete
* matching metadata entries for all objects,
* ignoring the specified object_id. Otherwise,
* only delete matching metadata entries for the
* specified object_id.
*
* @return bool True on successful delete, false on failure.
*/
protected function delete_metadata( $object_id, $meta_key, $meta_value = '', $delete_all = false ) {
return delete_user_meta( $object_id, $meta_key, $meta_value, $delete_all );
protected function delete_metadata( $object_id, $meta_key, $meta_value = '' ) {
return delete_user_meta( $object_id, $meta_key, $meta_value );
}
/**
@@ -501,16 +501,11 @@ protected function get_metadata( $object_id, $meta_key = '', $single = false ) {
* this check. For backward compatibility, it is
* not possible to pass an empty string to delete
* those entries with an empty string for a value.
* @param bool $delete_all Optional, default is false. If true, delete
* matching metadata entries for all objects,
* ignoring the specified object_id. Otherwise,
* only delete matching metadata entries for the
* specified object_id.
*
* @return bool True on successful delete, false on failure.
*/
protected function delete_metadata( $object_id, $meta_key, $meta_value = '', $delete_all = false ) {
return delete_metadata( $this->meta_type, $object_id, $meta_key, $meta_value, $delete_all );
protected function delete_metadata( $object_id, $meta_key, $meta_value = '' ) {
return delete_metadata( $this->meta_type, $object_id, $meta_key, $meta_value, false );
}
/**

0 comments on commit 3e480f4

Please sign in to comment.