| 1 |
<?php |
| 2 |
|
| 3 |
if ( !function_exists( 'ctc_fs' ) ) { |
| 4 |
// Create a helper function for easy SDK access. |
| 5 |
function ctc_fs() |
| 6 |
{ |
| 7 |
global $ctc_fs ; |
| 8 |
|
| 9 |
if ( !isset( $ctc_fs ) ) { |
| 10 |
// Include Freemius SDK. |
| 11 |
require_once dirname( __FILE__ ) . '/freemius/start.php'; |
| 12 |
$ctc_fs = fs_dynamic_init( array( |
| 13 |
'id' => '2780', |
| 14 |
'slug' => 'copy-the-code', |
| 15 |
'type' => 'plugin', |
| 16 |
'public_key' => 'pk_15a174f8c30f506a9a35ccbf0fa76', |
| 17 |
'is_premium' => false, |
| 18 |
'premium_suffix' => 'Premium', |
| 19 |
'has_addons' => false, |
| 20 |
'has_paid_plans' => true, |
| 21 |
'has_affiliation' => 'selected', |
| 22 |
'menu' => array( |
| 23 |
'slug' => 'copy-the-code', |
| 24 |
'override_exact' => true, |
| 25 |
'first-path' => 'options-general.php?page=copy-the-code', |
| 26 |
'contact' => true, |
| 27 |
'support' => true, |
| 28 |
'affiliation' => false, |
| 29 |
'parent' => array( |
| 30 |
'slug' => 'options-general.php', |
| 31 |
), |
| 32 |
), |
| 33 |
'is_live' => true, |
| 34 |
) ); |
| 35 |
} |
| 36 |
|
| 37 |
return $ctc_fs; |
| 38 |
} |
| 39 |
|
| 40 |
// Init Freemius. |
| 41 |
ctc_fs(); |
| 42 |
// Signal that SDK was initiated. |
| 43 |
do_action( 'ctc_fs_loaded' ); |
| 44 |
function ctc_fs_settings_url() |
| 45 |
{ |
| 46 |
return admin_url( 'options-general.php?page=copy-the-code' ); |
| 47 |
} |
| 48 |
|
| 49 |
ctc_fs()->add_filter( 'connect_url', 'ctc_fs_settings_url' ); |
| 50 |
ctc_fs()->add_filter( 'after_skip_url', 'ctc_fs_settings_url' ); |
| 51 |
ctc_fs()->add_filter( 'after_connect_url', 'ctc_fs_settings_url' ); |
| 52 |
ctc_fs()->add_filter( 'after_pending_connect_url', 'ctc_fs_settings_url' ); |
| 53 |
} |
| 54 |
|