Skip to:
Content

BuddyPress.org

Changeset 10652


Ignore:
Timestamp:
03/10/2016 07:45:07 PM (8 years ago)
Author:
boonebgorges
Message:

Autoload BuddyPress classes.

Backward compatibility with SPL-disabled installations is included.

See #6853.

Location:
trunk/src
Files:
47 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-admin.php

    r10613 r10652  
    1717if ( !class_exists( 'WP_List_Table' ) ) require( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
    1818
    19 require dirname( __FILE__ ) . '/classes/class-bp-activity-list-table.php';
     19if ( ! buddypress()->do_autoload ) {
     20    require dirname( __FILE__ ) . '/classes/class-bp-activity-list-table.php';
     21}
    2022
    2123// Per_page screen option. Has to be hooked in extremely early.
  • trunk/src/bp-activity/bp-activity-akismet.php

    r10516 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-akismet.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-akismet.php';
     15}
    1416
    1517/**
  • trunk/src/bp-activity/bp-activity-loader.php

    r10516 r10652  
    1313defined( 'ABSPATH' ) || exit;
    1414
    15 require dirname( __FILE__ ) . '/classes/class-bp-activity-component.php';
     15if ( ! buddypress()->do_autoload ) {
     16    require dirname( __FILE__ ) . '/classes/class-bp-activity-component.php';
     17}
    1618
    1719/**
  • trunk/src/bp-activity/bp-activity-screens.php

    r10516 r10652  
    1515defined( 'ABSPATH' ) || exit;
    1616
    17 require dirname( __FILE__ ) . '/classes/class-bp-activity-theme-compat.php';
     17if ( ! buddypress()->do_autoload ) {
     18    require dirname( __FILE__ ) . '/classes/class-bp-activity-theme-compat.php';
     19}
    1820
    1921/**
  • trunk/src/bp-activity/bp-activity-template.php

    r10542 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-activity-template.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-activity-template.php';
     15}
    1416
    1517/**
  • trunk/src/bp-activity/classes/class-bp-activity-component.php

    r10555 r10652  
    5454            'screens',
    5555            'filters',
    56             'classes',
    5756            'template',
    5857            'functions',
     
    6059            'cache'
    6160        );
     61
     62        if ( ! buddypress()->do_autoload ) {
     63            $includes[] = 'classes';
     64        }
    6265
    6366        // Load Akismet support if Akismet is configured.
  • trunk/src/bp-blogs/bp-blogs-loader.php

    r10517 r10652  
    1515defined( 'ABSPATH' ) || exit;
    1616
    17 require dirname( __FILE__ ) . '/classes/class-bp-blogs-component.php';
     17if ( ! buddypress()->do_autoload ) {
     18    require dirname( __FILE__ ) . '/classes/class-bp-blogs-component.php';
     19}
    1820
    1921/**
  • trunk/src/bp-blogs/bp-blogs-screens.php

    r10517 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-blogs-theme-compat.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-blogs-theme-compat.php';
     15}
    1416
    1517/**
  • trunk/src/bp-blogs/bp-blogs-template.php

    r10517 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-blogs-template.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-blogs-template.php';
     15}
    1416
    1517/**
  • trunk/src/bp-blogs/bp-blogs-widgets.php

    r10517 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-blogs-recent-posts-widget.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-blogs-recent-posts-widget.php';
     15}
    1416
    1517/**
  • trunk/src/bp-blogs/classes/class-bp-blogs-component.php

    r10555 r10652  
    123123            'actions',
    124124            'screens',
    125             'classes',
    126125            'template',
    127126            'filters',
    128127            'functions',
    129128        );
     129
     130        if ( ! buddypress()->do_autoload ) {
     131            $includes[] = 'classes';
     132        }
    130133
    131134        if ( bp_is_active( 'activity' ) ) {
  • trunk/src/bp-core/bp-core-admin.php

    r10518 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-admin.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-admin.php';
     15}
    1416
    1517/**
  • trunk/src/bp-core/bp-core-component.php

    r10527 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-component.php';
     13if ( ! class_exists( 'BP_Component' ) ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-component.php';
     15}
  • trunk/src/bp-core/bp-core-customizer-email.php

    r10613 r10652  
    4848     * BP_Customizer_Control_Range class.
    4949     */
    50     require_once dirname( __FILE__ ) . '/classes/class-bp-customizer-control-range.php';
     50    if ( ! buddypress()->do_autoload ) {
     51        require_once dirname( __FILE__ ) . '/classes/class-bp-customizer-control-range.php';
     52    }
    5153
    5254    /**
  • trunk/src/bp-core/bp-core-loader.php

    r10518 r10652  
    1313defined( 'ABSPATH' ) || exit;
    1414
    15 require dirname( __FILE__ ) . '/classes/class-bp-core.php';
     15if ( ! buddypress()->do_autoload ) {
     16    require dirname( __FILE__ ) . '/classes/class-bp-component.php';
     17    require dirname( __FILE__ ) . '/classes/class-bp-core.php';
     18}
    1619
    1720/**
  • trunk/src/bp-core/bp-core-theme-compatibility.php

    r10528 r10652  
    2525/** Base Class ****************************************************************/
    2626
    27 require dirname( __FILE__ ) . '/classes/class-bp-theme-compat.php';
     27if ( ! buddypress()->do_autoload ) {
     28    require dirname( __FILE__ ) . '/classes/class-bp-theme-compat.php';
     29}
    2830
    2931/** Functions *****************************************************************/
  • trunk/src/bp-core/bp-core-widgets.php

    r10518 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-core-login-widget.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-core-login-widget.php';
     15}
    1416
    1517/**
  • trunk/src/bp-core/classes/class-bp-admin.php

    r10621 r10652  
    121121     */
    122122    private function includes() {
    123         require( $this->admin_dir . 'bp-core-admin-classes.php'    );
     123        if ( ! buddypress()->do_autoload ) {
     124            require( $this->admin_dir . 'bp-core-admin-classes.php'    );
     125        }
     126
    124127        require( $this->admin_dir . 'bp-core-admin-actions.php'    );
    125128        require( $this->admin_dir . 'bp-core-admin-settings.php'   );
  • trunk/src/bp-friends/bp-friends-loader.php

    r10587 r10652  
    1313defined( 'ABSPATH' ) || exit;
    1414
    15 require dirname( __FILE__ ) . '/classes/class-bp-friends-component.php';
     15if ( ! buddypress()->do_autoload ) {
     16    require dirname( __FILE__ ) . '/classes/class-bp-friends-component.php';
     17}
    1618
    1719/**
  • trunk/src/bp-friends/bp-friends-widgets.php

    r10529 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-core-friends-widget.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-core-friends-widget.php';
     15}
    1416
    1517/**
  • trunk/src/bp-friends/classes/class-bp-friends-component.php

    r10587 r10652  
    5151            'screens',
    5252            'filters',
    53             'classes',
    5453            'activity',
    5554            'template',
     
    5857            'widgets',
    5958        );
     59
     60        if ( ! buddypress()->do_autoload ) {
     61            $includes[] = 'classes';
     62        }
    6063
    6164        parent::includes( $includes );
  • trunk/src/bp-groups/bp-groups-admin.php

    r10613 r10652  
    1717if ( !class_exists( 'WP_List_Table' ) ) require( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
    1818
    19 require dirname( __FILE__ ) . '/classes/class-bp-groups-list-table.php';
     19if ( ! buddypress()->do_autoload ) {
     20    require dirname( __FILE__ ) . '/classes/class-bp-groups-list-table.php';
     21}
    2022
    2123// The per_page screen option. Has to be hooked in extremely early.
  • trunk/src/bp-groups/bp-groups-loader.php

    r10520 r10652  
    1515defined( 'ABSPATH' ) || exit;
    1616
    17 require dirname( __FILE__ ) . '/classes/class-bp-groups-component.php';
     17if ( ! buddypress()->do_autoload ) {
     18    require dirname( __FILE__ ) . '/classes/class-bp-groups-component.php';
     19}
    1820
    1921/**
  • trunk/src/bp-groups/bp-groups-screens.php

    r10520 r10652  
    1515defined( 'ABSPATH' ) || exit;
    1616
    17 require dirname( __FILE__ ) . '/classes/class-bp-groups-theme-compat.php';
     17if ( ! buddypress()->do_autoload ) {
     18    require dirname( __FILE__ ) . '/classes/class-bp-groups-theme-compat.php';
     19}
    1820
    1921/**
  • trunk/src/bp-groups/bp-groups-template.php

    r10562 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-groups-template.php';
    14 require dirname( __FILE__ ) . '/classes/class-bp-groups-group-members-template.php';
    15 require dirname( __FILE__ ) . '/classes/class-bp-groups-membership-requests-template.php';
    16 require dirname( __FILE__ ) . '/classes/class-bp-groups-invite-template.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-groups-template.php';
     15    require dirname( __FILE__ ) . '/classes/class-bp-groups-group-members-template.php';
     16    require dirname( __FILE__ ) . '/classes/class-bp-groups-membership-requests-template.php';
     17    require dirname( __FILE__ ) . '/classes/class-bp-groups-invite-template.php';
     18}
    1719
    1820/**
  • trunk/src/bp-groups/bp-groups-widgets.php

    r10520 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-groups-widget.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-groups-widget.php';
     15}
    1416
    1517/**
  • trunk/src/bp-groups/classes/class-bp-groups-component.php

    r10555 r10652  
    108108            'filters',
    109109            'screens',
    110             'classes',
    111110            'widgets',
    112111            'activity',
     
    116115            'notifications'
    117116        );
     117
     118        if ( ! buddypress()->do_autoload ) {
     119            $includes[] = 'classes';
     120        }
    118121
    119122        if ( is_admin() ) {
  • trunk/src/bp-loader.php

    r10628 r10652  
    102102    public $active_components = array();
    103103
     104    /**
     105     * Whether autoload is in use.
     106     *
     107     * @since 2.5.0
     108     * @var bool
     109     */
     110    public $do_autoload = false;
     111
    104112    /** Option Overload *******************************************************/
    105113
     
    458466     */
    459467    private function includes() {
     468        if ( function_exists( 'spl_autoload_register' ) ) {
     469            spl_autoload_register( array( $this, 'autoload' ) );
     470            $this->do_autoload = true;
     471        }
    460472
    461473        // Load the WP abstraction file so BuddyPress can run on all WordPress setups.
     
    479491        require( $this->plugin_dir . 'bp-core/bp-core-update.php'           );
    480492        require( $this->plugin_dir . 'bp-core/bp-core-options.php'          );
    481         require( $this->plugin_dir . 'bp-core/bp-core-classes.php'          );
    482493        require( $this->plugin_dir . 'bp-core/bp-core-taxonomy.php'         );
    483494        require( $this->plugin_dir . 'bp-core/bp-core-filters.php'          );
     
    489500        require( $this->plugin_dir . 'bp-core/bp-core-buddybar.php'         );
    490501        require( $this->plugin_dir . 'bp-core/bp-core-catchuri.php'         );
    491         require( $this->plugin_dir . 'bp-core/bp-core-component.php'        );
    492502        require( $this->plugin_dir . 'bp-core/bp-core-functions.php'        );
    493503        require( $this->plugin_dir . 'bp-core/bp-core-moderation.php'       );
    494504        require( $this->plugin_dir . 'bp-core/bp-core-loader.php'           );
    495505        require( $this->plugin_dir . 'bp-core/bp-core-customizer-email.php' );
     506
     507        if ( ! $this->do_autoload ) {
     508            require( $this->plugin_dir . 'bp-core/bp-core-classes.php' );
     509        }
    496510
    497511        // Skip or load deprecated content
     
    509523            require( $this->plugin_dir . 'bp-core/deprecated/2.5.php' );
    510524        }
     525    }
     526
     527    /**
     528     * Autoload classes.
     529     *
     530     * @since 2.5.0
     531     *
     532     * @param string $class
     533     */
     534    public function autoload( $class ) {
     535        $class_parts = explode( '_', strtolower( $class ) );
     536
     537        if ( 'bp' !== $class_parts[0] ) {
     538            return;
     539        }
     540
     541        $components = array(
     542            'activity',
     543            'blogs',
     544            'core',
     545            'friends',
     546            'groups',
     547            'members',
     548            'messages',
     549            'notifications',
     550            'settings',
     551            'xprofile',
     552        );
     553
     554        // These classes don't have a name that matches their component.
     555        $irregular_map = array(
     556            'BP_Akismet' => 'activity',
     557
     558            'BP_Admin'                     => 'core',
     559            'BP_Attachment_Avatar'         => 'core',
     560            'BP_Attachment_Cover_Image'    => 'core',
     561            'BP_Attachment'                => 'core',
     562            'BP_Button'                    => 'core',
     563            'BP_Component'                 => 'core',
     564            'BP_Date_Query'                => 'core',
     565            'BP_Email_Delivery'            => 'core',
     566            'BP_Email_Recipient'           => 'core',
     567            'BP_Email'                     => 'core',
     568            'BP_Embed'                     => 'core',
     569            'BP_Media_Extractor'           => 'core',
     570            'BP_Members_Suggestions'       => 'core',
     571            'BP_PHPMailer'                 => 'core',
     572            'BP_Recursive_Query'           => 'core',
     573            'BP_Suggestions'               => 'core',
     574            'BP_Theme_Compat'              => 'core',
     575            'BP_User_Query'                => 'core',
     576            'BP_Walker_Category_Checklist' => 'core',
     577            'BP_Walker_Nav_Menu_Checklist' => 'core',
     578            'BP_Walker_Nav_Menu_Menu'      => 'core',
     579
     580            'BP_Core_Friends_Widget' => 'friends',
     581
     582            'BP_Group_Extension'    => 'groups',
     583            'BP_Group_Member_Query' => 'groups',
     584
     585            'BP_Core_Members_Template'       => 'members',
     586            'BP_Core_Members_Widget'         => 'members',
     587            'BP_Core_Recently_Active_Widget' => 'members',
     588            'BP_Core_Whos_Online_Widget'     => 'members',
     589            'BP_Registration_Theme_Compat'   => 'members',
     590            'BP_Signup'                      => 'members',
     591        );
     592
     593        $component = null;
     594
     595        // First check to see if the class is one without a properly namespaced name.
     596        if ( isset( $irregular_map[ $class ] ) ) {
     597            $component = $irregular_map[ $class ];
     598
     599        // Next chunk is usually the component name.
     600        } elseif ( in_array( $class_parts[1], $components, true ) ) {
     601            $component = $class_parts[1];
     602        }
     603
     604        if ( ! $component ) {
     605            return;
     606        }
     607
     608        // Sanitize class name.
     609        $class = strtolower( str_replace( '_', '-', $class ) );
     610
     611        require dirname( __FILE__ ) . "/bp-{$component}/classes/class-{$class}.php";
    511612    }
    512613
  • trunk/src/bp-members/bp-members-admin.php

    r10521 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-members-admin.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-members-admin.php';
     15}
    1416
    1517// Load the BP Members admin.
  • trunk/src/bp-members/bp-members-loader.php

    r10521 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-members-component.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-members-component.php';
     15}
    1416
    1517/**
  • trunk/src/bp-members/bp-members-screens.php

    r10521 r10652  
    1313defined( 'ABSPATH' ) || exit;
    1414
    15 require dirname( __FILE__ ) . '/classes/class-bp-members-theme-compat.php';
    16 require dirname( __FILE__ ) . '/classes/class-bp-registration-theme-compat.php';
     15if ( ! buddypress()->do_autoload ) {
     16    require dirname( __FILE__ ) . '/classes/class-bp-members-theme-compat.php';
     17    require dirname( __FILE__ ) . '/classes/class-bp-registration-theme-compat.php';
     18}
    1719
    1820/**
  • trunk/src/bp-members/bp-members-template.php

    r10521 r10652  
    1313defined( 'ABSPATH' ) || exit;
    1414
    15 require dirname( __FILE__ ) . '/classes/class-bp-core-members-template.php';
     15if ( ! buddypress()->do_autoload ) {
     16    require dirname( __FILE__ ) . '/classes/class-bp-core-members-template.php';
     17}
    1618
    1719/**
  • trunk/src/bp-members/bp-members-widgets.php

    r10521 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-core-members-widget.php';
    14 require dirname( __FILE__ ) . '/classes/class-bp-core-whos-online-widget.php';
    15 require dirname( __FILE__ ) . '/classes/class-bp-core-recently-active-widget.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-core-members-widget.php';
     15    require dirname( __FILE__ ) . '/classes/class-bp-core-whos-online-widget.php';
     16    require dirname( __FILE__ ) . '/classes/class-bp-core-recently-active-widget.php';
     17}
    1618
    1719/**
  • trunk/src/bp-members/classes/class-bp-members-admin.php

    r10613 r10652  
    13671367        if ( ! empty( $required ) ) {
    13681368            require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php' );
    1369             require_once( buddypress()->members->admin->admin_dir . 'bp-members-admin-classes.php' );
     1369
     1370            if ( ! buddypress()->do_autoload ) {
     1371                require_once( buddypress()->members->admin->admin_dir . 'bp-members-admin-classes.php' );
     1372            }
    13701373        }
    13711374
  • trunk/src/bp-members/classes/class-bp-members-component.php

    r10521 r10652  
    5555        $includes = array(
    5656            'actions',
    57             'classes',
    5857            'filters',
    5958            'screens',
     
    6463            'cache',
    6564        );
     65
     66        if ( ! buddypress()->do_autoload ) {
     67            $includes[] = 'classes';
     68        }
    6669
    6770        if ( bp_is_active( 'activity' ) ) {
  • trunk/src/bp-messages/bp-messages-loader.php

    r10522 r10652  
    1313defined( 'ABSPATH' ) || exit;
    1414
    15 require dirname( __FILE__ ) . '/classes/class-bp-messages-component.php';
     15if ( ! buddypress()->do_autoload ) {
     16    require dirname( __FILE__ ) . '/classes/class-bp-messages-component.php';
     17}
    1618
    1719/**
  • trunk/src/bp-messages/bp-messages-template.php

    r10522 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-messages-box-template.php';
    14 require dirname( __FILE__ ) . '/classes/class-bp-messages-thread-template.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-messages-box-template.php';
     15    require dirname( __FILE__ ) . '/classes/class-bp-messages-thread-template.php';
     16}
    1517
    1618/**
  • trunk/src/bp-messages/bp-messages-widgets.php

    r10522 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-messages-sitewide-notices-widget.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-messages-sitewide-notices-widget.php';
     15}
    1416
    1517/**
  • trunk/src/bp-messages/classes/class-bp-messages-component.php

    r10555 r10652  
    6161            'actions',
    6262            'screens',
    63             'classes',
    6463            'filters',
    6564            'template',
     
    6867            'widgets',
    6968        );
     69
     70        if ( ! buddypress()->do_autoload ) {
     71            $includes[] = 'classes';
     72        }
    7073
    7174        // Conditional includes.
  • trunk/src/bp-notifications/bp-notifications-loader.php

    r10523 r10652  
    1313defined( 'ABSPATH' ) || exit;
    1414
    15 require dirname( __FILE__ ) . '/classes/class-bp-notifications-component.php';
     15if ( ! buddypress()->do_autoload ) {
     16    require dirname( __FILE__ ) . '/classes/class-bp-notifications-component.php';
     17}
    1618
    1719/**
  • trunk/src/bp-notifications/bp-notifications-template.php

    r10523 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-notifications-template.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-notifications-template.php';
     15}
    1416
    1517/**
  • trunk/src/bp-notifications/classes/class-bp-notifications-component.php

    r10555 r10652  
    4646        $includes = array(
    4747            'actions',
    48             'classes',
    4948            'screens',
    5049            'adminbar',
     
    5352            'cache',
    5453        );
     54
     55        if ( ! buddypress()->do_autoload ) {
     56            $includes[] = 'classes';
     57        }
    5558
    5659        parent::includes( $includes );
  • trunk/src/bp-settings/bp-settings-loader.php

    r10524 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-settings-component.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-settings-component.php';
     15}
    1416
    1517/**
  • trunk/src/bp-xprofile/bp-xprofile-admin.php

    r10557 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-xprofile-user-admin.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-xprofile-user-admin.php';
     15}
    1416
    1517/**
  • trunk/src/bp-xprofile/bp-xprofile-loader.php

    r10525 r10652  
    1414defined( 'ABSPATH' ) || exit;
    1515
    16 require dirname( __FILE__ ) . '/classes/class-bp-xprofile-component.php';
     16if ( ! buddypress()->do_autoload ) {
     17    require dirname( __FILE__ ) . '/classes/class-bp-xprofile-component.php';
     18}
    1719
    1820/**
  • trunk/src/bp-xprofile/bp-xprofile-template.php

    r10525 r10652  
    1111defined( 'ABSPATH' ) || exit;
    1212
    13 require dirname( __FILE__ ) . '/classes/class-bp-xprofile-data-template.php';
     13if ( ! buddypress()->do_autoload ) {
     14    require dirname( __FILE__ ) . '/classes/class-bp-xprofile-data-template.php';
     15}
    1416
    1517/**
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php

    r10555 r10652  
    6767            'screens',
    6868            'caps',
    69             'classes',
    7069            'filters',
    7170            'settings',
     
    7473            'notifications',
    7574        );
     75
     76        if ( ! buddypress()->do_autoload ) {
     77            $includes[] = 'classes';
     78        }
    7679
    7780        if ( is_admin() ) {
Note: See TracChangeset for help on using the changeset viewer.