| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: GutSlider Blocks |
| 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: 1.0.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: gutsliders |
| 13 |
* |
| 14 |
*/ |
| 15 |
|
| 16 |
// Stop Direct Access |
| 17 |
if ( ! defined( 'ABSPATH' ) ) { |
| 18 |
exit; |
| 19 |
} |
| 20 |
|
| 21 |
// require autoload |
| 22 |
require_once __DIR__ . '/vendor/autoload.php'; |
| 23 |
|
| 24 |
use GutSliders\Traits\Singleton; |
| 25 |
|
| 26 |
/** |
| 27 |
* Blocks Final Class |
| 28 |
*/ |
| 29 |
|
| 30 |
final class GutSliderBlocks { |
| 31 |
|
| 32 |
// Singleton Trait |
| 33 |
use Singleton; |
| 34 |
|
| 35 |
// Constructor |
| 36 |
public function __construct() { |
| 37 |
// loader |
| 38 |
new GutSliders\Loader(); |
| 39 |
// define constants |
| 40 |
$this->define_constants(); |
| 41 |
} |
| 42 |
|
| 43 |
/** |
| 44 |
* Define the plugin constants |
| 45 |
*/ |
| 46 |
private function define_constants() { |
| 47 |
define( 'GUTSLIDERS_VERSION', '1.0.0' ); |
| 48 |
define( 'GUTSLIDERS_URL', plugin_dir_url( __FILE__ ) ); |
| 49 |
define('GUTSLIDERS_DIR_PATH', plugin_dir_path(__FILE__)); |
| 50 |
define( 'GUTSLIDERS_PATH', __DIR__ ); |
| 51 |
} |
| 52 |
|
| 53 |
} |
| 54 |
|
| 55 |
/** |
| 56 |
* Kickoff |
| 57 |
*/ |
| 58 |
function gut_slider_blocks() { |
| 59 |
return GutSliderBlocks::init(); |
| 60 |
} |
| 61 |
|
| 62 |
// Let's start it |
| 63 |
gut_slider_blocks(); |
| 64 |
|