Skip to:
Content

BuddyPress.org

Changeset 11929


Ignore:
Timestamp:
04/02/2018 04:37:09 AM (7 years ago)
Author:
r-a-y
Message:

XProfile: Load activity, notifications, and settings files if active.

Benefits those that do not have those components active.

See #7218.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php

    r11928 r11929  
    6868            'cssjs',
    6969            'cache',
    70             'activity',
    7170            'caps',
    7271            'filters',
    73             'settings',
    7472            'template',
    7573            'functions',
    76             'notifications',
    77         );
    78 
     74        );
     75
     76        // Conditional includes.
     77        if ( bp_is_active( 'activity' ) ) {
     78            $includes[] = 'activity';
     79        }
     80        if ( bp_is_active( 'notifications' ) ) {
     81            $includes[] = 'notifications';
     82        }
     83        if ( bp_is_active( 'settings' ) ) {
     84            $includes[] = 'settings';
     85        }
    7986        if ( is_admin() ) {
    8087            $includes[] = 'admin';
Note: See TracChangeset for help on using the changeset viewer.