PluginProbe ʕ •ᴥ•ʔ
YITH WooCommerce Wishlist / 3.0.17
YITH WooCommerce Wishlist v3.0.17
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 / plugin-fw / init.php
yith-woocommerce-wishlist / plugin-fw Last commit date
assets 5 years ago bin 5 years ago languages 5 years ago lib 5 years ago templates 5 years ago .jshintrc 6 years ago Gruntfile.js 5 years ago init.php 5 years ago package.json 5 years ago yit-deactive-plugin.php 9 years ago yit-functions.php 5 years ago yit-plugin-registration-hook.php 8 years ago yit-plugin.php 5 years ago yit-woocommerce-compatibility.php 8 years ago
init.php
121 lines
1 <?php
2 /**
3 * Framework Name: YIT Plugin Framework
4 * Version: 3.4.37
5 * Author: YITH
6 * Text Domain: yith-plugin-fw
7 * Domain Path: /languages/
8 *
9 * @author Your Inspiration Themes
10 * @version 3.4.37
11 */
12 /**
13 * This file belongs to the YIT Plugin Framework.
14 *
15 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
16 * that is bundled with this package in the file LICENSE.txt.
17 * It is also available through the world-wide-web at this URL:
18 * http://www.gnu.org/licenses/gpl-3.0.txt
19 */
20
21 if ( ! defined ( 'ABSPATH' ) ) {
22 exit;
23 } // Exit if accessed directly
24
25
26
27 if ( ! function_exists ( 'yit_maybe_plugin_fw_loader' ) ) {
28 /**
29 * yit_maybe_plugin_fw_loader
30 *
31 * @since 1.0.0
32 */
33 function yit_maybe_plugin_fw_loader ( $plugin_path ) {
34 global $plugin_fw_data, $plugin_upgrade_fw_data;
35
36 $default_headers = array (
37 'Name' => 'Framework Name',
38 'Version' => 'Version',
39 'Author' => 'Author',
40 'TextDomain' => 'Text Domain',
41 'DomainPath' => 'Domain Path',
42 );
43
44 $plugin_path = trailingslashit( $plugin_path );
45 $framework_data = get_file_data( $plugin_path . 'plugin-fw/init.php', $default_headers );
46 $plugin_fw_main_file = $plugin_path . 'plugin-fw/yit-plugin.php';
47
48 if ( ! empty( $plugin_fw_data ) ) {
49 foreach ( $plugin_fw_data as $version => $path ) {
50 if ( version_compare ( $version, $framework_data[ 'Version' ], '<' ) ) {
51 $plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file );
52 }
53 }
54 } else {
55 $plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file );
56 }
57
58 //Check for license & upgrade classes
59 $upgrade_fw_init_file = $plugin_path . 'plugin-upgrade/init.php';
60 $framework_data = file_exists( $upgrade_fw_init_file ) ? get_file_data( $upgrade_fw_init_file, $default_headers ) : $framework_data;
61 $plugin_license_path = $plugin_upgrade_path = $plugin_path . 'plugin-upgrade';
62
63 if( ! file_exists( $plugin_upgrade_path ) ){
64 //Check the path for OLD plugin FW
65 if( file_exists( $plugin_path . 'plugin-fw/licence' ) ){
66 $plugin_license_path = $plugin_path . 'plugin-fw/licence';
67 $plugin_upgrade_path = $plugin_path . 'plugin-fw/';
68 }
69
70 else {
71 $plugin_upgrade_path = $plugin_license_path = false;
72 }
73 }
74
75 if( file_exists( $plugin_upgrade_path ) ){
76 if( ! empty( $plugin_upgrade_fw_data ) ){
77 foreach( $plugin_upgrade_fw_data as $version => $files ){
78 if( version_compare ( $version, $framework_data[ 'Version' ], '<' ) ){
79 $plugin_upgrade_fw_data = array ( $framework_data[ 'Version' ] => yit_get_upgrade_files( $plugin_license_path, $plugin_upgrade_path ) );
80 }
81 }
82 }
83
84 else {
85 $plugin_upgrade_fw_data = array ( $framework_data[ 'Version' ] => yit_get_upgrade_files( $plugin_license_path, $plugin_upgrade_path ) );
86 }
87 }
88 }
89 }
90
91 if( ! function_exists( 'yit_get_upgrade_files' ) ){
92 /**
93 * Retreive the core files to include to manage license and upgrade if exists
94 *
95 * @param $plugin_update_path file path
96 *
97 * @return array to files to include
98 */
99 function yit_get_upgrade_files( $plugin_license_path, $plugin_upgrade_path = '' ){
100 $to_include = array();
101
102 if( false ==! $plugin_license_path ){
103 $plugin_upgrade_path = empty( $plugin_upgrade_path ) ? $plugin_license_path : $plugin_upgrade_path;
104 $license_files = array(
105 '%yith-license-path%/lib/yit-licence.php',
106 '%yith-license-path%/lib/yit-plugin-licence.php',
107 '%yith-license-path%/lib/yit-theme-licence.php',
108 );
109
110 $upgrade_files = array( '%yith-upgrade-path%/lib/yit-plugin-upgrade.php' );
111
112 $to_include_license = str_replace( '%yith-license-path%', $plugin_license_path, $license_files );
113 $to_include_upgrade = str_replace( '%yith-upgrade-path%', $plugin_upgrade_path, $upgrade_files );
114
115 $to_include = array_merge( $to_include_license, $to_include_upgrade );
116 }
117
118 return $to_include;
119 }
120 }
121