Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r8640 r8261  
    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;
    517513
    518514        // expected_slashed ($meta_key)
    … …  
    12771273
    12781274        // If the post date is empty (due to having been new or a draft) and status is not 'draft', set date to now
    1279         if ( empty($post_date) || '0000-00-00 00:00:00' == $post_date ) {
     1275        if (empty($post_date)) {
    12801276                if ( !in_array($post_status, array('draft', 'pending')) )
    12811277                        $post_date = current_time('mysql');
    … …  
    12841280        }
    12851281
    1286         if ( empty($post_date_gmt) || '0000-00-00 00:00:00' == $post_date_gmt ) {
     1282        if (empty($post_date_gmt)) {
    12871283                if ( !in_array($post_status, array('draft', 'pending')) )
    12881284                        $post_date_gmt = get_gmt_from_date($post_date);
    … …  
    31183114                $fields = array(
    31193115                        'post_title' => __( 'Title' ),
     3116                        'post_author' => __( 'Author' ),
    31203117                        'post_content' => __( 'Content' ),
    31213118                        'post_excerpt' => __( 'Excerpt' ),
    … …  
    31263123
    31273124                // WP uses these internally either in versioning or elsewhere - they cannot be versioned
    3128                 foreach ( array( 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count', 'post_author' ) as $protect )
     3125                foreach ( array( 'ID', 'post_name', 'post_parent', 'post_date', 'post_date_gmt', 'post_status', 'post_type', 'comment_count' ) as $protect )
    31293126                        unset( $fields[$protect] );
    31303127        }
Note: See TracChangeset for help on using the changeset viewer.