Changeset 4839
- Timestamp:
- 07/24/2011 07:45:09 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r4820 r4839 741 741 function bp_is_root_component( $component_name ) { 742 742 global $bp; 743 743 744 744 if ( !isset( $bp->active_components ) ) 745 745 return false; … … 777 777 } 778 778 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 */ 779 788 function bp_is_blog_page() { 780 789 global $bp, $wp_query; 781 790 782 if ( $wp_query->is_home && !bp_is_directory() ) 783 return true; 784 785 if ( !bp_is_user() && !bp_is_single_item() && !bp_is_directory() && !bp_is_root_component( $bp->current_component ) ) 786 return true; 787 788 return false; 791 $is_blog_page = false; 792 793 if ( !bp_current_component() ) 794 $is_blog_page = true; 795 796 return apply_filters( 'bp_is_blog_page', $is_blog_page ); 789 797 } 790 798 … … 1214 1222 * @package BuddyPress 1215 1223 * @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 1216 1228 */ 1217 1229 function bp_the_body_class() { … … 1388 1400 return apply_filters( 'bp_get_the_body_class', $classes, $bp_classes, $wp_classes, $custom_classes ); 1389 1401 } 1390 1402 add_filter( 'body_class', 'bp_get_the_body_class', 10, 2 ) 1391 1403 ?>
Note: See TracChangeset
for help on using the changeset viewer.