| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Plugin Name: Counters Block |
| 5 |
* Description: Display Number as animated counter( start to end ). |
| 6 |
* Version: 2.0.2 |
| 7 |
* Author: bPlugins |
| 8 |
* Author URI: https://bplugins.com |
| 9 |
* License: GPLv3 |
| 10 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt |
| 11 |
* Text Domain: counters-block |
| 12 |
*/ |
| 13 |
// ABS PATH |
| 14 |
if ( !defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
if ( function_exists( 'cb_fs' ) ) { |
| 18 |
cb_fs()->set_basename( false, __FILE__ ); |
| 19 |
} else { |
| 20 |
// Constant |
| 21 |
define( 'CTRB_VERSION', ( isset( $_SERVER['HTTP_HOST'] ) && ('localhost' === $_SERVER['HTTP_HOST'] || 'plugins.local' === $_SERVER['HTTP_HOST']) ? time() : '2.0.2' ) ); |
| 22 |
define( 'CTRB_DIR_URL', plugin_dir_url( __FILE__ ) ); |
| 23 |
define( 'CTRB_DIR_PATH', plugin_dir_path( __FILE__ ) ); |
| 24 |
define( 'CTRB_HAS_PRO', file_exists( CTRB_DIR_PATH . 'vendor/freemius/start.php' ) ); |
| 25 |
if ( !function_exists( 'cb_fs' ) ) { |
| 26 |
function cb_fs() { |
| 27 |
global $cb_fs; |
| 28 |
if ( !isset( $cb_fs ) ) { |
| 29 |
$fsLitePath = CTRB_DIR_PATH . 'vendor/freemius-lite/start.php'; |
| 30 |
$fsPath = CTRB_DIR_PATH . 'vendor/freemius/start.php'; |
| 31 |
if ( CTRB_HAS_PRO ) { |
| 32 |
require_once $fsPath; |
| 33 |
} else { |
| 34 |
require_once $fsLitePath; |
| 35 |
} |
| 36 |
$config = array( |
| 37 |
'id' => '22599', |
| 38 |
'slug' => 'counters-block', |
| 39 |
'premium_slug' => 'counters-block-pro', |
| 40 |
'type' => 'plugin', |
| 41 |
'public_key' => 'pk_6cbd9ad1f21c0e19b48fc1eb61413', |
| 42 |
'is_premium' => false, |
| 43 |
'premium_suffix' => 'Pro', |
| 44 |
'has_premium_version' => true, |
| 45 |
'has_addons' => false, |
| 46 |
'has_paid_plans' => true, |
| 47 |
'menu' => array( |
| 48 |
'slug' => 'edit.php?post_type=counters-block', |
| 49 |
'first-path' => 'edit.php?post_type=counters-block&page=demo_page#/welcome', |
| 50 |
'support' => false, |
| 51 |
), |
| 52 |
); |
| 53 |
$cb_fs = ( CTRB_HAS_PRO && file_exists( $fsPath ) ? fs_dynamic_init( $config ) : fs_lite_dynamic_init( $config ) ); |
| 54 |
} |
| 55 |
return $cb_fs; |
| 56 |
} |
| 57 |
|
| 58 |
// Init Freemius. |
| 59 |
cb_fs(); |
| 60 |
// Signal that SDK was initiated. |
| 61 |
do_action( 'cb_fs_loaded' ); |
| 62 |
} |
| 63 |
// ... Your plugin's main file logic ... |
| 64 |
require_once CTRB_DIR_PATH . "includes/class-ctrbPlugin.php"; |
| 65 |
new CTRBPlugin(); |
| 66 |
} |