Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/15/2015 07:57:03 PM (9 years ago)
Author:
tw2113
Message:

[Samus Aran]
I first battled the documentation inconsistencies on planet Zebes. It was there that I foiled the plans of the
Space Pirate leader Mother Brain to use the issues to attack galactic civilization...

I next fought the inconsistencies on their homeworld SR388. I completely eradicated them except for an @since tag,
which after hatching followed me like a confused child...

I personally delivered it to the Galactic Research Station at Ceres so scientists could study its energy production qualities...

The scientists' findings were astounding! They discovered that the powers of the docs inconsistencies
might be harnessed for the good of galactic civilization!

Satisfied that all was well, I left the station to seek a new bounty to hunt. But, I had hardly gone beyond the asteroid
belt when I picked up a distress signal!

Ceres station was under attack!

More documentation cleanup for part of BP-Core component.

See #6398.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-loader.php

    r10108 r10356  
    1212defined( 'ABSPATH' ) || exit;
    1313
     14/**
     15 * Creates the Core component.
     16 */
    1417class BP_Core extends BP_Component {
    1518
     
    5154        do_action( 'bp_core_loaded' );
    5255
    53         /** Components ********************************************************/
     56        /** Components *******************************************************
     57         */
    5458
    5559        /**
     
    7175        $bp->required_components = apply_filters( 'bp_required_components', array( 'members' ) );
    7276
    73         // Get a list of activated components
     77        // Get a list of activated components.
    7478        if ( $active_components = bp_get_option( 'bp-active-components' ) ) {
    7579
     
    8690            $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 ) ) ) );
    8791
    88         // Pre 1.5 Backwards compatibility
     92        // Pre 1.5 Backwards compatibility.
    8993        } elseif ( $deactivated_components = bp_get_option( 'bp-deactivated-components' ) ) {
    9094
    91             // Trim off namespace and filename
     95            // Trim off namespace and filename.
    9296            foreach ( array_keys( (array) $deactivated_components ) as $component ) {
    9397                $trimmed[] = str_replace( '.php', '', str_replace( 'bp-', '', $component ) );
     
    97101            $bp->deactivated_components = apply_filters( 'bp_deactivated_components', $trimmed );
    98102
    99             // Setup the active components
     103            // Setup the active components.
    100104            $active_components     = array_fill_keys( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_values( $bp->deactivated_components ) ), '1' );
    101105
     
    103107            $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components );
    104108
    105         // Default to all components active
     109        // Default to all components active.
    106110        } else {
    107111
    108             // Set globals
     112            // Set globals.
    109113            $bp->deactivated_components = array();
    110114
    111             // Setup the active components
     115            // Setup the active components.
    112116            $active_components     = array_fill_keys( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), '1' );
    113117
     
    116120        }
    117121
    118         // Loop through optional components
     122        // Loop through optional components.
    119123        foreach( $bp->optional_components as $component ) {
    120124            if ( bp_is_active( $component ) && file_exists( $bp->plugin_dir . '/bp-' . $component . '/bp-' . $component . '-loader.php' ) ) {
     
    123127        }
    124128
    125         // Loop through required components
     129        // Loop through required components.
    126130        foreach( $bp->required_components as $component ) {
    127131            if ( file_exists( $bp->plugin_dir . '/bp-' . $component . '/bp-' . $component . '-loader.php' ) ) {
     
    130134        }
    131135
    132         // Add Core to required components
     136        // Add Core to required components.
    133137        $bp->required_components[] = 'core';
    134138
     
    176180        $bp = buddypress();
    177181
    178         /** Database **********************************************************/
    179 
    180         // Get the base database prefix
     182        /** Database *********************************************************
     183         */
     184
     185        // Get the base database prefix.
    181186        if ( empty( $bp->table_prefix ) ) {
    182187            $bp->table_prefix = bp_core_get_table_prefix();
    183188        }
    184189
    185         // The domain for the root of the site where the main blog resides
     190        // The domain for the root of the site where the main blog resides.
    186191        if ( empty( $bp->root_domain ) ) {
    187192            $bp->root_domain = bp_core_get_root_domain();
    188193        }
    189194
    190         // Fetches all of the core BuddyPress settings in one fell swoop
     195        // Fetches all of the core BuddyPress settings in one fell swoop.
    191196        if ( empty( $bp->site_options ) ) {
    192197            $bp->site_options = bp_core_get_root_options();
    193198        }
    194199
    195         // The names of the core WordPress pages used to display BuddyPress content
     200        // The names of the core WordPress pages used to display BuddyPress content.
    196201        if ( empty( $bp->pages ) ) {
    197202            $bp->pages = bp_core_get_directory_pages();
    198203        }
    199204
    200         /** Basic current user data *******************************************/
    201 
    202         // Logged in user is the 'current_user'
     205        /** Basic current user data ******************************************
     206         */
     207
     208        // Logged in user is the 'current_user'.
    203209        $current_user            = wp_get_current_user();
    204210
     
    207213        $bp->loggedin_user->id   = isset( $current_user->ID ) ? $current_user->ID : 0;
    208214
    209         /** Avatars ***********************************************************/
    210 
    211         // Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar
     215        /** Avatars **********************************************************
     216         */
     217
     218        // Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar.
    212219        $bp->grav_default        = new stdClass;
    213220
     
    271278    public function setup_cache_groups() {
    272279
    273         // Global groups
     280        // Global groups.
    274281        wp_cache_add_global_groups( array(
    275282            'bp'
Note: See TracChangeset for help on using the changeset viewer.