| 1 |
<?php |
| 2 |
/** |
| 3 |
* Bootstrap the application |
| 4 |
*/ |
| 5 |
|
| 6 |
use Extendify\Library\Admin; |
| 7 |
use Extendify\Library\Frontend; |
| 8 |
use Extendify\Library\Shared; |
| 9 |
use Extendify\Library\Welcome; |
| 10 |
|
| 11 |
if (!defined('ABSPATH')) { |
| 12 |
die('No direct access.'); |
| 13 |
} |
| 14 |
|
| 15 |
if (!defined('EXTENDIFY_PATH')) { |
| 16 |
define('EXTENDIFY_PATH', \plugin_dir_path(__FILE__)); |
| 17 |
} |
| 18 |
|
| 19 |
if (!defined('EXTENDIFY_URL')) { |
| 20 |
define('EXTENDIFY_URL', \plugin_dir_url(__FILE__)); |
| 21 |
} |
| 22 |
|
| 23 |
if (!defined('EXTENDIFY_PLUGIN_BASENAME')) { |
| 24 |
define('EXTENDIFY_PLUGIN_BASENAME', \plugin_basename(__DIR__ . '/extendify.php')); |
| 25 |
} |
| 26 |
|
| 27 |
if (is_readable(EXTENDIFY_PATH . 'vendor/autoload.php')) { |
| 28 |
require EXTENDIFY_PATH . 'vendor/autoload.php'; |
| 29 |
} |
| 30 |
|
| 31 |
$extendifyAdmin = new Admin(); |
| 32 |
$extendifyFrontend = new Frontend(); |
| 33 |
$extendifyShared = new Shared(); |
| 34 |
$extendifyWelcome = new Welcome(); |
| 35 |
|
| 36 |
require EXTENDIFY_PATH . 'routes/api.php'; |
| 37 |
require EXTENDIFY_PATH . 'editorplus/EditorPlus.php'; |
| 38 |
|
| 39 |
\add_action( |
| 40 |
'init', |
| 41 |
function () { |
| 42 |
\load_plugin_textdomain('extendify', false, EXTENDIFY_PATH . 'languages'); |
| 43 |
} |
| 44 |
); |
| 45 |
|
| 46 |
// To cover legacy conflicts. |
| 47 |
// phpcs:ignore |
| 48 |
class ExtendifySdk |
| 49 |
{ |
| 50 |
} |
| 51 |
|