WordPress.org

Make WordPress Core

Changeset 22189


Ignore:
Timestamp:
10/11/12 17:36:59 (18 months ago)
Author:
nacin
Message:

Use wp_update_post() rather than wp_insert_post() in wp_publish_post() to avoid stomping of values like categories. props ericmann, fixes #22167. see #21963.

File:
1 edited

Legend:

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

    r22164 r22189  
    28662866 * 
    28672867 * @since 2.1.0 
    2868  * @uses wp_insert_post() 
     2868 * @uses wp_update_post() 
    28692869 * 
    28702870 * @param mixed $post Post ID or object. 
     
    28772877 
    28782878    $post->post_status = 'publish'; 
    2879     wp_insert_post( $post ); 
     2879    wp_update_post( $post ); 
    28802880} 
    28812881 
Note: See TracChangeset for help on using the changeset viewer.