PluginProbe
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for news, magazine, blog and business sites / 1.0.5
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for news, magazine, blog and business sites v1.0.5
5.0.1 4.1.0 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.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 All 39 releases
← All changes | blockspare.php +77 -61 5.0.1 → 1.0.5 View file →
@@ -1,65 +1,81 @@
1 1 <?php
2 + /*
3 + * Plugin Name: Blockspare
4 + * Plugin URI: https://profiles.wordpress.org/blockspare
5 + * Description: Beautiful Page Building Blocks for WordPress
6 + * Version: 1.0.5
7 + * Author: Blockspare
8 + * Author URI: https://blockspare.com
9 + * Text Domain: blockspare
10 + * License: GPL-2.0+
11 + * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12 + */
13 +
14 + defined('ABSPATH') or die('No script kiddies please!'); // prevent direct access
15 +
16 + if (!class_exists('Blockspare')) :
17 +
18 + class Blockspare
19 + {
20 +
21 +
22 + /**
23 + * Plugin version.
24 + *
25 + * @var string
26 + */
27 + const VERSION = '1.0.5';
28 +
29 + /**
30 + * Instance of this class.
31 + *
32 + * @var object
33 + */
34 + protected static $instance = null;
35 +
36 +
37 + /**
38 + * Initialize the plugin.
39 + */
40 + public function __construct()
41 + {
42 +
43 + /**
44 + * Define global constants
45 + **/
46 + defined('BLOCKSPARE_BASE_FILE') or define('BLOCKSPARE_BASE_FILE', __FILE__);
47 + defined('BLOCKSPARE_BASE_DIR') or define('BLOCKSPARE_BASE_DIR', dirname(BLOCKSPARE_BASE_FILE));
48 + defined('BLOCKSPARE_PLUGIN_URL') or define('BLOCKSPARE_PLUGIN_URL', plugin_dir_url(__FILE__));
49 + defined('BLOCKSPARE_PLUGIN_DIR') or define('BLOCKSPARE_PLUGIN_DIR', plugin_dir_path(__FILE__));
2 50
3 -/**
4 - * Plugin Name: BlockSpare
5 - * Plugin URI: https://blockspare.com/
6 - * Description: Build news, magazine, blog, editorial and business websites with powerful Gutenberg blocks, AI tools, Site Builder, starter sites, post layouts and more.
7 - * Version: 5.0.1
8 - * Author: BlockSpare
9 - * Author URI: https://blockspare.com/
10 - * Text Domain: blockspare
11 - * License: GPL-2.0+
12 - * License URI: http://www.gnu.org/licenses/gpl-2.0.html
13 - */
51 + defined( 'BLOCKSPARE_SHOW_PRO_NOTICES' ) || define( 'BLOCKSPARE_SHOW_PRO_NOTICES', true );
52 + defined( 'BLOCKSPARE_VERSION' ) || define( 'BLOCKSPARE_VERSION', '1.0.5' );
14 53
15 -defined('ABSPATH') or die('No script kiddies please!'); // prevent direct access
54 +
55 +
56 + include_once 'src/init.php';
57 + include_once 'src/welcome.php';
16 58
17 -/**
18 - * Define global constants
19 - **/
20 -defined('BLOCKSPARE_BASE_FILE') or define('BLOCKSPARE_BASE_FILE', __FILE__);
21 -defined('BLOCKSPARE_PLUGIN_BASE') or define('BLOCKSPARE_PLUGIN_BASE', plugin_basename(BLOCKSPARE_BASE_FILE));
22 -defined('BLOCKSPARE_BASE_DIR') or define('BLOCKSPARE_BASE_DIR', dirname(BLOCKSPARE_BASE_FILE));
23 -defined('BLOCKSPARE_PLUGIN_URL') or define('BLOCKSPARE_PLUGIN_URL', plugin_dir_url(__FILE__));
24 -defined('BLOCKSPARE_PLUGIN_DIR') or define('BLOCKSPARE_PLUGIN_DIR', plugin_dir_path(__FILE__));
25 -defined('BLOCKSPARE_PRO_PATH') || define('BLOCKSPARE_PRO_PATH', 'https://www.blockspare.com/');
26 -defined('BLOCKSPARE_SHOW_PRO_NOTICES') || define('BLOCKSPARE_SHOW_PRO_NOTICES', true);
27 -defined('BLOCKSPARE_VERSION') || define('BLOCKSPARE_VERSION', '5.0.0');
28 -
29 -
30 -if (!version_compare(PHP_VERSION, '5.6', '>=')) {
31 - add_action('admin_notices', 'blockspare_fail_php_free_version');
32 -} elseif (!version_compare(get_bloginfo('version'), '4.7', '>=')) {
33 - add_action('admin_notices', 'blockspare_fail_wp_free_version');
34 -} else {
35 - /**
36 - * Freemius.
37 - */
38 - require_once(BLOCKSPARE_PLUGIN_DIR . '/freemius.php');
39 -
40 - /**
41 - * Plugin init and welcome.
42 - */
43 -
44 - include_once BLOCKSPARE_PLUGIN_DIR . 'inc/init.php';
45 - include_once BLOCKSPARE_PLUGIN_DIR . 'inc/welcome.php';
46 - include_once BLOCKSPARE_PLUGIN_DIR . 'inc/fonts.php';
47 - include_once BLOCKSPARE_PLUGIN_DIR . 'inc/theme-builder/theme-builder-loader.php';
48 - include_once BLOCKSPARE_PLUGIN_DIR . 'inc/ai/class-ai.php';
49 -}
50 -
51 -function blockspare_fail_php_free_version()
52 -{
53 - /* translators: %s: PHP version */
54 - $message = sprintf(esc_html__('BlockSpare for Gutenberg requires PHP version %s+, plugin is currently NOT RUNNING.', 'blockspare'), '5.6');
55 - $html_message = sprintf('<div class="error">%s</div>', wpautop($message));
56 - echo wp_kses_post($html_message);
57 -}
58 -
59 -function blockspare_fail_wp_free_version()
60 -{
61 - /* translators: %s: WordPress version */
62 - $message = sprintf(esc_html__('BlockSpare for Gutenberg requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT RUNNING.', 'blockspare'), '4.7');
63 - $html_message = sprintf('<div class="error">%s</div>', wpautop($message));
64 - echo wp_kses_post($html_message);
65 -}
59 + } // end of contructor
60 +
61 + /**
62 + * Return an instance of this class.
63 + *
64 + * @return object A single instance of this class.
65 + */
66 + public static function get_instance()
67 + {
68 +
69 + // If the single instance hasn't been set, set it now.
70 + if (null == self::$instance) {
71 + self::$instance = new self;
72 + }
73 + return self::$instance;
74 + }
75 +
76 +
77 + }// end of the class
78 +
79 + add_action('plugins_loaded', array('Blockspare', 'get_instance'), 0);
80 +
81 + endif;