BP_Activity_Component::includes( array $includes = array() )
Include component files.
Description
See also
- BP_Component::includes(): for a description of arguments.
Parameters
- $includes
-
(Optional) See BP_Component::includes() for a description.
Default value: array()
Source
File: bp-activity/classes/class-bp-activity-component.php
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
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.