PluginProbe
Boxzilla – WordPress Popup Builder / 3.1.1
Boxzilla – WordPress Popup Builder v3.1.1
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.1.1, at bootstrap.php

50 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 /** @var Boxzilla $boxzilla */
8 $boxzilla = boxzilla();
9
10 // register services
11 $provider = new BoxzillaServiceProvider();
12 $provider->register( $boxzilla );
13 $provider = new Licensing\LicenseServiceProvider();
14 $provider->register( $boxzilla );
15
16 // Rest of bootstrapping runs at plugins_loaded:90
17 add_action( 'plugins_loaded', function() use( $boxzilla ) {
18
19 // load default filters
20 require __DIR__ . '/src/default-filters.php';
21 require __DIR__ . '/src/default-actions.php';
22
23 $bootstrapper = $boxzilla->bootstrapper;
24
25 $bootstrapper->admin(function() use( $boxzilla ){
26 $boxzilla['admin']->init();
27
28 if( count( $boxzilla->plugins ) > 0 ) {
29 $boxzilla['license_manager']->hook();
30 $boxzilla['update_manager']->hook();
31 }
32 });
33
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 );
50