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-admin/includes/post.php

    r21300 r21597  
    161161    // Autosave shouldn't save too soon after a real save
    162162    if ( 'autosave' == $post_data['action'] ) {
    163         $post =& get_post( $post_ID );
     163        $post = get_post( $post_ID );
    164164        $now = time();
    165165        $then = strtotime($post->post_date_gmt . ' +0000');
     
    440440        $post->post_parent = 0;
    441441        $post->menu_order = 0;
     442        $post = new WP_Post( $post );
    442443    }
    443444
     
    746747 */
    747748function _fix_attachment_links( $post_ID ) {
    748     $post = & get_post( $post_ID, ARRAY_A );
     749    $post = get_post( $post_ID, ARRAY_A );
    749750    $content = $post['post_content'];
    750751
     
    10131014 */
    10141015function get_sample_permalink($id, $title = null, $name = null) {
    1015     $post = &get_post($id);
     1016    $post = get_post($id);
    10161017    if ( !$post->ID )
    10171018        return array('', '');
     
    10791080function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
    10801081    global $wpdb;
    1081     $post = &get_post($id);
     1082    $post = get_post($id);
    10821083
    10831084    list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
Note: See TracChangeset for help on using the changeset viewer.