BP_Document_Component::late_includes()
Late includes method.
Description
Only load up certain code when on specific pages.
Source
File: bp-document/classes/class-bp-document-component.php
public function late_includes() { // Bail if PHPUnit is running. if ( defined( 'BP_TESTS_DIR' ) ) { return; } if ( bp_is_document_component() ) { // Screens - Directory. if ( bp_is_document_directory() && ( bp_is_profile_document_support_enabled() || bp_is_group_document_support_enabled() ) ) { require $this->path . 'bp-document/screens/directory.php'; } // Screens - User profile integration. if ( bp_is_user() && bp_is_profile_document_support_enabled() ) { require $this->path . 'bp-document/screens/document.php'; /* * Nav items. * * 'folder' is not a registered nav item, but we add a screen handler manually. */ if ( bp_is_user_document() && in_array( bp_current_action(), array( 'folders' ), true ) ) { require $this->path . 'bp-document/screens/' . bp_current_action() . '.php'; } } // Theme compatibility. new BP_Document_Theme_Compat(); } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.4.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.