BP_Activity_Component::includes( array $includes = array() )

Include component files.

Description

See also

Parameters

$includes

(Optional) See BP_Component::includes() for a description.

Default value: array()

Source

File: bp-activity/classes/class-bp-activity-component.php

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
public function includes( $includes = array() ) {
 
    // Files to include.
    $includes = array(
        'cssjs',
        'filters',
        'adminbar',
        'template',
        'functions',
        'cache'
    );
 
    // Notifications support.
    if ( bp_is_active( 'notifications' ) ) {
        $includes[] = 'notifications';
    }
 
    // Load Akismet support if Akismet is configured.
    $akismet_key = bp_get_option( 'wordpress_api_key' );
 
    /** This filter is documented in bp-activity/bp-activity-akismet.php */
    if ( defined( 'AKISMET_VERSION' ) && class_exists( 'Akismet' ) && ( ! empty( $akismet_key ) || defined( 'WPCOM_API_KEY' ) ) && apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) ) {
        $includes[] = 'akismet';
    }
 
    // Embeds
    if ( bp_is_active( $this->id, 'embeds' ) ) {
        $includes[] = 'embeds';
    }
 
    if ( is_admin() ) {
        $includes[] = 'admin';
    }
 
    parent::includes( $includes );
}

Changelog

Changelog
Version Description
BuddyPress 1.5.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.