Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/03/2012 12:33:13 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Theme Compatibility:

  • First pass at including theme compatibility into BuddyPress.
  • Introduce dependency, theme-compatibility, template-loader files into Core component.
  • Add theme compatibility classes for components with direct template access.
  • Move actions and filters around for improved plugin dependency.
  • Remove old $bbp references.
  • Turn $bp global into byref singleton, and include methods for setting up theme compatibility. (Fixes #4470.)
  • Add is_buddypress() function to bp-core-template.php.
  • Rename incorrectly named bp_after_theme_setup sub-action.
  • See: #3741.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-template.php

    r6259 r6285  
    10561056}
    10571057
     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 */
     1073function is_buddypress() {
     1074    $retval = (bool) ( bp_current_component() || bp_is_user() );
     1075
     1076    return apply_filters( 'is_buddypress', $retval );
     1077}
     1078
    10581079/** Components ****************************************************************/
    10591080
Note: See TracChangeset for help on using the changeset viewer.