| 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.2.2 |
| 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.2.2'; |
| 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__)); |
| 50 |
|
| 51 |
defined( 'BLOCKSPARE_SHOW_PRO_NOTICES' ) || define( 'BLOCKSPARE_SHOW_PRO_NOTICES', true ); |
| 52 |
defined( 'BLOCKSPARE_VERSION' ) || define( 'BLOCKSPARE_VERSION', '1.2.5' ); |
| 53 |
|
| 54 |
/** |
| 55 |
* Freemius. |
| 56 |
*/ |
| 57 |
require_once(BLOCKSPARE_PLUGIN_DIR.'/freemius.php'); |
| 58 |
|
| 59 |
/** |
| 60 |
* Plugin init and welcome. |
| 61 |
*/ |
| 62 |
include_once 'src/init.php'; |
| 63 |
include_once 'src/welcome.php'; |
| 64 |
include_once 'src/fonts.php'; |
| 65 |
|
| 66 |
} // end of contructor |
| 67 |
|
| 68 |
/** |
| 69 |
* Return an instance of this class. |
| 70 |
* |
| 71 |
* @return object A single instance of this class. |
| 72 |
*/ |
| 73 |
public static function get_instance() |
| 74 |
{ |
| 75 |
|
| 76 |
// If the single instance hasn't been set, set it now. |
| 77 |
if (null == self::$instance) { |
| 78 |
self::$instance = new self; |
| 79 |
} |
| 80 |
return self::$instance; |
| 81 |
} |
| 82 |
|
| 83 |
|
| 84 |
}// end of the class |
| 85 |
|
| 86 |
add_action('plugins_loaded', array('Blockspare', 'get_instance'), 0); |
| 87 |
|
| 88 |
endif; |
| 89 |
|