WordPress.org

Make WordPress Core

Changeset 12373


Ignore:
Timestamp:
12/11/09 16:44:41 (4 years ago)
Author:
ryan
Message:

Call wp_cache_delete after issuing update actions. Props Denis-de-Bernardy. fixes #11397

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r12351 r12373  
    600600 
    601601    $post_id = $wpdb->get_var( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); 
     602 
     603    do_action( 'delete_postmeta', $mid ); 
    602604    wp_cache_delete($post_id, 'post_meta'); 
    603  
    604     do_action( 'delete_postmeta', $mid ); 
    605605    $rval = $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); 
    606606    do_action( 'deleted_postmeta', $mid ); 
     
    687687 
    688688    $post_id = $wpdb->get_var( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_id = %d", $meta_id) ); 
    689     wp_cache_delete($post_id, 'post_meta'); 
    690689 
    691690    $meta_value = maybe_serialize( stripslashes_deep( $meta_value ) ); 
     
    697696    do_action( 'update_postmeta', $meta_id, $post_id, $meta_key, $meta_value ); 
    698697    $rval = $wpdb->update( $wpdb->postmeta, $data, $where ); 
     698    wp_cache_delete($post_id, 'post_meta'); 
    699699    do_action( 'updated_postmeta', $meta_id, $post_id, $meta_key, $meta_value ); 
    700700 
Note: See TracChangeset for help on using the changeset viewer.