PluginProbe
Boxzilla – WordPress Popup Builder / 3.2.24
Boxzilla – WordPress Popup Builder v3.2.24
3.4.11 3.4.10 3.4.9 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 trunk 3.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 All 72 releases
boxzilla / bootstrap.php

bootstrap.php in Boxzilla – WordPress Popup Builder 3.2.24, at bootstrap.php

53 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Boxzilla;
4
5 defined( 'ABSPATH' ) or exit;
6
7
8 require __DIR__ . '/src/services.php';
9 require __DIR__ . '/src/licensing/services.php';
10
11 // Bootstrap plugin at later action hook
12 add_action(
13 'plugins_loaded',
14 function() {
15 $boxzilla = boxzilla();
16
17 // load default filters
18 require __DIR__ . '/src/default-filters.php';
19 require __DIR__ . '/src/default-actions.php';
20
21 if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
22 $boxzilla['filter.autocomplete']->init();
23 $boxzilla['admin.menu']->init();
24 } elseif ( defined( 'DOING_CRON' ) && DOING_CRON ) {
25 $boxzilla['license_poller']->init();
26 } elseif ( is_admin() ) {
27 $boxzilla['admin']->init();
28 $boxzilla['admin.menu']->init();
29 } else {
30 add_action(
31 'template_redirect',
32 function() use ( $boxzilla ) {
33 $boxzilla['box_loader']->init();
34 }
35 );
36 }
37
38 // license manager
39 if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
40 $boxzilla['license_manager']->init();
41
42 if ( count( $boxzilla->plugins ) > 0 ) {
43 $boxzilla['update_manager']->init();
44 }
45 }
46
47 // for legacy reasons: Boxzilla Theme Pack & Boxzilla WooCommerce used this
48 // we will be removing this in future versions
49 $boxzilla['bootstrapper']->run();
50 },
51 90
52 );
53