-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloader.php
56 lines (47 loc) · 1.42 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
<?php
/**
* Plugin Name: FrontPage Buddy
* Plugin URI: https://www.recycleb.in/frontpage-buddy/
* Description: Personalized front pages for buddypress & buddyboss members & groups, bbpress profiles and 'Ultimate Member' profiles.
* Version: 1.0.1
* Author: ckchaudhary
* Author URI: https://www.recycleb.in/u/chandan/
* Text Domain: frontpage-buddy
* Domain Path: /languages
*
* License: GPLv2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*
* @package FrontPage Buddy
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
require __DIR__ . '/vendor/autoload.php';
// Directory.
if ( ! defined( 'FRONTPAGE_BUDDY_PLUGIN_DIR' ) ) {
define( 'FRONTPAGE_BUDDY_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
}
// Url.
if ( ! defined( 'FRONTPAGE_BUDDY_PLUGIN_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( 'FRONTPAGE_BUDDY_PLUGIN_URL', $plugin_url );
}
if ( ! defined( 'FRONTPAGE_BUDDY_PLUGIN_VERSION' ) ) {
define( 'FRONTPAGE_BUDDY_PLUGIN_VERSION', '1.0.1' );
}
/**
* Returns the main plugin object.
*
* @since 1.0.0
*
* @return \FrontPageBuddy\Plugin
*/
function frontpage_buddy() {
return \FrontPageBuddy\Plugin::get_instance();
}
// Instantiate the main plugin object.
\add_action( 'plugins_loaded', 'frontpage_buddy' );