Version Description
- Added: Add Plugin-Fw support for Essential Kit #1
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Ajax Search |
Version | 1.3.8 |
Comparing to | |
See all releases |
Code changes from version 1.3.7 to 1.3.8
- README.txt +4 -1
- class.yith-wcas.php +7 -6
- init.php +12 -5
- languages/yith-woocommerce-ajax-search-it_IT.mo +0 -0
- languages/yith-woocommerce-ajax-search-it_IT.po +19 -15
- plugin-fw/assets/css/yit-plugin-panel.css +7 -0
- plugin-fw/assets/js/chosen/ajax-chosen.jquery.min.js +3 -2
- plugin-fw/assets/js/metabox.min.js +2 -2
- plugin-fw/assets/js/multisite-updater.min.js +4 -4
- plugin-fw/assets/js/yit-plugin-panel.js +6 -0
- plugin-fw/assets/js/yit-plugin-panel.min.js +5 -5
- plugin-fw/assets/js/yit-wp-pointer.min.js +3 -3
- plugin-fw/init.php +59 -0
- plugin-fw/lib/yit-cpt-unlimited.php +1 -1
- plugin-fw/lib/yit-metabox.php +0 -2
- plugin-fw/lib/yit-plugin-panel-wc.php +16 -3
- plugin-fw/lib/yit-plugin-panel.php +13 -18
- plugin-fw/lib/yit-upgrade.php +23 -4
- plugin-fw/licence/assets/js/yit-licence.min.js +4 -4
- plugin-fw/licence/lib/yit-licence.php +2 -2
- plugin-fw/licence/lib/yit-plugin-licence.php +0 -2
- plugin-fw/licence/lib/yit-theme-licence.php +0 -2
- plugin-fw/templates/panel/woocommerce/woocommerce-upload.php +14 -7
- plugin-fw/yit-plugin.php +4 -16
README.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
|
|
4 |
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
|
5 |
Requires at least: 3.5.1
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -138,6 +138,9 @@ If you have created your own language pack for YITH WooCommerce Ajax Search, or
|
|
138 |
2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
|
139 |
|
140 |
== Changelog ==
|
|
|
|
|
|
|
141 |
= 1.3.7 =
|
142 |
* Updated: Changed Text Domain from 'yit' to 'yith-woocommerce-ajax-search'
|
143 |
* Updated: Plugin Core Framework
|
4 |
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
|
5 |
Requires at least: 3.5.1
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 1.3.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
138 |
2. YITH WooCommerce Ajax Search in operation displaying WooCommerce search results
|
139 |
|
140 |
== Changelog ==
|
141 |
+
= 1.3.8 =
|
142 |
+
* Added: Add Plugin-Fw support for Essential Kit #1
|
143 |
+
|
144 |
= 1.3.7 =
|
145 |
* Updated: Changed Text Domain from 'yit' to 'yith-woocommerce-ajax-search'
|
146 |
* Updated: Plugin Core Framework
|
class.yith-wcas.php
CHANGED
@@ -43,7 +43,7 @@ if ( !class_exists( 'YITH_WCAS' ) ) {
|
|
43 |
public function __construct() {
|
44 |
|
45 |
// Load Plugin Framework
|
46 |
-
add_action( '
|
47 |
|
48 |
// actions
|
49 |
add_action( 'widgets_init', array( $this, 'registerWidgets' ) );
|
@@ -77,12 +77,13 @@ if ( !class_exists( 'YITH_WCAS' ) ) {
|
|
77 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
78 |
*/
|
79 |
public function plugin_fw_loader() {
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
84 |
}
|
85 |
-
|
86 |
}
|
87 |
|
88 |
|
43 |
public function __construct() {
|
44 |
|
45 |
// Load Plugin Framework
|
46 |
+
add_action( 'plugins_loaded', array( $this, 'plugin_fw_loader' ), 15 );
|
47 |
|
48 |
// actions
|
49 |
add_action( 'widgets_init', array( $this, 'registerWidgets' ) );
|
77 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
78 |
*/
|
79 |
public function plugin_fw_loader() {
|
80 |
+
if ( ! defined( 'YIT_CORE_PLUGIN' ) ) {
|
81 |
+
global $plugin_fw_data;
|
82 |
+
if( ! empty( $plugin_fw_data ) ){
|
83 |
+
$plugin_fw_file = array_shift( $plugin_fw_data );
|
84 |
+
require_once( $plugin_fw_file );
|
85 |
+
}
|
86 |
}
|
|
|
87 |
}
|
88 |
|
89 |
|
init.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Ajax Search
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Ajax Search allows your users to search products in real time.
|
6 |
-
* Version: 1.3.
|
7 |
* Author: Yithemes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-ajax-search
|
@@ -31,6 +31,15 @@
|
|
31 |
*/
|
32 |
if ( !defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
|
36 |
if ( defined( 'YITH_WCAS_PREMIUM' ) ) {
|
@@ -59,7 +68,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
|
|
59 |
if ( defined( 'YITH_WCAS_VERSION' ) ){
|
60 |
return;
|
61 |
}else{
|
62 |
-
define( 'YITH_WCAS_VERSION', '1.3.
|
63 |
}
|
64 |
|
65 |
if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
|
@@ -78,9 +87,7 @@ if ( ! defined( 'YITH_WCAS_URL' ) ) {
|
|
78 |
define( 'YITH_WCAS_URL', plugin_dir_url( __FILE__ ) );
|
79 |
}
|
80 |
|
81 |
-
|
82 |
-
define( 'YITH_WCAS_DIR', plugin_dir_path( __FILE__ ) );
|
83 |
-
}
|
84 |
|
85 |
if ( ! defined( 'YITH_WCAS_TEMPLATE_PATH' ) ) {
|
86 |
define( 'YITH_WCAS_TEMPLATE_PATH', YITH_WCAS_DIR . 'templates' );
|
3 |
* Plugin Name: YITH WooCommerce Ajax Search
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Ajax Search allows your users to search products in real time.
|
6 |
+
* Version: 1.3.8
|
7 |
* Author: Yithemes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-ajax-search
|
31 |
*/
|
32 |
if ( !defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
|
33 |
|
34 |
+
if ( ! defined( 'YITH_WCAS_DIR' ) ) {
|
35 |
+
define( 'YITH_WCAS_DIR', plugin_dir_path( __FILE__ ) );
|
36 |
+
}
|
37 |
+
|
38 |
+
/* Plugin Framework Version Check */
|
39 |
+
if( ! function_exists( 'yit_maybe_plugin_fw_loader' ) && file_exists( YITH_WCAS_DIR . 'plugin-fw/init.php' ) ) {
|
40 |
+
require_once( YITH_WCAS_DIR . 'plugin-fw/init.php' );
|
41 |
+
}
|
42 |
+
yit_maybe_plugin_fw_loader( YITH_WCAS_DIR );
|
43 |
|
44 |
|
45 |
if ( defined( 'YITH_WCAS_PREMIUM' ) ) {
|
68 |
if ( defined( 'YITH_WCAS_VERSION' ) ){
|
69 |
return;
|
70 |
}else{
|
71 |
+
define( 'YITH_WCAS_VERSION', '1.3.8' );
|
72 |
}
|
73 |
|
74 |
if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
|
87 |
define( 'YITH_WCAS_URL', plugin_dir_url( __FILE__ ) );
|
88 |
}
|
89 |
|
90 |
+
|
|
|
|
|
91 |
|
92 |
if ( ! defined( 'YITH_WCAS_TEMPLATE_PATH' ) ) {
|
93 |
define( 'YITH_WCAS_TEMPLATE_PATH', YITH_WCAS_DIR . 'templates' );
|
languages/yith-woocommerce-ajax-search-it_IT.mo
CHANGED
Binary file
|
languages/yith-woocommerce-ajax-search-it_IT.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: YITH WooCommerce Ajax Search Premium\n"
|
4 |
-
"POT-Creation-Date: 2015-09-
|
5 |
-
"PO-Revision-Date: 2015-09-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Yithemes <plugins@yithemes.com>\n"
|
8 |
"Language: it_IT\n"
|
@@ -172,71 +172,75 @@ msgid ""
|
|
172 |
"Upgrade to the %1$spremium version%2$s%3$s of %1$sYITH WooCommerce Ajax "
|
173 |
"Search%2$s to benefit from all features!"
|
174 |
msgstr ""
|
|
|
|
|
175 |
|
176 |
#: ../templates/admin/premium.php:253 ../templates/admin/premium.php:301
|
177 |
#, php-format
|
178 |
msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
|
179 |
-
msgstr ""
|
180 |
|
181 |
#: ../templates/admin/premium.php:259
|
182 |
msgid "Premium Features"
|
183 |
-
msgstr ""
|
184 |
|
185 |
#: ../templates/admin/premium.php:261
|
186 |
msgid "HOW TO CUSTOMIZE THE RESULTS OF THE AUTOCOMPLETE"
|
187 |
-
msgstr ""
|
188 |
|
189 |
#: ../templates/admin/premium.php:263
|
190 |
msgid "RESULTS OF THE AUTOCOMPLETE"
|
191 |
-
msgstr ""
|
192 |
|
193 |
#: ../templates/admin/premium.php:268
|
194 |
#, php-format
|
195 |
msgid "Show %1$sthe image%2$s of the product (left or right aligned)"
|
196 |
-
msgstr ""
|
197 |
|
198 |
#: ../templates/admin/premium.php:269
|
199 |
#, php-format
|
200 |
msgid "Enable the %1$sprice visualization%2$s"
|
201 |
-
msgstr ""
|
202 |
|
203 |
#: ../templates/admin/premium.php:270
|
204 |
#, php-format
|
205 |
msgid "Show the %1$sproduct description%2$s"
|
206 |
-
msgstr ""
|
207 |
|
208 |
#: ../templates/admin/premium.php:271
|
209 |
#, php-format
|
210 |
msgid "Tell to the client if the product is %1$son discount or is featured%2$s"
|
211 |
-
msgstr ""
|
212 |
|
213 |
#: ../templates/admin/premium.php:279
|
214 |
msgid "HOW TO CUSTOMIZE THE SEARCH OPTIONS"
|
215 |
-
msgstr ""
|
216 |
|
217 |
#: ../templates/admin/premium.php:283
|
218 |
#, php-format
|
219 |
msgid "%1$sExtend the research%2$s in the excerpt and in the content"
|
220 |
msgstr ""
|
|
|
|
|
221 |
|
222 |
#: ../templates/admin/premium.php:284
|
223 |
#, php-format
|
224 |
msgid "%1$sActivate%2$s the category search"
|
225 |
-
msgstr ""
|
226 |
|
227 |
#: ../templates/admin/premium.php:285
|
228 |
#, php-format
|
229 |
msgid "Configure the %1$stag%2$s search"
|
230 |
-
msgstr ""
|
231 |
|
232 |
#: ../templates/admin/premium.php:286
|
233 |
#, php-format
|
234 |
msgid "Search a product with an %1$sID%2$s"
|
235 |
-
msgstr ""
|
236 |
|
237 |
#: ../templates/admin/premium.php:292
|
238 |
msgid "SEARCH OPTIONS"
|
239 |
-
msgstr ""
|
240 |
|
241 |
#: ../templates/yith-woocommerce-ajax-search.php:18
|
242 |
msgid "Search for:"
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: YITH WooCommerce Ajax Search Premium\n"
|
4 |
+
"POT-Creation-Date: 2015-09-25 12:30+0200\n"
|
5 |
+
"PO-Revision-Date: 2015-09-25 12:42+0200\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Yithemes <plugins@yithemes.com>\n"
|
8 |
"Language: it_IT\n"
|
172 |
"Upgrade to the %1$spremium version%2$s%3$s of %1$sYITH WooCommerce Ajax "
|
173 |
"Search%2$s to benefit from all features!"
|
174 |
msgstr ""
|
175 |
+
"Aggiorna alla %1$spremium versione%2$s %3$s di%1$sYITH WooCommerce Ajax "
|
176 |
+
"Search%2$s per usufruire di tutte le sue funzionalità!"
|
177 |
|
178 |
#: ../templates/admin/premium.php:253 ../templates/admin/premium.php:301
|
179 |
#, php-format
|
180 |
msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
|
181 |
+
msgstr "%1$sAGGIORNA%2$s %3$salla versione premium%2$s "
|
182 |
|
183 |
#: ../templates/admin/premium.php:259
|
184 |
msgid "Premium Features"
|
185 |
+
msgstr "Funzionalità premium"
|
186 |
|
187 |
#: ../templates/admin/premium.php:261
|
188 |
msgid "HOW TO CUSTOMIZE THE RESULTS OF THE AUTOCOMPLETE"
|
189 |
+
msgstr "Come personalizzare i risultati del riempimento automatico"
|
190 |
|
191 |
#: ../templates/admin/premium.php:263
|
192 |
msgid "RESULTS OF THE AUTOCOMPLETE"
|
193 |
+
msgstr "Risultati del completamento automatico"
|
194 |
|
195 |
#: ../templates/admin/premium.php:268
|
196 |
#, php-format
|
197 |
msgid "Show %1$sthe image%2$s of the product (left or right aligned)"
|
198 |
+
msgstr "Mostra %1$sl'immagine%2$s del prodotto (a destra o sinistra)"
|
199 |
|
200 |
#: ../templates/admin/premium.php:269
|
201 |
#, php-format
|
202 |
msgid "Enable the %1$sprice visualization%2$s"
|
203 |
+
msgstr "Abilita %1$svisualizzazione prezzo%2$s"
|
204 |
|
205 |
#: ../templates/admin/premium.php:270
|
206 |
#, php-format
|
207 |
msgid "Show the %1$sproduct description%2$s"
|
208 |
+
msgstr "Mostra %1$sdescrizione prodotto%2$s"
|
209 |
|
210 |
#: ../templates/admin/premium.php:271
|
211 |
#, php-format
|
212 |
msgid "Tell to the client if the product is %1$son discount or is featured%2$s"
|
213 |
+
msgstr "Informa l'utente se il prodotto è %1$sin saldo o in evidenza%2$s"
|
214 |
|
215 |
#: ../templates/admin/premium.php:279
|
216 |
msgid "HOW TO CUSTOMIZE THE SEARCH OPTIONS"
|
217 |
+
msgstr "Come personalizzare le opzioni di ricerca"
|
218 |
|
219 |
#: ../templates/admin/premium.php:283
|
220 |
#, php-format
|
221 |
msgid "%1$sExtend the research%2$s in the excerpt and in the content"
|
222 |
msgstr ""
|
223 |
+
"%1$sEstendi le funzionalità di ricerca%2$s anche all'interno del riassunto "
|
224 |
+
"prodotto e del contenuto"
|
225 |
|
226 |
#: ../templates/admin/premium.php:284
|
227 |
#, php-format
|
228 |
msgid "%1$sActivate%2$s the category search"
|
229 |
+
msgstr "%1$sAbilita%2$s la ricerca per categoria"
|
230 |
|
231 |
#: ../templates/admin/premium.php:285
|
232 |
#, php-format
|
233 |
msgid "Configure the %1$stag%2$s search"
|
234 |
+
msgstr "Configura la ricerca per %1$stag%2$s"
|
235 |
|
236 |
#: ../templates/admin/premium.php:286
|
237 |
#, php-format
|
238 |
msgid "Search a product with an %1$sID%2$s"
|
239 |
+
msgstr "Cerca un prodotto utilizzando il suo %1$sID%2$s"
|
240 |
|
241 |
#: ../templates/admin/premium.php:292
|
242 |
msgid "SEARCH OPTIONS"
|
243 |
+
msgstr "OPZIONI DI RICERCA"
|
244 |
|
245 |
#: ../templates/yith-woocommerce-ajax-search.php:18
|
246 |
msgid "Search for:"
|
plugin-fw/assets/css/yit-plugin-panel.css
CHANGED
@@ -631,6 +631,13 @@
|
|
631 |
width: 6em;
|
632 |
}
|
633 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
634 |
/* === Responsive === */
|
635 |
|
636 |
@media (max-width: 767px) {}
|
631 |
width: 6em;
|
632 |
}
|
633 |
|
634 |
+
/* === YIT FRAMEWORK === */
|
635 |
+
.plugin-card .plugin-icon img {
|
636 |
+
max-width: 100%;
|
637 |
+
width: auto;
|
638 |
+
height: auto;
|
639 |
+
}
|
640 |
+
|
641 |
/* === Responsive === */
|
642 |
|
643 |
@media (max-width: 767px) {}
|
plugin-fw/assets/js/chosen/ajax-chosen.jquery.min.js
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
-
|
2 |
-
|
|
1 |
+
(function(b){return b.fn.ajaxChosen=function(d,g){var e,a,f;null==d&&(d={});null==g&&(g=function(){});f=this;e=null;a=b.extend({},{minTermLength:3,afterTypeDelay:500,jsonTermKey:"term"},d);this.chosen();return this.each(function(){return b(this).next(".chosen-container").find(".search-field > input, .chosen-search > input").bind("keyup",function(){var d,l,h,c;c=b.trim(b(this).attr("value"));l=c.length<a.minTermLength?"Keep typing...":"Looking for '"+c+"'";f.next(".chosen-container").find(".no-results").text(l);
|
2 |
+
if(c===b(this).data("prevVal"))return!1;b(this).data("prevVal",c);this.timer&&clearTimeout(this.timer);if(c.length<a.minTermLength)return!1;d=b(this);null==a.data&&(a.data={});a.data[a.jsonTermKey]=c;null!=a.dataCallback&&(a.data=a.dataCallback(a.data));h=a.success;a.success=function(a){var e,k;if(null!=a)return k=[],f.find("option").each(function(){return b(this).is(":selected")?k.push(b(this).val()+"-"+b(this).text()):b(this).remove()}),e=g(a),b.each(e,function(a,c){if(-1===b.inArray(a+"-"+c,k))return b("<option />").attr("value",
|
3 |
+
a).html(c).appendTo(f)}),f.trigger("chosen:updated"),null!=h&&h(a),d.attr("value",c),d.css("width","auto")};return this.timer=setTimeout(function(){e&&e.abort();return e=b.ajax(a)},a.afterTypeDelay)})})}})(jQuery);
|
plugin-fw/assets/js/metabox.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
(function(a){function k(b,c,d){var e=!0;if("string"==typeof c){":radio"==c.substr(0,6)&&(c+=":checked");var g=a(c).val();"checkbox"==a(c).attr("type")&&(g=a(c).is(":checked")?"yes":"no");d=d.split(",");for(c=0;c<d.length;c++)if(g!=d[c])e=!1;else{e=!0;break}}e?a(b+"-container").parent().show():a(b+"-container").parent().hide()}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab"),b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):
|
2 |
-
"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").slideUp("fast"),a(b).delay(350).slideDown("fast"),!1})});var h=!0,l=wp.media.editor.send.attachment;a(document).on("click",".metaboxes-tab .upload_button",function(b){b=a(this);var c=b.attr("id").replace("-button",
|
3 |
-
wp.media.editor.send.attachment=function(b,e){if(h)a("#"+c).is("input[type=text]")?a("#"+c).val(e.url):a("#"+c+"_custom").val(e.url);else return l.apply(this,[b,e])};wp.media.editor.open(b);return!1});a(".metaboxes-tab .add_media").on("click",function(){h=!1});a(".metaboxes-tab .panel-colorpicker").wpColorPicker({onInit:function(){console.log("test")},change:function(a,c){},clear:function(){var b=a(this);b.val(b.data("default-color"));b.change()}});a(".metaboxes-tab .panel-colorpicker").each(function(){var b=
|
4 |
a(this).data("variations-label");a(this).parent().parent().find("a.wp-color-result").attr("title",b)});a(".metaboxes-tab .panel-datepicker").each(function(){a(this).datepicker()});var f=function(){var b="";a(this).attr("multiple")?(a(this).children("option:selected").each(function(c,d){0!=c&&(b+=", ");b+=a(d).text()}),""==b&&a(this).children().children("option:selected").each(function(c,d){0!=c&&(b+=", ");b+=a(d).text()})):(b=a(this).children("option:selected").text(),""==b&&(b=a(this).children().children("option:selected").text()));
|
5 |
0>=a(this).parent().find("span").length&&a(this).before("<span></span>");a(this).parent().children("span").replaceWith("<span>"+b+"</span>")};a(".metaboxes-tab .select_wrapper select").not(".chosen").each(f).change(f);a(".metaboxes-tab .select_wrapper").click(function(b){b.stopPropagation();a(this).find("select[multiple]").not(".chosen").toggle()});a(".metaboxes-tab .select_wrapper select[multiple]").not(".chosen").click(function(a){a.stopPropagation()});a(window).click(function(){a(".metaboxes-tab .select_wrapper select[multiple]").not(".chosen").hide()});
|
6 |
a(".metaboxes-tab .onoff_container span").on("click",function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a(".metaboxes-tab .chosen .select_wrapper select").chosen();a(".metaboxes-tab .slider_container .ui-slider-horizontal").each(function(){var b=a(this).data("val"),c=a(this).data("min"),d=a(this).data("max"),e=a(this).data("step"),g=a(this).data("labels");
|
1 |
(function(a){function k(b,c,d){var e=!0;if("string"==typeof c){":radio"==c.substr(0,6)&&(c+=":checked");var g=a(c).val();"checkbox"==a(c).attr("type")&&(g=a(c).is(":checked")?"yes":"no");d=d.split(",");for(c=0;c<d.length;c++)if(g!=d[c])e=!1;else{e=!0;break}}e?a(b+"-container").parent().show():a(b+"-container").parent().hide()}a(".metaboxes-tab").each(function(){a(".tabs-panel",this).hide();var b=wpCookies.get("active_metabox_tab"),b=null==b?a("ul.metaboxes-tabs li:first-child a",this).attr("href"):
|
2 |
+
"#"+b;a(b).show();a(".metaboxes-tabs a",this).click(function(b){if(a(this).parent().hasClass("tabs"))b.preventDefault();else return b=a(this).attr("href"),a(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),a(this).closest(".metaboxes-tab").find(".tabs-panel").slideUp("fast"),a(b).delay(350).slideDown("fast"),!1})});var h=!0,l=wp.media.editor.send.attachment;a(document).on("click",".metaboxes-tab .upload_button",function(b){b=a(this);if("undefined"!=typeof b.attr("id")){var c=b.attr("id").replace("-button",
|
3 |
+
"");h=!0;wp.media.editor.send.attachment=function(b,e){if(h)a("#"+c).is("input[type=text]")?a("#"+c).val(e.url):a("#"+c+"_custom").val(e.url);else return l.apply(this,[b,e])};wp.media.editor.open(b);return!1}});a(".metaboxes-tab .add_media").on("click",function(){h=!1});a(".metaboxes-tab .panel-colorpicker").wpColorPicker({onInit:function(){console.log("test")},change:function(a,c){},clear:function(){var b=a(this);b.val(b.data("default-color"));b.change()}});a(".metaboxes-tab .panel-colorpicker").each(function(){var b=
|
4 |
a(this).data("variations-label");a(this).parent().parent().find("a.wp-color-result").attr("title",b)});a(".metaboxes-tab .panel-datepicker").each(function(){a(this).datepicker()});var f=function(){var b="";a(this).attr("multiple")?(a(this).children("option:selected").each(function(c,d){0!=c&&(b+=", ");b+=a(d).text()}),""==b&&a(this).children().children("option:selected").each(function(c,d){0!=c&&(b+=", ");b+=a(d).text()})):(b=a(this).children("option:selected").text(),""==b&&(b=a(this).children().children("option:selected").text()));
|
5 |
0>=a(this).parent().find("span").length&&a(this).before("<span></span>");a(this).parent().children("span").replaceWith("<span>"+b+"</span>")};a(".metaboxes-tab .select_wrapper select").not(".chosen").each(f).change(f);a(".metaboxes-tab .select_wrapper").click(function(b){b.stopPropagation();a(this).find("select[multiple]").not(".chosen").toggle()});a(".metaboxes-tab .select_wrapper select[multiple]").not(".chosen").click(function(a){a.stopPropagation()});a(window).click(function(){a(".metaboxes-tab .select_wrapper select[multiple]").not(".chosen").hide()});
|
6 |
a(".metaboxes-tab .onoff_container span").on("click",function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a(".metaboxes-tab .chosen .select_wrapper select").chosen();a(".metaboxes-tab .slider_container .ui-slider-horizontal").each(function(){var b=a(this).data("val"),c=a(this).data("min"),d=a(this).data("max"),e=a(this).data("step"),g=a(this).data("labels");
|
plugin-fw/assets/js/multisite-updater.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
(function(m){function n(c,d,k){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var a=0,e=0,b=0,f={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},a=function(a){a=(""+a).replace(/[_\-+]/g,".");a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".");return a.length?a.split("."):[-8]};numVersion=function(a){return a?isNaN(a)?f[a]||-7:parseInt(a,10):0};c=a(c);d=a(d);e=Math.max(c.length,d.length);for(a=0;a<e;a++)if(c[a]!=d[a])if(c[a]=numVersion(c[a]),d[a]=numVersion(d[a]),
|
2 |
-
|
3 |
-
|
4 |
-
|
1 |
+
(function(m){function n(c,d,k){this.php_js=this.php_js||{};this.php_js.ENV=this.php_js.ENV||{};var a=0,e=0,b=0,f={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},a=function(a){a=(""+a).replace(/[_\-+]/g,".");a=a.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,".");return a.length?a.split("."):[-8]};numVersion=function(a){return a?isNaN(a)?f[a]||-7:parseInt(a,10):0};c=a(c);d=a(d);e=Math.max(c.length,d.length);for(a=0;a<e;a++)if(c[a]!=d[a])if(c[a]=numVersion(c[a]),d[a]=numVersion(d[a]),
|
2 |
+
c[a]<d[a]){b=-1;break}else if(c[a]>d[a]){b=1;break}if(!k)return b;switch(k){case ">":case "gt":return 0<b;case ">=":case "ge":return 0<=b;case "<=":case "le":return 0>=b;case "==":case "=":case "eq":return 0===b;case "<>":case "!=":case "ne":return 0!==b;case "":case "<":case "lt":return 0>b;default:return null}}var l=m("#menu-plugins"),g=l.find(".update-plugins").find(".update-count").text(),p=plugins.registered,q=plugins.activated;if(0==g||""==g)g=0,l.find(".wp-menu-name").append('<span class="update-plugins"><span class="plugin-count"></span></span>');
|
3 |
+
(function(c,d,k,a){for(var e in c){var b=c[e],f;for(f in b)if("slug"!=f&&!n(b[f].Version,b[f].Latest,">=")){k=parseInt(k)+1;m(".plugin-count").empty().html(k);var g=""+b[f].Name,l="#"+g.replace(RegExp(" ","g"),"-").trim().toLowerCase();m(l).addClass("update");var h='<tr class="plugin-update-tr"><td colspan="3" class="plugin-update colspanchange"><div class="update-message">'+a.strings.new_version.replace("%plugin_name%",g)+'<a class="thickbox" href="'+a.details_url[e]+'">'+a.strings.latest.replace("%latest%",
|
4 |
+
b[f].Latest)+"</a>",h="undefined"==typeof d[e]?h+" <em>"+a.strings.unavailable+"</em>"+a.strings.activate.replace("%activate_link%",a.licence_activation_url).replace("%plugin_name%",g):h+'. <a href="'+a.update_url[e]+'">'+a.strings.update_now+"</a>";"undefined"!=typeof a.changelogs[e]&&(h+=a.changelogs[e]);h+="</div></td></tr>";m(h).insertAfter(l)}}})(p,q,g,plugins)})(jQuery);
|
plugin-fw/assets/js/yit-plugin-panel.js
CHANGED
@@ -165,6 +165,12 @@
|
|
165 |
var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
|
166 |
|
167 |
$("#" + id).val( attachment.url );
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
$('.plugin-option .upload_img_url').trigger('change');
|
169 |
});
|
170 |
|
165 |
var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
|
166 |
|
167 |
$("#" + id).val( attachment.url );
|
168 |
+
// Save the id of the selected element to an element which name is the same with
|
169 |
+
// a suffix "-yith-attachment-id"
|
170 |
+
if ($("#" + id + "-yith-attachment-id")) {
|
171 |
+
$("#" + id + "-yith-attachment-id").val(attachment.id);
|
172 |
+
}
|
173 |
+
|
174 |
$('.plugin-option .upload_img_url').trigger('change');
|
175 |
});
|
176 |
|
plugin-fw/assets/js/yit-plugin-panel.min.js
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
"</span>")};a(".plugin-option .select_wrapper select").not(".chosen").each(l).change(l);a(".plugin-option .select_wrapper").click(function(b){b.stopPropagation();a(this).find("select[multiple]").not(".chosen").toggle()});a(".plugin-option .select_wrapper select[multiple]").not(".chosen").click(function(a){a.stopPropagation()});a(window).click(function(){a(".plugin-option .select_wrapper select[multiple]").not(".chosen").hide()});a(".plugin-option .chosen .select_wrapper select").chosen();a(".plugin-option .on_off_container span").on("click",
|
3 |
function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a(".plugin-option .slider_container .ui-slider-horizontal").each(function(){var b=a(this).data("val"),c=a(this).data("min"),d=a(this).data("max"),e=a(this).data("step"),f=a(this).data("labels");a(this).slider({value:b,min:c,max:d,range:"min",step:e,slide:function(b,c){a(this).find("input").val(c.value);
|
4 |
a(this).siblings(".feedback").find("strong").text(c.value+f)}})});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&(a(".plugin-option .upload_img_url").change(function(){var b=a(this).val(),c=a(this).parents().siblings(".upload_img_preview");/(http|ftp|https):\/\/[a-zA-Z0-9@?^=%&:/~+#-_.]*.(gif|jpg|jpeg|png|ico)/.test(b)?c.html('<img src="'+b+'" style="max-width:600px; max-height:300px;" />'):c.html("")}).trigger("change"),a(document).on("click",".plugin-option .upload_button",function(b){b.preventDefault();
|
5 |
-
var c,d=a(this).attr("id").replace(/-button$/,"");c||(b=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})],c=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:b}),c.on("select",function(){var b=c.state().get("selection").first().toJSON();a("#"+d).val(b.url);a("
|
6 |
-
function(){});a("[data-field]").each(function(){var b=a(this),c="#"+b.data("field"),d="#"+b.data("dep"),e=b.data("value");a(d).on("change",function(){var b=d,g=e.toString(),h=!0;if("string"==typeof b){":radio"==b.substr(0,6)&&(b+=":checked");for(var g=g.split(","),k=0;k<g.length;k++)if(a(b).val()!=g[k])h=!1;else{h=!0;break}}h?a(c+"-container").closest("tr").show():a(c+"-container").closest("tr").hide()}).change()});a(".rm_connectedlist").each(function(){var b=
|
7 |
-
b.sortable({connectWith:b,update:function(d,e){var f={};b.each(function(){var b={};a(this).children().each(function(){b[a(this).data("option")]=a(this).text()});f[a(this).data("list")]=b});c.val(JSON.stringify(f).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()});a(document).ready(function(){a(".yith-video-link").click(function(b){b.preventDefault();b=a(this).data("video-id");a("."+b).dialog({dialogClass:"wp-dialog yit-dialog yit-video-dialog",
|
8 |
-
resizable:!1,draggable:!1,create:function(b,d){a(this).css("maxWidth","853px")},open:function(b,d){a(".ui-widget-overlay").bind("click",function(){a(this).siblings(".ui-dialog").find(".ui-dialog-content").dialog("close")})}});a(".ui-dialog :button").blur()})});a(document).ready(function(){a(".codemirror").each(function(b,c){var d=CodeMirror.fromTextArea(c,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});a(c).data("codemirrorInstance",d)})});a(document).ready(function(){a(".google-analytic-generate").click(function(){var b=
|
9 |
a("#"+a(this).data("textarea")).data("codemirrorInstance"),c=a("#"+a(this).data("input")).val(),d=a(this).data("basename"),e;e="(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\nm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n";e+="})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n";e+="ga('create', '"+c+"', '"+d+"');\n";e+="ga('send', 'pageview');\n";
|
10 |
-
b.replaceRange(e,b.getCursor("start"),b.getCursor("end"))})})})(jQuery);
|
2 |
"</span>")};a(".plugin-option .select_wrapper select").not(".chosen").each(l).change(l);a(".plugin-option .select_wrapper").click(function(b){b.stopPropagation();a(this).find("select[multiple]").not(".chosen").toggle()});a(".plugin-option .select_wrapper select[multiple]").not(".chosen").click(function(a){a.stopPropagation()});a(window).click(function(){a(".plugin-option .select_wrapper select[multiple]").not(".chosen").hide()});a(".plugin-option .chosen .select_wrapper select").chosen();a(".plugin-option .on_off_container span").on("click",
|
3 |
function(){var b=a(this).prev("input");b.prop("checked")?b.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):b.prop("checked",!0).attr("value","yes").addClass("onoffchecked");b.change()});a(".plugin-option .slider_container .ui-slider-horizontal").each(function(){var b=a(this).data("val"),c=a(this).data("min"),d=a(this).data("max"),e=a(this).data("step"),f=a(this).data("labels");a(this).slider({value:b,min:c,max:d,range:"min",step:e,slide:function(b,c){a(this).find("input").val(c.value);
|
4 |
a(this).siblings(".feedback").find("strong").text(c.value+f)}})});"undefined"!==typeof wp&&"undefined"!==typeof wp.media&&(a(".plugin-option .upload_img_url").change(function(){var b=a(this).val(),c=a(this).parents().siblings(".upload_img_preview");/(http|ftp|https):\/\/[a-zA-Z0-9@?^=%&:/~+#-_.]*.(gif|jpg|jpeg|png|ico)/.test(b)?c.html('<img src="'+b+'" style="max-width:600px; max-height:300px;" />'):c.html("")}).trigger("change"),a(document).on("click",".plugin-option .upload_button",function(b){b.preventDefault();
|
5 |
+
var c,d=a(this).attr("id").replace(/-button$/,"");c||(b=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})],c=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:b}),c.on("select",function(){var b=c.state().get("selection").first().toJSON();a("#"+d).val(b.url);a("#"+d+"-yith-attachment-id")&&a("#"+d+"-yith-attachment-id").val(b.id);a(".plugin-option .upload_img_url").trigger("change")}));
|
6 |
+
c.open()}));a(".plugin-option .add_media").on("click",function(){});a("[data-field]").each(function(){var b=a(this),c="#"+b.data("field"),d="#"+b.data("dep"),e=b.data("value");a(d).on("change",function(){var b=d,g=e.toString(),h=!0;if("string"==typeof b){":radio"==b.substr(0,6)&&(b+=":checked");for(var g=g.split(","),k=0;k<g.length;k++)if(a(b).val()!=g[k])h=!1;else{h=!0;break}}h?a(c+"-container").closest("tr").show():a(c+"-container").closest("tr").hide()}).change()});a(".rm_connectedlist").each(function(){var b=
|
7 |
+
a(this).find("ul"),c=a(this).find(":hidden");b.sortable({connectWith:b,update:function(d,e){var f={};b.each(function(){var b={};a(this).children().each(function(){b[a(this).data("option")]=a(this).text()});f[a(this).data("list")]=b});c.val(JSON.stringify(f).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()});a(document).ready(function(){a(".yith-video-link").click(function(b){b.preventDefault();b=a(this).data("video-id");a("."+b).dialog({dialogClass:"wp-dialog yit-dialog yit-video-dialog",
|
8 |
+
modal:!0,closeOnEscape:!0,width:"auto",resizable:!1,draggable:!1,create:function(b,d){a(this).css("maxWidth","853px")},open:function(b,d){a(".ui-widget-overlay").bind("click",function(){a(this).siblings(".ui-dialog").find(".ui-dialog-content").dialog("close")})}});a(".ui-dialog :button").blur()})});a(document).ready(function(){a(".codemirror").each(function(b,c){var d=CodeMirror.fromTextArea(c,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});a(c).data("codemirrorInstance",d)})});a(document).ready(function(){a(".google-analytic-generate").click(function(){var b=
|
9 |
a("#"+a(this).data("textarea")).data("codemirrorInstance"),c=a("#"+a(this).data("input")).val(),d=a(this).data("basename"),e;e="(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\nm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n";e+="})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n";e+="ga('create', '"+c+"', '"+d+"');\n";e+="ga('send', 'pageview');\n";
|
10 |
+
b.replaceRange(e,b.getCursor("start"),b.getCursor("end"))})})})(jQuery);
|
plugin-fw/assets/js/yit-wp-pointer.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
jQuery(document).ready(function(b){var c=custom_pointer.pointers[0],d=c.options,a=b(c.target),e=c.pointer_id;b(a).find(".wp-submenu li a").each(function(){var f=b(this),h=f.attr("href"),h=h.replace("admin.php?page=","");if(h==e){var k=f.add(a),g=a.find(c.target.replace("#","."));a.toggleClass("wp-no-current-submenu wp-menu-open wp-has-current-submenu");f.pointer({pointerClass:"yit-wp-pointer",content:d.content,position:d.position,open:function(){
|
2 |
-
|
3 |
-
|
1 |
+
jQuery(document).ready(function(b){var c=custom_pointer.pointers[0],d=c.options,a=b(c.target),e=c.pointer_id;b(a).find(".wp-submenu li a").each(function(){var f=b(this),h=f.attr("href"),h=h.replace("admin.php?page=","");if(h==e){var k=f.add(a),g=a.find(c.target.replace("#","."));a.toggleClass("wp-no-current-submenu wp-menu-open wp-has-current-submenu");f.pointer({pointerClass:"yit-wp-pointer",content:d.content,position:d.position,open:function(){k.toggleClass("yit-pointer-selected-row");g.addClass("yit-pointer")},
|
2 |
+
close:function(){a.toggleClass("wp-no-current-submenu wp-menu-open wp-has-current-submenu");k.toggleClass("yit-pointer-selected-row");g.removeClass("yit-pointer");b.ajax({type:"POST",url:ajaxurl,data:{action:"dismiss-wp-pointer",pointer:e},success:function(a){}})}}).pointer("open")}else if("yith_default_pointer"==e){var k=f.add(a),g=a.find(c.target.replace("#",".")),l=b(c.target);l.addClass("wp-has-current-submenu");g.pointer({pointerClass:"yit-wp-pointer",content:d.content,position:d.position,open:function(){l.addClass("yit-pointer-selected-row")},
|
3 |
+
close:function(){l.removeClass("yit-pointer-selected-row wp-has-current-submenu");b.ajax({type:"POST",url:ajaxurl,data:{action:"dismiss-wp-pointer",pointer:e},success:function(a){}})}}).pointer("open")}})});
|
plugin-fw/init.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Framework Name: YIT Plugin Framework
|
4 |
+
* Version: 2.1
|
5 |
+
* Author: Yithemes
|
6 |
+
* Text Domain: yith-plugin-fw
|
7 |
+
* Domain Path: /languages/
|
8 |
+
*
|
9 |
+
* @author Your Inspiration Themes
|
10 |
+
* @package YITH WooCommerce Ajax Navigation
|
11 |
+
* @version 2.0
|
12 |
+
*/
|
13 |
+
/**
|
14 |
+
* This file belongs to the YIT Plugin Framework.
|
15 |
+
*
|
16 |
+
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
|
17 |
+
* that is bundled with this package in the file LICENSE.txt.
|
18 |
+
* It is also available through the world-wide-web at this URL:
|
19 |
+
* http://www.gnu.org/licenses/gpl-3.0.txt
|
20 |
+
*/
|
21 |
+
|
22 |
+
|
23 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
24 |
+
exit;
|
25 |
+
} // Exit if accessed directly
|
26 |
+
|
27 |
+
if ( ! function_exists( 'yit_maybe_plugin_fw_loader' ) ) {
|
28 |
+
/**
|
29 |
+
* YITH WooCommerce Ajax Navigation
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
function yit_maybe_plugin_fw_loader( $plugin_path ) {
|
34 |
+
global $plugin_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 |
+
$framework_data = get_file_data( trailingslashit( $plugin_path ) .'plugin-fw/init.php', $default_headers );
|
45 |
+
$plugin_fw_main_file = trailingslashit( $plugin_path ) . 'plugin-fw/yit-plugin.php';
|
46 |
+
|
47 |
+
if( ! empty( $plugin_fw_data ) ){
|
48 |
+
foreach( $plugin_fw_data as $version => $path ){
|
49 |
+
if( version_compare( $version, $framework_data['Version'], '<' ) ){
|
50 |
+
$plugin_fw_data = array( $framework_data['Version'] => $plugin_fw_main_file );
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
else {
|
56 |
+
$plugin_fw_data = array( $framework_data['Version'] => $plugin_fw_main_file );
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
plugin-fw/lib/yit-cpt-unlimited.php
CHANGED
@@ -1049,7 +1049,7 @@ class YIT_CPT_Unlimited {
|
|
1049 |
'fields' => apply_filters( 'yit_cptu_fields', array(
|
1050 |
'type' => array(
|
1051 |
'label' => __( 'Type', 'yith-plugin-fw' ),
|
1052 |
-
'desc' => __( 'Layout for this '
|
1053 |
'type' => 'select',
|
1054 |
'options' => isset( $layouts ) ? $layouts : array(),
|
1055 |
'std' => '' ),
|
1049 |
'fields' => apply_filters( 'yit_cptu_fields', array(
|
1050 |
'type' => array(
|
1051 |
'label' => __( 'Type', 'yith-plugin-fw' ),
|
1052 |
+
'desc' => sprintf( __( 'Layout for this %s' , 'yith-plugin-fw' ), strtolower( $this->_labels['singular'] ) ),
|
1053 |
'type' => 'select',
|
1054 |
'options' => isset( $layouts ) ? $layouts : array(),
|
1055 |
'std' => '' ),
|
plugin-fw/lib/yit-metabox.php
CHANGED
@@ -161,8 +161,6 @@ if (!class_exists('YIT_Metabox')) {
|
|
161 |
wp_enqueue_script('ajax-chosen', yit_load_js_file(YIT_CORE_PLUGIN_URL . '/assets/js/chosen/ajax-chosen.jquery.js'), array('jquery'), '1.1.0', true);
|
162 |
wp_enqueue_script('yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox.js', array('jquery', 'wp-color-picker'), '1.0.0', true);
|
163 |
wp_enqueue_style('jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all');
|
164 |
-
|
165 |
-
|
166 |
}
|
167 |
|
168 |
/**
|
161 |
wp_enqueue_script('ajax-chosen', yit_load_js_file(YIT_CORE_PLUGIN_URL . '/assets/js/chosen/ajax-chosen.jquery.js'), array('jquery'), '1.1.0', true);
|
162 |
wp_enqueue_script('yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox.js', array('jquery', 'wp-color-picker'), '1.0.0', true);
|
163 |
wp_enqueue_style('jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all');
|
|
|
|
|
164 |
}
|
165 |
|
166 |
/**
|
plugin-fw/lib/yit-plugin-panel-wc.php
CHANGED
@@ -278,6 +278,20 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
278 |
}
|
279 |
}
|
280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
woocommerce_update_options( $yit_options[ $current_tab ] );
|
282 |
|
283 |
do_action( 'yit_panel_wc_after_update' );
|
@@ -314,7 +328,6 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
314 |
wp_enqueue_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $woocommerce->version );
|
315 |
wp_enqueue_style ( 'wp-jquery-ui-dialog' );
|
316 |
|
317 |
-
|
318 |
wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
|
319 |
wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
|
320 |
wp_enqueue_script( 'woocommerce_settings', $woocommerce->plugin_url() . '/assets/js/admin/settings.min.js', array( 'jquery', 'jquery-ui-datepicker','jquery-ui-dialog', 'jquery-ui-sortable', 'iris', 'chosen' ), $woocommerce->version, true );
|
@@ -365,8 +378,8 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
365 |
* @return array Filtered body classes
|
366 |
*/
|
367 |
public function admin_body_class( $admin_body_classes ){
|
368 |
-
$
|
369 |
-
return $admin_body_classes;
|
370 |
}
|
371 |
|
372 |
/**
|
278 |
}
|
279 |
}
|
280 |
|
281 |
+
foreach($_POST as $name => $value) {
|
282 |
+
|
283 |
+
// Check if current POST var which name ends with a specific needle
|
284 |
+
$attachment_id_needle = "-yith-attachment-id";
|
285 |
+
$is_hidden_input = (($temp = strlen($name) - strlen($attachment_id_needle)) >= 0 && strpos($name, $attachment_id_needle, $temp) !== FALSE);
|
286 |
+
if ($is_hidden_input){
|
287 |
+
// Is an input element of type "hidden" coupled with an input element for selecting an element from the media gallery
|
288 |
+
$yit_options[ $current_tab ][$name] = array(
|
289 |
+
"type" => "text",
|
290 |
+
"id" => $name
|
291 |
+
);
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
woocommerce_update_options( $yit_options[ $current_tab ] );
|
296 |
|
297 |
do_action( 'yit_panel_wc_after_update' );
|
328 |
wp_enqueue_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $woocommerce->version );
|
329 |
wp_enqueue_style ( 'wp-jquery-ui-dialog' );
|
330 |
|
|
|
331 |
wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
|
332 |
wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
|
333 |
wp_enqueue_script( 'woocommerce_settings', $woocommerce->plugin_url() . '/assets/js/admin/settings.min.js', array( 'jquery', 'jquery-ui-datepicker','jquery-ui-dialog', 'jquery-ui-sortable', 'iris', 'chosen' ), $woocommerce->version, true );
|
378 |
* @return array Filtered body classes
|
379 |
*/
|
380 |
public function admin_body_class( $admin_body_classes ){
|
381 |
+
global $pagenow;
|
382 |
+
return 'admin.php' == $pagenow && substr_count( $admin_body_classes, 'woocommerce' ) == 0 ? $admin_body_classes .= ' woocommerce ' : $admin_body_classes;
|
383 |
}
|
384 |
|
385 |
/**
|
plugin-fw/lib/yit-plugin-panel.php
CHANGED
@@ -121,32 +121,27 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
121 |
*/
|
122 |
public function admin_enqueue_scripts() {
|
123 |
|
124 |
-
global $wp_scripts;
|
125 |
|
126 |
//scripts
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), $this->version, true );
|
137 |
-
|
138 |
-
|
139 |
-
wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
|
140 |
|
141 |
//styles
|
142 |
-
|
143 |
$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
|
144 |
-
|
145 |
wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
|
146 |
wp_enqueue_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $this->version );
|
147 |
wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
|
148 |
-
|
149 |
-
|
150 |
}
|
151 |
|
152 |
/**
|
121 |
*/
|
122 |
public function admin_enqueue_scripts() {
|
123 |
|
124 |
+
global $wp_scripts, $pagenow;
|
125 |
|
126 |
//scripts
|
127 |
+
wp_enqueue_media();
|
128 |
+
wp_enqueue_script( 'jquery-ui' );
|
129 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
130 |
+
wp_enqueue_script( 'jquery-ui-slider' );
|
131 |
+
wp_enqueue_script( 'jquery-ui-dialog' );
|
132 |
+
wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
|
133 |
+
wp_enqueue_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
|
134 |
+
wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), $this->version, true );
|
135 |
+
wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), $this->version, true );
|
|
|
|
|
|
|
|
|
136 |
|
137 |
//styles
|
|
|
138 |
$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
|
139 |
+
wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
|
140 |
wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
|
141 |
wp_enqueue_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $this->version );
|
142 |
wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
|
143 |
+
wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
|
144 |
+
wp_enqueue_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
|
145 |
}
|
146 |
|
147 |
/**
|
plugin-fw/lib/yit-upgrade.php
CHANGED
@@ -190,15 +190,34 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
|
|
190 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
191 |
*/
|
192 |
protected function _upgrader_pre_download( $reply, $package, $upgrader ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
/**
|
195 |
* It isn't YITH Premium plugins, please wordpress update it for me!
|
196 |
*/
|
197 |
-
if( !
|
198 |
return $reply;
|
199 |
}
|
200 |
|
201 |
-
|
202 |
|
203 |
/**
|
204 |
* False ? It isn't YITH Premium plugins, please wordpress update it for me!
|
@@ -262,7 +281,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
|
|
262 |
|
263 |
//WARNING: The file is not automatically deleted, The script must unlink() the file.
|
264 |
if ( ! $url ) {
|
265 |
-
return new WP_Error( 'http_no_url', __( 'Invalid URL Provided.' ) );
|
266 |
}
|
267 |
|
268 |
$tmpfname = wp_tempnam( $url );
|
@@ -275,7 +294,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
|
|
275 |
);
|
276 |
|
277 |
if ( ! $tmpfname ) {
|
278 |
-
return new WP_Error( 'http_no_file', __( 'Could not create Temporary file.' ) );
|
279 |
}
|
280 |
|
281 |
$response = wp_safe_remote_post( $url, $args );
|
190 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
191 |
*/
|
192 |
protected function _upgrader_pre_download( $reply, $package, $upgrader ) {
|
193 |
+
$plugin = false;
|
194 |
+
$is_bulk = $upgrader->skin instanceof Bulk_Plugin_Upgrader_Skin;
|
195 |
+
|
196 |
+
if( ! $is_bulk ){
|
197 |
+
$plugin = isset( $upgrader->skin->plugin ) ? $upgrader->skin->plugin : false;
|
198 |
+
}
|
199 |
+
|
200 |
+
else {
|
201 |
+
//Bulk action upgrade
|
202 |
+
$action_url = parse_url( $upgrader->skin->options['url'] );
|
203 |
+
parse_str( rawurldecode( htmlspecialchars_decode( $action_url['query'] ) ) );
|
204 |
+
$plugins = explode( ',', $plugins );
|
205 |
+
foreach( $plugins as $plugin_init ){
|
206 |
+
$to_upgrade = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin_init );
|
207 |
+
if( $to_upgrade['Name'] == $upgrader->skin->plugin_info['Name'] ){
|
208 |
+
$plugin = $plugin_init;
|
209 |
+
}
|
210 |
+
}
|
211 |
+
}
|
212 |
|
213 |
/**
|
214 |
* It isn't YITH Premium plugins, please wordpress update it for me!
|
215 |
*/
|
216 |
+
if( ! $plugin ) {
|
217 |
return $reply;
|
218 |
}
|
219 |
|
220 |
+
$plugin_info = YIT_Plugin_Licence()->get_product( $plugin );
|
221 |
|
222 |
/**
|
223 |
* False ? It isn't YITH Premium plugins, please wordpress update it for me!
|
281 |
|
282 |
//WARNING: The file is not automatically deleted, The script must unlink() the file.
|
283 |
if ( ! $url ) {
|
284 |
+
return new WP_Error( 'http_no_url', __( 'Invalid URL Provided.', 'yit' ) );
|
285 |
}
|
286 |
|
287 |
$tmpfname = wp_tempnam( $url );
|
294 |
);
|
295 |
|
296 |
if ( ! $tmpfname ) {
|
297 |
+
return new WP_Error( 'http_no_file', __( 'Could not create Temporary file.', 'yit' ) );
|
298 |
}
|
299 |
|
300 |
$response = wp_safe_remote_post( $url, $args );
|
plugin-fw/licence/assets/js/yit-licence.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
(function(b){var g=function(d){d.on("click",function(u,d){u.preventDefault();var e=b(this),a=e.data("formid"),c=b("#"+a),f=c.serialize(),h=b(c).find(".message"),l=b(c).find(".message-wrapper"),r=c.find(".user-email"),t=c.find(".licence-key"),g=c.find(".user-email").val(),q=c.find(".licence-key").val(),m=!1,a=[],n=c.find(".product-row"),p=b("h3.to-active").find(".spinner");h.empty();l.removeClass("visible");r.removeClass("require");t.removeClass("require");n.removeClass("error");p.addClass("show");
|
2 |
-
e.prop("disabled",!0).addClass("clicked");""==g&&(m=!0,a[a.length]="Email",r.addClass("require"));""==q&&(m=!0,a[a.length]="Licence Key",t.addClass("require"));if(0==m)jQuery.ajax({type:"POST",url:ajaxurl,data:f,success:function(a){p.removeClass("show");e.prop("disabled",!1).removeClass("clicked");1==a.activated?(b(".product-licence-activation").empty().replaceWith(a.template),k()):(0!=a?h.text(a.error):h.text(licence_message.server),l.addClass("visible"),n.addClass("error"))}});else{if(1==a.length)h.text(licence_message.error.replace("%field%",
|
3 |
-
a[0]));else{c=licence_message.errors;for(f=0;f<a.length;f++)c=c.replace("%field_"+(f+1)+"%",a[f]),l.addClass("visible");h.text(c)}l.addClass("visible");n.addClass("error");p.removeClass("show");e.prop("disabled",!1).removeClass("clicked")}})},q=function(d){d.on("click",function(d){d.preventDefault();d=b(this);var g=b("#licence-check-update"),e=g.serialize();d.prop("disabled",!0).addClass("clicked");g.find("div.spinner").addClass("show");jQuery.ajax({type:"POST",url:ajaxurl,data:e,success:function(a){b(".product-licence-activation").empty().replaceWith(a.template);
|
4 |
-
k()}})})},k=function(){var d=b(".licence-activation"),k=b(".licence-check");g(d);q(k)};k();b("body").on("click",".yit-changelog-button",function(d){b("#TB_window").remove()})})(jQuery);
|
1 |
+
(function(b){var g=function(d){d.on("click",function(u,d){u.preventDefault();var e=b(this),a=e.data("formid"),c=b("#"+a),f=c.serialize(),h=b(c).find(".message"),l=b(c).find(".message-wrapper"),r=c.find(".user-email"),t=c.find(".licence-key"),g=c.find(".user-email").val(),q=c.find(".licence-key").val(),m=!1,a=[],n=c.find(".product-row"),p=b("h3.to-active").find(".spinner");h.empty();l.removeClass("visible");r.removeClass("require");t.removeClass("require");n.removeClass("error");p.addClass("show");
|
2 |
+
e.prop("disabled",!0).addClass("clicked");""==g&&(m=!0,a[a.length]="Email",r.addClass("require"));""==q&&(m=!0,a[a.length]="Licence Key",t.addClass("require"));if(0==m)jQuery.ajax({type:"POST",url:ajaxurl,data:f,success:function(a){p.removeClass("show");e.prop("disabled",!1).removeClass("clicked");1==a.activated?(b(".product-licence-activation").empty().replaceWith(a.template),k()):(0!=a?h.text(a.error):h.text(licence_message.server),l.addClass("visible"),n.addClass("error"))}});else{if(1==a.length)h.text(licence_message.error.replace("%field%",
|
3 |
+
a[0]));else{c=licence_message.errors;for(f=0;f<a.length;f++)c=c.replace("%field_"+(f+1)+"%",a[f]),l.addClass("visible");h.text(c)}l.addClass("visible");n.addClass("error");p.removeClass("show");e.prop("disabled",!1).removeClass("clicked")}})},q=function(d){d.on("click",function(d){d.preventDefault();d=b(this);var g=b("#licence-check-update"),e=g.serialize();d.prop("disabled",!0).addClass("clicked");g.find("div.spinner").addClass("show");jQuery.ajax({type:"POST",url:ajaxurl,data:e,success:function(a){b(".product-licence-activation").empty().replaceWith(a.template);
|
4 |
+
k()}})})},k=function(){var d=b(".licence-activation"),k=b(".licence-check");g(d);q(k)};k();b("body").on("click",".yit-changelog-button",function(d){b("#TB_window").remove()})})(jQuery);
|
plugin-fw/licence/lib/yit-licence.php
CHANGED
@@ -48,7 +48,7 @@ if ( ! class_exists( 'YIT_Licence' ) ) {
|
|
48 |
* @var string The yithemes api uri
|
49 |
* @since 1.0
|
50 |
*/
|
51 |
-
protected $_api_uri = 'http://
|
52 |
|
53 |
/**
|
54 |
* @var string The yithemes api uri query args
|
@@ -159,7 +159,7 @@ if ( ! class_exists( 'YIT_Licence' ) ) {
|
|
159 |
public function localize_script() {
|
160 |
wp_localize_script( 'yit-licence', 'licence_message', array(
|
161 |
'error' => sprintf( _x( '%s field cannot be empty', '%s = field name', 'yith-plugin-fw' ), '%field%' ), // sprintf must be used to avoid errors with '%field%' string in translation in .po file
|
162 |
-
'errors' => sprintf( __( '%s and %s fields cannot be empty', 'yith-plugin-fw' ), '%field_1%', '%field_2' ),
|
163 |
'server' => __( 'Unable to contact the remote server, please try again later. Thanks!', 'yith-plugin-fw' )
|
164 |
)
|
165 |
);
|
48 |
* @var string The yithemes api uri
|
49 |
* @since 1.0
|
50 |
*/
|
51 |
+
protected $_api_uri = 'http://yithemes.com';
|
52 |
|
53 |
/**
|
54 |
* @var string The yithemes api uri query args
|
159 |
public function localize_script() {
|
160 |
wp_localize_script( 'yit-licence', 'licence_message', array(
|
161 |
'error' => sprintf( _x( '%s field cannot be empty', '%s = field name', 'yith-plugin-fw' ), '%field%' ), // sprintf must be used to avoid errors with '%field%' string in translation in .po file
|
162 |
+
'errors' => sprintf( __( '%s and %s fields cannot be empty', 'yith-plugin-fw' ), '%field_1%', '%field_2%' ),
|
163 |
'server' => __( 'Unable to contact the remote server, please try again later. Thanks!', 'yith-plugin-fw' )
|
164 |
)
|
165 |
);
|
plugin-fw/licence/lib/yit-plugin-licence.php
CHANGED
@@ -75,9 +75,7 @@ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
|
|
75 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
76 |
add_action( 'admin_enqueue_scripts', array( $this, 'localize_script' ), 15 );
|
77 |
add_action( "wp_ajax_activate-{$this->_product_type}", array( $this, 'activate' ) );
|
78 |
-
add_action( "wp_ajax_nopriv_activate-{$this->_product_type}", array( $this, 'activate' ) );
|
79 |
add_action( "wp_ajax_update_licence_information-{$this->_product_type}", array( $this, 'update_licence_information' ) );
|
80 |
-
add_action( "wp_ajax_nopriv_update_licence_information-{$this->_product_type}", array( $this, 'update_licence_information' ) );
|
81 |
add_action( 'yit_licence_after_check', array( $this, 'licence_after_check' ) );
|
82 |
}
|
83 |
|
75 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
76 |
add_action( 'admin_enqueue_scripts', array( $this, 'localize_script' ), 15 );
|
77 |
add_action( "wp_ajax_activate-{$this->_product_type}", array( $this, 'activate' ) );
|
|
|
78 |
add_action( "wp_ajax_update_licence_information-{$this->_product_type}", array( $this, 'update_licence_information' ) );
|
|
|
79 |
add_action( 'yit_licence_after_check', array( $this, 'licence_after_check' ) );
|
80 |
}
|
81 |
|
plugin-fw/licence/lib/yit-theme-licence.php
CHANGED
@@ -71,9 +71,7 @@ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
|
|
71 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
72 |
add_action( 'admin_enqueue_scripts', array( $this, 'localize_script' ), 15 );
|
73 |
add_action( "wp_ajax_activate-{$this->_product_type}", array( $this, 'activate' ) );
|
74 |
-
add_action( "wp_ajax_nopriv_activate-{$this->_product_type}", array( $this, 'activate' ) );
|
75 |
add_action( "wp_ajax_update_licence_information-{$this->_product_type}", array( $this, 'update_licence_information' ) );
|
76 |
-
add_action( "wp_ajax_nopriv_update_licence_information-{$this->_product_type}", array( $this, 'update_licence_information' ) );
|
77 |
}
|
78 |
|
79 |
/**
|
71 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
72 |
add_action( 'admin_enqueue_scripts', array( $this, 'localize_script' ), 15 );
|
73 |
add_action( "wp_ajax_activate-{$this->_product_type}", array( $this, 'activate' ) );
|
|
|
74 |
add_action( "wp_ajax_update_licence_information-{$this->_product_type}", array( $this, 'update_licence_information' ) );
|
|
|
75 |
}
|
76 |
|
77 |
/**
|
plugin-fw/templates/panel/woocommerce/woocommerce-upload.php
CHANGED
@@ -16,10 +16,10 @@
|
|
16 |
* @since 1.0.0
|
17 |
*/
|
18 |
|
19 |
-
if (
|
20 |
exit;
|
21 |
} // Exit if accessed directly
|
22 |
-
|
23 |
|
24 |
?>
|
25 |
|
@@ -29,18 +29,25 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
29 |
</th>
|
30 |
<td class="forminp forminp-color plugin-option">
|
31 |
|
32 |
-
<div id="<?php echo $id ?>-container" class="yit_options rm_option rm_input rm_text rm_upload"
|
|
|
|
|
|
|
33 |
<div class="option">
|
34 |
-
<input type="text" name="<?php echo $id ?>" id="<?php echo $id ?>"
|
35 |
-
|
|
|
|
|
|
|
36 |
</div>
|
37 |
<div class="clear"></div>
|
38 |
<span class="description"><?php echo $desc ?></span>
|
|
|
39 |
<div class="upload_img_preview" style="margin-top:10px;">
|
40 |
<?php
|
41 |
$file = $value;
|
42 |
-
if (
|
43 |
-
echo "<img src=\"" . YIT_CORE_PLUGIN_URL. "/assets/images/sleep.png\" data-src=\"$file\" />";
|
44 |
}
|
45 |
?>
|
46 |
</div>
|
16 |
* @since 1.0.0
|
17 |
*/
|
18 |
|
19 |
+
if (!defined('ABSPATH')) {
|
20 |
exit;
|
21 |
} // Exit if accessed directly
|
22 |
+
$hidden_val = get_option($id . "-yith-attachment-id", 0);
|
23 |
|
24 |
?>
|
25 |
|
29 |
</th>
|
30 |
<td class="forminp forminp-color plugin-option">
|
31 |
|
32 |
+
<div id="<?php echo $id ?>-container" class="yit_options rm_option rm_input rm_text rm_upload"
|
33 |
+
<?php if (isset($option['deps'])): ?>data-field="<?php echo $id ?>"
|
34 |
+
data-dep="<?php echo $this->get_id_field($option['deps']['ids']) ?>"
|
35 |
+
data-value="<?php echo $option['deps']['values'] ?>" <?php endif ?>>
|
36 |
<div class="option">
|
37 |
+
<input type="text" name="<?php echo $id ?>" id="<?php echo $id ?>"
|
38 |
+
value="<?php echo $value == '1' ? '' : esc_attr($value) ?>" class="upload_img_url"/>
|
39 |
+
<input type="hidden" name="<?php echo $id ?>-yith-attachment-id" id="<?php echo $id ?>-yith-attachment-id" value="<?php echo $hidden_val; ?>" />
|
40 |
+
<input type="button" value="<?php _e('Upload', 'yith-plugin-fw') ?>" id="<?php echo $id ?>-button"
|
41 |
+
class="upload_button button"/>
|
42 |
</div>
|
43 |
<div class="clear"></div>
|
44 |
<span class="description"><?php echo $desc ?></span>
|
45 |
+
|
46 |
<div class="upload_img_preview" style="margin-top:10px;">
|
47 |
<?php
|
48 |
$file = $value;
|
49 |
+
if (preg_match('/(jpg|jpeg|png|gif|ico)$/', $file)) {
|
50 |
+
echo "<img src=\"" . YIT_CORE_PLUGIN_URL . "/assets/images/sleep.png\" data-src=\"$file\" />";
|
51 |
}
|
52 |
?>
|
53 |
</div>
|
plugin-fw/yit-plugin.php
CHANGED
@@ -13,22 +13,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
13 |
} // Exit if accessed directly
|
14 |
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
if( !defined('YIT_CORE_PLUGIN_PATH')) {
|
21 |
-
define( 'YIT_CORE_PLUGIN_PATH', dirname(__FILE__));
|
22 |
-
}
|
23 |
-
|
24 |
-
if( !defined('YIT_CORE_PLUGIN_URL')) {
|
25 |
-
define( 'YIT_CORE_PLUGIN_URL', untrailingslashit( plugins_url( '/', __FILE__ ) ));
|
26 |
-
}
|
27 |
-
|
28 |
-
if( ! defined( 'YIT_CORE_PLUGIN_TEMPLATE_PATH' ) ){
|
29 |
-
define ( 'YIT_CORE_PLUGIN_TEMPLATE_PATH', YIT_CORE_PLUGIN_PATH . '/templates' );
|
30 |
-
}
|
31 |
-
|
32 |
|
33 |
include_once( 'yit-functions.php' );
|
34 |
include_once( 'yit-plugin-registration-hook.php' );
|
13 |
} // Exit if accessed directly
|
14 |
|
15 |
|
16 |
+
! defined( 'YIT_CORE_PLUGIN' ) && define( 'YIT_CORE_PLUGIN', true);
|
17 |
+
! defined( 'YIT_CORE_PLUGIN_PATH' ) && define( 'YIT_CORE_PLUGIN_PATH', dirname(__FILE__) );
|
18 |
+
! defined( 'YIT_CORE_PLUGIN_URL' ) && define( 'YIT_CORE_PLUGIN_URL', untrailingslashit( plugins_url( '/', __FILE__ ) ) );
|
19 |
+
! defined( 'YIT_CORE_PLUGIN_TEMPLATE_PATH' ) && define( 'YIT_CORE_PLUGIN_TEMPLATE_PATH', YIT_CORE_PLUGIN_PATH . '/templates' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
include_once( 'yit-functions.php' );
|
22 |
include_once( 'yit-plugin-registration-hook.php' );
|