Skip to:
Content

BuddyPress.org

Ticket #8198: 8198.patch

File 8198.patch, 21.6 KB (added by sharaz, 5 years ago)
  • src/class-buddypress.php

    a b class BuddyPress { 
    118118
    119119                // Only run these methods if they haven't been run previously
    120120                if ( null === $instance ) {
    121                         $instance = new BuddyPress;
     121                        $instance = new BuddyPress();
    122122                        $instance->constants();
    123123                        $instance->setup_globals();
    124124                        $instance->legacy_constants();
    class BuddyPress { 
    141141         * @see BuddyPress::instance()
    142142         * @see buddypress()
    143143         */
    144         private function __construct() { /* Do nothing here */ }
     144        private function __construct() {
     145                /* Do nothing here */ }
    145146
    146147        /**
    147148         * A dummy magic method to prevent BuddyPress from being cloned.
    148149         *
    149150         * @since 1.7.0
    150151         */
    151         public function __clone() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'buddypress' ), '1.7' ); }
     152        public function __clone() {
     153                _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'buddypress' ), '1.7' ); }
    152154
    153155        /**
    154156         * A dummy magic method to prevent BuddyPress from being unserialized.
    155157         *
    156158         * @since 1.7.0
    157159         */
    158         public function __wakeup() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'buddypress' ), '1.7' ); }
     160        public function __wakeup() {
     161                _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'buddypress' ), '1.7' ); }
    159162
    160163        /**
    161164         * Magic method for checking the existence of a certain custom field.
    class BuddyPress { 
    166169         *
    167170         * @return bool
    168171         */
    169         public function __isset( $key ) { return isset( $this->data[$key] ); }
     172        public function __isset( $key ) {
     173                return isset( $this->data[ $key ] ); }
    170174
    171175        /**
    172176         * Magic method for getting BuddyPress variables.
    class BuddyPress { 
    177181         *
    178182         * @return mixed
    179183         */
    180         public function __get( $key ) { return isset( $this->data[$key] ) ? $this->data[$key] : null; }
     184        public function __get( $key ) {
     185                return isset( $this->data[ $key ] ) ? $this->data[ $key ] : null; }
    181186
    182187        /**
    183188         * Magic method for setting BuddyPress variables.
    class BuddyPress { 
    187192         * @param string $key   Key to set a value for.
    188193         * @param mixed  $value Value to set.
    189194         */
    190         public function __set( $key, $value ) { $this->data[$key] = $value; }
     195        public function __set( $key, $value ) {
     196                $this->data[ $key ] = $value; }
    191197
    192198        /**
    193199         * Magic method for unsetting BuddyPress variables.
    class BuddyPress { 
    196202         *
    197203         * @param string $key Key to unset a value for.
    198204         */
    199         public function __unset( $key ) { if ( isset( $this->data[$key] ) ) unset( $this->data[$key] ); }
     205        public function __unset( $key ) {
     206                if ( isset( $this->data[ $key ] ) ) {
     207                        unset( $this->data[ $key ] );
     208                } }
    200209
    201210        /**
    202211         * Magic method to prevent notices and errors from invalid method calls.
    class BuddyPress { 
    208217         *
    209218         * @return null
    210219         */
    211         public function __call( $name = '', $args = array() ) { unset( $name, $args ); return null; }
     220        public function __call( $name = '', $args = array() ) {
     221                unset( $name, $args );
     222                return null; }
    212223
    213224        /** Private Methods *******************************************************/
    214225
    class BuddyPress { 
    216227         * Bootstrap constants.
    217228         *
    218229         * @since 1.6.0
    219          *
    220230         */
    221231        private function constants() {
    222232
    223233                // Place your custom code (actions/filters) in a file called
    224234                // '/plugins/bp-custom.php' and it will be loaded before anything else.
    225235                if ( file_exists( WP_PLUGIN_DIR . '/bp-custom.php' ) ) {
    226                         require( WP_PLUGIN_DIR . '/bp-custom.php' );
     236                        require WP_PLUGIN_DIR . '/bp-custom.php';
    227237                }
    228238
    229239                // Path and URL
    class BuddyPress { 
    267277                                        // /wp-admin/includes/plugin.php file in order to use that function.
    268278
    269279                                        // get network-activated plugins
    270                                         $plugins = get_site_option( 'active_sitewide_plugins');
     280                                        $plugins = get_site_option( 'active_sitewide_plugins' );
    271281
    272282                                        // basename
    273283                                        $basename = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php';
    class BuddyPress { 
    278288                                                $root_blog_id = $current_site->blog_id;
    279289                                        }
    280290                                }
    281 
    282291                        }
    283292
    284293                        define( 'BP_ROOT_BLOG', $root_blog_id );
    class BuddyPress { 
    297306         * Component global variables.
    298307         *
    299308         * @since 1.6.0
    300          *
    301309         */
    302310        private function setup_globals() {
    303311
    304                 /** Versions **********************************************************/
     312                /** Versions */
    305313
    306314                $this->version    = '6.0.0-alpha';
    307315                $this->db_version = 12385;
    308316
    309                 /** Loading ***********************************************************/
     317                /** Loading */
    310318
    311319                /**
    312320                 * Should deprecated code be loaded?
    class BuddyPress { 
    316324                 */
    317325                $this->load_deprecated = false;
    318326
    319                 /** Toolbar ***********************************************************/
     327                /** Toolbar */
    320328
    321329                /**
    322330                 * @var string The primary toolbar ID.
    323331                 */
    324332                $this->my_account_menu_id = '';
    325333
    326                 /** URIs **************************************************************/
     334                /** URIs */
    327335
    328336                /**
    329337                 * @var int The current offset of the URI.
    class BuddyPress { 
    336344                 */
    337345                $this->no_status_set = false;
    338346
    339                 /** Components ********************************************************/
     347                /** Components */
    340348
    341349                /**
    342350                 * @var string Name of the current BuddyPress component (primary).
    class BuddyPress { 
    358366                 */
    359367                $this->is_single_item = false;
    360368
    361                 /** Root **************************************************************/
     369                /** Root */
    362370
    363371                /**
    364372                 * Filters the BuddyPress Root blog ID.
    class BuddyPress { 
    369377                 */
    370378                $this->root_blog_id = (int) apply_filters( 'bp_get_root_blog_id', BP_ROOT_BLOG );
    371379
    372                 /** Paths**************************************************************/
     380                /** Paths*/
    373381
    374382                // BuddyPress root directory
    375                 $this->file           = constant( 'BP_PLUGIN_DIR' ) . 'bp-loader.php';
    376                 $this->basename       = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php';
    377                 $this->plugin_dir     = trailingslashit( constant( 'BP_PLUGIN_DIR' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) );
    378                 $this->plugin_url     = trailingslashit( constant( 'BP_PLUGIN_URL' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) );
     383                $this->file       = constant( 'BP_PLUGIN_DIR' ) . 'bp-loader.php';
     384                $this->basename   = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php';
     385                $this->plugin_dir = trailingslashit( constant( 'BP_PLUGIN_DIR' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) );
     386                $this->plugin_url = trailingslashit( constant( 'BP_PLUGIN_URL' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) );
    379387
    380388                // Languages
    381                 $this->lang_dir       = $this->plugin_dir . 'bp-languages';
     389                $this->lang_dir = $this->plugin_dir . 'bp-languages';
    382390
    383391                // Templates (theme compatibility)
    384                 $this->themes_dir     = $this->plugin_dir . 'bp-templates';
    385                 $this->themes_url     = $this->plugin_url . 'bp-templates';
     392                $this->themes_dir = $this->plugin_dir . 'bp-templates';
     393                $this->themes_url = $this->plugin_url . 'bp-templates';
    386394
    387395                // Themes (for bp-default)
    388396                $this->old_themes_dir = $this->plugin_dir . 'bp-themes';
    389397                $this->old_themes_url = $this->plugin_url . 'bp-themes';
    390398
    391                 /** Theme Compat ******************************************************/
     399                /** Theme Compat */
    392400
    393                 $this->theme_compat   = new stdClass(); // Base theme compatibility class
    394                 $this->filters        = new stdClass(); // Used when adding/removing filters
     401                $this->theme_compat = new stdClass(); // Base theme compatibility class
     402                $this->filters      = new stdClass(); // Used when adding/removing filters
    395403
    396                 /** Users *************************************************************/
     404                /** Users */
    397405
    398406                $this->current_user   = new stdClass();
    399407                $this->displayed_user = new stdClass();
    400408
    401                 /** Post types and taxonomies *****************************************/
     409                /** Post types and taxonomies */
    402410
    403411                /**
    404412                 * Filters the post type slug for the email component.
    class BuddyPress { 
    407415                 *
    408416                 * @param string $value Email post type slug.
    409417                 */
    410                 $this->email_post_type     = apply_filters( 'bp_email_post_type', 'bp-email' );
     418                $this->email_post_type = apply_filters( 'bp_email_post_type', 'bp-email' );
    411419
    412420                /**
    413421                 * Filters the taxonomy slug for the email type component.
    class BuddyPress { 
    449457         * Include required files.
    450458         *
    451459         * @since 1.6.0
    452          *
    453460         */
    454461        private function includes() {
    455462                spl_autoload_register( array( $this, 'autoload' ) );
    456463
    457464                // Load the WP abstraction file so BuddyPress can run on all WordPress setups.
    458                 require( $this->plugin_dir . 'bp-core/bp-core-wpabstraction.php' );
     465                require $this->plugin_dir . 'bp-core/bp-core-wpabstraction.php';
    459466
    460467                // Setup the versions (after we include multisite abstraction above)
    461468                $this->versions();
    462469
    463                 /** Update/Install ****************************************************/
     470                /** Update/Install */
    464471
    465472                // Theme compatibility
    466                 require( $this->plugin_dir . 'bp-core/bp-core-template-loader.php'     );
    467                 require( $this->plugin_dir . 'bp-core/bp-core-theme-compatibility.php' );
     473                require $this->plugin_dir . 'bp-core/bp-core-template-loader.php';
     474                require $this->plugin_dir . 'bp-core/bp-core-theme-compatibility.php';
    468475
    469476                // Require all of the BuddyPress core libraries
    470                 require( $this->plugin_dir . 'bp-core/bp-core-dependency.php'       );
    471                 require( $this->plugin_dir . 'bp-core/bp-core-actions.php'          );
    472                 require( $this->plugin_dir . 'bp-core/bp-core-caps.php'             );
    473                 require( $this->plugin_dir . 'bp-core/bp-core-cache.php'            );
    474                 require( $this->plugin_dir . 'bp-core/bp-core-cssjs.php'            );
    475                 require( $this->plugin_dir . 'bp-core/bp-core-update.php'           );
    476                 require( $this->plugin_dir . 'bp-core/bp-core-options.php'          );
    477                 require( $this->plugin_dir . 'bp-core/bp-core-taxonomy.php'         );
    478                 require( $this->plugin_dir . 'bp-core/bp-core-filters.php'          );
    479                 require( $this->plugin_dir . 'bp-core/bp-core-attachments.php'      );
    480                 require( $this->plugin_dir . 'bp-core/bp-core-avatars.php'          );
    481                 require( $this->plugin_dir . 'bp-core/bp-core-widgets.php'          );
    482                 require( $this->plugin_dir . 'bp-core/bp-core-template.php'         );
    483                 require( $this->plugin_dir . 'bp-core/bp-core-adminbar.php'         );
    484                 require( $this->plugin_dir . 'bp-core/bp-core-buddybar.php'         );
    485                 require( $this->plugin_dir . 'bp-core/bp-core-catchuri.php'         );
    486                 require( $this->plugin_dir . 'bp-core/bp-core-functions.php'        );
    487                 require( $this->plugin_dir . 'bp-core/bp-core-moderation.php'       );
    488                 require( $this->plugin_dir . 'bp-core/bp-core-loader.php'           );
    489                 require( $this->plugin_dir . 'bp-core/bp-core-customizer-email.php' );
    490                 require( $this->plugin_dir . 'bp-core/bp-core-rest-api.php'         );
     477                require $this->plugin_dir . 'bp-core/bp-core-dependency.php';
     478                require $this->plugin_dir . 'bp-core/bp-core-actions.php';
     479                require $this->plugin_dir . 'bp-core/bp-core-caps.php';
     480                require $this->plugin_dir . 'bp-core/bp-core-cache.php';
     481                require $this->plugin_dir . 'bp-core/bp-core-cssjs.php';
     482                require $this->plugin_dir . 'bp-core/bp-core-update.php';
     483                require $this->plugin_dir . 'bp-core/bp-core-options.php';
     484                require $this->plugin_dir . 'bp-core/bp-core-taxonomy.php';
     485                require $this->plugin_dir . 'bp-core/bp-core-filters.php';
     486                require $this->plugin_dir . 'bp-core/bp-core-attachments.php';
     487                require $this->plugin_dir . 'bp-core/bp-core-avatars.php';
     488                require $this->plugin_dir . 'bp-core/bp-core-widgets.php';
     489                require $this->plugin_dir . 'bp-core/bp-core-template.php';
     490                require $this->plugin_dir . 'bp-core/bp-core-adminbar.php';
     491                require $this->plugin_dir . 'bp-core/bp-core-buddybar.php';
     492                require $this->plugin_dir . 'bp-core/bp-core-catchuri.php';
     493                require $this->plugin_dir . 'bp-core/bp-core-functions.php';
     494                require $this->plugin_dir . 'bp-core/bp-core-moderation.php';
     495                require $this->plugin_dir . 'bp-core/bp-core-loader.php';
     496                require $this->plugin_dir . 'bp-core/bp-core-customizer-email.php';
     497                require $this->plugin_dir . 'bp-core/bp-core-rest-api.php';
    491498
    492499                // Maybe load deprecated functionality (this double negative is proof positive!)
    493500                if ( ! bp_get_option( '_bp_ignore_deprecated_code', ! $this->load_deprecated ) ) {
    494                         require( $this->plugin_dir . 'bp-core/deprecated/1.2.php' );
    495                         require( $this->plugin_dir . 'bp-core/deprecated/1.5.php' );
    496                         require( $this->plugin_dir . 'bp-core/deprecated/1.6.php' );
    497                         require( $this->plugin_dir . 'bp-core/deprecated/1.7.php' );
    498                         require( $this->plugin_dir . 'bp-core/deprecated/1.9.php' );
    499                         require( $this->plugin_dir . 'bp-core/deprecated/2.0.php' );
    500                         require( $this->plugin_dir . 'bp-core/deprecated/2.1.php' );
    501                         require( $this->plugin_dir . 'bp-core/deprecated/2.2.php' );
    502                         require( $this->plugin_dir . 'bp-core/deprecated/2.3.php' );
    503                         require( $this->plugin_dir . 'bp-core/deprecated/2.4.php' );
    504                         require( $this->plugin_dir . 'bp-core/deprecated/2.5.php' );
    505                         require( $this->plugin_dir . 'bp-core/deprecated/2.6.php' );
    506                         require( $this->plugin_dir . 'bp-core/deprecated/2.7.php' );
    507                         require( $this->plugin_dir . 'bp-core/deprecated/2.8.php' );
    508                         require( $this->plugin_dir . 'bp-core/deprecated/2.9.php' );
    509                         require( $this->plugin_dir . 'bp-core/deprecated/3.0.php' );
    510                         require( $this->plugin_dir . 'bp-core/deprecated/4.0.php' );
     501                        require $this->plugin_dir . 'bp-core/deprecated/1.2.php';
     502                        require $this->plugin_dir . 'bp-core/deprecated/1.5.php';
     503                        require $this->plugin_dir . 'bp-core/deprecated/1.6.php';
     504                        require $this->plugin_dir . 'bp-core/deprecated/1.7.php';
     505                        require $this->plugin_dir . 'bp-core/deprecated/1.9.php';
     506                        require $this->plugin_dir . 'bp-core/deprecated/2.0.php';
     507                        require $this->plugin_dir . 'bp-core/deprecated/2.1.php';
     508                        require $this->plugin_dir . 'bp-core/deprecated/2.2.php';
     509                        require $this->plugin_dir . 'bp-core/deprecated/2.3.php';
     510                        require $this->plugin_dir . 'bp-core/deprecated/2.4.php';
     511                        require $this->plugin_dir . 'bp-core/deprecated/2.5.php';
     512                        require $this->plugin_dir . 'bp-core/deprecated/2.6.php';
     513                        require $this->plugin_dir . 'bp-core/deprecated/2.7.php';
     514                        require $this->plugin_dir . 'bp-core/deprecated/2.8.php';
     515                        require $this->plugin_dir . 'bp-core/deprecated/2.9.php';
     516                        require $this->plugin_dir . 'bp-core/deprecated/3.0.php';
     517                        require $this->plugin_dir . 'bp-core/deprecated/4.0.php';
    511518                }
    512519
    513520                // Load wp-cli module if PHP 5.4+
    514521                if ( defined( 'WP_CLI' ) && file_exists( $this->plugin_dir . 'cli/wp-cli-bp.php' ) && version_compare( phpversion(), '5.4.0', '>=' ) ) {
    515                         require( $this->plugin_dir . 'cli/wp-cli-bp.php' );
     522                        require $this->plugin_dir . 'cli/wp-cli-bp.php';
    516523                }
    517524        }
    518525
    class BuddyPress { 
    545552
    546553                // These classes don't have a name that matches their component.
    547554                $irregular_map = array(
    548                         'BP_Akismet'                => 'activity',
    549                         'BP_REST_Activity_Endpoint' => 'activity',
     555                        'BP_Akismet'                                 => 'activity',
     556                        'BP_REST_Activity_Endpoint'                  => 'activity',
    550557
    551558                        'BP_Admin'                                   => 'core',
    552559                        'BP_Attachment_Avatar'                       => 'core',
    class BuddyPress { 
    580587                        'BP_REST_Attachments_Member_Avatar_Endpoint' => 'core',
    581588                        'BP_REST_Attachments_Group_Avatar_Endpoint'  => 'core',
    582589
    583                         'BP_Core_Friends_Widget' => 'friends',
     590                        'BP_Core_Friends_Widget'                     => 'friends',
    584591
    585                         'BP_Group_Extension'                        => 'groups',
    586                         'BP_Group_Member_Query'                     => 'groups',
    587                         'BP_REST_Groups_Endpoint'                   => 'groups',
    588                         'BP_REST_Group_Membership_Endpoint'         => 'groups',
    589                         'BP_REST_Group_Invites_Endpoint'            => 'groups',
    590                         'BP_REST_Group_Membership_Request_Endpoint' => 'groups',
     592                        'BP_Group_Extension'                         => 'groups',
     593                        'BP_Group_Member_Query'                      => 'groups',
     594                        'BP_REST_Groups_Endpoint'                    => 'groups',
     595                        'BP_REST_Group_Membership_Endpoint'          => 'groups',
     596                        'BP_REST_Group_Invites_Endpoint'             => 'groups',
     597                        'BP_REST_Group_Membership_Request_Endpoint'  => 'groups',
    591598
    592                         'BP_Core_Members_Template'       => 'members',
    593                         'BP_Core_Members_Widget'         => 'members',
    594                         'BP_Core_Recently_Active_Widget' => 'members',
    595                         'BP_Core_Whos_Online_Widget'     => 'members',
    596                         'BP_Registration_Theme_Compat'   => 'members',
    597                         'BP_Signup'                      => 'members',
    598                         'BP_REST_Members_Endpoint'       => 'members',
     599                        'BP_Core_Members_Template'                   => 'members',
     600                        'BP_Core_Members_Widget'                     => 'members',
     601                        'BP_Core_Recently_Active_Widget'             => 'members',
     602                        'BP_Core_Whos_Online_Widget'                 => 'members',
     603                        'BP_Registration_Theme_Compat'               => 'members',
     604                        'BP_Signup'                                  => 'members',
     605                        'BP_REST_Members_Endpoint'                   => 'members',
    599606
    600                         'BP_REST_Messages_Endpoint' => 'messages',
     607                        'BP_REST_Messages_Endpoint'                  => 'messages',
    601608
    602                         'BP_REST_Notifications_Endpoint' => 'notifications',
     609                        'BP_REST_Notifications_Endpoint'             => 'notifications',
    603610
    604                         'BP_REST_XProfile_Fields_Endpoint'       => 'xprofile',
    605                         'BP_REST_XProfile_Field_Groups_Endpoint' => 'xprofile',
    606                         'BP_REST_XProfile_Data_Endpoint'         => 'xprofile',
     611                        'BP_REST_XProfile_Fields_Endpoint'           => 'xprofile',
     612                        'BP_REST_XProfile_Field_Groups_Endpoint'     => 'xprofile',
     613                        'BP_REST_XProfile_Data_Endpoint'             => 'xprofile',
    607614                );
    608615
    609616                $component = null;
    class BuddyPress { 
    612619                if ( isset( $irregular_map[ $class ] ) ) {
    613620                        $component = $irregular_map[ $class ];
    614621
    615                 // Next chunk is usually the component name.
     622                        // Next chunk is usually the component name.
    616623                } elseif ( in_array( $class_parts[1], $components, true ) ) {
    617624                        $component = $class_parts[1];
    618625                }
    class BuddyPress { 
    654661         * Set up the default hooks and actions.
    655662         *
    656663         * @since 1.6.0
    657          *
    658664         */
    659665        private function setup_actions() {
    660666
    661667                // Add actions to plugin activation and deactivation hooks
    662                 add_action( 'activate_'   . $this->basename, 'bp_activation'  );
     668                add_action( 'activate_' . $this->basename, 'bp_activation' );
    663669                add_action( 'deactivate_' . $this->basename, 'bp_deactivation' );
    664670
    665671                // If BuddyPress is being deactivated, do not add any actions
    class BuddyPress { 
    679685                        'register_theme_packages',  // Register bundled theme packages (bp-themes)
    680686                        'load_textdomain',          // Load textdomain
    681687                        'add_rewrite_tags',         // Add rewrite tags
    682                         'generate_rewrite_rules'    // Generate rewrite rules
     688                        'generate_rewrite_rules',    // Generate rewrite rules
    683689                );
    684690
    685691                // Add the actions
    686                 foreach( $actions as $class_action ) {
     692                foreach ( $actions as $class_action ) {
    687693                        if ( method_exists( $this, $class_action ) ) {
    688694                                add_action( 'bp_' . $class_action, array( $this, $class_action ), 5 );
    689695                        }
    class BuddyPress { 
    713719                $versions['1.6-single'] = get_blog_option( $this->root_blog_id, '_bp_db_version' );
    714720
    715721                // 1.6-single exists, so trust it
    716                 if ( !empty( $versions['1.6-single'] ) ) {
     722                if ( ! empty( $versions['1.6-single'] ) ) {
    717723                        $this->db_version_raw = (int) $versions['1.6-single'];
    718724
    719                 // If no 1.6-single exists, use the max of the others
     725                        // If no 1.6-single exists, use the max of the others
    720726                } else {
    721                         $versions['1.2']        = get_site_option(                      'bp-core-db-version' );
    722                         $versions['1.5-multi']  = get_site_option(                           'bp-db-version' );
    723                         $versions['1.6-multi']  = get_site_option(                          '_bp_db_version' );
    724                         $versions['1.5-single'] = get_blog_option( $this->root_blog_id,      'bp-db-version' );
     727                        $versions['1.2']        = get_site_option( 'bp-core-db-version' );
     728                        $versions['1.5-multi']  = get_site_option( 'bp-db-version' );
     729                        $versions['1.6-multi']  = get_site_option( '_bp_db_version' );
     730                        $versions['1.5-single'] = get_blog_option( $this->root_blog_id, 'bp-db-version' );
    725731
    726732                        // Remove empty array items
    727733                        $versions             = array_filter( $versions );
    728                         $this->db_version_raw = (int) ( !empty( $versions ) ) ? (int) max( $versions ) : 0;
     734                        $this->db_version_raw = (int) ( ! empty( $versions ) ) ? (int) max( $versions ) : 0;
    729735                }
    730736        }
    731737
    class BuddyPress { 
    765771        public function register_theme_packages() {
    766772
    767773                // Register the default theme compatibility package
    768                 bp_register_theme_package( array(
    769                         'id'      => 'legacy',
    770                         'name'    => __( 'BuddyPress Legacy', 'buddypress' ),
    771                         'version' => bp_get_version(),
    772                         'dir'     => trailingslashit( $this->themes_dir . '/bp-legacy' ),
    773                         'url'     => trailingslashit( $this->themes_url . '/bp-legacy' )
    774                 ) );
    775 
    776                 bp_register_theme_package( array(
    777                         'id'      => 'nouveau',
    778                         'name'    => __( 'BuddyPress Nouveau', 'buddypress' ),
    779                         'version' => bp_get_version(),
    780                         'dir'     => trailingslashit( $this->themes_dir . '/bp-nouveau' ),
    781                         'url'     => trailingslashit( $this->themes_url . '/bp-nouveau' )
    782                 ) );
     774                bp_register_theme_package(
     775                        array(
     776                                'id'      => 'legacy',
     777                                'name'    => __( 'BuddyPress Legacy', 'buddypress' ),
     778                                'version' => bp_get_version(),
     779                                'dir'     => trailingslashit( $this->themes_dir . '/bp-legacy' ),
     780                                'url'     => trailingslashit( $this->themes_url . '/bp-legacy' ),
     781                        )
     782                );
     783
     784                bp_register_theme_package(
     785                        array(
     786                                'id'      => 'nouveau',
     787                                'name'    => __( 'BuddyPress Nouveau', 'buddypress' ),
     788                                'version' => bp_get_version(),
     789                                'dir'     => trailingslashit( $this->themes_dir . '/bp-nouveau' ),
     790                                'url'     => trailingslashit( $this->themes_url . '/bp-nouveau' ),
     791                        )
     792                );
    783793
    784794                // Register the basic theme stack. This is really dope.
    785795                bp_register_template_stack( 'get_stylesheet_directory', 10 );
    786                 bp_register_template_stack( 'get_template_directory',   12 );
    787                 bp_register_template_stack( 'bp_get_theme_compat_dir',  14 );
     796                bp_register_template_stack( 'get_template_directory', 12 );
     797                bp_register_template_stack( 'bp_get_theme_compat_dir', 14 );
    788798        }
    789799
    790800        /**