Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

BuddyPress::includes()

Include required files.


Source Source

File: class-buddypress.php

	private function includes() {
		spl_autoload_register( array( $this, 'autoload' ) );

		// Load the WP abstraction file so BuddyPress can run on all WordPress setups.
		require( $this->plugin_dir . 'bp-core/bp-core-wpabstraction.php' );

		// Setup the versions (after we include multisite abstraction above).
		$this->versions();

		/** Update/Install ****************************************************/

		// Theme compatibility.
		require( $this->plugin_dir . 'bp-core/bp-core-template-loader.php'     );
		require( $this->plugin_dir . 'bp-core/bp-core-theme-compatibility.php' );

		// Require all of the BuddyPress core libraries.
		require( $this->plugin_dir . 'bp-core/bp-core-dependency.php'       );
		require( $this->plugin_dir . 'bp-core/bp-core-actions.php'          );
		require( $this->plugin_dir . 'bp-core/bp-core-caps.php'             );
		require( $this->plugin_dir . 'bp-core/bp-core-cache.php'            );
		require( $this->plugin_dir . 'bp-core/bp-core-cssjs.php'            );
		require( $this->plugin_dir . 'bp-core/bp-core-update.php'           );
		require( $this->plugin_dir . 'bp-core/bp-core-options.php'          );
		require( $this->plugin_dir . 'bp-core/bp-core-taxonomy.php'         );
		require( $this->plugin_dir . 'bp-core/bp-core-filters.php'          );
		require( $this->plugin_dir . 'bp-core/bp-core-attachments.php'      );
		require( $this->plugin_dir . 'bp-core/bp-core-avatars.php'          );
		require( $this->plugin_dir . 'bp-core/bp-core-widgets.php'          );
		require( $this->plugin_dir . 'bp-core/bp-core-template.php'         );
		require( $this->plugin_dir . 'bp-core/bp-core-adminbar.php'         );
		require( $this->plugin_dir . 'bp-core/bp-core-buddybar.php'         );
		require( $this->plugin_dir . 'bp-core/bp-core-catchuri.php'         );
		require( $this->plugin_dir . 'bp-core/bp-core-functions.php'        );
		require( $this->plugin_dir . 'bp-core/bp-core-moderation.php'       );
		require( $this->plugin_dir . 'bp-core/bp-core-loader.php'           );
		require( $this->plugin_dir . 'bp-core/bp-core-customizer-email.php' );
		require( $this->plugin_dir . 'bp-core/bp-core-rest-api.php'         );
		require( $this->plugin_dir . 'bp-core/bp-core-blocks.php'           );

		// Maybe load deprecated functionality (this double negative is proof positive!).
		if ( ! bp_get_option( '_bp_ignore_deprecated_code', ! $this->load_deprecated ) ) {
			require( $this->plugin_dir . 'bp-core/deprecated/1.2.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/1.5.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/1.6.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/1.7.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/1.9.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.0.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.1.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.2.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.3.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.4.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.5.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.6.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.7.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.8.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/2.9.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/3.0.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/4.0.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/6.0.php' );
			require( $this->plugin_dir . 'bp-core/deprecated/7.0.php' );
		}

		// Load wp-cli module if PHP 5.6+.
		if (
			defined( 'WP_CLI' )
			&& ! class_exists( 'Buddypress\CLI\Command\BuddypressCommand' )
			&& file_exists( $this->plugin_dir . 'cli/wp-cli-bp.php' )
			&& version_compare( phpversion(), '5.6.0', '>=' ) ) {
			require( $this->plugin_dir . 'cli/wp-cli-bp.php' );
		}
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.