WordPress.org

Make WordPress Core

Changeset 8513


Ignore:
Timestamp:
08/01/08 03:50:20 (6 years ago)
Author:
azaozz
Message:

Make sure meta is added to the post, not a revision.

File:
1 edited

Legend:

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

    r8480 r8513  
    511511function add_post_meta($post_id, $meta_key, $meta_value, $unique = false) { 
    512512    global $wpdb; 
     513 
     514    // make sure meta is added to the post, not a revision 
     515    if ( $the_post = wp_is_post_revision($post_id) ) 
     516        $post_id = $the_post; 
    513517 
    514518    // expected_slashed ($meta_key) 
Note: See TracChangeset for help on using the changeset viewer.