Changeset 9597
- Timestamp:
- 03/05/2015 05:08:16 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-loader.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-loader.php
r9351 r9597 44 44 45 45 /** 46 * At this point in the stack, BuddyPress core has been loaded but47 * individual components (friends/activity/groups/etc...) have not.48 * 49 * The 'bp_core_loaded' action lets you execute code ahead of the50 * other components.46 * Fires before the loading of individual components and after BuddyPress Core. 47 * 48 * Allows plugins to run code ahead of the other components. 49 * 50 * @since BuddyPress (1.2.0) 51 51 */ 52 52 do_action( 'bp_core_loaded' ); … … 54 54 /** Components ********************************************************/ 55 55 56 // Set the included and optional components. 56 /** 57 * Filters the included and optional components. 58 * 59 * @since BuddyPress (1.5.0) 60 * 61 * @param array $value Array of included and optional components. 62 */ 57 63 $bp->optional_components = apply_filters( 'bp_optional_components', array( 'activity', 'blogs', 'forums', 'friends', 'groups', 'messages', 'notifications', 'settings', 'xprofile' ) ); 58 64 59 // Set the required components 65 /** 66 * Filters the required components. 67 * 68 * @since BuddyPress (1.5.0) 69 * 70 * @param array $value Array of required components. 71 */ 60 72 $bp->required_components = apply_filters( 'bp_required_components', array( 'members' ) ); 61 73 62 74 // Get a list of activated components 63 75 if ( $active_components = bp_get_option( 'bp-active-components' ) ) { 76 77 /** This filter is documented in bp-core/admin/bp-core-admin-components.php */ 64 78 $bp->active_components = apply_filters( 'bp_active_components', $active_components ); 79 80 /** 81 * Filters the deactivated components. 82 * 83 * @since BuddyPress (1.0.0) 84 * 85 * @param array $value Array of deactivated components. 86 */ 65 87 $bp->deactivated_components = apply_filters( 'bp_deactivated_components', array_values( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_keys( $bp->active_components ) ) ) ); 66 88 … … 73 95 } 74 96 75 / / Set globals97 /** This filter is documented in bp-core/bp-core-loader.php */ 76 98 $bp->deactivated_components = apply_filters( 'bp_deactivated_components', $trimmed ); 77 99 … … 79 101 $active_components = array_fill_keys( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_values( $bp->deactivated_components ) ), '1' ); 80 102 81 / / Set the active component global103 /** This filter is documented in bp-core/admin/bp-core-admin-components.php */ 82 104 $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components ); 83 105 … … 91 113 $active_components = array_fill_keys( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), '1' ); 92 114 93 / / Set the active component global115 /** This filter is documented in bp-core/admin/bp-core-admin-components.php */ 94 116 $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components ); 95 117 } … … 112 134 $bp->required_components[] = 'core'; 113 135 136 /** 137 * Fires after the loading of individual components. 138 * 139 * @since BuddyPress (2.0.0) 140 */ 114 141 do_action( 'bp_core_components_included' ); 115 142 } … … 180 207 // Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar 181 208 $bp->grav_default = new stdClass; 209 210 /** 211 * Filters the default user Gravatar. 212 * 213 * @since BuddyPress (1.1.0) 214 * 215 * @param string $value Default user Gravatar. 216 */ 182 217 $bp->grav_default->user = apply_filters( 'bp_user_gravatar_default', $bp->site_options['avatar_default'] ); 218 219 /** 220 * Filters the default group Gravatar. 221 * 222 * @since BuddyPress (1.1.0) 223 * 224 * @param string $value Default group Gravatar. 225 */ 183 226 $bp->grav_default->group = apply_filters( 'bp_group_gravatar_default', $bp->grav_default->user ); 227 228 /** 229 * Filters the default blog Gravatar. 230 * 231 * @since BuddyPress (1.1.0) 232 * 233 * @param string $value Default blog Gravatar. 234 */ 184 235 $bp->grav_default->blog = apply_filters( 'bp_blog_gravatar_default', $bp->grav_default->user ); 185 236 … … 201 252 bp_update_is_item_mod( false, 'core' ); 202 253 254 /** 255 * Fires at the end of the setup of bp-core globals setting. 256 * 257 * @since BuddyPress (1.1.0) 258 */ 203 259 do_action( 'bp_core_setup_globals' ); 204 260 }
Note: See TracChangeset
for help on using the changeset viewer.