| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /* |
| 3 | 3 | Plugin Name: Boxzilla |
| 4 | -Version: 3.0.3 | |
| 4 | +Version: 3.2 | |
| 5 | 5 | Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page |
| 6 | 6 | Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing! |
| 7 | 7 | Author: ibericode |
| 8 | 8 | Author URI: https://ibericode.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page |
| @@ -10,9 +10,9 @@ | ||
| 10 | 10 | Domain Path: /languages/ |
| 11 | 11 | License: GPL v3 |
| 12 | 12 | |
| 13 | 13 | Boxzilla Plugin |
| 14 | -Copyright (C) 2013-2016, Danny van Kooten, hi@dannyvankooten.com | |
| 14 | +Copyright (C) 2013-2018, Danny van Kooten, hi@dannyvankooten.com | |
| 15 | 15 | |
| 16 | 16 | This program is free software: you can redistribute it and/or modify |
| 17 | 17 | it under the terms of the GNU General Public License as published by |
| 18 | 18 | the Free Software Foundation, either version 3 of the License, or |
| @@ -37,28 +37,32 @@ | ||
| 37 | 37 | /** |
| 38 | 38 | * @ignore |
| 39 | 39 | * @internal |
| 40 | 40 | */ |
| 41 | -function __load_boxzilla() { | |
| 41 | +function _load_boxzilla() { | |
| 42 | 42 | |
| 43 | - // Load PHP 5.2 fallback | |
| 44 | - if( version_compare( PHP_VERSION, '5.3', '<' ) ) { | |
| 45 | - require dirname( __FILE__ ) . '/src/class-php-fallback.php'; | |
| 46 | - new Boxzilla_PHP_Fallback( 'Boxzilla', plugin_basename( __FILE__ ) ); | |
| 47 | - return; | |
| 48 | - } | |
| 49 | - | |
| 50 | 43 | define( 'BOXZILLA_FILE', __FILE__ ); |
| 51 | - define( 'BOXZILLA_VERSION', '3.0.3' ); | |
| 44 | + define( 'BOXZILLA_VERSION', '3.2' ); | |
| 52 | 45 | |
| 53 | 46 | require __DIR__ . '/bootstrap.php'; |
| 54 | 47 | } |
| 55 | 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 | 56 | // load autoloader but only if not loaded already (for compat with sitewide autoloader) |
| 57 | 57 | if( ! function_exists( 'boxzilla' ) ) { |
| 58 | - require dirname( __FILE__ ) . '/vendor/autoload.php'; | |
| 58 | + require __DIR__ . '/vendor/autoload.php'; | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // register activation hook |
| 62 | 62 | register_activation_hook( __FILE__, array( 'Boxzilla\\Admin\\Installer', 'run' ) ); |
| 63 | 63 | |
| 64 | -add_action( 'plugins_loaded', '__load_boxzilla', 8 ); | |
| 64 | +// hook into plugins_loaded for boostrapping | |
| 65 | +add_action( 'plugins_loaded', '_load_boxzilla', 8 ); | |
| 66 | + | |
| 67 | + | |
| 68 | + | |