-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.php
42 lines (38 loc) · 1.03 KB
/
bootstrap.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
<?php
use NewfoldLabs\WP\Module\Facebook\Facebook;
use NewfoldLabs\WP\ModuleLoader\Container;
use function NewfoldLabs\WP\ModuleLoader\register;
// Exit if accessed directly
if (!defined('ABSPATH')) {
return;
}
if (function_exists('add_action')) {
add_action(
'plugins_loaded',
function () {
register(
[
'name' => 'facebook',
'label' => __('Facebook', 'wp-module-facebook'),
'callback' => function (Container $container) {
if (!defined('NFD_FACEBOOK_WORKER')) {
define('NFD_FACEBOOK_WORKER', 'https://hiive.cloud/workers/facebook-connect/');
}
if (!defined('NFD_FACEBOOK_GRAPH_BASE')) {
define('NFD_FACEBOOK_GRAPH_BASE', 'https://graph.facebook.com');
}
if (!defined('MONTH_IN_SECONDS')) {
define('MONTH_IN_SECONDS', '60 * 60 * 24 * 30');
}
if ( ! defined( 'NFD_FACEBOOK_VERSION' ) ) {
define( 'NFD_FACEBOOK_VERSION', '1.1.2' );
}
new Facebook($container);
},
'isActive' => true,
'isHidden' => true,
]
);
}
);
}