<?php
/**
 * Plugin Name: BuddyBoss Platform
 * Plugin URI:  https://buddyboss.com/
 * Description: The BuddyBoss Platform adds community features to WordPress. Member Profiles, Activity Feeds, Direct Messaging, Notifications, and more!
 * Author:      BuddyBoss
 * Author URI:  https://buddyboss.com/
 * Version:     2.14.3
 * Text Domain: buddyboss
 * Domain Path: /src/languages
 * License:     GPLv2 or later (license.txt)
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) && file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
	require dirname( __FILE__ ) . '/vendor/autoload.php';
}

// Assume you want to load from build.
$bp_loader = dirname( __FILE__ ) . '/src/bp-loader.php';
$subdir    = 'src';

if ( ! defined( 'BP_SOURCE_SUBDIRECTORY' ) ) {
	// Set source subdirectory.
	define( 'BP_SOURCE_SUBDIRECTORY', $subdir );
}

// Define overrides - only applicable to those running trunk.
if ( ! defined( 'BP_PLUGIN_DIR' ) ) {
	define( 'BP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
}
if ( ! defined( 'BP_PLUGIN_URL' ) ) {
	// Be nice to symlinked directories.
	define( 'BP_PLUGIN_URL', plugins_url( trailingslashit( basename( constant( 'BP_PLUGIN_DIR' ) ) ) ) );
}

// Include BuddyBoss Platform.
include( $bp_loader );

// Unset the loader, since it's loaded in global scope.
unset( $bp_loader );
