WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/09/2005 05:25:47 PM (17 years ago)
Author:
ryan
Message:

Make get_postdata() use get_post(). Label get_postdata() as deprecated. Remove the one remaining call to get_postdata().

File:
1 edited

Legend:

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

    r2496 r2524  
    208208        die ( __('You are not allowed to edit this post.') );
    209209       
    210     $postdata = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$post_ID'");
     210    $postdata = &get_post($post_ID);
    211211    $content = $postdata->post_content;
    212212    $content = format_to_edit($content);
     
    238238    }
    239239
    240     $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$post_ID'");
     240    $post = &$postdata;
    241241    ?>
    242242    <div id='preview' class='wrap'>
     
    528528    }
    529529
    530     $postdata = get_postdata($p) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
     530    $postdata = get_post($p) or die(sprintf(__('Oops, no post with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
    531531    $commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'post.php'));
    532532
Note: See TracChangeset for help on using the changeset viewer.