| 1 |
<?php |
| 2 |
// removeIf(pro) |
| 3 |
|
| 4 |
/** |
| 5 |
* The plugin bootstrap file |
| 6 |
* |
| 7 |
* @link http://hurrytimer.com |
| 8 |
* @since 1.0.0 |
| 9 |
* @package Hurrytimer |
| 10 |
* |
| 11 |
* @wordpress-plugin |
| 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.14.2 |
| 16 |
* Author: Nabil Lemsieh |
| 17 |
* Author URI: https://hurrytimer.com |
| 18 |
* License: GPLv3 |
| 19 |
* License URI: http://www.gnu.org/licenses/gpl.html |
| 20 |
* Text Domain: hurrytimer |
| 21 |
* Domain Path: /languages |
| 22 |
* WC requires at least: 3.0.0 |
| 23 |
* WC tested up to: 10.4 |
| 24 |
*/ |
| 25 |
|
| 26 |
|
| 27 |
// endRemoveIf(pro) |
| 28 |
|
| 29 |
// If this file is called directly, abort. |
| 30 |
|
| 31 |
if (!defined('WPINC')) { |
| 32 |
die; |
| 33 |
} |
| 34 |
|
| 35 |
if(!(defined( 'WP_CLI' ) && WP_CLI) && function_exists('\is_plugin_active') && function_exists('\deactivate_plugins')): |
| 36 |
|
| 37 |
// removeIf(pro) |
| 38 |
if ( defined( 'HURRYT_IS_PRO' ) ) { |
| 39 |
if ( is_plugin_active( 'hurrytimer-pro/hurrytimer.php' ) ) { |
| 40 |
deactivate_plugins( 'hurrytimer-pro/hurrytimer.php' ); |
| 41 |
} |
| 42 |
|
| 43 |
wp_redirect( $_SERVER['REQUEST_URI'] ); |
| 44 |
exit; |
| 45 |
} |
| 46 |
// endRemoveIf(pro) |
| 47 |
|
| 48 |
endif; |
| 49 |
|
| 50 |
define('HURRYT_VERSION', '2.14.2'); |
| 51 |
|
| 52 |
define('HURRYT_DIR', plugin_dir_path(__FILE__)); |
| 53 |
define('HURRYT_URL', plugin_dir_url(__FILE__)); |
| 54 |
define('HURRYT_BASENAME', plugin_basename(__FILE__)); |
| 55 |
define('HURRYT_POST_TYPE', 'hurrytimer_countdown'); |
| 56 |
|
| 57 |
// Declare compatibility with custom order tables for WooCommerce. |
| 58 |
add_action( |
| 59 |
'before_woocommerce_init', |
| 60 |
function () { |
| 61 |
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { |
| 62 |
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); |
| 63 |
} |
| 64 |
} |
| 65 |
); |
| 66 |
|
| 67 |
require_once __DIR__ . '/vendor/autoload.php'; |
| 68 |
|
| 69 |
register_activation_hook(__FILE__, [Hurrytimer\Installer::get_instance(), 'activate']); |
| 70 |
|
| 71 |
add_action('plugins_loaded', function () { |
| 72 |
(new \Hurrytimer\Bootstrap())->run(); |
| 73 |
do_action('hurrytimer_init'); |
| 74 |
}); |
| 75 |
|