Make WordPress Core


Ignore:
Timestamp:
08/23/2012 08:01:10 PM (13 years ago)
Author:
ryan
Message:

Remove return ref from all calls to get_post()
Return WP_Post from get_default_post_to_edit()
Replace all calls to get_page() with get_post()
see #21309

File:
1 edited

Legend:

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

    r21568 r21597  
    2727    _deprecated_function( __FUNCTION__, '1.5.1', 'get_post()' );
    2828
    29     $post = &get_post($postid);
     29    $post = get_post($postid);
    3030
    3131    $postdata = array (
     
    18931893    _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_link()' );
    18941894    $id = (int) $id;
    1895     $_post = & get_post($id);
     1895    $_post = get_post($id);
    18961896
    18971897    if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
     
    19221922    _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image_src()' );
    19231923    $id = (int) $id;
    1924     if ( !$post = & get_post($id) )
     1924    if ( !$post = get_post($id) )
    19251925        return false;
    19261926
     
    19671967    _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
    19681968    $id = (int) $id;
    1969     if ( !$post = & get_post($id) )
     1969    if ( !$post = get_post($id) )
    19701970        return false;
    19711971
     
    20242024    _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
    20252025    $id = (int) $id;
    2026     if ( !$post = & get_post($id) )
     2026    if ( !$post = get_post($id) )
    20272027        return false;
    20282028
     
    28022802
    28032803    if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) )
    2804         $post = & get_post($GLOBALS['post']->post_parent);
     2804        $post = get_post($GLOBALS['post']->post_parent);
    28052805
    28062806    if ( empty($post) )
Note: See TracChangeset for help on using the changeset viewer.