balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

bootstrap.php (909B)


      1 <?php
      2 /**
      3  * Bootstrap the application
      4  */
      5 
      6 use Extendify\ExtendifySdk\Admin;
      7 
      8 if (!defined('ABSPATH')) {
      9     die('No direct access.');
     10 }
     11 
     12 if (!defined('EXTENDIFYSDK_PATH')) {
     13     define('EXTENDIFYSDK_PATH', \plugin_dir_path(__FILE__));
     14 }
     15 
     16 if (is_readable(EXTENDIFYSDK_PATH . 'vendor/autoload.php')) {
     17     require EXTENDIFYSDK_PATH . 'vendor/autoload.php';
     18 }
     19 
     20 $extendifysdkAdmin = new Admin();
     21 
     22 require EXTENDIFYSDK_PATH . 'routes/api.php';
     23 require EXTENDIFYSDK_PATH . 'editorplus/EditorPlus.php';
     24 
     25 \add_action(
     26     'init',
     27     function () {
     28         // Hard-coded to run only within Editor Plus for now.
     29         if (isset($GLOBALS['extendifySdkSourcePlugin']) && in_array($GLOBALS['extendifySdkSourcePlugin'], ['Editor Plus'], true)) {
     30             require EXTENDIFYSDK_PATH . 'support/notices.php';
     31         }
     32 
     33         \load_plugin_textdomain('extendify-sdk', false, EXTENDIFYSDK_PATH . 'languages');
     34     }
     35 );