PluginProbe
Boxzilla – WordPress Popup Builder / 3.4.8
Boxzilla – WordPress Popup Builder v3.4.8
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 / src / services.php

services.php in Boxzilla – WordPress Popup Builder 3.4.8, at src/services.php

60 lines 1.2 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 use Boxzilla\Admin\Admin;
6 use Boxzilla\Admin\Menu;
7 use Boxzilla\Admin\Notices;
8
9 defined('ABSPATH') or exit;
10
11 $boxzilla = boxzilla();
12
13 $boxzilla['admin'] = function ($boxzilla) {
14 return new Admin($boxzilla->plugin, $boxzilla);
15 };
16
17 $boxzilla['admin.menu'] = function () {
18 return new Menu();
19 };
20
21 $boxzilla['box_loader'] = function ($boxzilla) {
22 return new BoxLoader($boxzilla->plugin, $boxzilla->options);
23 };
24
25 $boxzilla['filter.autocomplete'] = function () {
26 return new Filter\Autocomplete();
27 };
28
29 $boxzilla['notices'] = function () {
30 return new Notices();
31 };
32
33 $boxzilla['options'] = function () {
34 $defaults = [
35 'test_mode' => 0,
36 ];
37
38 $options = (array) get_option('boxzilla_settings', $defaults);
39 $options = array_merge($defaults, $options);
40 return $options;
41 };
42
43 $boxzilla['plugin'] = new Plugin(
44 'boxzilla',
45 'Boxzilla',
46 BOXZILLA_VERSION,
47 BOXZILLA_FILE,
48 dirname(BOXZILLA_FILE)
49 );
50
51 $boxzilla['plugins'] = function () {
52 $raw = (array) apply_filters('boxzilla_extensions', []);
53
54 $plugins = [];
55 foreach ($raw as $p) {
56 $plugins[ $p->id() ] = $p;
57 }
58 return $plugins;
59 };
60