-
Notifications
You must be signed in to change notification settings - Fork 1
/
freemius-load.php
50 lines (42 loc) · 1.51 KB
/
freemius-load.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
<?php
if ( ! function_exists( 'wpassetcleanup_fs' )
&& ! class_exists( 'Freemius' )
&& is_admin() ) {
// Create a helper function for easy SDK access.
function wpassetcleanup_fs() {
global $wpassetcleanup_fs;
if ( ! isset( $wpassetcleanup_fs ) ) {
// Include Freemius SDK.
require_once __DIR__ . '/freemius/start.php';
$wpassetcleanup_fs = fs_dynamic_init( array (
'id' => '2951',
'slug' => WPACU_PLUGIN_TEXT_DOMAIN,
'type' => 'plugin',
'public_key' => 'pk_70ecc6600cb03b5168150b4c99257',
'is_premium' => false,
'has_addons' => false,
'has_paid_plans' => false,
'anonymous_mode' => true,
'menu' => array(
'slug' => WPACU_ADMIN_PAGE_ID_START,
'override_exact' => true,
'account' => false,
'contact' => false,
'support' => true,
),
) );
}
return $wpassetcleanup_fs;
}
// Init Freemius.
wpassetcleanup_fs();
// Signal that SDK was initiated.
do_action('wpassetcleanup_fs_loaded');
function wpassetcleanup_fs_settings_url() {
return admin_url('admin.php?page='.WPACU_ADMIN_PAGE_ID_START);
}
wpassetcleanup_fs()->add_filter('connect_url', WPACU_PLUGIN_ID.'_fs_settings_url');
wpassetcleanup_fs()->add_filter('after_skip_url', WPACU_PLUGIN_ID.'_fs_settings_url');
wpassetcleanup_fs()->add_filter('after_connect_url', WPACU_PLUGIN_ID.'_fs_settings_url');
wpassetcleanup_fs()->add_filter('after_pending_connect_url', WPACU_PLUGIN_ID.'_fs_settings_url');
}