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/link-template.php

    r21596 r21597  
    9797        $sample = true;
    9898    } else {
    99         $post = &get_post($id);
     99        $post = get_post($id);
    100100        $sample = false;
    101101    }
     
    179179    global $wp_rewrite;
    180180
    181     $post = &get_post($id);
     181    $post = get_post($id);
    182182
    183183    if ( is_wp_error( $post ) )
     
    896896 */
    897897function get_edit_post_link( $id = 0, $context = 'display' ) {
    898     if ( !$post = &get_post( $id ) )
     898    if ( !$post = get_post( $id ) )
    899899        return;
    900900
     
    925925 */
    926926function edit_post_link( $link = null, $before = '', $after = '', $id = 0 ) {
    927     if ( !$post = &get_post( $id ) )
     927    if ( !$post = get_post( $id ) )
    928928        return;
    929929
     
    955955        _deprecated_argument( __FUNCTION__, '3.0' );
    956956
    957     if ( !$post = &get_post( $id ) )
     957    if ( !$post = get_post( $id ) )
    958958        return;
    959959
     
    12021202function get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $previous = true) {
    12031203    if ( $previous && is_attachment() && is_object( $GLOBALS['post'] ) )
    1204         $post = & get_post($GLOBALS['post']->post_parent);
     1204        $post = get_post($GLOBALS['post']->post_parent);
    12051205    else
    12061206        $post = get_adjacent_post($in_same_cat,$excluded_categories,$previous);
     
    13671367function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) {
    13681368    if ( $previous && is_attachment() )
    1369         $post = & get_post($GLOBALS['post']->post_parent);
     1369        $post = get_post($GLOBALS['post']->post_parent);
    13701370    else
    13711371        $post = get_adjacent_post($in_same_cat, $excluded_categories, $previous);
Note: See TracChangeset for help on using the changeset viewer.