WordPress.org

Make WordPress Core

Changeset 8532


Ignore:
Timestamp:
08/04/08 16:18:15 (7 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/wp-includes/post.php

    r8481 r8532  
    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.