boot.php
46 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Factory Bootstrap |
| 4 | * |
| 5 | * @since 1.0.0 |
| 6 | * @package factory-bootstrap |
| 7 | */ |
| 8 | |
| 9 | // Exit if accessed directly |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit; |
| 12 | } |
| 13 | |
| 14 | // module provides function only for the admin area |
| 15 | if ( ! is_admin() ) { |
| 16 | return; |
| 17 | } |
| 18 | |
| 19 | if ( defined( 'FACTORY_BOOTSTRAP_500_LOADED' ) ) { |
| 20 | return; |
| 21 | } |
| 22 | |
| 23 | define( 'FACTORY_BOOTSTRAP_500_VERSION', '5.0.2' ); |
| 24 | |
| 25 | define( 'FACTORY_BOOTSTRAP_500_LOADED', true ); |
| 26 | |
| 27 | if ( ! defined( 'FACTORY_FLAT_ADMIN' ) ) { |
| 28 | define( 'FACTORY_FLAT_ADMIN', true ); |
| 29 | } |
| 30 | |
| 31 | define( 'FACTORY_BOOTSTRAP_500_DIR', __DIR__ ); |
| 32 | define( 'FACTORY_BOOTSTRAP_500_URL', plugins_url( '', __FILE__ ) ); |
| 33 | |
| 34 | require_once FACTORY_BOOTSTRAP_500_DIR . '/includes/functions.php'; |
| 35 | |
| 36 | /** |
| 37 | * @param Wbcr_Factory600_Plugin $plugin |
| 38 | */ |
| 39 | add_action( |
| 40 | 'wbcr_factory_bootstrap_500_plugin_created', |
| 41 | function ( $plugin ) { |
| 42 | $manager = new Wbcr_FactoryBootstrap500_Manager( $plugin ); |
| 43 | $plugin->setBootstap( $manager ); |
| 44 | } |
| 45 | ); |
| 46 |