Changeset 6783 for trunk/bp-core/bp-core-template.php
- Timestamp:
- 02/11/2013 02:01:12 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r6697 r6783 1142 1142 } 1143 1143 1144 /** 1145 * Is the current component an active core component. 1146 * 1147 * Use this function when you need to check if the current component is an 1148 * active core component of BuddyPress. If the current component is inactive, it 1149 * will return false. If the current component is not part of BuddyPress core, 1150 * it will return false. If the current component is active, and is part of 1151 * BuddyPress core, it will return true. 1152 * 1153 * @since BuddyPress (1.7) 1154 * @return boolean 1155 */ 1156 function bp_is_current_component_core() { 1157 $retval = false; 1158 $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) ); 1159 1160 foreach ( array_keys( $active_components ) as $active_component ) { 1161 if ( bp_is_current_component( $active_component ) ) { 1162 $retval = true; 1163 break; 1164 } 1165 } 1166 1167 return $retval; 1168 } 1169 1144 1170 /** Activity ******************************************************************/ 1145 1171
Note: See TracChangeset
for help on using the changeset viewer.