PluginProbe ʕ •ᴥ•ʔ
YITH WooCommerce Compare / 2.5.1
YITH WooCommerce Compare v2.5.1
3.11.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 1.2.2 1.2.3 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.10.0 2.11.0 2.12.0 2.13.0 2.14.0 2.15.0 2.16.0 2.17.0 2.18.0 2.19.0 2.2.0 2.2.1 2.2.2 2.2.3 2.20.0 2.20.1 2.21.0 2.23.0 2.24.1 2.25.0 2.26.0 2.28.0 2.29.0 2.29.1 2.3.0 2.3.1 2.3.10 2.3.11 2.3.12 2.3.13 2.3.14 2.3.15 2.3.16 2.3.17 2.3.18 2.3.19 2.3.2 2.3.20 2.3.21 2.3.22 2.3.23 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.30.0 2.31.0 2.32.0 2.33.0 2.34.0 2.35.0 2.36.0 2.37.0 2.38.0 2.39.0 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.40.0 2.41.0 2.42.0 2.43.0 2.44.0 2.45.0 2.46.0 2.47.0 2.48.0 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.4.1 2.6.0 2.6.1 2.7.0 2.8.0 2.9.0 3.0.0 3.0.1 3.1.0 3.10.0 3.2.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 3.8.0 3.9.0
yith-woocommerce-compare / init.php
yith-woocommerce-compare Last commit date
assets 5 years ago includes 5 years ago languages 6 years ago plugin-fw 5 years ago plugin-options 5 years ago templates 5 years ago widgets 7 years ago init.php 5 years ago license.txt 5 years ago readme.txt 5 years ago wpml-config.xml 11 years ago
init.php
124 lines
1 <?php
2 /**
3 * Plugin Name: YITH WooCommerce Compare
4 * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-compare/
5 * Description: The <code><strong>YITH WooCommerce Compare</strong></code> plugin allow you to compare in a simple and efficient way products on sale in your shop and analyze their main features in a single table. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6 * Version: 2.5.1
7 * Author: YITH
8 * Author URI: https://yithemes.com/
9 * Text Domain: yith-woocommerce-compare
10 * Domain Path: /languages/
11 * WC requires at least: 4.5
12 * WC tested up to: 5.3
13 *
14 * @author YITH
15 * @package YITH WooCommerce Compare
16 * @version 2.5.1
17 */
18 /*
19 Copyright 2013-2021 Your Inspiration Solutions (email : plugins@yithemes.com)
20
21 This program is free software; you can redistribute it and/or modify
22 it under the terms of the GNU General Public License, version 2, as
23 published by the Free Software Foundation.
24
25 This program is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 GNU General Public License for more details.
29
30 You should have received a copy of the GNU General Public License
31 along with this program; if not, write to the Free Software
32 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35 defined( 'ABSPATH' ) || exit; // Exit if accessed directly
36
37 if ( ! function_exists( 'is_plugin_active' ) ) {
38 require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
39 }
40
41 function yith_woocompare_install_woocommerce_admin_notice() {
42 ?>
43 <div class="error">
44 <p><?php esc_html_e( 'YITH WooCommerce Compare is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-compare' ); ?></p>
45 </div>
46 <?php
47 }
48
49 function yith_woocompare_install_free_admin_notice() {
50 ?>
51 <div class="error">
52 <p><?php esc_html_e( 'You can\'t activate the free version of YITH WooCommerce Compare while you are using the premium one.', 'yith-woocommerce-compare' ); ?></p>
53 </div>
54 <?php
55 }
56
57 if ( ! function_exists( 'yith_plugin_registration_hook' ) ) {
58 require_once 'plugin-fw/yit-plugin-registration-hook.php';
59 }
60 register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
61
62 if ( ! defined( 'YITH_WOOCOMPARE_VERSION' ) ){
63 define( 'YITH_WOOCOMPARE_VERSION', '2.5.1' );
64 }
65 if ( ! defined( 'YITH_WOOCOMPARE_FREE_INIT' ) ) {
66 define( 'YITH_WOOCOMPARE_FREE_INIT', plugin_basename( __FILE__ ) );
67 }
68 if ( ! defined( 'YITH_WOOCOMPARE_INIT' ) ) {
69 define( 'YITH_WOOCOMPARE_INIT', plugin_basename( __FILE__ ) );
70 }
71 if ( ! defined( 'YITH_WOOCOMPARE' ) ) {
72 define( 'YITH_WOOCOMPARE', true );
73 }
74 if ( ! defined( 'YITH_WOOCOMPARE_FILE' ) ) {
75 define( 'YITH_WOOCOMPARE_FILE', __FILE__ );
76 }
77 if ( ! defined( 'YITH_WOOCOMPARE_URL' ) ) {
78 define( 'YITH_WOOCOMPARE_URL', plugin_dir_url( __FILE__ ) );
79 }
80 if ( ! defined( 'YITH_WOOCOMPARE_DIR' ) ) {
81 define( 'YITH_WOOCOMPARE_DIR', plugin_dir_path( __FILE__ ) );
82 }
83 if ( ! defined( 'YITH_WOOCOMPARE_TEMPLATE_PATH' ) ) {
84 define( 'YITH_WOOCOMPARE_TEMPLATE_PATH', YITH_WOOCOMPARE_DIR . 'templates' );
85 }
86 if ( ! defined( 'YITH_WOOCOMPARE_ASSETS_URL' ) ) {
87 define( 'YITH_WOOCOMPARE_ASSETS_URL', YITH_WOOCOMPARE_URL . 'assets' );
88 }
89 if ( ! defined( 'YITH_WOOCOMPARE_SLUG' ) ) {
90 define( 'YITH_WOOCOMPARE_SLUG', 'yith-woocommerce-compare' );
91 }
92 /* Plugin Framework Version Check */
93 if( ! function_exists( 'yit_maybe_plugin_fw_loader' ) && file_exists( YITH_WOOCOMPARE_DIR . 'plugin-fw/init.php' ) ) {
94 require_once YITH_WOOCOMPARE_DIR . 'plugin-fw/init.php';
95 }
96 yit_maybe_plugin_fw_loader( YITH_WOOCOMPARE_DIR );
97
98 function yith_woocompare_constructor() {
99
100 global $woocommerce;
101
102 if ( ! isset( $woocommerce ) || ! function_exists( 'WC' ) ) {
103 add_action( 'admin_notices', 'yith_woocompare_install_woocommerce_admin_notice' );
104 return;
105 }
106 elseif ( defined( 'YITH_WOOCOMPARE_PREMIUM' ) ) {
107 add_action( 'admin_notices', 'yith_woocompare_install_free_admin_notice' );
108 deactivate_plugins( plugin_basename( __FILE__ ) );
109 return;
110 }
111
112 load_plugin_textdomain( 'yith-woocommerce-compare', false, dirname( plugin_basename( __FILE__ ) ). '/languages/' );
113
114 // Load required classes and functions.
115 require_once 'includes/class.yith-woocompare-helper.php';
116 require_once 'widgets/class.yith-woocompare-widget.php';
117 require_once 'includes/class.yith-woocompare.php';
118
119 // Let's start the game!
120 global $yith_woocompare;
121 $yith_woocompare = new YITH_Woocompare();
122 }
123 add_action( 'plugins_loaded', 'yith_woocompare_constructor', 11 );
124