Skip to:
Content

BuddyPress.org

Ticket #3375: 3375.01.diff

File 3375.01.diff, 1.8 KB (added by boonebgorges, 13 years ago)
  • bp-core/bp-core-template.php

    diff --git a/bp-core/bp-core-template.php b/bp-core/bp-core-template.php
    index a280152..c60a462 100644
    a b function bp_is_component_front_page( $component = '' ) { 
    776776        return apply_filters( 'bp_is_component_front_page', ( $bp->pages->{$component}->id == get_option( 'page_on_front' ) ), $component );
    777777}
    778778
     779/**
     780 * Is this a blog page, ie a non-BP page?
     781 *
     782 * You can tell if a page is displaying BP content by whether the current_component has been defined
     783 *
     784 * @package BuddyPress
     785 *
     786 * @return bool True if it's a non-BP page, false otherwise
     787 */
    779788function bp_is_blog_page() {
    780789        global $bp, $wp_query;
    781790
    782         if ( $wp_query->is_home && !bp_is_directory() )
    783                 return true;
     791        $is_blog_page = false;
    784792
    785         if ( !bp_is_user() && !bp_is_single_item() && !bp_is_directory() && !bp_is_root_component( $bp->current_component ) )
    786                 return true;
     793        if ( !bp_current_component() )
     794                $is_blog_page = true;
    787795
    788         return false;
     796        return apply_filters( 'bp_is_blog_page', $is_blog_page );
    789797}
    790798
    791799function bp_is_page( $page ) {
    function bp_is_register_page() { 
    12131221 *
    12141222 * @package BuddyPress
    12151223 * @subpackage Core Template
     1224 *
     1225 * @param array $wp_classes The body classes coming from WP
     1226 * @param array $custom_classes Classes that were passed to get_body_class()
     1227 * @return array $classes The BP-adjusted body classes
    12161228 */
    12171229function bp_the_body_class() {
    12181230        echo bp_get_the_body_class();
    function bp_the_body_class() { 
    13871399
    13881400                return apply_filters( 'bp_get_the_body_class', $classes, $bp_classes, $wp_classes, $custom_classes );
    13891401        }
    1390         add_filter( 'body_class', 'bp_get_the_body_class', 10, 2 )
     1402add_filter( 'body_class', 'bp_get_the_body_class', 10, 2 )
    13911403?>
     1404 No newline at end of file