PluginProbe
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce / 2.2.16
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce v2.2.16
2.15.0 trunk 1.0.0 1.0.1 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 All 62 releases
← All changes | hurrytimer.php +34 -40 1.1.22.2.16 View file →
@@ -1,17 +1,19 @@
1 1 <?php
2 + // removeIf(pro)
3 +
2 4 /**
3 5 * The plugin bootstrap file
4 6 *
5 - * @link http://nabillemsieh.com
7 + * @link http://hurrytimer.com
6 8 * @since 1.0.0
7 9 * @package Hurrytimer
8 10 *
9 11 * @wordpress-plugin
10 - * Plugin Name: HurryTimer - A Scarcity Countdown Timer for WordPress & WooCoomerce
11 - * Plugin URI: https://wordpress.org/plugins/hurrytimer
12 - * Description: A simple yet powerful scarcity countdown timer for WordPress & WooCommerce.
13 - * Version: 1.1.2
12 + * Plugin Name: HurryTimer
13 + * Plugin URI: https://hurrytimer.com
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,54 +19,46 @@
17 19 * License URI: http://www.gnu.org/licenses/gpl.html
18 20 * Text Domain: hurrytimer
19 21 * Domain Path: /languages
20 22 */
21 -namespace Hurrytimer;
23 + // endRemoveIf(pro)
22 24
25 + namespace Hurrytimer;
26 +
23 27 // If this file is called directly, abort.
28 +use Hurrytimer\Utils\Helpers;
29 +
24 30 if (!defined('WPINC')) {
25 31 die;
26 32 }
27 33
28 -define('HURRYTIMER_PLUGIN_VERSION', '1.1.2');
29 -define('HURRYTIMER_PLUGIN_NAME', 'hurrytimer');
30 -define('HURRYTIMER_PLUGIN_DIR', plugin_dir_path(__FILE__));
31 -define('HURRYTIMER_PLUGIN_URL', plugin_dir_url(__FILE__));
32 -define('HURRYTIMER_COUNTDOWN_PT', 'hurrytimer_countdown');
34 +define('HURRYT_VERSION', '2.2.16');
35 +define('HURRYT_DB_VERSION', '1.0.0');
36 +define('HURRYT_SLUG', 'hurrytimer');
37 +define('HURRYT_DIR', plugin_dir_path(__FILE__));
38 +define('HURRYT_URL', plugin_dir_url(__FILE__));
39 +define('HURRYT_BASENAME', plugin_basename(__FILE__));
40 +define('HURRYT_POST_TYPE', 'hurrytimer_countdown');
41 +define('HURRYT_OPTION_VERSION_KEY', 'hurrytimer_version');
33 42
34 -function activate_hurrytimer()
43 +
44 +require plugin_dir_path(__FILE__) . 'includes/Bootstrap.php';
45 +
46 +function activate()
35 47 {
36 - require_once plugin_dir_path(__FILE__) . 'includes/class-hurrytimer-activator.php';
37 - Hurrytimer_Activator::activate();
48 + require_once HURRYT_DIR . 'includes/Activator.php';
49 + Activator::activate();
38 50 }
39 51
40 -function deactivate_hurrytimer()
52 +function deactivate()
41 53 {
42 - require_once plugin_dir_path(__FILE__) . 'includes/class-hurrytimer-deactivator.php';
43 - Hurrytimer_Deactivator::deactivate();
54 + require_once HURRYT_DIR . 'includes/Deactivator.php';
55 + Deactivator::deactivate();
44 56 }
45 57
46 -register_activation_hook(__FILE__, 'Hurrytimer\activate_hurrytimer');
47 -register_deactivation_hook(__FILE__, 'Hurrytimer\deactivate_hurrytimer');
58 +register_activation_hook(__FILE__, 'Hurrytimer\activate');
59 +register_deactivation_hook(__FILE__, 'Hurrytimer\deactivate');
48 60
49 -/**
50 - * The core plugin class that is used to define internationalization,
51 - * admin-specific hooks, and public-facing site hooks.
52 - */
53 -require plugin_dir_path(__FILE__) . 'includes/class-hurrytimer.php';
61 +do_action('before_hurrytimer_init');
62 + (new Bootstrap())->run();
63 +do_action('hurrytimer_init');
54 64
55 -/**
56 - * Begins execution of the plugin.
57 - *
58 - * Since everything within the plugin is registered via hooks,
59 - * then kicking off the plugin from this point in the file does
60 - * not affect the page life cycle.
61 - *
62 - * @since 1.0.0
63 - */
64 -function run_hurrytimer()
65 -{
66 - $plugin = new Hurrytimer();
67 - $plugin->run();
68 -}
69 -
70 -run_hurrytimer();