Make WordPress Core


Ignore:
Timestamp:
04/09/2005 05:12:36 PM (22 years ago)
Author:
ryan
Message:

Remove old preview stuff. Allow draft posts to be displayed if the logged in user has edit permissions on the draft. Don't use cruft-free links for drafts since they might not have a slug. ​http://mosquito.wordpress.org/view.php?id=1220

File:
1 edited

Legend:

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

    r2516 r2523  
    857857// Setup global post data.
    858858function setup_postdata($post) {
    859   global $id, $postdata, $authordata, $day, $preview, $page, $pages, $multipage, $more, $numpages, $wp_query;
     859  global $id, $postdata, $authordata, $day, $page, $pages, $multipage, $more, $numpages, $wp_query;
    860860        global $pagenow;
    861861
    862         if (!$preview) {
    863                 $id = $post->ID;
    864         } else {
    865                 $id = 0;
    866                 $postdata = array (
    867                         'ID' => 0,
    868                         'Author_ID' => $_GET['preview_userid'],
    869                         'Date' => $_GET['preview_date'],
    870                         'Content' => $_GET['preview_content'],
    871                         'Excerpt' => $_GET['preview_excerpt'],
    872                         'Title' => $_GET['preview_title'],
    873                         'Category' => $_GET['preview_category'],
    874                         'Notify' => 1
    875                         );
    876         }
     862        $id = $post->ID;
     863
    877864        $authordata = get_userdata($post->post_author);
    878865
    … …  
    11591146        FROM $wpdb->posts
    11601147        LEFT JOIN $wpdb->comments ON ( comment_post_ID = ID  AND comment_approved =  '1')
    1161         WHERE post_status =  'publish' AND ID IN ($post_id_list)
     1148        WHERE ID IN ($post_id_list)
    11621149        GROUP BY ID");
    11631150       
Note: See TracChangeset for help on using the changeset viewer.