Version Description
- Added: Compatibility with WooCommerce 2.4
- Updated: Plugin Core
- Updated: Language file
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Quick View |
Version | 1.0.5 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.0.5
- README.txt +12 -8
- assets/js/frontend.js +4 -0
- class.yith-wcqv-admin.php +1 -1
- init.php +7 -7
- languages/yith-wcqv.pot +4 -3
- plugin-fw/assets/css/overcast/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- plugin-fw/assets/css/overcast/images/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- plugin-fw/assets/css/overcast/images/ui-bg_flat_55_c0402a_40x100.png +0 -0
- plugin-fw/assets/css/overcast/images/ui-bg_flat_55_eeeeee_40x100.png +0 -0
- plugin-fw/assets/css/overcast/images/ui-bg_glass_100_f8f8f8_1x400.png +0 -0
- plugin-fw/assets/css/overcast/images/ui-bg_glass_35_dddddd_1x400.png +0 -0
- plugin-fw/assets/css/overcast/images/ui-bg_glass_60_eeeeee_1x400.png +0 -0
- plugin-fw/assets/css/overcast/images/ui-bg_inset-hard_75_999999_1x100.png +0 -0
- plugin-fw/assets/css/overcast/images/ui-bg_inset-soft_50_c9c9c9_1x100.png +0 -0
- plugin-fw/assets/css/yit-plugin-panel.css +6 -0
- plugin-fw/assets/css/yit-upgrader.css +0 -0
- plugin-fw/assets/images/select.png +0 -0
- plugin-fw/assets/images/sleep.png +0 -0
- plugin-fw/assets/images/spinner.png +0 -0
- plugin-fw/assets/images/yithemes-icon.png +0 -0
- plugin-fw/assets/js/metabox.js +17 -13
- plugin-fw/assets/js/yit-plugin-panel.js +3 -25
- plugin-fw/assets/js/yit-plugin-panel.min.js +8 -8
- plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
- plugin-fw/languages/yith-plugin-fw-it_IT.po +3 -3
- plugin-fw/lib/yit-cpt-unlimited.php +1 -1
- plugin-fw/lib/yit-plugin-common.php +1 -0
- plugin-fw/lib/yit-plugin-panel-wc.php +72 -1
- plugin-fw/lib/yit-plugin-panel.php +3 -2
- plugin-fw/lib/yit-plugin-subpanel.php +3 -2
- plugin-fw/licence/lib/yit-plugin-licence.php +4 -0
- plugin-fw/templates/metaboxes/types/icon-list.php +2 -2
- plugin-fw/templates/metaboxes/types/simple-text.php +0 -0
- plugin-fw/templates/panel/woocommerce/woocommerce-panel.php +0 -0
- plugin-fw/yit-functions.php +62 -0
README.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: yithemes
|
3 |
Tags: yith, woocommerce, quick view, woocommerce quick view, yit, single product, products quick view, free quick view, woocommerce extension, woocommerce plugin, product summary, summary, modal
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 4.2
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -42,6 +42,12 @@ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woo
|
|
42 |
|
43 |
== Changelog ==
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
= 1.0.4 =
|
46 |
|
47 |
* Added option for enable quick view also in mobile device
|
@@ -82,10 +88,8 @@ If you have created your own language pack, or have an update for an existing on
|
|
82 |
|
83 |
== Upgrade notice ==
|
84 |
|
85 |
-
= 1.0.
|
86 |
|
87 |
-
* Added
|
88 |
-
*
|
89 |
-
*
|
90 |
-
* Updated Plugin Core
|
91 |
-
* Updated Language file
|
2 |
Contributors: yithemes
|
3 |
Tags: yith, woocommerce, quick view, woocommerce quick view, yit, single product, products quick view, free quick view, woocommerce extension, woocommerce plugin, product summary, summary, modal
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 4.2.4
|
6 |
+
Stable tag: 1.0.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
42 |
|
43 |
== Changelog ==
|
44 |
|
45 |
+
= 1.0.5 =
|
46 |
+
|
47 |
+
* Added: Compatibility with WooCommerce 2.4
|
48 |
+
* Updated: Plugin Core
|
49 |
+
* Updated: Language file
|
50 |
+
|
51 |
= 1.0.4 =
|
52 |
|
53 |
* Added option for enable quick view also in mobile device
|
88 |
|
89 |
== Upgrade notice ==
|
90 |
|
91 |
+
= 1.0.5 =
|
92 |
|
93 |
+
* Added: Compatibility with WooCommerce 2.4
|
94 |
+
* Updated: Plugin Core
|
95 |
+
* Updated: Language file
|
|
|
|
assets/js/frontend.js
CHANGED
@@ -9,6 +9,10 @@
|
|
9 |
jQuery(document).ready(function($){
|
10 |
"use strict";
|
11 |
|
|
|
|
|
|
|
|
|
12 |
var qv_modal = $(document).find( '#yith-quick-view-modal' ),
|
13 |
qv_overlay = qv_modal.find( '.yith-quick-view-overlay'),
|
14 |
qv_content = qv_modal.find( '#yith-quick-view-content' ),
|
9 |
jQuery(document).ready(function($){
|
10 |
"use strict";
|
11 |
|
12 |
+
if( typeof yith_qv === 'undefined' ) {
|
13 |
+
return;
|
14 |
+
}
|
15 |
+
|
16 |
var qv_modal = $(document).find( '#yith-quick-view-modal' ),
|
17 |
qv_overlay = qv_modal.find( '.yith-quick-view-overlay'),
|
18 |
qv_content = qv_modal.find( '#yith-quick-view-content' ),
|
class.yith-wcqv-admin.php
CHANGED
@@ -250,7 +250,7 @@ if ( ! class_exists( 'YITH_WCQV_Admin' ) ) {
|
|
250 |
* @return string The premium landing link
|
251 |
*/
|
252 |
public function get_premium_landing_uri(){
|
253 |
-
return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing;
|
254 |
}
|
255 |
|
256 |
}
|
250 |
* @return string The premium landing link
|
251 |
*/
|
252 |
public function get_premium_landing_uri(){
|
253 |
+
return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing.'?refer_id=1030585';
|
254 |
}
|
255 |
|
256 |
}
|
init.php
CHANGED
@@ -3,15 +3,15 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Quick View
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Quick View allows your users to have a quick look about products.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: Yithemes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
-
* Text Domain:
|
10 |
* Domain Path: /languages/
|
11 |
*
|
12 |
* @author Yithemes
|
13 |
* @package YITH WooCommerce Quick View
|
14 |
-
* @version 1.0.
|
15 |
*/
|
16 |
/* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
|
17 |
|
@@ -38,7 +38,7 @@ if ( ! function_exists( 'is_plugin_active' ) ) {
|
|
38 |
function yith_wcqv_install_woocommerce_admin_notice() {
|
39 |
?>
|
40 |
<div class="error">
|
41 |
-
<p><?php _e( 'YITH WooCommerce Quick View is enabled but not effective. It requires
|
42 |
</div>
|
43 |
<?php
|
44 |
}
|
@@ -47,7 +47,7 @@ function yith_wcqv_install_woocommerce_admin_notice() {
|
|
47 |
function yith_wcqv_install_free_admin_notice() {
|
48 |
?>
|
49 |
<div class="error">
|
50 |
-
<p><?php _e( 'You can\'t activate the free version of YITH WooCommerce Quick View while you are using the premium one.', '
|
51 |
</div>
|
52 |
<?php
|
53 |
}
|
@@ -59,7 +59,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
|
|
59 |
|
60 |
|
61 |
if ( ! defined( 'YITH_WCQV_VERSION' ) ){
|
62 |
-
define( 'YITH_WCQV_VERSION', '1.0.
|
63 |
}
|
64 |
|
65 |
if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
|
@@ -93,7 +93,7 @@ if ( ! defined( 'YITH_WCQV_ASSETS_URL' ) ) {
|
|
93 |
|
94 |
function yith_wcqv_init() {
|
95 |
|
96 |
-
load_plugin_textdomain( '
|
97 |
|
98 |
// Load required classes and functions
|
99 |
require_once('class.yith-wcqv-admin.php');
|
3 |
* Plugin Name: YITH WooCommerce Quick View
|
4 |
* Plugin URI: http://yithemes.com/
|
5 |
* Description: YITH WooCommerce Quick View allows your users to have a quick look about products.
|
6 |
+
* Version: 1.0.5
|
7 |
* Author: Yithemes
|
8 |
* Author URI: http://yithemes.com/
|
9 |
+
* Text Domain: yith-wcqv
|
10 |
* Domain Path: /languages/
|
11 |
*
|
12 |
* @author Yithemes
|
13 |
* @package YITH WooCommerce Quick View
|
14 |
+
* @version 1.0.5
|
15 |
*/
|
16 |
/* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
|
17 |
|
38 |
function yith_wcqv_install_woocommerce_admin_notice() {
|
39 |
?>
|
40 |
<div class="error">
|
41 |
+
<p><?php _e( 'YITH WooCommerce Quick View is enabled but not effective. It requires WooCommerce in order to work.', 'yith-wcqv' ); ?></p>
|
42 |
</div>
|
43 |
<?php
|
44 |
}
|
47 |
function yith_wcqv_install_free_admin_notice() {
|
48 |
?>
|
49 |
<div class="error">
|
50 |
+
<p><?php _e( 'You can\'t activate the free version of YITH WooCommerce Quick View while you are using the premium one.', 'yith-wcqv' ); ?></p>
|
51 |
</div>
|
52 |
<?php
|
53 |
}
|
59 |
|
60 |
|
61 |
if ( ! defined( 'YITH_WCQV_VERSION' ) ){
|
62 |
+
define( 'YITH_WCQV_VERSION', '1.0.5' );
|
63 |
}
|
64 |
|
65 |
if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
|
93 |
|
94 |
function yith_wcqv_init() {
|
95 |
|
96 |
+
load_plugin_textdomain( 'yith-wcqv', false, dirname( plugin_basename( __FILE__ ) ). '/languages/' );
|
97 |
|
98 |
// Load required classes and functions
|
99 |
require_once('class.yith-wcqv-admin.php');
|
languages/yith-wcqv.pot
CHANGED
@@ -1,7 +1,8 @@
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: YITH Woocommerce Quick View\n"
|
4 |
-
"POT-Creation-Date: 2015-
|
5 |
"PO-Revision-Date: 2015-05-18 11:52+0100\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: YIThemes <plugins@yithemes.com>\n"
|
@@ -9,7 +10,7 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"Plural-Forms: nplurals=2; plural=n!=1;\n"
|
15 |
"X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
|
@@ -53,7 +54,7 @@ msgstr ""
|
|
53 |
#: ../init.php:41
|
54 |
msgid ""
|
55 |
"YITH WooCommerce Quick View is enabled but not effective. It requires "
|
56 |
-
"
|
57 |
msgstr ""
|
58 |
|
59 |
#: ../init.php:50
|
1 |
+
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: YITH Woocommerce Quick View\n"
|
5 |
+
"POT-Creation-Date: 2015-08-11 16:51+0200\n"
|
6 |
"PO-Revision-Date: 2015-05-18 11:52+0100\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: YIThemes <plugins@yithemes.com>\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 1.8.2\n"
|
14 |
"X-Poedit-Basepath: .\n"
|
15 |
"Plural-Forms: nplurals=2; plural=n!=1;\n"
|
16 |
"X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
|
54 |
#: ../init.php:41
|
55 |
msgid ""
|
56 |
"YITH WooCommerce Quick View is enabled but not effective. It requires "
|
57 |
+
"WooCommerce in order to work."
|
58 |
msgstr ""
|
59 |
|
60 |
#: ../init.php:50
|
plugin-fw/assets/css/overcast/images/ui-bg_flat_0_aaaaaa_40x100.png
CHANGED
Binary file
|
plugin-fw/assets/css/overcast/images/ui-bg_flat_0_eeeeee_40x100.png
CHANGED
Binary file
|
plugin-fw/assets/css/overcast/images/ui-bg_flat_55_c0402a_40x100.png
CHANGED
Binary file
|
plugin-fw/assets/css/overcast/images/ui-bg_flat_55_eeeeee_40x100.png
CHANGED
Binary file
|
plugin-fw/assets/css/overcast/images/ui-bg_glass_100_f8f8f8_1x400.png
CHANGED
Binary file
|
plugin-fw/assets/css/overcast/images/ui-bg_glass_35_dddddd_1x400.png
CHANGED
Binary file
|
plugin-fw/assets/css/overcast/images/ui-bg_glass_60_eeeeee_1x400.png
CHANGED
Binary file
|
plugin-fw/assets/css/overcast/images/ui-bg_inset-hard_75_999999_1x100.png
CHANGED
Binary file
|
plugin-fw/assets/css/overcast/images/ui-bg_inset-soft_50_c9c9c9_1x100.png
CHANGED
Binary file
|
plugin-fw/assets/css/yit-plugin-panel.css
CHANGED
@@ -169,6 +169,7 @@
|
|
169 |
padding-left: 6px;
|
170 |
position: absolute;
|
171 |
z-index: 2;
|
|
|
172 |
}
|
173 |
.ie8 .yit_options select,
|
174 |
.ie8 .yit-options select {
|
@@ -625,6 +626,11 @@
|
|
625 |
color: #45bbe6;
|
626 |
}
|
627 |
|
|
|
|
|
|
|
|
|
|
|
628 |
/* === Responsive === */
|
629 |
|
630 |
@media (max-width: 767px) {}
|
169 |
padding-left: 6px;
|
170 |
position: absolute;
|
171 |
z-index: 2;
|
172 |
+
overflow: hidden;
|
173 |
}
|
174 |
.ie8 .yit_options select,
|
175 |
.ie8 .yit-options select {
|
626 |
color: #45bbe6;
|
627 |
}
|
628 |
|
629 |
+
/* WooCommerce 2.4 Support */
|
630 |
+
.woocommerce table.form-table .colorpick{
|
631 |
+
width: 6em;
|
632 |
+
}
|
633 |
+
|
634 |
/* === Responsive === */
|
635 |
|
636 |
@media (max-width: 767px) {}
|
plugin-fw/assets/css/yit-upgrader.css
CHANGED
Binary file
|
plugin-fw/assets/images/select.png
CHANGED
Binary file
|
plugin-fw/assets/images/sleep.png
CHANGED
Binary file
|
plugin-fw/assets/images/spinner.png
CHANGED
Binary file
|
plugin-fw/assets/images/yithemes-icon.png
CHANGED
Binary file
|
plugin-fw/assets/js/metabox.js
CHANGED
@@ -42,22 +42,26 @@
|
|
42 |
$(document).on('click', '.metaboxes-tab .upload_button', function(e) {
|
43 |
var send_attachment_bkp = wp.media.editor.send.attachment;
|
44 |
var button = $(this);
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
51 |
} else {
|
52 |
-
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
|
|
|
57 |
}
|
58 |
|
59 |
-
wp.media.editor.open(button);
|
60 |
-
return false;
|
61 |
});
|
62 |
|
63 |
$('.metaboxes-tab .add_media').on('click', function(){
|
42 |
$(document).on('click', '.metaboxes-tab .upload_button', function(e) {
|
43 |
var send_attachment_bkp = wp.media.editor.send.attachment;
|
44 |
var button = $(this);
|
45 |
+
if( typeof button.attr('id') != 'undefined' ) {
|
46 |
+
|
47 |
+
var id = button.attr('id').replace('-button', '');
|
48 |
+
_custom_media = true;
|
49 |
+
wp.media.editor.send.attachment = function(props, attachment){
|
50 |
+
if ( _custom_media ) {
|
51 |
+
if( $("#"+id).is('input[type=text]') ) {
|
52 |
+
$("#"+id).val(attachment.url);
|
53 |
+
} else {
|
54 |
+
$("#"+id + '_custom').val(attachment.url);
|
55 |
+
}
|
56 |
} else {
|
57 |
+
return _orig_send_attachment.apply( this, [props, attachment] );
|
58 |
+
};
|
59 |
+
}
|
60 |
+
|
61 |
+
wp.media.editor.open(button);
|
62 |
+
return false;
|
63 |
}
|
64 |
|
|
|
|
|
65 |
});
|
66 |
|
67 |
$('.metaboxes-tab .add_media').on('click', function(){
|
plugin-fw/assets/js/yit-plugin-panel.js
CHANGED
@@ -113,36 +113,13 @@
|
|
113 |
var url = $(this).val();
|
114 |
var re = new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&:/~+#-_.]*.(gif|jpg|jpeg|png|ico)");
|
115 |
|
116 |
-
var preview = $(this).
|
117 |
if (re.test(url)) {
|
118 |
preview.html('<img src="' + url + '" style="max-width:600px; max-height:300px;" />');
|
119 |
} else {
|
120 |
preview.html('');
|
121 |
}
|
122 |
-
}).change
|
123 |
-
|
124 |
-
//$(document).on('click', '.plugin-option .upload_button', function (e) {
|
125 |
-
// var send_attachment_bkp = wp.media.editor.send.attachment;
|
126 |
-
// var button = $(this);
|
127 |
-
// var id = button.attr('id').replace('-button', '');
|
128 |
-
// _custom_media = true;
|
129 |
-
// wp.media.editor.send.attachment = function (props, attachment) {
|
130 |
-
// if (_custom_media) {
|
131 |
-
// if ($("#" + id).is('input[type=text]')) {
|
132 |
-
// $("#" + id).val(attachment.url);
|
133 |
-
// } else {
|
134 |
-
// $("#" + id + '_custom').val(attachment.url);
|
135 |
-
// }
|
136 |
-
//
|
137 |
-
// } else {
|
138 |
-
// return _orig_send_attachment.apply(this, [props, attachment]);
|
139 |
-
// }
|
140 |
-
// ;
|
141 |
-
// }
|
142 |
-
//
|
143 |
-
// wp.media.editor.open(button);
|
144 |
-
// return false;
|
145 |
-
//});
|
146 |
|
147 |
$( document ).on( 'click', '.plugin-option .upload_button', function(e) {
|
148 |
e.preventDefault();
|
@@ -188,6 +165,7 @@
|
|
188 |
var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
|
189 |
|
190 |
$("#" + id).val( attachment.url );
|
|
|
191 |
});
|
192 |
|
193 |
//Open the uploader dialog
|
113 |
var url = $(this).val();
|
114 |
var re = new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&:/~+#-_.]*.(gif|jpg|jpeg|png|ico)");
|
115 |
|
116 |
+
var preview = $(this).parents().siblings('.upload_img_preview');
|
117 |
if (re.test(url)) {
|
118 |
preview.html('<img src="' + url + '" style="max-width:600px; max-height:300px;" />');
|
119 |
} else {
|
120 |
preview.html('');
|
121 |
}
|
122 |
+
}).trigger( 'change' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
$( document ).on( 'click', '.plugin-option .upload_button', function(e) {
|
125 |
e.preventDefault();
|
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 |
|
171 |
//Open the uploader dialog
|
plugin-fw/assets/js/yit-plugin-panel.min.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
(function(a){var l=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()));0>=a(this).parent().find("span").length&&a(this).before("<span></span>");a(this).parent().children("span").replaceWith("<span>"+b+
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
{};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",modal:!0,closeOnEscape:!0,width:"auto",
|
8 |
-
|
9 |
-
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 |
-
|
1 |
(function(a){var l=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()));0>=a(this).parent().find("span").length&&a(this).before("<span></span>");a(this).parent().children("span").replaceWith("<span>"+b+
|
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(".plugin-option .upload_img_url").trigger("change")}));c.open()}));a(".plugin-option .add_media").on("click",
|
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=a(this).find("ul"),c=a(this).find(":hidden");
|
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",modal:!0,closeOnEscape:!0,width:"auto",
|
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);
|
plugin-fw/languages/yith-plugin-fw-it_IT.mo
CHANGED
Binary file
|
plugin-fw/languages/yith-plugin-fw-it_IT.po
CHANGED
@@ -5,14 +5,14 @@ msgstr ""
|
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
|
7 |
"POT-Creation-Date: 2015-05-11 17:13+0100\n"
|
8 |
-
"PO-Revision-Date: 2015-
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
|
11 |
"Language: en\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=utf-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
-
"X-Generator: Poedit 1.
|
16 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
17 |
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
18 |
"esc_html_x:1,2c\n"
|
@@ -233,7 +233,7 @@ msgstr "Impostazioni plugin"
|
|
233 |
|
234 |
#: lib/yit-plugin-panel.php:95 lib/yit-plugin-subpanel.php:101
|
235 |
msgid "YIT Plugins"
|
236 |
-
msgstr "
|
237 |
|
238 |
#: lib/yit-plugin-panel.php:292 lib/yit-plugin-subpanel.php:142
|
239 |
#: templates/panel/woocommerce/woocommerce-form.php:5
|
5 |
"Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
|
6 |
"Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
|
7 |
"POT-Creation-Date: 2015-05-11 17:13+0100\n"
|
8 |
+
"PO-Revision-Date: 2015-07-24 16:13+0100\n"
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: Your Inspiration Themes <info@yithemes.com>\n"
|
11 |
"Language: en\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=utf-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 1.8\n"
|
16 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
17 |
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
18 |
"esc_html_x:1,2c\n"
|
233 |
|
234 |
#: lib/yit-plugin-panel.php:95 lib/yit-plugin-subpanel.php:101
|
235 |
msgid "YIT Plugins"
|
236 |
+
msgstr "YIT Plugins"
|
237 |
|
238 |
#: lib/yit-plugin-panel.php:292 lib/yit-plugin-subpanel.php:142
|
239 |
#: templates/panel/woocommerce/woocommerce-form.php:5
|
plugin-fw/lib/yit-cpt-unlimited.php
CHANGED
@@ -1630,7 +1630,7 @@ class YIT_CPT_Unlimited {
|
|
1630 |
class: 'multi-uploader add-new-h2',
|
1631 |
'data-uploader_title': '<?php printf( __( 'Add %s from images', 'yith-plugin-fw' ), $label_plural ) ?>',
|
1632 |
'data-uploader_button_text': '<?php printf( __( 'Add %s', 'yith-plugin-fw' ), $label_plural ) ?>'
|
1633 |
-
}).text('<?php _e( '
|
1634 |
|
1635 |
var spinner = $('<span />', {
|
1636 |
class: 'spinner',
|
1630 |
class: 'multi-uploader add-new-h2',
|
1631 |
'data-uploader_title': '<?php printf( __( 'Add %s from images', 'yith-plugin-fw' ), $label_plural ) ?>',
|
1632 |
'data-uploader_button_text': '<?php printf( __( 'Add %s', 'yith-plugin-fw' ), $label_plural ) ?>'
|
1633 |
+
}).text('<?php _e( 'Upload multiple files', 'yith-plugin-fw' ) ?>');
|
1634 |
|
1635 |
var spinner = $('<span />', {
|
1636 |
class: 'spinner',
|
plugin-fw/lib/yit-plugin-common.php
CHANGED
@@ -27,6 +27,7 @@ class YIT_Plugin_Common {
|
|
27 |
|
28 |
|
29 |
'awesome_icons' => array(
|
|
|
30 |
'f042' => 'adjust',
|
31 |
'f170' => 'adn',
|
32 |
'f037' => 'align-center',
|
27 |
|
28 |
|
29 |
'awesome_icons' => array(
|
30 |
+
'' => 'no-icon',
|
31 |
'f042' => 'adjust',
|
32 |
'f170' => 'adn',
|
33 |
'f037' => 'align-center',
|
plugin-fw/lib/yit-plugin-panel-wc.php
CHANGED
@@ -37,6 +37,11 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
37 |
*/
|
38 |
public $settings = array();
|
39 |
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* @var array
|
42 |
*/
|
@@ -51,6 +56,14 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
51 |
*/
|
52 |
public function __construct( $args = array() ) {
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
if ( ! empty( $args ) ) {
|
55 |
$this->settings = $args;
|
56 |
$this->_tabs_path_files = $this->get_tabs_path_files();
|
@@ -64,10 +77,14 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
64 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
65 |
add_action( 'admin_init', array( $this, 'woocommerce_update_options' ) );
|
66 |
add_filter( 'woocommerce_screen_ids', array( $this, 'add_allowed_screen_id' ) );
|
|
|
67 |
|
68 |
/* Add VideoBox and InfoBox */
|
69 |
add_action( 'woocommerce_admin_field_boxinfo', array( $this, 'add_infobox' ), 10, 1 );
|
70 |
add_action( 'woocommerce_admin_field_videobox', array( $this, 'add_videobox' ), 10, 1 );
|
|
|
|
|
|
|
71 |
}
|
72 |
}
|
73 |
|
@@ -251,6 +268,16 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
251 |
$yit_options = $this->get_main_array_options();
|
252 |
$current_tab = $this->get_current_tab();
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
woocommerce_update_options( $yit_options[ $current_tab ] );
|
255 |
|
256 |
do_action( 'yit_panel_wc_after_update' );
|
@@ -320,7 +347,6 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
320 |
} else {
|
321 |
add_option($value['id'], $default_value);
|
322 |
}
|
323 |
-
|
324 |
}
|
325 |
|
326 |
}
|
@@ -328,6 +354,51 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
|
|
328 |
|
329 |
}
|
330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
|
332 |
}
|
333 |
}
|
37 |
*/
|
38 |
public $settings = array();
|
39 |
|
40 |
+
/**
|
41 |
+
* @var array a setting list of parameters
|
42 |
+
*/
|
43 |
+
public $wc_type = array();
|
44 |
+
|
45 |
/**
|
46 |
* @var array
|
47 |
*/
|
56 |
*/
|
57 |
public function __construct( $args = array() ) {
|
58 |
|
59 |
+
$this->wc_type = array(
|
60 |
+
'checkbox',
|
61 |
+
'textarea',
|
62 |
+
'multiselect',
|
63 |
+
'multi_select_countries',
|
64 |
+
'image_width'
|
65 |
+
);
|
66 |
+
|
67 |
if ( ! empty( $args ) ) {
|
68 |
$this->settings = $args;
|
69 |
$this->_tabs_path_files = $this->get_tabs_path_files();
|
77 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
78 |
add_action( 'admin_init', array( $this, 'woocommerce_update_options' ) );
|
79 |
add_filter( 'woocommerce_screen_ids', array( $this, 'add_allowed_screen_id' ) );
|
80 |
+
add_filter( 'woocommerce_admin_settings_sanitize_option', array( $this, 'maybe_unserialize_panel_data' ), 10, 3 );
|
81 |
|
82 |
/* Add VideoBox and InfoBox */
|
83 |
add_action( 'woocommerce_admin_field_boxinfo', array( $this, 'add_infobox' ), 10, 1 );
|
84 |
add_action( 'woocommerce_admin_field_videobox', array( $this, 'add_videobox' ), 10, 1 );
|
85 |
+
|
86 |
+
/* WooCommerce 2.4 Support */
|
87 |
+
add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
|
88 |
}
|
89 |
}
|
90 |
|
268 |
$yit_options = $this->get_main_array_options();
|
269 |
$current_tab = $this->get_current_tab();
|
270 |
|
271 |
+
if( version_compare( WC()->version, '2.4.0', '>=' ) ) {
|
272 |
+
if ( ! empty( $yit_options[ $current_tab ] ) ) {
|
273 |
+
foreach ( $yit_options[ $current_tab ] as $option ) {
|
274 |
+
if ( isset( $option['id'] ) && isset( $_POST[ $option['id'] ] ) && isset( $option['type' ] ) && ! in_array( $option['type'], $this->wc_type ) ) {
|
275 |
+
$_POST[ $option['id'] ] = maybe_serialize( $_POST[ $option['id'] ] );
|
276 |
+
}
|
277 |
+
}
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
woocommerce_update_options( $yit_options[ $current_tab ] );
|
282 |
|
283 |
do_action( 'yit_panel_wc_after_update' );
|
347 |
} else {
|
348 |
add_option($value['id'], $default_value);
|
349 |
}
|
|
|
350 |
}
|
351 |
|
352 |
}
|
354 |
|
355 |
}
|
356 |
|
357 |
+
/**
|
358 |
+
* Add the woocommerce body class in plugin panel page
|
359 |
+
*
|
360 |
+
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
361 |
+
* @since 2.0
|
362 |
+
* @param $classes The body classes
|
363 |
+
*
|
364 |
+
* @return array Filtered body classes
|
365 |
+
*/
|
366 |
+
public function admin_body_class( $admin_body_classes ){
|
367 |
+
$admin_body_classes .= ' woocommerce ';
|
368 |
+
return $admin_body_classes;
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Maybe unserialize panel data
|
373 |
+
*
|
374 |
+
* @param $value mixed Option value
|
375 |
+
* @param $option mixed Option settings array
|
376 |
+
* @param $raw_value string Raw option value
|
377 |
+
*
|
378 |
+
* @return mixed Filtered return value
|
379 |
+
* @author Antonio La Rocca <antonio.larocca@yithemes.com>
|
380 |
+
* @since 2.0
|
381 |
+
*/
|
382 |
+
public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
|
383 |
+
|
384 |
+
|
385 |
+
if( ! version_compare( WC()->version, '2.4.0', '>=' ) || ! isset( $option['type' ] ) || in_array( $option['type'], $this->wc_type ) ) {
|
386 |
+
return $value;
|
387 |
+
}
|
388 |
+
|
389 |
+
$yit_options = $this->get_main_array_options();
|
390 |
+
$current_tab = $this->get_current_tab();
|
391 |
+
|
392 |
+
if( ! empty( $yit_options[ $current_tab ] ) ){
|
393 |
+
foreach( $yit_options[ $current_tab ] as $option_array ){
|
394 |
+
if( isset( $option_array['id'] ) && isset( $option['id'] ) && $option_array['id'] == $option['id'] ){
|
395 |
+
return maybe_unserialize( $value );
|
396 |
+
}
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
return $value;
|
401 |
+
}
|
402 |
|
403 |
}
|
404 |
}
|
plugin-fw/lib/yit-plugin-panel.php
CHANGED
@@ -92,7 +92,8 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
92 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
93 |
*/
|
94 |
public function add_menu_page() {
|
95 |
-
|
|
|
96 |
}
|
97 |
|
98 |
/**
|
@@ -294,7 +295,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
|
|
294 |
<form method="post">
|
295 |
<?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
|
296 |
<input type="hidden" name="yit-action" value="reset" />
|
297 |
-
<input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to
|
298 |
</form>
|
299 |
<p> </p>
|
300 |
<?php endif ?>
|
92 |
* @author Andrea Grillo <andrea.grillo@yithemes.com>
|
93 |
*/
|
94 |
public function add_menu_page() {
|
95 |
+
$position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
|
96 |
+
add_menu_page( 'yit_plugin_panel', __( 'YIT Plugins', 'yith-plugin-fw' ), 'manage_options', 'yit_plugin_panel', NULL, YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png', $position );
|
97 |
}
|
98 |
|
99 |
/**
|
295 |
<form method="post">
|
296 |
<?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
|
297 |
<input type="hidden" name="yit-action" value="reset" />
|
298 |
+
<input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>" onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');" />
|
299 |
</form>
|
300 |
<p> </p>
|
301 |
<?php endif ?>
|
plugin-fw/lib/yit-plugin-subpanel.php
CHANGED
@@ -97,8 +97,9 @@ if ( ! class_exists( 'YIT_Plugin_SubPanel' ) ) {
|
|
97 |
if ( isset( $admin_logo ) && ! empty( $admin_logo ) && $admin_logo != '' && $admin_logo) {
|
98 |
$logo = $admin_logo;
|
99 |
}
|
|
|
|
|
100 |
|
101 |
-
add_menu_page( 'yit_plugin_panel', __( 'YIT Plugins', 'yith-plugin-fw' ), 'nosuchcapability', 'yit_plugin_panel', NULL, $logo, 62 );
|
102 |
add_submenu_page( 'yit_plugin_panel', $this->settings['label'], $this->settings['label'], 'manage_options', $this->settings['page'], array( $this, 'yit_panel' ) );
|
103 |
remove_submenu_page( 'yit_plugin_panel', 'yit_plugin_panel' );
|
104 |
|
@@ -144,7 +145,7 @@ if ( ! class_exists( 'YIT_Plugin_SubPanel' ) ) {
|
|
144 |
<form method="post">
|
145 |
<?php $warning = __( 'If you continue with this action, you will reset all the options in this page.', 'yith-plugin-fw' ) ?>
|
146 |
<input type="hidden" name="yit-action" value="reset" />
|
147 |
-
<input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to
|
148 |
</form>
|
149 |
<p> </p>
|
150 |
<?php endif ?>
|
97 |
if ( isset( $admin_logo ) && ! empty( $admin_logo ) && $admin_logo != '' && $admin_logo) {
|
98 |
$logo = $admin_logo;
|
99 |
}
|
100 |
+
$position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
|
101 |
+
add_menu_page( 'yit_plugin_panel', __( 'YIT Plugins', 'yith-plugin-fw' ), 'nosuchcapability', 'yit_plugin_panel', NULL, $logo, $position );
|
102 |
|
|
|
103 |
add_submenu_page( 'yit_plugin_panel', $this->settings['label'], $this->settings['label'], 'manage_options', $this->settings['page'], array( $this, 'yit_panel' ) );
|
104 |
remove_submenu_page( 'yit_plugin_panel', 'yit_plugin_panel' );
|
105 |
|
145 |
<form method="post">
|
146 |
<?php $warning = __( 'If you continue with this action, you will reset all the options in this page.', 'yith-plugin-fw' ) ?>
|
147 |
<input type="hidden" name="yit-action" value="reset" />
|
148 |
+
<input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset to default', 'yith-plugin-fw' ) ?>" onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');" />
|
149 |
</form>
|
150 |
<p> </p>
|
151 |
<?php endif ?>
|
plugin-fw/licence/lib/yit-plugin-licence.php
CHANGED
@@ -59,6 +59,10 @@ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
|
|
59 |
public function __construct() {
|
60 |
parent::__construct();
|
61 |
|
|
|
|
|
|
|
|
|
62 |
$this->_settings = array(
|
63 |
'parent_page' => 'yit_plugin_panel',
|
64 |
'page_title' => __( 'Licence Activation', 'yith-plugin-fw' ),
|
59 |
public function __construct() {
|
60 |
parent::__construct();
|
61 |
|
62 |
+
if ( ! is_admin() ) {
|
63 |
+
return;
|
64 |
+
}
|
65 |
+
|
66 |
$this->_settings = array(
|
67 |
'parent_page' => 'yit_plugin_panel',
|
68 |
'page_title' => __( 'Licence Activation', 'yith-plugin-fw' ),
|
plugin-fw/templates/metaboxes/types/icon-list.php
CHANGED
@@ -23,7 +23,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
23 |
|
24 |
$current_options = wp_parse_args( $args['value'], $args['std'] );
|
25 |
$current_icon = YIT_Icon()->get_icon_data( $current_options['icon'] );
|
26 |
-
$
|
27 |
|
28 |
$options['icon'] = YIT_Plugin_Common::get_icon_list();
|
29 |
|
@@ -88,7 +88,7 @@ $options['icon'] = YIT_Plugin_Common::get_icon_list();
|
|
88 |
<?php if( $std['select'] == 'custom' ) : ?>
|
89 |
<?php printf( __( '(Default: %s <img src="%s"/>)', 'yith-plugin-fw' ), $options['select']['custom'], $std['custom'] ) ?>
|
90 |
<?php else: ?>
|
91 |
-
<?php printf( __( '(Default: <i %s></i> )', 'yith-plugin-fw' ), $
|
92 |
<?php endif; ?>
|
93 |
</div>
|
94 |
|
23 |
|
24 |
$current_options = wp_parse_args( $args['value'], $args['std'] );
|
25 |
$current_icon = YIT_Icon()->get_icon_data( $current_options['icon'] );
|
26 |
+
$std_icon = YIT_Icon()->get_icon_data( $std['icon'] );
|
27 |
|
28 |
$options['icon'] = YIT_Plugin_Common::get_icon_list();
|
29 |
|
88 |
<?php if( $std['select'] == 'custom' ) : ?>
|
89 |
<?php printf( __( '(Default: %s <img src="%s"/>)', 'yith-plugin-fw' ), $options['select']['custom'], $std['custom'] ) ?>
|
90 |
<?php else: ?>
|
91 |
+
<?php printf( __( '(Default: <i %s></i> )', 'yith-plugin-fw' ), $std_icon ) ?>
|
92 |
<?php endif; ?>
|
93 |
</div>
|
94 |
|
plugin-fw/templates/metaboxes/types/simple-text.php
CHANGED
Binary file
|
plugin-fw/templates/panel/woocommerce/woocommerce-panel.php
CHANGED
Binary file
|
plugin-fw/yit-functions.php
CHANGED
@@ -818,4 +818,66 @@ if ( ! function_exists( 'yit_load_js_file' ) ) {
|
|
818 |
|
819 |
return $filename;
|
820 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
}
|
818 |
|
819 |
return $filename;
|
820 |
}
|
821 |
+
}
|
822 |
+
|
823 |
+
if ( ! function_exists( 'yit_wpml_register_string' ) ) {
|
824 |
+
/**
|
825 |
+
* Register a string in wpml trnslation
|
826 |
+
*
|
827 |
+
* @param $contenxt context name
|
828 |
+
* @param $name string name
|
829 |
+
* @param $value value to translate
|
830 |
+
*
|
831 |
+
* @since 2.0.0
|
832 |
+
* @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
|
833 |
+
*/
|
834 |
+
function yit_wpml_register_string( $contenxt , $name , $value ) {
|
835 |
+
// wpml string translation
|
836 |
+
do_action( 'wpml_register_single_string', $contenxt, $name, $value );
|
837 |
+
}
|
838 |
+
}
|
839 |
+
|
840 |
+
if ( ! function_exists( 'yit_wpml_string_translate' ) ) {
|
841 |
+
/**
|
842 |
+
* Get a string translation
|
843 |
+
*
|
844 |
+
* @param $contenxt context name
|
845 |
+
* @param $name string name
|
846 |
+
* @param $default_value value to translate
|
847 |
+
*
|
848 |
+
* @return string the string translated
|
849 |
+
* @since 2.0.0
|
850 |
+
* @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
|
851 |
+
*/
|
852 |
+
function yit_wpml_string_translate( $contenxt, $name, $default_value ) {
|
853 |
+
return apply_filters( 'wpml_translate_single_string', $default_value, $contenxt, $name );
|
854 |
+
}
|
855 |
+
|
856 |
+
}
|
857 |
+
|
858 |
+
if ( ! function_exists( 'yit_wpml_object_id' ) ) {
|
859 |
+
/**
|
860 |
+
* Get id of post translation in current language
|
861 |
+
*
|
862 |
+
* @param int $element_id
|
863 |
+
* @param string $element_type
|
864 |
+
* @param bool $return_original_if_missing
|
865 |
+
* @param null|string $ulanguage_code
|
866 |
+
*
|
867 |
+
* @return int the translation id
|
868 |
+
* @since 2.0.0
|
869 |
+
* @author Antonio La Rocca <antonio.larocca@yithemes.com>
|
870 |
+
*/
|
871 |
+
function yit_wpml_object_id( $element_id, $element_type = 'post', $return_original_if_missing = false, $ulanguage_code = null ) {
|
872 |
+
if( function_exists( 'wpml_object_id' ) ){
|
873 |
+
return wpml_object_id( $element_id, $element_type, $return_original_if_missing, $ulanguage_code );
|
874 |
+
}
|
875 |
+
elseif( function_exists( 'icl_object_id' ) ){
|
876 |
+
return icl_object_id( $element_id, $element_type, $return_original_if_missing, $ulanguage_code );
|
877 |
+
}
|
878 |
+
else{
|
879 |
+
return $element_id;
|
880 |
+
}
|
881 |
+
}
|
882 |
+
|
883 |
}
|