| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: GutSlider - Slider Blocks for Gutenberg |
| 4 |
* Description: A collection of custom Gutenberg Slider Blocks to slide your post or custom content. |
| 5 |
* Requires at least: 5.7 |
| 6 |
* Requires PHP: 7.0 |
| 7 |
* Version: 2.1.0 |
| 8 |
* Author: Zakaria Binsaifullah |
| 9 |
* Author URI: https://makegutenblock.com |
| 10 |
* License: GPL-2.0-or-later |
| 11 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 12 |
* Text Domain: slider-blocks |
| 13 |
* |
| 14 |
*/ |
| 15 |
|
| 16 |
|
| 17 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
| 18 |
|
| 19 |
/** |
| 20 |
* Blocks Final Class |
| 21 |
* return GutSliderBlocks |
| 22 |
*/ |
| 23 |
if( ! class_exists('GutSliderBlocks') ) { |
| 24 |
|
| 25 |
final class GutSliderBlocks { |
| 26 |
|
| 27 |
private static $instance = null; |
| 28 |
|
| 29 |
/** |
| 30 |
* Constructor |
| 31 |
* return void |
| 32 |
*/ |
| 33 |
public function __construct() { |
| 34 |
$this->define_constants(); |
| 35 |
$this->includes(); |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* Define the plugin constants |
| 40 |
* return void |
| 41 |
*/ |
| 42 |
private function define_constants() { |
| 43 |
define( 'GUTSLIDER_VERSION', '2.1.0' ); |
| 44 |
define( 'GUTSLIDER_URL', plugin_dir_url( __FILE__ ) ); |
| 45 |
define('GUTSLIDER_DIR_PATH', plugin_dir_path(__FILE__)); |
| 46 |
define( 'GUTSLIDER_DIR', __DIR__ ); |
| 47 |
} |
| 48 |
|
| 49 |
/** |
| 50 |
* Initialize the plugin |
| 51 |
* return GutSliderBlocks |
| 52 |
*/ |
| 53 |
public static function init() { |
| 54 |
if( is_null( self::$instance ) ) { |
| 55 |
self::$instance = new self(); |
| 56 |
} |
| 57 |
return self::$instance; |
| 58 |
} |
| 59 |
|
| 60 |
/** |
| 61 |
* Include the files |
| 62 |
* return void |
| 63 |
*/ |
| 64 |
public function includes() { |
| 65 |
require_once GUTSLIDER_DIR . '/includes/init.php'; |
| 66 |
} |
| 67 |
} |
| 68 |
|
| 69 |
} |
| 70 |
|
| 71 |
/** |
| 72 |
* Initialize the GutSliderBlocks |
| 73 |
* return GutSliderBlocks |
| 74 |
*/ |
| 75 |
function gutsliderblocks() { |
| 76 |
return GutSliderBlocks::init(); |
| 77 |
} |
| 78 |
|
| 79 |
// kick-off the plugin |
| 80 |
gutsliderblocks(); |