PluginProbe
Boxzilla – WordPress Popup Builder / 3.2.18
Boxzilla – WordPress Popup Builder v3.2.18
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
← All changes | bootstrap.php +36 -28 3.0.23.2.18 View file →
@@ -12,38 +12,46 @@
12 12 $provider->register( $boxzilla );
13 13 $provider = new Licensing\LicenseServiceProvider();
14 14 $provider->register( $boxzilla );
15 15
16 +
16 17 // Rest of bootstrapping runs at plugins_loaded:90
17 -add_action( 'plugins_loaded', function() use( $boxzilla ) {
18 +add_action(
19 + 'plugins_loaded',
20 + function() use ( $boxzilla ) {
18 21
19 - // load default filters
20 - require __DIR__ . '/src/default-filters.php';
21 - require __DIR__ . '/src/default-actions.php';
22 + // load default filters
23 + require __DIR__ . '/src/default-filters.php';
24 + require __DIR__ . '/src/default-actions.php';
22 25
23 - $bootstrapper = $boxzilla->bootstrapper;
26 + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
27 + $boxzilla['filter.autocomplete']->init();
28 + $boxzilla['admin.menu']->init();
29 + } elseif ( defined( 'DOING_CRON' ) && DOING_CRON ) {
30 + $boxzilla['license_poller']->init();
31 + } elseif ( is_admin() ) {
32 + $boxzilla['admin']->init();
33 + $boxzilla['admin.menu']->init();
34 + } else {
35 + add_action(
36 + 'template_redirect',
37 + function() use ( $boxzilla ) {
38 + $boxzilla['box_loader']->init();
39 + }
40 + );
41 + }
24 42
25 - $bootstrapper->admin(function() use( $boxzilla ){
26 - $boxzilla['admin']->init();
43 + // license manager
44 + if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
45 + $boxzilla['license_manager']->init();
27 46
28 - if( count( $boxzilla->plugins ) > 0 ) {
29 - $boxzilla['license_manager']->hook();
30 - $boxzilla['update_manager']->hook();
31 - }
32 - });
47 + if ( count( $boxzilla->plugins ) > 0 ) {
48 + $boxzilla['update_manager']->init();
49 + }
50 + }
33 51
34 - $bootstrapper->ajax(function() use( $boxzilla ) {
35 - $boxzilla['filter.autocomplete']->add_hooks();
36 - });
37 -
38 - $bootstrapper->front(function() use( $boxzilla ) {
39 - add_action( 'template_redirect', function() use( $boxzilla ) {
40 - $boxzilla['box_loader']->init();
41 - });
42 - });
43 -
44 - $bootstrapper->cron(function() use( $boxzilla ) {
45 - $boxzilla['license_poller']->hook();
46 - });
47 -
48 - $bootstrapper->run();
49 -}, 90 );
52 + // for legacy reasons: Boxzilla Theme Pack & Boxzilla WooCommerce used this
53 + // we will be removing this in future versions
54 + $boxzilla['bootstrapper']->run();
55 + },
56 + 90
57 +);