Make WordPress Core


Ignore:
Timestamp:
09/04/2012 04:29:28 PM (13 years ago)
Author:
ryan
Message:

Use get_post() instead of global $post.
Make the $post argument to get_post() optional, defaulting to the current post in The Loop.

Props nacin
see #21309

File:
1 edited

Legend:

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

    r21651 r21735  
    5858 */
    5959function start_wp() {
    60     global $wp_query, $post;
     60    global $wp_query;
    6161
    6262    _deprecated_function( __FUNCTION__, '1.5', __('new WordPress Loop') );
     
    6565    $wp_query->next_post();
    6666
    67     setup_postdata($post);
     67    setup_postdata( get_post() );
    6868}
    6969
Note: See TracChangeset for help on using the changeset viewer.