BP_Nouveau::includes()

Includes!

Description

Source

File: bp-templates/bp-nouveau/buddypress-functions.php

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
protected function includes() {
    require $this->includes_dir . 'functions.php';
    require $this->includes_dir . 'classes.php';
    require $this->includes_dir . 'template-tags.php';
 
    // Test suite requires the AJAX functions early.
    if ( function_exists( 'tests_add_filter' ) ) {
        require $this->includes_dir . 'ajax.php';
 
    // Load AJAX code only on AJAX requests.
    } else {
        add_action( 'admin_init', function() {
            if ( defined( 'DOING_AJAX' ) && true === DOING_AJAX ) {
                require $this->includes_dir . 'ajax.php';
            }
        }, 0 );
    }
 
    add_action( 'bp_customize_register', function() {
        if ( bp_is_root_blog() && current_user_can( 'customize' ) ) {
            require $this->includes_dir . 'customizer.php';
        }
    }, 0 );
 
    foreach ( bp_core_get_packaged_component_ids() as $component ) {
        $component_loader = trailingslashit( $this->includes_dir ) . $component . '/loader.php';
 
        if ( ! bp_is_active( $component ) || ! file_exists( $component_loader ) ) {
            continue;
        }
 
        require( $component_loader );
    }
 
    if ( bp_is_active( 'activity' ) && bp_is_activity_follow_active() ) {
        $component_loader = trailingslashit( $this->includes_dir ) . 'follow/loader.php';
 
        if ( file_exists( $component_loader ) ) {
            require( $component_loader );
        }
    }
 
    /**
     * Fires after all of the BuddyPress Nouveau includes have been loaded. Passed by reference.
     *
     * @since BuddyPress 3.0.0
     *
     * @param BP_Nouveau $value Current BP_Nouveau instance.
     */
    do_action_ref_array( 'bp_nouveau_includes', array( &$this ) );
}

Changelog

Changelog
Version Description
BuddyPress 3.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.