Make WordPress Core

Ticket #14173: 14173.diff

File 14173.diff, 755 bytes (added by wojtek.szkutnik, 14 years ago)
  • wp-includes/meta.php

     
    5353        $_meta_value = $meta_value;
    5454        $meta_value = maybe_serialize( stripslashes_deep($meta_value) );
    5555
     56        do_action( "add_{$meta_type}_meta", $object_id, $meta_key, $_meta_value );
     57       
    5658        $wpdb->insert( $table, array(
    5759                $column => $object_id,
    5860                'meta_key' => $meta_key,
     
    190192        if ( !count( $meta_ids ) )
    191193                return false;
    192194
     195       
     196        do_action( "delete_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $meta_value );
     197
    193198        $query = "DELETE FROM $table WHERE $id_column IN( " . implode( ',', $meta_ids ) . " )";
    194199
    195200        $count = $wpdb->query($query);