| @@ -1,64 +1,61 @@ | ||
| 1 | 1 | <?php |
| 2 | + /* | |
| 3 | + * Plugin Name: Blockspare | |
| 4 | + * Plugin URI: https://blockspare.com/ | |
| 5 | + * Description: Empower your WordPress site effortlessly! Expert-designed starter templates library and Gutenberg blocks for stunning blogs, news, magazines, and agency sites. One-click import, no coding hassle! | |
| 6 | + * Version: 3.1.1 | |
| 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 | + /** | |
| 17 | + * Define global constants | |
| 18 | + **/ | |
| 19 | + defined('BLOCKSPARE_BASE_FILE') or define('BLOCKSPARE_BASE_FILE', __FILE__); | |
| 20 | + defined('BLOCKSPARE_PLUGIN_BASE') or define('BLOCKSPARE_PLUGIN_BASE', plugin_basename( BLOCKSPARE_BASE_FILE ) ); | |
| 21 | + defined('BLOCKSPARE_BASE_DIR') or define('BLOCKSPARE_BASE_DIR', dirname(BLOCKSPARE_BASE_FILE)); | |
| 22 | + defined('BLOCKSPARE_PLUGIN_URL') or define('BLOCKSPARE_PLUGIN_URL', plugin_dir_url(__FILE__)); | |
| 23 | + defined('BLOCKSPARE_PLUGIN_DIR') or define('BLOCKSPARE_PLUGIN_DIR', plugin_dir_path(__FILE__)); | |
| 24 | + defined('BLOCKSPARE_PRO_PATH') || define('BLOCKSPARE_PRO_PATH','https://www.blockspare.com/'); | |
| 25 | + defined('BLOCKSPARE_SHOW_PRO_NOTICES' ) || define('BLOCKSPARE_SHOW_PRO_NOTICES', true ); | |
| 26 | + defined('BLOCKSPARE_VERSION' ) || define('BLOCKSPARE_VERSION', '3.1.1'); | |
| 2 | 27 | |
| 3 | -/** | |
| 4 | - * Plugin Name: BlockSpare - Gutenberg Site Builder Blocks & Starter Templates | |
| 5 | - * Plugin URI: https://blockspare.com/ | |
| 6 | - * Description: Gutenberg Blocks & Patterns for Blogs, Magazines, Business Sites – Post Grids, Sliders, Carousels, Counters, Page Builder & Starter Site Imports, No Coding Needed | |
| 7 | - * Version: 4.2.6 | |
| 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 | - */ | |
| 14 | 28 | |
| 15 | -defined('ABSPATH') or die('No script kiddies please!'); // prevent direct access | |
| 29 | + if ( ! version_compare( PHP_VERSION, '5.6', '>=' ) ) { | |
| 30 | + add_action( 'admin_notices', 'blockspare_fail_php_version' ); | |
| 31 | + } elseif ( ! version_compare( get_bloginfo( 'version' ), '4.7', '>=' ) ) { | |
| 32 | + add_action( 'admin_notices', 'blockspare_fail_wp_version' ); | |
| 33 | + } else { | |
| 34 | + /** | |
| 35 | + * Freemius. | |
| 36 | + */ | |
| 37 | + require_once(BLOCKSPARE_PLUGIN_DIR.'/freemius.php'); | |
| 16 | 38 | |
| 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', '4.2.4'); | |
| 39 | + /** | |
| 40 | + * Plugin init and welcome. | |
| 41 | + */ | |
| 42 | + | |
| 43 | + include_once BLOCKSPARE_PLUGIN_DIR. 'inc/init.php'; | |
| 44 | + include_once BLOCKSPARE_PLUGIN_DIR.'inc/welcome.php'; | |
| 45 | + include_once BLOCKSPARE_PLUGIN_DIR.'inc/fonts.php'; | |
| 46 | + } | |
| 28 | 47 | |
| 29 | 48 | |
| 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'); | |
| 49 | + function blockspare_fail_php_version() { | |
| 50 | + /* translators: %s: PHP version */ | |
| 51 | + $message = sprintf( esc_html__( 'Blockspare for Gutenberg requires PHP version %s+, plugin is currently NOT RUNNING.', 'blockspare' ), '5.6' ); | |
| 52 | + $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) ); | |
| 53 | + echo wp_kses_post( $html_message ); | |
| 54 | + } | |
| 39 | 55 | |
| 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 | - | |
| 48 | -} | |
| 49 | - | |
| 50 | -function blockspare_fail_php_free_version() | |
| 51 | -{ | |
| 52 | - /* translators: %s: PHP version */ | |
| 53 | - $message = sprintf(esc_html__('BlockSpare for Gutenberg requires PHP version %s+, plugin is currently NOT RUNNING.', 'blockspare'), '5.6'); | |
| 54 | - $html_message = sprintf('<div class="error">%s</div>', wpautop($message)); | |
| 55 | - echo wp_kses_post($html_message); | |
| 56 | -} | |
| 57 | - | |
| 58 | -function blockspare_fail_wp_free_version() | |
| 59 | -{ | |
| 60 | - /* translators: %s: WordPress version */ | |
| 61 | - $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'); | |
| 62 | - $html_message = sprintf('<div class="error">%s</div>', wpautop($message)); | |
| 63 | - echo wp_kses_post($html_message); | |
| 64 | -} | |
| 56 | + function blockspare_fail_wp_version() { | |
| 57 | + /* translators: %s: WordPress version */ | |
| 58 | + $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' ); | |
| 59 | + $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) ); | |
| 60 | + echo wp_kses_post( $html_message ); | |
| 61 | + } | |