/** * Used to setup and fix common variables and include * the bbPress and BackPress procedural and class libraries. * * You should not have to change this file, all configuration * should be possible in bb-config.php * * @package bbPress */ // Die if called directly /** * bb_unregister_GLOBALS() - Turn register globals off * * @access private * @return null Will return null if register_globals PHP directive was disabled */ // Variables that shouldn't be unset /** * Let bbPress know what we are up to at the moment */ /** * Whether the current script is in the admin area or not */ /** * Whether the current script is part of the installation process or not * @since 1.0 */ /** * Whether to load deprecated routines, constants and functions * @since 1.0 */ /** * Remove filters and action that have been set by an included WordPress install */ /** * Define include paths and load core BackPress libraries */ /** * The full path to the BackPress libraries */ // Load logging class require_once( BACKPRESS_PATH . 'class.bp-log.php' ); // Load core BackPress functions require_once( BACKPRESS_PATH . 'functions.core.php' ); require_once( BACKPRESS_PATH . 'functions.compat.php' ); require_once( BACKPRESS_PATH . 'functions.formatting.php' ); // WP_Error require_once( BACKPRESS_PATH . 'class.wp-error.php' ); /** * Set up database parameters based on config and initialise */ /** * Define the full path to the database class */ /** * Define the name of the database class */ /** * Define BackPress Database errors if not already done - no localisation at this stage */ // Load the database class require_once( BB_DATABASE_CLASS_INCLUDE ); // Die if there is no database table prefix // Setup the global database connection /** * bbPress tables */ // Deprecated // Deprecated // Deprecated // Set the prefix on the tables // Set a site id if there isn't one already /** * Load core bbPress libraries */ require_once( BB_PATH . BB_INC . 'functions.bb-core.php' ); require_once( BB_PATH . BB_INC . 'functions.bb-forums.php' ); require_once( BB_PATH . BB_INC . 'functions.bb-topics.php' ); require_once( BB_PATH . BB_INC . 'functions.bb-posts.php' ); require_once( BB_PATH . BB_INC . 'functions.bb-topic-tags.php' ); require_once( BB_PATH . BB_INC . 'functions.bb-users.php' ); require_once( BB_PATH . BB_INC . 'functions.bb-meta.php' ); require_once( BB_PATH . BB_INC . 'class.bb-query.php' ); require_once( BB_PATH . BB_INC . 'class.bb-walker.php' ); /** * Load API and object handling BackPress libraries */ // Plugin API require_once( BACKPRESS_PATH . 'functions.plugin-api.php' ); // Shortcodes API require_once( BACKPRESS_PATH . 'functions.shortcodes.php' ); /** * Define the full path to the object cache functions include */ // See if a caching class is already loaded (by WordPress) // Load the object cache class require_once( BB_OBJECT_CACHE_FUNCTIONS_INCLUDE ); // Instantiate the $wp_object_cache object using wp_cache_init() // Clear WordPress cache if it exists already - maybe should save and re-load? /** * Load mapping class for BackPress to store options */ require_once( BB_PATH . BB_INC . 'class.bp-options.php' ); require_once( BACKPRESS_PATH . 'functions.bp-options.php' ); /** * Load WP_Http class */ require_once( BACKPRESS_PATH . 'class.wp-http.php' ); /** * Determine language settings and load i10n libraries as required */ /** * The full path to the directory containing language files */ // User has set old constant // absolute path with trailing slash /** * The language in which to display bbPress */ // User has set old constant require_once( BACKPRESS_PATH . 'pomo/mo.php' ); // Is WordPress loaded // Only load this if WordPress isn't loaded require_once( BACKPRESS_PATH . 'functions.kses.php' ); require_once( BB_PATH . BB_INC . 'functions.bb-l10n.php' ); /** * Routines related to installation */ // Load BB_CHANNELS_INCLUDE if it exists, must be done before the install is completed require_once( BB_CHANNELS_INCLUDE ); // If there is no forum table in the database then redirect to the installer require_once( BB_PATH . BB_INC . 'functions.bb-pluggable.php' ); // Setup some variables in the $bb class if they don't exist - some of these are deprecated // Disable plugins during installation /** * Load additional bbPress libraries */ require_once( BB_PATH . BB_INC . 'functions.bb-formatting.php' ); require_once( BB_PATH . BB_INC . 'functions.bb-template.php' ); require_once( BB_PATH . BB_INC . 'functions.bb-capabilities.php' ); require_once( BB_PATH . BB_INC . 'class.bb-pingbacks.php' ); // Cache options from the database /** * Set the URI and derivitaves */ // Used when setting up cookie domain // Used when setting up cookie paths // Backwards compatibility // These were never set in the database // We need both to build a uri // Die if no URI /** * BB_FORCE_SSL_USER_FORMS - Whether to force use of ssl on user forms like login, registration and profile editing */ /** * BB_FORCE_SSL_ADMIN - Whether to force use of ssl in the admin area */ // Load default filters require_once( BB_PATH . BB_INC . 'defaults.bb-filters.php' ); // Load default scripts require_once( BB_PATH . BB_INC . 'functions.bb-script-loader.php' ); // Sanitise external input /** * Define theme and plugin constants */ /** * Full path to the location of the core plugins directory */ /** * Full URL of the core plugins directory */ /** * Full path to the location of the core themes directory */ /** * Full URL of the core themes directory */ /** * The default theme */ /** * Full path to the location of the default theme directory */ /** * Full URL of the default theme directory */ /** * Full path to the location of the user plugins directory */ // User has set old constant /** * Full URL of the user plugins directory */ // User has set old constant /** * Full path to the location of the user themes directory */ // User has set old constant /** * Full URL of the user themes directory */ // User has set old constant /** * Look-up arrays provide easier access to arbitrary plugin and theme locations */ // Don't accept a plugin location called "all". Unlikely, but really not desirable. /** * Add custom tables if present */ // Resolve the various ways custom user tables might be setup // Add custom databases if required // Add custom tables if required /** * Sort out cookies so they work with WordPress (if required) * Note that database integration is no longer a pre-requisite for cookie integration */ // Deprecated setting // Deprecated setting // Cookie path was set before integration logic above // Deprecated settings // This is a best guess only, should be manually set to match WP_PLUGIN_URL /** * Should be exactly the same as the default value of the KEYS in bb-config-sample.php * @since 1.0 */ /** * Initialise localisation */ // Load the default text localization domain. // Pull in locale data after loading text domain. require_once( BB_PATH . BB_INC . 'class.bb-locale.php' ); /** * Localisation object */ /** * Remaining BackPress */ // WP_Pass require_once( BACKPRESS_PATH . 'class.wp-pass.php' ); // WP_Users require_once( BACKPRESS_PATH . 'class.wp-users.php' ); require_once( BACKPRESS_PATH . 'class.bp-roles.php' ); /** * BP_Roles object */ // BP_User require_once( BACKPRESS_PATH . 'class.bp-user.php' ); // WP_Auth require_once( BACKPRESS_PATH . 'class.wp-auth.php' ); /** * The current cookie version * * Version 1 is for WordPress >= 2.6 and < 2.8 * Version 2 is for Wordpress >= 2.8 */ /** * WP_Auth object */ /** * Current user object */ // WP_Scripts/WP_Styles require_once( BACKPRESS_PATH . 'class.wp-dependencies.php' ); require_once( BACKPRESS_PATH . 'class.wp-scripts.php' ); require_once( BACKPRESS_PATH . 'functions.wp-scripts.php' ); require_once( BACKPRESS_PATH . 'class.wp-styles.php' ); require_once( BACKPRESS_PATH . 'functions.wp-styles.php' ); // WP_Taxonomy require_once( BACKPRESS_PATH . 'class.wp-taxonomy.php' ); require_once( BB_PATH . BB_INC . 'class.bb-taxonomy.php' ); // Clean slate // exists, but it's not good enough, translate it // preserve the references do_action( 'bb_options_loaded' ); /** * Load deprecated constants and functions */ // Skip loading of deprecated stuff unless specifically requested /** * Define deprecated constants for plugin compatibility * $deprecated_constants below is a complete array of old constants and their replacements */ // only define if new one is defined /** * Load deprecated functions */ require_once( BB_PATH . BB_INC . 'functions.bb-deprecated.php' ); /** * Old cache global object for backwards compatibility */ /** * Load active template functions.php file */ require_once( $template_functions_include ); /** * Load Plugins */ // Skip plugin loading in "safe" mode // Autoloaded "underscore" plugins require_once( $_plugin ); do_action( 'bb_underscore_plugins_loaded' ); // Normal plugins // The plugin entry in the database is invalid // Not likely // $plugin has .., :, etc. // The plugin isn't there require_once( $_directory . $_plugin ); do_action( 'bb_plugins_loaded' ); require_once( BB_PATH . BB_INC . 'functions.bb-pluggable.php' ); /** * Reference to $wp_roles */ do_action( 'bb_got_roles' ); /** * Create an API hook to run on shutdown */ do_action( 'bb_shutdown' ); /** * Get details of the current user */ /** * Initialise CRON */ require_once( BACKPRESS_PATH . 'functions.wp-cron.php' ); /** * The currently viewed page number */ /** * Initialisation complete API hook */ do_action( 'bb_init' ); /** * Block user if they deserve it */ /** * Send HTTP headers */