| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Chart Block |
| 4 |
* Description: Represent your data by symbols, such as bars, lines, or pie charts. |
| 5 |
* Version: 1.1.9 |
| 6 |
* Requires at least: 6.5 |
| 7 |
* Tested up to: 7.1 |
| 8 |
* Requires PHP: 7.4 |
| 9 |
* Author: bPlugins |
| 10 |
* Author URI: https://bplugins.com |
| 11 |
* License: GPLv3 |
| 12 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt |
| 13 |
* Text Domain: chart-block |
| 14 |
*/ |
| 15 |
|
| 16 |
|
| 17 |
// ABS PATH |
| 18 |
if ( !defined( 'ABSPATH' ) ) { exit; } |
| 19 |
|
| 20 |
|
| 21 |
if ( function_exists( 'chart_block_fs' ) ) { |
| 22 |
chart_block_fs()->set_basename( true, __FILE__ ); |
| 23 |
} |
| 24 |
else { |
| 25 |
// Constant |
| 26 |
// নতুন কনস্ট্যান্ট (New Prefix) |
| 27 |
define( 'CHART_BLOCK_VERSION', ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? time() : '1.1.9' ); |
| 28 |
define( 'CHART_BLOCK_DIR_URL', plugin_dir_url( __FILE__ ) ); |
| 29 |
define( 'CHART_BLOCK_DIR_PATH', plugin_dir_path( __FILE__ ) ); |
| 30 |
|
| 31 |
// পুরনো ব্যবহারকারীদের জন্য ব্যাকআপ (Fallback) |
| 32 |
if ( ! defined( 'BCHART_VERSION' ) ) { |
| 33 |
define( 'BCHART_VERSION', CHART_BLOCK_VERSION ); |
| 34 |
} |
| 35 |
if ( ! defined( 'BCHART_DIR_URL' ) ) { |
| 36 |
define( 'BCHART_DIR_URL', CHART_BLOCK_DIR_URL ); |
| 37 |
} |
| 38 |
if ( ! defined( 'BCHART_DIR_PATH' ) ) { |
| 39 |
define( 'BCHART_DIR_PATH', CHART_BLOCK_DIR_PATH ); |
| 40 |
} |
| 41 |
|
| 42 |
if ( ! function_exists( 'chart_block_fs' ) ) { |
| 43 |
// Create a helper function for easy SDK access. |
| 44 |
function chart_block_fs() { |
| 45 |
global $chart_block_fs; |
| 46 |
|
| 47 |
|
| 48 |
if ( ! isset( $chart_block_fs ) ) { |
| 49 |
// Include Freemius SDK. |
| 50 |
require_once BCHART_DIR_PATH . 'vendor/freemius-lite/start.php'; |
| 51 |
|
| 52 |
$chart_block_fs =fs_lite_dynamic_init([ |
| 53 |
'id' => '17726', |
| 54 |
'slug' => 'chart-block', |
| 55 |
'premium_slug' => 'chart-block-pro', |
| 56 |
'type' => 'plugin', |
| 57 |
'public_key' => 'pk_e8ee503e1b981e8777e10621d3f8a', |
| 58 |
'is_premium' => false, |
| 59 |
'premium_suffix' => 'Pro', |
| 60 |
'has_premium_version' => true, |
| 61 |
'has_addons' => false, |
| 62 |
'has_paid_plans' => true, |
| 63 |
'menu' => array( |
| 64 |
'slug' => 'chart-block', |
| 65 |
'first-path' => 'edit.php?post_type=chart_block&page=block-dashboard#/welcome', |
| 66 |
'support' => false, |
| 67 |
), |
| 68 |
]); |
| 69 |
} |
| 70 |
|
| 71 |
return $chart_block_fs; |
| 72 |
} |
| 73 |
|
| 74 |
// Init Freemius. |
| 75 |
chart_block_fs(); |
| 76 |
// Signal that SDK was initiated. |
| 77 |
do_action( 'chart_block_fs_loaded' ); |
| 78 |
} |
| 79 |
// ... Your plugin's main file logic ... |
| 80 |
require_once BCHART_DIR_PATH . 'includes/class-chart-block-dependencies.php'; |
| 81 |
new ChartBlock_Dependencies(); |
| 82 |
} |
| 83 |
|
| 84 |
|