| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Depicter |
| 4 |
* Plugin URI: https://depicter.com |
| 5 |
* Description: Make animated and interactive image slider, video slider, post slider and carousel which work smoothly across devices. |
| 6 |
* Version: 1.5.0 |
| 7 |
* Requires at least: 4.9 |
| 8 |
* Requires PHP: 7.2.5 |
| 9 |
* Author: Averta |
| 10 |
* Author URI: http://averta.net |
| 11 |
* License: GPL-2.0-only |
| 12 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 13 |
* Text Domain: depicter |
| 14 |
* Domain Path: /languages |
| 15 |
* |
| 16 |
* |
| 17 |
* @package Depicter |
| 18 |
*/ |
| 19 |
|
| 20 |
if ( ! defined( 'ABSPATH' ) ) { |
| 21 |
exit; |
| 22 |
} |
| 23 |
|
| 24 |
define( 'DEPICTER_VERSION', '1.5.0' ); |
| 25 |
define( 'DEPICTER_PLUGIN_ID', 'depicter' ); |
| 26 |
define( 'DEPICTER_PLUGIN_FILE', __FILE__ ); |
| 27 |
define( 'DEPICTER_PLUGIN_PATH', __DIR__ ); |
| 28 |
define( 'DEPICTER_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); |
| 29 |
define( 'DEPICTER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); |
| 30 |
|
| 31 |
$name = trim( get_file_data( __FILE__, [ 'Plugin Name' ] )[0] ); |
| 32 |
|
| 33 |
|
| 34 |
// Make sure requirements are met |
| 35 |
require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'requirement.php'; |
| 36 |
|
| 37 |
if( ! depicter_requirements_satisfied( $name, '7.2.5' ) ){ |
| 38 |
// requirements are not met, stop further execution. |
| 39 |
// depicter_requirements_satisfied() will automatically add an admin notice. |
| 40 |
return; |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
// Make sure we can load a compatible version of WP Emerge. |
| 45 |
require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'version.php'; |
| 46 |
|
| 47 |
if ( ! depicter_should_load_framework( $name, '0.16.0', '2.0.0' )) { |
| 48 |
// An incompatible WP Emerge version is already loaded - stop further execution. |
| 49 |
// depicter_should_load_framework() will automatically add an admin notice. |
| 50 |
return; |
| 51 |
} |
| 52 |
|
| 53 |
// ----------------- |
| 54 |
|
| 55 |
// Load composer dependencies. |
| 56 |
if ( file_exists( __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php' ) ) { |
| 57 |
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; |
| 58 |
} |
| 59 |
|
| 60 |
depicter_declare_loaded_framework( $name, 'plugin', __FILE__ ); |
| 61 |
|
| 62 |
// Load helpers. |
| 63 |
require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'App.php'; |
| 64 |
require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'helpers.php'; |
| 65 |
require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'functions.php'; |
| 66 |
|
| 67 |
// Bootstrap plugin after all dependencies and helpers are loaded. |
| 68 |
\Depicter::make()->bootstrap( require __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'config.php' ); |
| 69 |
|
| 70 |
// Register hooks. |
| 71 |
require_once __DIR__ . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'hooks.php'; |
| 72 |
|