PluginProbe
Chart Block – Visualize Data with Bar, Line, Pie Charts / 1.2.0
Chart Block – Visualize Data with Bar, Line, Pie Charts v1.2.0
1.2.0 1.1.9 1.1.8 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7
chart-block / plugin.php

plugin.php in Chart Block – Visualize Data with Bar, Line, Pie Charts 1.2.0, at plugin.php

84 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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.2.0
6 * Requires at least: 6.5
7 * Tested up to: 7.0
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.2.0' );
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