PluginProbe
Boxzilla – WordPress Popup Builder / 3.2.21
Boxzilla – WordPress Popup Builder v3.2.21
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 | boxzilla.php +36 -57 3.4.113.2.21 View file →
@@ -1,21 +1,18 @@
1 1 <?php
2 -
3 2 /*
4 3 Plugin Name: Boxzilla
5 -Version: 3.4.11
6 -Plugin URI: https://www.boxzillaplugin.com/
4 +Version: 3.2.21
5 +Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
7 6 Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!
8 7 Author: ibericode
9 -Author URI: https://www.ibericode.com/
8 +Author URI: https://ibericode.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
10 9 Text Domain: boxzilla
11 -Requires at least: 4.6
12 -Requires PHP: 7.4
13 -License: GPL-3.0-or-later
14 -License URI: http://www.gnu.org/licenses/gpl-3.0.html
10 +Domain Path: /languages/
11 +License: GPL v3
15 12
16 13 Boxzilla Plugin
17 -Copyright (C) 2013 Danny van Kooten
14 +Copyright (C) 2013 - 2020, Danny van Kooten, hi@dannyvankooten.com
18 15
19 16 This program is free software: you can redistribute it and/or modify
20 17 it under the terms of the GNU General Public License as published by
21 18 the Free Software Foundation, either version 3 of the License, or
@@ -26,64 +23,46 @@
26 23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 24 GNU General Public License for more details.
28 25
29 26 You should have received a copy of the GNU General Public License
30 -along with this program. If not, see <https://www.gnu.org/licenses/>.
27 +along with this program. If not, see <http://www.gnu.org/licenses/>.
31 28 */
32 29
30 +if ( ! defined( 'ABSPATH' ) ) {
31 + header( 'Status: 403 Forbidden' );
32 + header( 'HTTP/1.1 403 Forbidden' );
33 + exit;
34 +}
33 35
34 -// Exit if not loaded inside a WordPress context
35 -defined('ABSPATH') or exit;
36 36
37 -// Exit if PHP lower than 7.4
38 -PHP_VERSION_ID >= 70400 or exit;
37 +/**
38 + * @ignore
39 + * @internal
40 + */
41 +function _load_boxzilla() {
39 42
40 -define('BOXZILLA_FILE', __FILE__);
41 -define('BOXZILLA_DIR', __DIR__);
42 -define('BOXZILLA_VERSION', '3.4.11');
43 + define( 'BOXZILLA_FILE', __FILE__ );
44 + define( 'BOXZILLA_VERSION', '3.2.21' );
43 45
44 -require __DIR__ . '/autoload.php';
45 -require __DIR__ . '/src/services.php';
46 -require __DIR__ . '/src/licensing/services.php';
46 + require __DIR__ . '/bootstrap.php';
47 +}
47 48
49 +// Check if we're on PHP 5.2, if so: bail early.
50 +if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
51 + require dirname( __FILE__ ) . '/src/class-php-fallback.php';
52 + new Boxzilla_PHP_Fallback( 'Boxzilla', plugin_basename( __FILE__ ) );
53 + return;
54 +}
55 +
56 +// load autoloader but only if not loaded already (for compat with sitewide autoloader)
57 +if ( ! function_exists( 'boxzilla' ) ) {
58 + require __DIR__ . '/vendor/autoload.php';
59 +}
60 +
48 61 // register activation hook
49 -register_activation_hook(__FILE__, [ 'Boxzilla\\Admin\\Installer', 'run' ]);
50 -register_deactivation_hook(__FILE__, [ 'Boxzilla\\Licensing\\Poller', 'deactivate' ]);
62 +register_activation_hook( __FILE__, array( 'Boxzilla\\Admin\\Installer', 'run' ) );
51 63
52 -// Bootstrap plugin at later action hook
53 -add_action(
54 - 'plugins_loaded',
55 - function () {
56 - $boxzilla = boxzilla();
64 +// hook into plugins_loaded for boostrapping
65 +add_action( 'plugins_loaded', '_load_boxzilla', 8 );
57 66
58 - // load default filters
59 - require __DIR__ . '/src/default-filters.php';
60 - require __DIR__ . '/src/default-actions.php';
61 67
62 - if (wp_doing_ajax()) {
63 - $boxzilla['filter.autocomplete']->init();
64 - $boxzilla['admin.menu']->init();
65 - } elseif (wp_doing_cron()) {
66 - $boxzilla['license_poller']->init();
67 - } elseif (is_admin()) {
68 - $boxzilla['admin']->init();
69 - $boxzilla['admin.menu']->init();
70 - } else {
71 - add_action(
72 - 'template_redirect',
73 - function () use ($boxzilla) {
74 - $boxzilla['box_loader']->init();
75 - }
76 - );
77 - }
78 68
79 - // license manager
80 - if (is_admin() || wp_doing_cron() || ( defined('WP_CLI') && WP_CLI )) {
81 - $boxzilla['license_manager']->init();
82 -
83 - if (count($boxzilla->plugins) > 0) {
84 - $boxzilla['update_manager']->init();
85 - }
86 - }
87 - },
88 - 90
89 -);