PluginProbe ʕ •ᴥ•ʔ
YITH WooCommerce Wishlist / 2.2.3
YITH WooCommerce Wishlist v2.2.3
trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.18 3.0.19 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.25 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.10.0 3.11.0 3.12.0 3.13.0 3.14.0 3.15.0 3.16.0 3.17.0 3.18.0 3.19.0 3.2.0 3.20.0 3.21.0 3.22.0 3.23.0 3.24.0 3.25.0 3.26.0 3.27.0 3.28.0 3.29.0 3.3.0 3.30.0 3.31.0 3.32.0 3.33.0 3.34.0 3.35.0 3.36.0 3.37.0 3.38.0 3.4.0 3.5.0 3.6.0 3.7.0 3.8.0 3.9.0 4.0.0 4.0.1 4.1.0 4.10.0 4.10.1 4.10.2 4.11.0 4.12.0 4.13.0 4.14.0 4.15.0 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0 4.8.0 4.9.0
yith-woocommerce-wishlist / init.php
yith-woocommerce-wishlist Last commit date
assets 7 years ago includes 7 years ago languages 7 years ago plugin-fw 7 years ago plugin-options 7 years ago templates 7 years ago README.txt 7 years ago init.php 7 years ago screenshot-1.png 7 years ago screenshot-2.png 7 years ago screenshot-3.png 7 years ago screenshot-4.png 7 years ago uninstall.php 7 years ago wpml-config.xml 7 years ago
init.php
144 lines
1 <?php
2 /**
3 * Plugin Name: YITH WooCommerce Wishlist
4 * Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-wishlist/
5 * Description: YITH WooCommerce Wishlist allows you to add Wishlist functionality to your e-commerce.
6 * Version: 2.2.3
7 * Author: YITHEMES
8 * Author URI: http://yithemes.com/
9 * Text Domain: yith-woocommerce-wishlist
10 * Domain Path: /languages/
11 * WC requires at least: 2.5.0
12 * WC tested up to: 3.4.0
13 *
14 * @author YITHEMES
15 * @package YITH WooCommerce Wishlist
16 * @version 2.0.0
17 */
18
19 /* Copyright 2013 Your Inspiration Themes (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 if ( ! defined( 'ABSPATH' ) ) {
36 exit;
37 } // Exit if accessed directly
38
39 if ( ! function_exists( 'yith_plugin_registration_hook' ) ) {
40 require_once 'plugin-fw/yit-plugin-registration-hook.php';
41 }
42 register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
43
44 if ( ! defined( 'YITH_WCWL' ) ) {
45 define( 'YITH_WCWL', true );
46 }
47
48 if ( ! defined( 'YITH_WCWL_URL' ) ) {
49 define( 'YITH_WCWL_URL', plugin_dir_url( __FILE__ ) );
50 }
51
52 if ( ! defined( 'YITH_WCWL_DIR' ) ) {
53 define( 'YITH_WCWL_DIR', plugin_dir_path( __FILE__ ) );
54 }
55
56 if ( ! defined( 'YITH_WCWL_INC' ) ) {
57 define( 'YITH_WCWL_INC', YITH_WCWL_DIR . 'includes/' );
58 }
59
60 if ( ! defined( 'YITH_WCWL_INIT' ) ) {
61 define( 'YITH_WCWL_INIT', plugin_basename( __FILE__ ) );
62 }
63
64 if ( ! defined( 'YITH_WCWL_FREE_INIT' ) ) {
65 define( 'YITH_WCWL_FREE_INIT', plugin_basename( __FILE__ ) );
66 }
67
68 /* Plugin Framework Version Check */
69 if( ! function_exists( 'yit_maybe_plugin_fw_loader' ) && file_exists( YITH_WCWL_DIR . 'plugin-fw/init.php' ) ) {
70 require_once( YITH_WCWL_DIR . 'plugin-fw/init.php' );
71 }
72 yit_maybe_plugin_fw_loader( YITH_WCWL_DIR );
73
74 if( ! function_exists( 'yith_wishlist_constructor' ) ) {
75 function yith_wishlist_constructor() {
76
77 load_plugin_textdomain( 'yith-woocommerce-wishlist', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
78
79 // Load required classes and functions
80 require_once( YITH_WCWL_INC . 'functions.yith-wcwl.php' );
81 require_once( YITH_WCWL_INC . 'class.yith-wcwl.php' );
82 require_once( YITH_WCWL_INC . 'class.yith-wcwl-init.php' );
83 require_once( YITH_WCWL_INC . 'class.yith-wcwl-install.php' );
84
85 if ( is_admin() ) {
86 require_once( YITH_WCWL_INC . 'class.yith-wcwl-admin-init.php' );
87 }
88
89 if ( get_option( 'yith_wcwl_enabled' ) == 'yes' ) {
90 require_once( YITH_WCWL_INC . 'class.yith-wcwl-ui.php' );
91 require_once( YITH_WCWL_INC . 'class.yith-wcwl-shortcode.php' );
92 }
93
94 // Let's start the game!
95
96 /**
97 * @deprecated
98 */
99 global $yith_wcwl;
100 $yith_wcwl = YITH_WCWL();
101 }
102 }
103 add_action( 'yith_wcwl_init', 'yith_wishlist_constructor' );
104
105 if( ! function_exists( 'yith_wishlist_install' ) ) {
106 function yith_wishlist_install() {
107
108 if ( ! function_exists( 'is_plugin_active' ) ) {
109 require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
110 }
111
112 if ( ! function_exists( 'WC' ) ) {
113 add_action( 'admin_notices', 'yith_wcwl_install_woocommerce_admin_notice' );
114 }
115 elseif( defined( 'YITH_WCWL_PREMIUM' ) ) {
116 add_action( 'admin_notices', 'yith_wcwl_install_free_admin_notice' );
117 deactivate_plugins( plugin_basename( __FILE__ ) );
118 }
119 else {
120 do_action( 'yith_wcwl_init' );
121 }
122 }
123 }
124 add_action( 'plugins_loaded', 'yith_wishlist_install', 11 );
125
126 if( ! function_exists( 'yith_wcwl_install_woocommerce_admin_notice' ) ) {
127 function yith_wcwl_install_woocommerce_admin_notice() {
128 ?>
129 <div class="error">
130 <p><?php _e( 'YITH WooCommerce Wishlist is enabled but not effective. It requires WooCommerce in order to work.', 'yith-woocommerce-wishlist' ); ?></p>
131 </div>
132 <?php
133 }
134 }
135
136 if( ! function_exists( 'yith_wcwl_install_free_admin_notice' ) ){
137 function yith_wcwl_install_free_admin_notice() {
138 ?>
139 <div class="error">
140 <p><?php _e( 'You can\'t activate the free version of YITH WooCommerce Wishlist while you are using the premium one.', 'yith-woocommerce-wishlist' ); ?></p>
141 </div>
142 <?php
143 }
144 }