Skip to:
Content

BuddyPress.org

Ticket #4835: 4835.patch

File 4835.patch, 1.0 KB (added by rahulsprajapati, 5 years ago)
  • src/bp-blogs/classes/class-bp-blogs-blog.php

    diff --git a/src/bp-blogs/classes/class-bp-blogs-blog.php b/src/bp-blogs/classes/class-bp-blogs-blog.php
    index 6e36295..1057dea 100644
    a b class BP_Blogs_Blog { 
    538538
    539539                for ( $i = 0, $count = count( $paged_blogs ); $i < $count; ++$i ) {
    540540                        $blog_prefix = $wpdb->get_blog_prefix( $paged_blogs[$i]->blog_id );
    541                         $paged_blogs[$i]->latest_post = $wpdb->get_row( "SELECT ID, post_content, post_title, post_excerpt, guid FROM {$blog_prefix}posts WHERE post_status = 'publish' AND post_type = 'post' AND id != 1 ORDER BY id DESC LIMIT 1" );
     541                        $bh_blog_latest_post_type = apply_filters( "bp_blog_latest_post_type", "post" );
     542                        $paged_blogs[$i]->latest_post = $wpdb->get_row( "SELECT ID, post_content, post_title, post_excerpt, guid FROM {$blog_prefix}posts WHERE post_status = 'publish' AND post_type = {$bh_blog_latest_post_type} AND id != 1 ORDER BY id DESC LIMIT 1" );
    542543                        $images = array();
    543544
    544545                        // Add URLs to any Featured Image this post might have.