-
Notifications
You must be signed in to change notification settings - Fork 0
/
loader.php
57 lines (48 loc) · 1.41 KB
/
loader.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* Plugin Name: RB Anonymous Members
* Plugin URI: https://blogs.recycleb.in/2024/07/buddypress-buyddyboss-anonymous-members/
* Description: Allow your BuddyBoss & BuddyPress website's members to join groups anonymously.
* Version: 1.0.0
* Author: ckchaudhary
* Author URI: https://www.recycleb.in/u/chandan/
* Text Domain: rb-anonymous-members
* Domain Path: /languages
* Licence: GPLv2
*
* @package Anonymous Members
* @author ckchaudhary
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) ? '' : exit();
// Directory.
if ( ! defined( 'RB_AM_P_DIR' ) ) {
define( 'RB_AM_P_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
}
// Url.
if ( ! defined( 'RB_AM_P_URL' ) ) {
$plugin_url = trailingslashit( plugin_dir_url( __FILE__ ) );
// If we're using https, update the protocol.
if ( is_ssl() ) {
$plugin_url = str_replace( 'http://', 'https://', $plugin_url );
}
define( 'RB_AM_P_URL', $plugin_url );
}
if ( ! defined( 'RB_AM_P_VERSION' ) ) {
define( 'RB_AM_P_VERSION', '1.0.0' );
}
if ( ! function_exists( '\rb_anonymous_members' ) ) {
require __DIR__ . '/vendor/autoload.php';
/**
* Returns the main plugin object.
*
* @since 1.0.0
*
* @return \RecycleBin\AnonymousMembers\Plugin
*/
function rb_anonymous_members() {
return \RecycleBin\AnonymousMembers\Plugin::get_instance();
}
// Instantiate the main plugin object.
\add_action( 'plugins_loaded', 'rb_anonymous_members' );
}