Fix back compat issues with delete_postmeta and deleted_postmeta actions as these should be passed the meta ID. Fixes #18825.

git-svn-id: https://develop.svn.wordpress.org/trunk@18835 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave 2011-09-30 15:19:32 +00:00
parent 805762af8f
commit 4219b8b03f
1 changed files with 2 additions and 2 deletions

View File

@ -486,7 +486,7 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
do_action( "delete_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );
if ( 'post' == $meta_type )
do_action( 'delete_postmeta', $object_id );
do_action( 'delete_postmeta', $meta_id );
// Run the query, will return true if deleted, false otherwise
$result = (bool) $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE $id_column = %d LIMIT 1;", $meta_id ) );
@ -497,7 +497,7 @@ function delete_metadata_by_mid( $meta_type, $meta_id ) {
do_action( "deleted_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );
if ( 'post' == $meta_type )
do_action( 'delete_postmeta', $object_id );
do_action( 'deleted_postmeta', $meta_id );
return $result;