WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/27/2005 08:45:01 PM (13 years ago)
Author:
ryan
Message:

Cacheing cleanup. Introduce get_post() and get_category(). http://mosquito.wordpress.org/view.php?id=1157

File:
1 edited

Legend:

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

    r2344 r2478  
    194194            $p = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '$name'");
    195195        }
    196         $post_data = get_postdata($p);
    197         $title = $post_data['Title'];
     196        $post = & get_post($p);
     197        $title = $post->post_title;
    198198        $title = apply_filters('single_post_title', $title);
    199199        if ($display) {
     
    348348        }
    349349    } elseif ('postbypost' == $type) {
    350         $arcresults = $wpdb->get_results("SELECT ID, post_date, post_title FROM $wpdb->posts WHERE post_date < '$now' AND post_status = 'publish' ORDER BY post_date DESC" . $limit);
     350        $arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_date < '$now' AND post_status = 'publish' ORDER BY post_date DESC" . $limit);
    351351        if ($arcresults) {
    352352            foreach ($arcresults as $arcresult) {
    353353                if ($arcresult->post_date != '0000-00-00 00:00:00') {
    354                     $url  = get_permalink($arcresult->ID);
     354                    $url  = get_permalink($arcresult);
    355355                    $arc_title = $arcresult->post_title;
    356356                    if ($arc_title) {
Note: See TracChangeset for help on using the changeset viewer.