| 1 |
<?php |
| 2 |
/** |
| 3 |
* Freemius Lite SDK bootstrap for Text Typing - Block (Free). |
| 4 |
* |
| 5 |
* Defines the `ttb_fs()` helper. This is the FREE edition, so it ships and |
| 6 |
* loads only the lite SDK (/freemius-lite) — there is no Pro/full-Freemius |
| 7 |
* code path here. Mirrors video-gallery-block's includes/fs-lite.php. |
| 8 |
* |
| 9 |
* Requires TTB_DIR_PATH to be defined by index.php before this file is loaded. |
| 10 |
* |
| 11 |
* @package TTB |
| 12 |
*/ |
| 13 |
|
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
if ( ! function_exists( 'ttb_fs' ) ) { |
| 19 |
// Create a helper function for easy SDK access. |
| 20 |
function ttb_fs() { |
| 21 |
global $ttb_fs; |
| 22 |
|
| 23 |
if ( ! isset( $ttb_fs ) ) { |
| 24 |
// Include the Freemius Lite SDK. |
| 25 |
require_once TTB_DIR_PATH . 'freemius-lite/start.php'; |
| 26 |
|
| 27 |
$ttb_fs = fs_lite_dynamic_init( array( |
| 28 |
'id' => '20170', |
| 29 |
'slug' => 'text-typing', |
| 30 |
// Resolve the SDK against the plugin root, not this includes/ file. |
| 31 |
'__FILE__' => TTB_DIR_PATH . 'index.php', |
| 32 |
'premium_slug' => 'text-typing-pro', |
| 33 |
'type' => 'plugin', |
| 34 |
'public_key' => 'pk_b0a805a4574f7a1db93e8859282de', |
| 35 |
'is_premium' => false, |
| 36 |
'premium_suffix' => 'Pro', |
| 37 |
'has_premium_version' => true, |
| 38 |
'has_addons' => false, |
| 39 |
'has_paid_plans' => true, |
| 40 |
'menu' => array( |
| 41 |
'slug' => 'edit.php?post_type=text-typing', |
| 42 |
'first-path' => 'edit.php?post_type=text-typing&page=ttb_demo_page', |
| 43 |
'support' => false, |
| 44 |
), |
| 45 |
) ); |
| 46 |
} |
| 47 |
|
| 48 |
return $ttb_fs; |
| 49 |
} |
| 50 |
|
| 51 |
// Init Freemius Lite. |
| 52 |
ttb_fs(); |
| 53 |
// Signal that the SDK was initiated. |
| 54 |
do_action( 'ttb_fs_loaded' ); |
| 55 |
} |
| 56 |
|