forked from sekedus/clickervolt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
freemiusSetup.php
78 lines (66 loc) · 2.23 KB
/
freemiusSetup.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
namespace ClickerVolt;
if ( !function_exists( '\\ClickerVolt\\cli_fs' ) ) {
// Create a helper function for easy SDK access.
function cli_fs()
{
global $cli_fs ;
if ( !isset( $cli_fs ) ) {
// Include Freemius SDK.
require_once dirname( __FILE__ ) . '/freemius/start.php';
$cli_fs = fs_dynamic_init( array(
'id' => '3482',
'slug' => 'clickervolt',
'type' => 'plugin',
'public_key' => 'pk_28ff3cf5fc9c70c194222c8c1b7e5',
'is_premium' => false,
'has_addons' => false,
'has_paid_plans' => true,
'has_affiliation' => 'all',
'menu' => array(
'slug' => 'clickervolt',
'support' => false,
),
'is_live' => true,
) );
}
return $cli_fs;
}
// Init Freemius.
cli_fs();
// Signal that SDK was initiated.
do_action( 'cli_fs_loaded' );
}
if ( !function_exists( '\\ClickerVolt\\cli_fs_custom_connect_message_on_update' ) ) {
function cli_fs_custom_connect_message_on_update(
$message,
$user_first_name,
$plugin_title,
$user_login,
$site_link,
$freemius_link
)
{
return sprintf(
__( 'Hey %1$s' ) . ',<br>' . __( 'never miss an important update -- opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %5$s.', 'clickervolt' ),
$user_first_name,
'<b>' . $plugin_title . '</b>',
'<b>' . $user_login . '</b>',
$site_link,
$freemius_link
);
}
cli_fs()->add_filter(
'connect_message_on_update',
'\\ClickerVolt\\cli_fs_custom_connect_message_on_update',
10,
6
);
}
if ( !function_exists( '\\ClickerVolt\\cli_fs_custom_icon' ) ) {
function cli_fs_custom_icon()
{
return dirname( __FILE__ ) . '/admin/images/clickervolt-256x256.png';
}
cli_fs()->add_filter( 'plugin_icon', '\\ClickerVolt\\cli_fs_custom_icon' );
}