introduce post & comment classes, props skeltoac, See #12267

git-svn-id: https://develop.svn.wordpress.org/trunk@13187 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ron Rennick
2010-02-18 01:52:37 +00:00
parent 5d1cb7981a
commit f3a3e63a5b
2 changed files with 102 additions and 0 deletions

View File

@@ -2302,6 +2302,10 @@ class WP_Query {
if ( !$q['suppress_filters'] )
$this->posts = apply_filters('posts_results', $this->posts);
// Turn each row into a classed object, e.g. wp_post, wp_comment.
if ( is_array($this->posts) )
$this->posts = array_map(array('wp_row', 'get'), $this->posts);
if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) {
$cjoin = apply_filters('comment_feed_join', '');
$cwhere = apply_filters('comment_feed_where', "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'");