Changeset 6285 for trunk/bp-core/bp-core-template.php
- Timestamp:
- 09/03/2012 12:33:13 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r6259 r6285 1056 1056 } 1057 1057 1058 /** 1059 * Is this a BuddyPress component? 1060 * 1061 * You can tell if a page is displaying BP content by whether the 1062 * current_component has been defined 1063 * 1064 * Generally, we can just check to see that there's no current component. 1065 * The one exception is single user home tabs, where $bp->current_component 1066 * is unset. Thus the addition of the bp_is_user() check. 1067 * 1068 * @since BuddyPress (1.7) 1069 * 1070 * @package BuddyPress 1071 * @return bool True if it's a BuddyPress page, false otherwise 1072 */ 1073 function is_buddypress() { 1074 $retval = (bool) ( bp_current_component() || bp_is_user() ); 1075 1076 return apply_filters( 'is_buddypress', $retval ); 1077 } 1078 1058 1079 /** Components ****************************************************************/ 1059 1080
Note: See TracChangeset
for help on using the changeset viewer.