[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/ -> bp-loader.php (source)

   1  <?php
   2  
   3  /**
   4   * The BuddyPress Plugin
   5   *
   6   * BuddyPress is social networking software with a twist from the creators of WordPress.
   7   *
   8   * @package BuddyPress
   9   * @subpackage Main
  10   */
  11  
  12  /**
  13   * Plugin Name:       BuddyPress
  14   * Plugin URI:        https://buddypress.org
  15   * Description:       BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
  16   * Author:            The BuddyPress Community
  17   * Author URI:        https://buddypress.org
  18   * License:           GNU General Public License v2 or later
  19   * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
  20   * Text Domain:       buddypress
  21   * Domain Path:       /bp-languages/
  22   * Requires PHP:      5.6
  23   * Requires at least: 5.4
  24   * Version:           11.0.0-alpha
  25   */
  26  
  27  // Exit if accessed directly
  28  defined( 'ABSPATH' ) || exit;
  29  
  30  // Assume you want to load from build
  31  $bp_loader = dirname( __FILE__ ) . '/build/bp-loader.php';
  32  
  33  // Load from source if no build exists
  34  if ( ! file_exists( $bp_loader ) || defined( 'BP_LOAD_SOURCE' ) ) {
  35      $bp_loader = dirname( __FILE__ ) . '/src/bp-loader.php';
  36      $bp_subdir = 'src';
  37  } else {
  38      $bp_subdir = 'build';
  39  }
  40  
  41  // Set source subdirectory
  42  define( 'BP_SOURCE_SUBDIRECTORY', $bp_subdir );
  43  
  44  // Define overrides - only applicable to those running trunk
  45  if ( ! defined( 'BP_PLUGIN_DIR' ) ) {
  46      define( 'BP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  47  }
  48  if ( ! defined( 'BP_PLUGIN_URL' ) ) {
  49      // Be nice to symlinked directories
  50      define( 'BP_PLUGIN_URL', plugins_url( trailingslashit( basename( constant( 'BP_PLUGIN_DIR' ) ) ) ) );
  51  }
  52  
  53  // Include BuddyPress
  54  include( $bp_loader );
  55  
  56  // Unset vars that were invoked in global scope
  57  unset( $bp_loader, $bp_subdir );


Generated: Thu Mar 28 01:00:56 2024 Cross-referenced by PHPXref 0.7.1