| @@ -1,5 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | + // removeIf(pro) | |
| 3 | + | |
| 2 | 4 | /** |
| 3 | 5 | * The plugin bootstrap file |
| 4 | 6 | * |
| 5 | 7 | * @link http://hurrytimer.com |
| @@ -8,10 +10,10 @@ | ||
| 8 | 10 | * |
| 9 | 11 | * @wordpress-plugin |
| 10 | 12 | * Plugin Name: HurryTimer |
| 11 | 13 | * Plugin URI: https://hurrytimer.com |
| 12 | - * Description: A Scarcity Countdown Timer for WordPress & WooCommerce. | |
| 13 | - * Version: 2.0.4 | |
| 14 | + * Description: A Scarcity and Urgency Countdown Timer for WordPress & WooCommerce with recurring and evergreen mode. | |
| 15 | + * Version: 2.2.16 | |
| 14 | 16 | * Author: Nabil Lemsieh |
| 15 | 17 | * Author URI: http://nabillemsieh.com |
| 16 | 18 | * License: GPLv3 |
| 17 | 19 | * License URI: http://www.gnu.org/licenses/gpl.html |
| @@ -17,17 +19,20 @@ | ||
| 17 | 19 | * License URI: http://www.gnu.org/licenses/gpl.html |
| 18 | 20 | * Text Domain: hurrytimer |
| 19 | 21 | * Domain Path: /languages |
| 20 | 22 | */ |
| 23 | + // endRemoveIf(pro) | |
| 21 | 24 | |
| 22 | -namespace Hurrytimer; | |
| 25 | + namespace Hurrytimer; | |
| 23 | 26 | |
| 24 | 27 | // If this file is called directly, abort. |
| 28 | +use Hurrytimer\Utils\Helpers; | |
| 29 | + | |
| 25 | 30 | if (!defined('WPINC')) { |
| 26 | 31 | die; |
| 27 | 32 | } |
| 28 | 33 | |
| 29 | -define('HURRYT_VERSION', '2.0.4'); | |
| 34 | +define('HURRYT_VERSION', '2.2.16'); | |
| 30 | 35 | define('HURRYT_DB_VERSION', '1.0.0'); |
| 31 | 36 | define('HURRYT_SLUG', 'hurrytimer'); |
| 32 | 37 | define('HURRYT_DIR', plugin_dir_path(__FILE__)); |
| 33 | 38 | define('HURRYT_URL', plugin_dir_url(__FILE__)); |
| @@ -32,9 +37,13 @@ | ||
| 32 | 37 | define('HURRYT_DIR', plugin_dir_path(__FILE__)); |
| 33 | 38 | define('HURRYT_URL', plugin_dir_url(__FILE__)); |
| 34 | 39 | define('HURRYT_BASENAME', plugin_basename(__FILE__)); |
| 35 | 40 | define('HURRYT_POST_TYPE', 'hurrytimer_countdown'); |
| 41 | +define('HURRYT_OPTION_VERSION_KEY', 'hurrytimer_version'); | |
| 36 | 42 | |
| 43 | + | |
| 44 | +require plugin_dir_path(__FILE__) . 'includes/Bootstrap.php'; | |
| 45 | + | |
| 37 | 46 | function activate() |
| 38 | 47 | { |
| 39 | 48 | require_once HURRYT_DIR . 'includes/Activator.php'; |
| 40 | 49 | Activator::activate(); |
| @@ -48,7 +57,8 @@ | ||
| 48 | 57 | |
| 49 | 58 | register_activation_hook(__FILE__, 'Hurrytimer\activate'); |
| 50 | 59 | register_deactivation_hook(__FILE__, 'Hurrytimer\deactivate'); |
| 51 | 60 | |
| 52 | -require plugin_dir_path(__FILE__) . 'includes/Bootstrap.php'; | |
| 61 | +do_action('before_hurrytimer_init'); | |
| 62 | + (new Bootstrap())->run(); | |
| 63 | +do_action('hurrytimer_init'); | |
| 53 | 64 | |
| 54 | -(new Bootstrap())->run(); | |