Make WordPress Core


Ignore:
Timestamp:
10/02/2013 09:09:52 PM (11 years ago)
Author:
ocean90
Message:

Replace use of global $user_ID in favor of get_current_user_id(). fixes #25372.

File:
1 edited

Legend:

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

    r25505 r25669  
    5353        $post_data['to_ping'] = $post_data['trackback_url'];
    5454
    55     $post_data['user_ID'] = $GLOBALS['user_ID'];
     55    $post_data['user_ID'] = get_current_user_id();
    5656
    5757    if (!empty ( $post_data['post_author_override'] ) ) {
     
    267267    add_meta( $post_ID );
    268268
    269     update_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID );
     269    update_post_meta( $post_ID, '_edit_last', get_current_user_id() );
    270270
    271271    wp_update_post( $post_data );
     
    539539 */
    540540function wp_write_post() {
    541     global $user_ID;
    542 
    543541    if ( isset($_POST['post_type']) )
    544542        $ptype = get_post_type_object($_POST['post_type']);
Note: See TracChangeset for help on using the changeset viewer.