YITH WooCommerce Quick View - Version 1.4.8

Version Description

Released 12 January 2021

  • New: Support for WooCommerce 4.9
  • Update: Plugin framework
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Quick View
Version 1.4.8
Comparing to
See all releases

Code changes from version 1.4.7 to 1.4.8

Files changed (77) hide show
  1. README.txt +8 -3
  2. init.php +5 -5
  3. plugin-fw/LICENSE.txt +696 -0
  4. plugin-fw/assets/css/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  5. plugin-fw/assets/css/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  6. plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  7. plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  8. plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  9. plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  10. plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  11. plugin-fw/assets/css/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  12. plugin-fw/assets/css/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
  13. plugin-fw/assets/css/jquery-ui/images/ui-icons_2e83ff_256x240.png +0 -0
  14. plugin-fw/assets/css/jquery-ui/images/ui-icons_454545_256x240.png +0 -0
  15. plugin-fw/assets/css/jquery-ui/images/ui-icons_888888_256x240.png +0 -0
  16. plugin-fw/assets/css/jquery-ui/images/ui-icons_cd0a0a_256x240.png +0 -0
  17. plugin-fw/assets/css/jquery-ui/jquery-ui.min.css +7 -0
  18. plugin-fw/assets/css/yit-plugin-panel.css +116 -99
  19. plugin-fw/assets/css/yit-upgrade-to-pro.css +67 -61
  20. plugin-fw/assets/css/yith-fields.css +36 -30
  21. plugin-fw/assets/js/metabox.js +144 -155
  22. plugin-fw/assets/js/metabox.min.js +1 -1
  23. plugin-fw/assets/js/select2/select2.min.js +13 -0
  24. plugin-fw/assets/js/yit-plugin-panel.js +200 -208
  25. plugin-fw/assets/js/yit-plugin-panel.min.js +1 -1
  26. plugin-fw/assets/js/yith-date-format.js +60 -0
  27. plugin-fw/assets/js/yith-date-format.min.js +1 -0
  28. plugin-fw/assets/js/yith-fields.js +808 -798
  29. plugin-fw/assets/js/yith-fields.min.js +1 -1
  30. plugin-fw/assets/js/yith-gutenberg.js +6 -5
  31. plugin-fw/assets/js/yith-gutenberg.min.js +1 -1
  32. plugin-fw/includes/class-yit-ajax.php +252 -0
  33. plugin-fw/includes/class-yit-assets.php +132 -0
  34. plugin-fw/includes/class-yit-cpt-unlimited.php +1905 -0
  35. plugin-fw/includes/class-yit-gradients.php +505 -0
  36. plugin-fw/includes/class-yit-icons.php +1180 -0
  37. plugin-fw/includes/class-yit-metabox.php +540 -0
  38. plugin-fw/includes/class-yit-plugin-common.php +1181 -0
  39. plugin-fw/includes/class-yit-plugin-licence.php +94 -0
  40. plugin-fw/includes/class-yit-plugin-panel-woocommerce.php +754 -0
  41. plugin-fw/includes/class-yit-plugin-panel.php +1547 -0
  42. plugin-fw/includes/class-yit-plugin-subpanel.php +149 -0
  43. plugin-fw/includes/class-yit-pointers.php +380 -0
  44. plugin-fw/includes/class-yit-theme-licence.php +74 -0
  45. plugin-fw/includes/class-yit-upgrade.php +70 -0
  46. plugin-fw/includes/class-yit-video.php +192 -0
  47. plugin-fw/includes/class-yith-dashboard.php +149 -0
  48. plugin-fw/includes/class-yith-debug.php +290 -0
  49. plugin-fw/includes/class-yith-gutenberg.php +328 -0
  50. plugin-fw/includes/class-yith-system-status.php +721 -0
  51. plugin-fw/includes/privacy/class-yith-privacy-plugin-abstract.php +72 -0
  52. plugin-fw/includes/privacy/class-yith-privacy.php +114 -0
  53. plugin-fw/{lib → includes}/promo/black.jpg +0 -0
  54. plugin-fw/{lib → includes}/promo/cyber.jpg +0 -0
  55. plugin-fw/{lib → includes}/promo/halloween.jpg +0 -0
  56. plugin-fw/includes/promo/yith-promo.php +245 -0
  57. plugin-fw/{lib → includes}/promo/yith-promo.xml +0 -0
  58. plugin-fw/init.php +68 -80
  59. plugin-fw/languages/yith-plugin-fw-el.mo +0 -0
  60. plugin-fw/languages/yith-plugin-fw-el.po +302 -249
  61. plugin-fw/languages/yith-plugin-fw-es_ES.mo +0 -0
  62. plugin-fw/languages/yith-plugin-fw-es_ES.po +302 -249
  63. plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
  64. plugin-fw/languages/yith-plugin-fw-it_IT.po +302 -249
  65. plugin-fw/languages/yith-plugin-fw-nl_NL.mo +0 -0
  66. plugin-fw/languages/yith-plugin-fw-nl_NL.po +302 -249
  67. plugin-fw/languages/yith-plugin-fw.pot +287 -248
  68. plugin-fw/lib/privacy/yit-privacy-plugin-abstract.php +10 -28
  69. plugin-fw/lib/privacy/yit-privacy.php +10 -78
  70. plugin-fw/lib/promo/yith-promo.php +6 -215
  71. plugin-fw/lib/yit-ajax.php +6 -261
  72. plugin-fw/lib/yit-assets.php +7 -113
  73. plugin-fw/lib/yit-cpt-unlimited.php +5 -1777
  74. plugin-fw/lib/yit-debug.php +6 -265
  75. plugin-fw/lib/yit-icons.php +6 -1140
  76. plugin-fw/lib/yit-metabox.php +7 -637
  77. plugin-fw/lib/yit-plugin-common.php +3 -509
README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: yithemes
3
  Tags: woocommerce, quick view, woocommerce quick view, products quick view
4
  Requires at least: 5.3
5
  Tested up to: 5.6
6
- Stable tag: 1.4.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -40,6 +40,11 @@ Full documentation is available [here](https://docs.yithemes.com/yith-woocommerc
40
 
41
  == Changelog ==
42
 
 
 
 
 
 
43
  = 1.4.7 = Released 04 December 2020
44
 
45
  * New: Support for WooCommerce 4.8
@@ -307,7 +312,7 @@ Or, if you have created your own language pack, or have an update for an existin
307
 
308
  == Upgrade notice ==
309
 
310
- = 1.4.7 = Released 04 December 2020
311
 
312
- * New: Support for WooCommerce 4.8
313
  * Update: Plugin framework
3
  Tags: woocommerce, quick view, woocommerce quick view, products quick view
4
  Requires at least: 5.3
5
  Tested up to: 5.6
6
+ Stable tag: 1.4.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
40
 
41
  == Changelog ==
42
 
43
+ = 1.4.8 = Released 12 January 2021
44
+
45
+ * New: Support for WooCommerce 4.9
46
+ * Update: Plugin framework
47
+
48
  = 1.4.7 = Released 04 December 2020
49
 
50
  * New: Support for WooCommerce 4.8
312
 
313
  == Upgrade notice ==
314
 
315
+ = 1.4.8 = Released 12 January 2021
316
 
317
+ * New: Support for WooCommerce 4.9
318
  * Update: Plugin framework
init.php CHANGED
@@ -3,19 +3,19 @@
3
  * Plugin Name: YITH WooCommerce Quick View
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
  * Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.4.7
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
10
  * Domain Path: /languages/
11
  * WC requires at least: 3.7
12
- * WC tested up to: 4.8
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
- * @version 1.4.7
17
  */
18
- /** Copyright 2015-2020 - YITH (email : plugins@yithemes.com)
19
  *
20
  * This program is free software; you can redistribute it and/or modify
21
  * it under the terms of the GNU General Public License, version 2, as
@@ -62,7 +62,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
62
 
63
 
64
  if ( ! defined( 'YITH_WCQV_VERSION' ) ) {
65
- define( 'YITH_WCQV_VERSION', '1.4.7' );
66
  }
67
 
68
  if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
3
  * Plugin Name: YITH WooCommerce Quick View
4
  * Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
  * Description: The <code><strong>YITH WooCommerce Quick View</strong></code> plugin allows your customers to have a quick look about products. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.4.8
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-quick-view
10
  * Domain Path: /languages/
11
  * WC requires at least: 3.7
12
+ * WC tested up to: 4.9
13
  *
14
  * @author YITH
15
  * @package YITH WooCommerce Quick View
16
+ * @version 1.4.8
17
  */
18
+ /** Copyright 2015-2021 - YITH (email : plugins@yithemes.com)
19
  *
20
  * This program is free software; you can redistribute it and/or modify
21
  * it under the terms of the GNU General Public License, version 2, as
62
 
63
 
64
  if ( ! defined( 'YITH_WCQV_VERSION' ) ) {
65
+ define( 'YITH_WCQV_VERSION', '1.4.8' );
66
  }
67
 
68
  if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
plugin-fw/LICENSE.txt ADDED
@@ -0,0 +1,696 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ YITH Plugin Framework
2
+
3
+ Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
4
+
5
+ This program is free software; you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation; either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with this program; if not, write to the Free Software
17
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
+
19
+ YITH Plugin Framework is released under the GPL
20
+
21
+ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22
+
23
+ GNU GENERAL PUBLIC LICENSE
24
+ Version 3, 29 June 2007
25
+
26
+ Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
27
+ Everyone is permitted to copy and distribute verbatim copies
28
+ of this license document, but changing it is not allowed.
29
+
30
+ Preamble
31
+
32
+ The GNU General Public License is a free, copyleft license for
33
+ software and other kinds of works.
34
+
35
+ The licenses for most software and other practical works are designed
36
+ to take away your freedom to share and change the works. By contrast,
37
+ the GNU General Public License is intended to guarantee your freedom to
38
+ share and change all versions of a program--to make sure it remains free
39
+ software for all its users. We, the Free Software Foundation, use the
40
+ GNU General Public License for most of our software; it applies also to
41
+ any other work released this way by its authors. You can apply it to
42
+ your programs, too.
43
+
44
+ When we speak of free software, we are referring to freedom, not
45
+ price. Our General Public Licenses are designed to make sure that you
46
+ have the freedom to distribute copies of free software (and charge for
47
+ them if you wish), that you receive source code or can get it if you
48
+ want it, that you can change the software or use pieces of it in new
49
+ free programs, and that you know you can do these things.
50
+
51
+ To protect your rights, we need to prevent others from denying you
52
+ these rights or asking you to surrender the rights. Therefore, you have
53
+ certain responsibilities if you distribute copies of the software, or if
54
+ you modify it: responsibilities to respect the freedom of others.
55
+
56
+ For example, if you distribute copies of such a program, whether
57
+ gratis or for a fee, you must pass on to the recipients the same
58
+ freedoms that you received. You must make sure that they, too, receive
59
+ or can get the source code. And you must show them these terms so they
60
+ know their rights.
61
+
62
+ Developers that use the GNU GPL protect your rights with two steps:
63
+ (1) assert copyright on the software, and (2) offer you this License
64
+ giving you legal permission to copy, distribute and/or modify it.
65
+
66
+ For the developers' and authors' protection, the GPL clearly explains
67
+ that there is no warranty for this free software. For both users' and
68
+ authors' sake, the GPL requires that modified versions be marked as
69
+ changed, so that their problems will not be attributed erroneously to
70
+ authors of previous versions.
71
+
72
+ Some devices are designed to deny users access to install or run
73
+ modified versions of the software inside them, although the manufacturer
74
+ can do so. This is fundamentally incompatible with the aim of
75
+ protecting users' freedom to change the software. The systematic
76
+ pattern of such abuse occurs in the area of products for individuals to
77
+ use, which is precisely where it is most unacceptable. Therefore, we
78
+ have designed this version of the GPL to prohibit the practice for those
79
+ products. If such problems arise substantially in other domains, we
80
+ stand ready to extend this provision to those domains in future versions
81
+ of the GPL, as needed to protect the freedom of users.
82
+
83
+ Finally, every program is threatened constantly by software patents.
84
+ States should not allow patents to restrict development and use of
85
+ software on general-purpose computers, but in those that do, we wish to
86
+ avoid the special danger that patents applied to a free program could
87
+ make it effectively proprietary. To prevent this, the GPL assures that
88
+ patents cannot be used to render the program non-free.
89
+
90
+ The precise terms and conditions for copying, distribution and
91
+ modification follow.
92
+
93
+ TERMS AND CONDITIONS
94
+
95
+ 0. Definitions.
96
+
97
+ "This License" refers to version 3 of the GNU General Public License.
98
+
99
+ "Copyright" also means copyright-like laws that apply to other kinds of
100
+ works, such as semiconductor masks.
101
+
102
+ "The Program" refers to any copyrightable work licensed under this
103
+ License. Each licensee is addressed as "you". "Licensees" and
104
+ "recipients" may be individuals or organizations.
105
+
106
+ To "modify" a work means to copy from or adapt all or part of the work
107
+ in a fashion requiring copyright permission, other than the making of an
108
+ exact copy. The resulting work is called a "modified version" of the
109
+ earlier work or a work "based on" the earlier work.
110
+
111
+ A "covered work" means either the unmodified Program or a work based
112
+ on the Program.
113
+
114
+ To "propagate" a work means to do anything with it that, without
115
+ permission, would make you directly or secondarily liable for
116
+ infringement under applicable copyright law, except executing it on a
117
+ computer or modifying a private copy. Propagation includes copying,
118
+ distribution (with or without modification), making available to the
119
+ public, and in some countries other activities as well.
120
+
121
+ To "convey" a work means any kind of propagation that enables other
122
+ parties to make or receive copies. Mere interaction with a user through
123
+ a computer network, with no transfer of a copy, is not conveying.
124
+
125
+ An interactive user interface displays "Appropriate Legal Notices"
126
+ to the extent that it includes a convenient and prominently visible
127
+ feature that (1) displays an appropriate copyright notice, and (2)
128
+ tells the user that there is no warranty for the work (except to the
129
+ extent that warranties are provided), that licensees may convey the
130
+ work under this License, and how to view a copy of this License. If
131
+ the interface presents a list of user commands or options, such as a
132
+ menu, a prominent item in the list meets this criterion.
133
+
134
+ 1. Source Code.
135
+
136
+ The "source code" for a work means the preferred form of the work
137
+ for making modifications to it. "Object code" means any non-source
138
+ form of a work.
139
+
140
+ A "Standard Interface" means an interface that either is an official
141
+ standard defined by a recognized standards body, or, in the case of
142
+ interfaces specified for a particular programming language, one that
143
+ is widely used among developers working in that language.
144
+
145
+ The "System Libraries" of an executable work include anything, other
146
+ than the work as a whole, that (a) is included in the normal form of
147
+ packaging a Major Component, but which is not part of that Major
148
+ Component, and (b) serves only to enable use of the work with that
149
+ Major Component, or to implement a Standard Interface for which an
150
+ implementation is available to the public in source code form. A
151
+ "Major Component", in this context, means a major essential component
152
+ (kernel, window system, and so on) of the specific operating system
153
+ (if any) on which the executable work runs, or a compiler used to
154
+ produce the work, or an object code interpreter used to run it.
155
+
156
+ The "Corresponding Source" for a work in object code form means all
157
+ the source code needed to generate, install, and (for an executable
158
+ work) run the object code and to modify the work, including scripts to
159
+ control those activities. However, it does not include the work's
160
+ System Libraries, or general-purpose tools or generally available free
161
+ programs which are used unmodified in performing those activities but
162
+ which are not part of the work. For example, Corresponding Source
163
+ includes interface definition files associated with source files for
164
+ the work, and the source code for shared libraries and dynamically
165
+ linked subprograms that the work is specifically designed to require,
166
+ such as by intimate data communication or control flow between those
167
+ subprograms and other parts of the work.
168
+
169
+ The Corresponding Source need not include anything that users
170
+ can regenerate automatically from other parts of the Corresponding
171
+ Source.
172
+
173
+ The Corresponding Source for a work in source code form is that
174
+ same work.
175
+
176
+ 2. Basic Permissions.
177
+
178
+ All rights granted under this License are granted for the term of
179
+ copyright on the Program, and are irrevocable provided the stated
180
+ conditions are met. This License explicitly affirms your unlimited
181
+ permission to run the unmodified Program. The output from running a
182
+ covered work is covered by this License only if the output, given its
183
+ content, constitutes a covered work. This License acknowledges your
184
+ rights of fair use or other equivalent, as provided by copyright law.
185
+
186
+ You may make, run and propagate covered works that you do not
187
+ convey, without conditions so long as your license otherwise remains
188
+ in force. You may convey covered works to others for the sole purpose
189
+ of having them make modifications exclusively for you, or provide you
190
+ with facilities for running those works, provided that you comply with
191
+ the terms of this License in conveying all material for which you do
192
+ not control copyright. Those thus making or running the covered works
193
+ for you must do so exclusively on your behalf, under your direction
194
+ and control, on terms that prohibit them from making any copies of
195
+ your copyrighted material outside their relationship with you.
196
+
197
+ Conveying under any other circumstances is permitted solely under
198
+ the conditions stated below. Sublicensing is not allowed; section 10
199
+ makes it unnecessary.
200
+
201
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
202
+
203
+ No covered work shall be deemed part of an effective technological
204
+ measure under any applicable law fulfilling obligations under article
205
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
206
+ similar laws prohibiting or restricting circumvention of such
207
+ measures.
208
+
209
+ When you convey a covered work, you waive any legal power to forbid
210
+ circumvention of technological measures to the extent such circumvention
211
+ is effected by exercising rights under this License with respect to
212
+ the covered work, and you disclaim any intention to limit operation or
213
+ modification of the work as a means of enforcing, against the work's
214
+ users, your or third parties' legal rights to forbid circumvention of
215
+ technological measures.
216
+
217
+ 4. Conveying Verbatim Copies.
218
+
219
+ You may convey verbatim copies of the Program's source code as you
220
+ receive it, in any medium, provided that you conspicuously and
221
+ appropriately publish on each copy an appropriate copyright notice;
222
+ keep intact all notices stating that this License and any
223
+ non-permissive terms added in accord with section 7 apply to the code;
224
+ keep intact all notices of the absence of any warranty; and give all
225
+ recipients a copy of this License along with the Program.
226
+
227
+ You may charge any price or no price for each copy that you convey,
228
+ and you may offer support or warranty protection for a fee.
229
+
230
+ 5. Conveying Modified Source Versions.
231
+
232
+ You may convey a work based on the Program, or the modifications to
233
+ produce it from the Program, in the form of source code under the
234
+ terms of section 4, provided that you also meet all of these conditions:
235
+
236
+ a) The work must carry prominent notices stating that you modified
237
+ it, and giving a relevant date.
238
+
239
+ b) The work must carry prominent notices stating that it is
240
+ released under this License and any conditions added under section
241
+ 7. This requirement modifies the requirement in section 4 to
242
+ "keep intact all notices".
243
+
244
+ c) You must license the entire work, as a whole, under this
245
+ License to anyone who comes into possession of a copy. This
246
+ License will therefore apply, along with any applicable section 7
247
+ additional terms, to the whole of the work, and all its parts,
248
+ regardless of how they are packaged. This License gives no
249
+ permission to license the work in any other way, but it does not
250
+ invalidate such permission if you have separately received it.
251
+
252
+ d) If the work has interactive user interfaces, each must display
253
+ Appropriate Legal Notices; however, if the Program has interactive
254
+ interfaces that do not display Appropriate Legal Notices, your
255
+ work need not make them do so.
256
+
257
+ A compilation of a covered work with other separate and independent
258
+ works, which are not by their nature extensions of the covered work,
259
+ and which are not combined with it such as to form a larger program,
260
+ in or on a volume of a storage or distribution medium, is called an
261
+ "aggregate" if the compilation and its resulting copyright are not
262
+ used to limit the access or legal rights of the compilation's users
263
+ beyond what the individual works permit. Inclusion of a covered work
264
+ in an aggregate does not cause this License to apply to the other
265
+ parts of the aggregate.
266
+
267
+ 6. Conveying Non-Source Forms.
268
+
269
+ You may convey a covered work in object code form under the terms
270
+ of sections 4 and 5, provided that you also convey the
271
+ machine-readable Corresponding Source under the terms of this License,
272
+ in one of these ways:
273
+
274
+ a) Convey the object code in, or embodied in, a physical product
275
+ (including a physical distribution medium), accompanied by the
276
+ Corresponding Source fixed on a durable physical medium
277
+ customarily used for software interchange.
278
+
279
+ b) Convey the object code in, or embodied in, a physical product
280
+ (including a physical distribution medium), accompanied by a
281
+ written offer, valid for at least three years and valid for as
282
+ long as you offer spare parts or customer support for that product
283
+ model, to give anyone who possesses the object code either (1) a
284
+ copy of the Corresponding Source for all the software in the
285
+ product that is covered by this License, on a durable physical
286
+ medium customarily used for software interchange, for a price no
287
+ more than your reasonable cost of physically performing this
288
+ conveying of source, or (2) access to copy the
289
+ Corresponding Source from a network server at no charge.
290
+
291
+ c) Convey individual copies of the object code with a copy of the
292
+ written offer to provide the Corresponding Source. This
293
+ alternative is allowed only occasionally and noncommercially, and
294
+ only if you received the object code with such an offer, in accord
295
+ with subsection 6b.
296
+
297
+ d) Convey the object code by offering access from a designated
298
+ place (gratis or for a charge), and offer equivalent access to the
299
+ Corresponding Source in the same way through the same place at no
300
+ further charge. You need not require recipients to copy the
301
+ Corresponding Source along with the object code. If the place to
302
+ copy the object code is a network server, the Corresponding Source
303
+ may be on a different server (operated by you or a third party)
304
+ that supports equivalent copying facilities, provided you maintain
305
+ clear directions next to the object code saying where to find the
306
+ Corresponding Source. Regardless of what server hosts the
307
+ Corresponding Source, you remain obligated to ensure that it is
308
+ available for as long as needed to satisfy these requirements.
309
+
310
+ e) Convey the object code using peer-to-peer transmission, provided
311
+ you inform other peers where the object code and Corresponding
312
+ Source of the work are being offered to the general public at no
313
+ charge under subsection 6d.
314
+
315
+ A separable portion of the object code, whose source code is excluded
316
+ from the Corresponding Source as a System Library, need not be
317
+ included in conveying the object code work.
318
+
319
+ A "User Product" is either (1) a "consumer product", which means any
320
+ tangible personal property which is normally used for personal, family,
321
+ or household purposes, or (2) anything designed or sold for incorporation
322
+ into a dwelling. In determining whether a product is a consumer product,
323
+ doubtful cases shall be resolved in favor of coverage. For a particular
324
+ product received by a particular user, "normally used" refers to a
325
+ typical or common use of that class of product, regardless of the status
326
+ of the particular user or of the way in which the particular user
327
+ actually uses, or expects or is expected to use, the product. A product
328
+ is a consumer product regardless of whether the product has substantial
329
+ commercial, industrial or non-consumer uses, unless such uses represent
330
+ the only significant mode of use of the product.
331
+
332
+ "Installation Information" for a User Product means any methods,
333
+ procedures, authorization keys, or other information required to install
334
+ and execute modified versions of a covered work in that User Product from
335
+ a modified version of its Corresponding Source. The information must
336
+ suffice to ensure that the continued functioning of the modified object
337
+ code is in no case prevented or interfered with solely because
338
+ modification has been made.
339
+
340
+ If you convey an object code work under this section in, or with, or
341
+ specifically for use in, a User Product, and the conveying occurs as
342
+ part of a transaction in which the right of possession and use of the
343
+ User Product is transferred to the recipient in perpetuity or for a
344
+ fixed term (regardless of how the transaction is characterized), the
345
+ Corresponding Source conveyed under this section must be accompanied
346
+ by the Installation Information. But this requirement does not apply
347
+ if neither you nor any third party retains the ability to install
348
+ modified object code on the User Product (for example, the work has
349
+ been installed in ROM).
350
+
351
+ The requirement to provide Installation Information does not include a
352
+ requirement to continue to provide support service, warranty, or updates
353
+ for a work that has been modified or installed by the recipient, or for
354
+ the User Product in which it has been modified or installed. Access to a
355
+ network may be denied when the modification itself materially and
356
+ adversely affects the operation of the network or violates the rules and
357
+ protocols for communication across the network.
358
+
359
+ Corresponding Source conveyed, and Installation Information provided,
360
+ in accord with this section must be in a format that is publicly
361
+ documented (and with an implementation available to the public in
362
+ source code form), and must require no special password or key for
363
+ unpacking, reading or copying.
364
+
365
+ 7. Additional Terms.
366
+
367
+ "Additional permissions" are terms that supplement the terms of this
368
+ License by making exceptions from one or more of its conditions.
369
+ Additional permissions that are applicable to the entire Program shall
370
+ be treated as though they were included in this License, to the extent
371
+ that they are valid under applicable law. If additional permissions
372
+ apply only to part of the Program, that part may be used separately
373
+ under those permissions, but the entire Program remains governed by
374
+ this License without regard to the additional permissions.
375
+
376
+ When you convey a copy of a covered work, you may at your option
377
+ remove any additional permissions from that copy, or from any part of
378
+ it. (Additional permissions may be written to require their own
379
+ removal in certain cases when you modify the work.) You may place
380
+ additional permissions on material, added by you to a covered work,
381
+ for which you have or can give appropriate copyright permission.
382
+
383
+ Notwithstanding any other provision of this License, for material you
384
+ add to a covered work, you may (if authorized by the copyright holders of
385
+ that material) supplement the terms of this License with terms:
386
+
387
+ a) Disclaiming warranty or limiting liability differently from the
388
+ terms of sections 15 and 16 of this License; or
389
+
390
+ b) Requiring preservation of specified reasonable legal notices or
391
+ author attributions in that material or in the Appropriate Legal
392
+ Notices displayed by works containing it; or
393
+
394
+ c) Prohibiting misrepresentation of the origin of that material, or
395
+ requiring that modified versions of such material be marked in
396
+ reasonable ways as different from the original version; or
397
+
398
+ d) Limiting the use for publicity purposes of names of licensors or
399
+ authors of the material; or
400
+
401
+ e) Declining to grant rights under trademark law for use of some
402
+ trade names, trademarks, or service marks; or
403
+
404
+ f) Requiring indemnification of licensors and authors of that
405
+ material by anyone who conveys the material (or modified versions of
406
+ it) with contractual assumptions of liability to the recipient, for
407
+ any liability that these contractual assumptions directly impose on
408
+ those licensors and authors.
409
+
410
+ All other non-permissive additional terms are considered "further
411
+ restrictions" within the meaning of section 10. If the Program as you
412
+ received it, or any part of it, contains a notice stating that it is
413
+ governed by this License along with a term that is a further
414
+ restriction, you may remove that term. If a license document contains
415
+ a further restriction but permits relicensing or conveying under this
416
+ License, you may add to a covered work material governed by the terms
417
+ of that license document, provided that the further restriction does
418
+ not survive such relicensing or conveying.
419
+
420
+ If you add terms to a covered work in accord with this section, you
421
+ must place, in the relevant source files, a statement of the
422
+ additional terms that apply to those files, or a notice indicating
423
+ where to find the applicable terms.
424
+
425
+ Additional terms, permissive or non-permissive, may be stated in the
426
+ form of a separately written license, or stated as exceptions;
427
+ the above requirements apply either way.
428
+
429
+ 8. Termination.
430
+
431
+ You may not propagate or modify a covered work except as expressly
432
+ provided under this License. Any attempt otherwise to propagate or
433
+ modify it is void, and will automatically terminate your rights under
434
+ this License (including any patent licenses granted under the third
435
+ paragraph of section 11).
436
+
437
+ However, if you cease all violation of this License, then your
438
+ license from a particular copyright holder is reinstated (a)
439
+ provisionally, unless and until the copyright holder explicitly and
440
+ finally terminates your license, and (b) permanently, if the copyright
441
+ holder fails to notify you of the violation by some reasonable means
442
+ prior to 60 days after the cessation.
443
+
444
+ Moreover, your license from a particular copyright holder is
445
+ reinstated permanently if the copyright holder notifies you of the
446
+ violation by some reasonable means, this is the first time you have
447
+ received notice of violation of this License (for any work) from that
448
+ copyright holder, and you cure the violation prior to 30 days after
449
+ your receipt of the notice.
450
+
451
+ Termination of your rights under this section does not terminate the
452
+ licenses of parties who have received copies or rights from you under
453
+ this License. If your rights have been terminated and not permanently
454
+ reinstated, you do not qualify to receive new licenses for the same
455
+ material under section 10.
456
+
457
+ 9. Acceptance Not Required for Having Copies.
458
+
459
+ You are not required to accept this License in order to receive or
460
+ run a copy of the Program. Ancillary propagation of a covered work
461
+ occurring solely as a consequence of using peer-to-peer transmission
462
+ to receive a copy likewise does not require acceptance. However,
463
+ nothing other than this License grants you permission to propagate or
464
+ modify any covered work. These actions infringe copyright if you do
465
+ not accept this License. Therefore, by modifying or propagating a
466
+ covered work, you indicate your acceptance of this License to do so.
467
+
468
+ 10. Automatic Licensing of Downstream Recipients.
469
+
470
+ Each time you convey a covered work, the recipient automatically
471
+ receives a license from the original licensors, to run, modify and
472
+ propagate that work, subject to this License. You are not responsible
473
+ for enforcing compliance by third parties with this License.
474
+
475
+ An "entity transaction" is a transaction transferring control of an
476
+ organization, or substantially all assets of one, or subdividing an
477
+ organization, or merging organizations. If propagation of a covered
478
+ work results from an entity transaction, each party to that
479
+ transaction who receives a copy of the work also receives whatever
480
+ licenses to the work the party's predecessor in interest had or could
481
+ give under the previous paragraph, plus a right to possession of the
482
+ Corresponding Source of the work from the predecessor in interest, if
483
+ the predecessor has it or can get it with reasonable efforts.
484
+
485
+ You may not impose any further restrictions on the exercise of the
486
+ rights granted or affirmed under this License. For example, you may
487
+ not impose a license fee, royalty, or other charge for exercise of
488
+ rights granted under this License, and you may not initiate litigation
489
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
490
+ any patent claim is infringed by making, using, selling, offering for
491
+ sale, or importing the Program or any portion of it.
492
+
493
+ 11. Patents.
494
+
495
+ A "contributor" is a copyright holder who authorizes use under this
496
+ License of the Program or a work on which the Program is based. The
497
+ work thus licensed is called the contributor's "contributor version".
498
+
499
+ A contributor's "essential patent claims" are all patent claims
500
+ owned or controlled by the contributor, whether already acquired or
501
+ hereafter acquired, that would be infringed by some manner, permitted
502
+ by this License, of making, using, or selling its contributor version,
503
+ but do not include claims that would be infringed only as a
504
+ consequence of further modification of the contributor version. For
505
+ purposes of this definition, "control" includes the right to grant
506
+ patent sublicenses in a manner consistent with the requirements of
507
+ this License.
508
+
509
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
510
+ patent license under the contributor's essential patent claims, to
511
+ make, use, sell, offer for sale, import and otherwise run, modify and
512
+ propagate the contents of its contributor version.
513
+
514
+ In the following three paragraphs, a "patent license" is any express
515
+ agreement or commitment, however denominated, not to enforce a patent
516
+ (such as an express permission to practice a patent or covenant not to
517
+ sue for patent infringement). To "grant" such a patent license to a
518
+ party means to make such an agreement or commitment not to enforce a
519
+ patent against the party.
520
+
521
+ If you convey a covered work, knowingly relying on a patent license,
522
+ and the Corresponding Source of the work is not available for anyone
523
+ to copy, free of charge and under the terms of this License, through a
524
+ publicly available network server or other readily accessible means,
525
+ then you must either (1) cause the Corresponding Source to be so
526
+ available, or (2) arrange to deprive yourself of the benefit of the
527
+ patent license for this particular work, or (3) arrange, in a manner
528
+ consistent with the requirements of this License, to extend the patent
529
+ license to downstream recipients. "Knowingly relying" means you have
530
+ actual knowledge that, but for the patent license, your conveying the
531
+ covered work in a country, or your recipient's use of the covered work
532
+ in a country, would infringe one or more identifiable patents in that
533
+ country that you have reason to believe are valid.
534
+
535
+ If, pursuant to or in connection with a single transaction or
536
+ arrangement, you convey, or propagate by procuring conveyance of, a
537
+ covered work, and grant a patent license to some of the parties
538
+ receiving the covered work authorizing them to use, propagate, modify
539
+ or convey a specific copy of the covered work, then the patent license
540
+ you grant is automatically extended to all recipients of the covered
541
+ work and works based on it.
542
+
543
+ A patent license is "discriminatory" if it does not include within
544
+ the scope of its coverage, prohibits the exercise of, or is
545
+ conditioned on the non-exercise of one or more of the rights that are
546
+ specifically granted under this License. You may not convey a covered
547
+ work if you are a party to an arrangement with a third party that is
548
+ in the business of distributing software, under which you make payment
549
+ to the third party based on the extent of your activity of conveying
550
+ the work, and under which the third party grants, to any of the
551
+ parties who would receive the covered work from you, a discriminatory
552
+ patent license (a) in connection with copies of the covered work
553
+ conveyed by you (or copies made from those copies), or (b) primarily
554
+ for and in connection with specific products or compilations that
555
+ contain the covered work, unless you entered into that arrangement,
556
+ or that patent license was granted, prior to 28 March 2007.
557
+
558
+ Nothing in this License shall be construed as excluding or limiting
559
+ any implied license or other defenses to infringement that may
560
+ otherwise be available to you under applicable patent law.
561
+
562
+ 12. No Surrender of Others' Freedom.
563
+
564
+ If conditions are imposed on you (whether by court order, agreement or
565
+ otherwise) that contradict the conditions of this License, they do not
566
+ excuse you from the conditions of this License. If you cannot convey a
567
+ covered work so as to satisfy simultaneously your obligations under this
568
+ License and any other pertinent obligations, then as a consequence you may
569
+ not convey it at all. For example, if you agree to terms that obligate you
570
+ to collect a royalty for further conveying from those to whom you convey
571
+ the Program, the only way you could satisfy both those terms and this
572
+ License would be to refrain entirely from conveying the Program.
573
+
574
+ 13. Use with the GNU Affero General Public License.
575
+
576
+ Notwithstanding any other provision of this License, you have
577
+ permission to link or combine any covered work with a work licensed
578
+ under version 3 of the GNU Affero General Public License into a single
579
+ combined work, and to convey the resulting work. The terms of this
580
+ License will continue to apply to the part which is the covered work,
581
+ but the special requirements of the GNU Affero General Public License,
582
+ section 13, concerning interaction through a network will apply to the
583
+ combination as such.
584
+
585
+ 14. Revised Versions of this License.
586
+
587
+ The Free Software Foundation may publish revised and/or new versions of
588
+ the GNU General Public License from time to time. Such new versions will
589
+ be similar in spirit to the present version, but may differ in detail to
590
+ address new problems or concerns.
591
+
592
+ Each version is given a distinguishing version number. If the
593
+ Program specifies that a certain numbered version of the GNU General
594
+ Public License "or any later version" applies to it, you have the
595
+ option of following the terms and conditions either of that numbered
596
+ version or of any later version published by the Free Software
597
+ Foundation. If the Program does not specify a version number of the
598
+ GNU General Public License, you may choose any version ever published
599
+ by the Free Software Foundation.
600
+
601
+ If the Program specifies that a proxy can decide which future
602
+ versions of the GNU General Public License can be used, that proxy's
603
+ public statement of acceptance of a version permanently authorizes you
604
+ to choose that version for the Program.
605
+
606
+ Later license versions may give you additional or different
607
+ permissions. However, no additional obligations are imposed on any
608
+ author or copyright holder as a result of your choosing to follow a
609
+ later version.
610
+
611
+ 15. Disclaimer of Warranty.
612
+
613
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
614
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
615
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
616
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
617
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
618
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
619
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
620
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
621
+
622
+ 16. Limitation of Liability.
623
+
624
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
625
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
626
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
627
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
628
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
629
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
630
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
631
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
632
+ SUCH DAMAGES.
633
+
634
+ 17. Interpretation of Sections 15 and 16.
635
+
636
+ If the disclaimer of warranty and limitation of liability provided
637
+ above cannot be given local legal effect according to their terms,
638
+ reviewing courts shall apply local law that most closely approximates
639
+ an absolute waiver of all civil liability in connection with the
640
+ Program, unless a warranty or assumption of liability accompanies a
641
+ copy of the Program in return for a fee.
642
+
643
+ END OF TERMS AND CONDITIONS
644
+
645
+ How to Apply These Terms to Your New Programs
646
+
647
+ If you develop a new program, and you want it to be of the greatest
648
+ possible use to the public, the best way to achieve this is to make it
649
+ free software which everyone can redistribute and change under these terms.
650
+
651
+ To do so, attach the following notices to the program. It is safest
652
+ to attach them to the start of each source file to most effectively
653
+ state the exclusion of warranty; and each file should have at least
654
+ the "copyright" line and a pointer to where the full notice is found.
655
+
656
+ <one line to give the program's name and a brief idea of what it does.>
657
+ Copyright © <year> <name of author>
658
+
659
+ This program is free software: you can redistribute it and/or modify
660
+ it under the terms of the GNU General Public License as published by
661
+ the Free Software Foundation, either version 3 of the License, or
662
+ (at your option) any later version.
663
+
664
+ This program is distributed in the hope that it will be useful,
665
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
666
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
667
+ GNU General Public License for more details.
668
+
669
+ You should have received a copy of the GNU General Public License
670
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
671
+
672
+ Also add information on how to contact you by electronic and paper mail.
673
+
674
+ If the program does terminal interaction, make it output a short
675
+ notice like this when it starts in an interactive mode:
676
+
677
+ <program> Copyright © <year> <name of author>
678
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
679
+ This is free software, and you are welcome to redistribute it
680
+ under certain conditions; type `show c' for details.
681
+
682
+ The hypothetical commands `show w' and `show c' should show the appropriate
683
+ parts of the General Public License. Of course, your program's commands
684
+ might be different; for a GUI interface, you would use an "about box".
685
+
686
+ You should also get your employer (if you work as a programmer) or school,
687
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
688
+ For more information on this, and how to apply and follow the GNU GPL, see
689
+ <https://www.gnu.org/licenses/>.
690
+
691
+ The GNU General Public License does not permit incorporating your program
692
+ into proprietary programs. If your program is a subroutine library, you
693
+ may consider it more useful to permit linking proprietary applications with
694
+ the library. If this is what you want to do, use the GNU Lesser General
695
+ Public License instead of this License. But first, please read
696
+ <https://www.gnu.org/philosophy/why-not-lgpl.html>.
plugin-fw/assets/css/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-icons_222222_256x240.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-icons_2e83ff_256x240.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-icons_454545_256x240.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-icons_888888_256x240.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/images/ui-icons_cd0a0a_256x240.png ADDED
Binary file
plugin-fw/assets/css/jquery-ui/jquery-ui.min.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.11.4 - 2015-03-11
2
+ * http://jqueryui.com
3
+ * Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
+ * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{-webkit-filter:inherit;filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
plugin-fw/assets/css/yit-plugin-panel.css CHANGED
@@ -46,17 +46,22 @@
46
  margin-right : 15px;
47
  }
48
 
49
- .yith-plugin-fw-panel-custom-tab-container > h2 {
50
- border : none;
51
- padding : 15px 0;
52
  }
53
 
54
- .yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container{
55
- border: 1px solid #ddd;
56
- border-top : 0;
 
 
 
57
  }
58
 
59
- .yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container > h2 {
 
 
60
  border : none;
61
  padding : 15px 0;
62
  }
@@ -88,13 +93,14 @@
88
  .yith-plugin-fw-wp-page-wrapper .wrap {
89
  border : 1px solid #d8d8d8;
90
  border-top : 0;
91
- margin: 0px 15px 0 0;
92
  background : #fff;
93
  padding : 20px;
94
  box-sizing : border-box;
95
  }
96
- .yith-plugin-fw-wp-page-wrapper .wrap.subnav-wrap .wrap{
97
- margin-top: -20px;
 
98
  }
99
 
100
  #wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
@@ -107,13 +113,12 @@
107
 
108
  .yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
109
  padding-top : 9px;
110
- padding-bottom: 0;
111
  }
112
 
113
  .yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
114
  color : #2a8db0;
115
- font-size : 15px;
116
- text-transform : uppercase;
117
  font-weight : 600;
118
  }
119
 
@@ -511,6 +516,7 @@
511
  #wpwrap h2.nav-tab-wrapper, #wpbody-content h2.nav-tab-wrapper {
512
  border-bottom : 1px solid #ccc;
513
  margin-right : 15px;
 
514
  }
515
 
516
  /* === YIT FRAMEWORK === */
@@ -529,12 +535,13 @@
529
  .yith-plugin-ui .yit-admin-panel-container {
530
  position : relative;
531
  margin-right : 15px;
532
- margin-top: -3px;
533
- z-index: 0;
534
- border-top: 1px solid #dbdada;
535
  }
 
536
  .yit-admin-panel-content-wrap {
537
- width: auto;
538
  display : block;
539
  }
540
 
@@ -569,37 +576,39 @@
569
  */
570
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
571
  background : #fff;
572
- padding: 10px 14px 0px 20px;
573
  box-sizing : border-box;
574
- margin-right: 15px;
575
  border-left : 1px solid #d8d8d8;
576
  border-right : 1px solid #d8d8d8;
577
- margin-top: -2px;
578
  }
579
- .yith-plugin-ui .yith-plugin-fw-wp-page-wrapper .wrap{
580
- margin-top: -29px;
 
581
  }
 
582
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
583
- text-transform : uppercase;
584
- line-height : inherit;
585
- font-weight : 600;
586
- margin-right: 21px;
587
- box-sizing: border-box;
588
- background-color: #f1f1f1;
589
- padding-top: 0;
590
- border: 1px solid #ccc;
591
- border-bottom: 0;
592
- margin-top: 20px;
593
  }
594
 
595
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
596
  line-height : 1.71428571;
597
  margin-left : 0;
598
  margin-right : 0;
599
- background-color: #f1f1f1;
600
  color : #336374;
601
  font-size : 13px;
602
- padding: 8px 20px 9px;
603
  border : 0;
604
  }
605
 
@@ -626,121 +635,129 @@
626
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
627
  color : #2a8db0;
628
  background : #fff;
629
- border-bottom: 2px solid #fff;
630
  }
631
- .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:first-child{
632
- border:0;
 
633
  }
634
 
635
  .yith-plugin-fw-wp-page-wrapper.yith-current-subtab-opened > .wrap {
636
  /* padding-top: 0; */
637
  }
 
638
  .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
639
- border-bottom: 2px solid #e9e9e9;
640
- margin: 0;
641
- padding-top: 9px;
642
- padding-bottom: 0;
643
- line-height: inherit;
644
  }
645
 
646
  div.nav-subtab-wrap {
647
- position: absolute;
648
- top: 100%;
649
- left: 1px;
650
- padding-top: 10px;
651
- visibility: hidden; /* hides sub-menu */
652
  }
 
653
  ul.nav-subtab {
654
- opacity: 0;
655
- background-color: #fff;
656
- transition: max-height 0.5s ease-in;
657
- max-height: 0;
658
- z-index: 100;
659
- overflow: hidden;
660
- border: 1px solid #f2f2f2;
661
- padding: 14px 15px;
662
  }
 
663
  ul.yith-plugin-fw-tabs {
664
- display: block;
665
- margin: 0;
666
  }
667
 
668
  li.yith-plugin-fw-tab-element {
669
- position: relative;
670
- margin: 0;
671
- padding: 0;
672
- display: inline-block;
673
- height: 37px;
674
- overflow: visible;
675
- z-index:10;
676
  }
 
677
  .yith-plugin-fw-panel-custom-tab-container {
678
- margin-top: -2px;
679
  }
680
 
681
- li.yith-plugin-fw-tab-element:hover{
682
- cursor:pointer;
683
  }
684
- li.nav-subtab-item{
685
- padding: 3px 0 0;
 
686
  }
 
687
  li.nav-subtab-item a {
688
- font-size: 12px;
689
- text-decoration: none;
690
- letter-spacing: 0.05em;
691
- color: #336374;
692
  }
693
- li.nav-subtab-item a:hover{
694
- color:#228fb6;
 
695
  }
696
 
697
  li.yith-plugin-fw-tab-element a:hover .nav-subtab-wrap,
698
  li.yith-plugin-fw-tab-element:hover .nav-subtab-wrap {
699
- visibility: visible; /* shows sub-menu */
700
  }
701
 
702
  li.yith-plugin-fw-tab-element a:hover ul.nav-subtab,
703
- li.yith-plugin-fw-tab-element:hover ul.nav-subtab{
704
- max-height: 200px;
705
- -webkit-box-shadow: -2px 2px 10px rgba(0, 111, 101, 0.27);
706
- -moz-box-shadow: -2px 2px 10px rgba(0, 111, 101, 0.27);
707
- box-shadow: -2px 2px 10px rgba(0, 111, 101, 0.27);
708
- opacity: 1;
709
- transition-delay: 0s, 0s, 0.3s;
710
- min-width: 180px;
711
  }
712
 
713
  li.yith-plugin-fw-tab-element a.nav-tab i {
714
- margin-left: 10px;
715
- font-size:12px;
716
  }
717
 
718
  li.yith-plugin-fw-tab-element a.nav-tab i:before {
719
- color: #fff;
720
  }
721
 
722
- .yith-plugin-fw-panel .woocommerce-page{
723
- margin-top:-2px;
724
  }
725
 
726
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container {
727
- margin-top: 0;
728
- padding-top: 0;
729
  }
730
 
731
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container,
732
- .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .wrap.subnav-wrap {
733
- border: 1px solid #d8d8d8;
734
- border-top: 0;
735
- margin: -2px 15px 0 0;
736
- background: #fff;
737
- padding: 20px;
738
- box-sizing: border-box;
739
  }
740
 
741
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .wrap.subnav-wrap .wrap,
742
  .yith-plugin-ui .yit-admin-panel-content-wrap.has-subnav {
743
- margin: -20px 15px 0 0;
744
  }
745
 
746
  /* === Responsive === */
46
  margin-right : 15px;
47
  }
48
 
49
+ .yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container {
50
+ border : 1px solid #ddd;
51
+ border-top : 0;
52
  }
53
 
54
+ .yith-plugin-ui .yith-plugin-fw-panel-custom-sub-tab-container {
55
+ padding : 20px;
56
+ box-sizing : border-box;
57
+ border : 1px solid #ccc;
58
+ border-top : 0;
59
+ margin : -20px 15px 0 0;
60
  }
61
 
62
+ .yith-plugin-fw-panel-custom-tab-container > h2,
63
+ .yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container > h2,
64
+ .yith-plugin-ui .yith-plugin-fw-panel-custom-sub-tab-container > h2 {
65
  border : none;
66
  padding : 15px 0;
67
  }
93
  .yith-plugin-fw-wp-page-wrapper .wrap {
94
  border : 1px solid #d8d8d8;
95
  border-top : 0;
96
+ margin : 0px 15px 0 0;
97
  background : #fff;
98
  padding : 20px;
99
  box-sizing : border-box;
100
  }
101
+
102
+ .yith-plugin-fw-wp-page-wrapper .wrap.subnav-wrap .wrap {
103
+ margin-top : -20px;
104
  }
105
 
106
  #wpwrap .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper, #wpbody-content .yith-plugin-fw-wp-page-wrapper .yith-plugin-ui h2.nav-tab-wrapper {
113
 
114
  .yith-plugin-fw-wp-page-wrapper h1.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper h2.nav-tab-wrapper, .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
115
  padding-top : 9px;
116
+ padding-bottom : 0;
117
  }
118
 
119
  .yith-plugin-fw-wp-page-wrapper .wrap h1.wp-heading-inline {
120
  color : #2a8db0;
121
+ font-size : 16px;
 
122
  font-weight : 600;
123
  }
124
 
516
  #wpwrap h2.nav-tab-wrapper, #wpbody-content h2.nav-tab-wrapper {
517
  border-bottom : 1px solid #ccc;
518
  margin-right : 15px;
519
+ text-transform: uppercase;
520
  }
521
 
522
  /* === YIT FRAMEWORK === */
535
  .yith-plugin-ui .yit-admin-panel-container {
536
  position : relative;
537
  margin-right : 15px;
538
+ margin-top : -3px;
539
+ z-index : 0;
540
+ border-top : 1px solid #dbdada;
541
  }
542
+
543
  .yit-admin-panel-content-wrap {
544
+ width : auto;
545
  display : block;
546
  }
547
 
576
  */
577
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav {
578
  background : #fff;
579
+ padding : 10px 14px 0px 20px;
580
  box-sizing : border-box;
581
+ margin-right : 15px;
582
  border-left : 1px solid #d8d8d8;
583
  border-right : 1px solid #d8d8d8;
584
+ margin-top : -2px;
585
  }
586
+
587
+ .yith-plugin-ui .yith-plugin-fw-wp-page-wrapper .wrap {
588
+ margin-top : -29px;
589
  }
590
+
591
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav h3.nav-tab-wrapper {
592
+ text-transform : uppercase;
593
+ line-height : inherit;
594
+ font-weight : 600;
595
+ margin-right : 21px;
596
+ box-sizing : border-box;
597
+ background-color : #f1f1f1;
598
+ padding-top : 0;
599
+ border : 1px solid #ccc;
600
+ border-bottom : 0;
601
+ margin-top : 20px;
602
  }
603
 
604
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab {
605
  line-height : 1.71428571;
606
  margin-left : 0;
607
  margin-right : 0;
608
+ background-color : #f1f1f1;
609
  color : #336374;
610
  font-size : 13px;
611
+ padding : 8px 20px 9px;
612
  border : 0;
613
  }
614
 
635
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab-active {
636
  color : #2a8db0;
637
  background : #fff;
638
+ border-bottom : 2px solid #fff;
639
  }
640
+
641
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav .nav-tab:first-child {
642
+ border : 0;
643
  }
644
 
645
  .yith-plugin-fw-wp-page-wrapper.yith-current-subtab-opened > .wrap {
646
  /* padding-top: 0; */
647
  }
648
+
649
  .yith-plugin-fw-wp-page-wrapper .nav-tab-wrapper {
650
+ border-bottom : 2px solid #e9e9e9;
651
+ margin : 0;
652
+ padding-top : 9px;
653
+ padding-bottom : 0;
654
+ line-height : inherit;
655
  }
656
 
657
  div.nav-subtab-wrap {
658
+ position : absolute;
659
+ top : 100%;
660
+ left : 1px;
661
+ padding-top : 10px;
662
+ visibility : hidden; /* hides sub-menu */
663
  }
664
+
665
  ul.nav-subtab {
666
+ opacity : 0;
667
+ background-color : #fff;
668
+ transition : max-height 0.5s ease-in;
669
+ max-height : 0;
670
+ z-index : 100;
671
+ overflow : hidden;
672
+ border : 1px solid #f2f2f2;
673
+ padding : 14px 15px;
674
  }
675
+
676
  ul.yith-plugin-fw-tabs {
677
+ display : block;
678
+ margin : 0;
679
  }
680
 
681
  li.yith-plugin-fw-tab-element {
682
+ position : relative;
683
+ margin : 0;
684
+ padding : 0;
685
+ display : inline-block;
686
+ height : 37px;
687
+ overflow : visible;
688
+ z-index : 10;
689
  }
690
+
691
  .yith-plugin-fw-panel-custom-tab-container {
692
+ margin-top : -2px;
693
  }
694
 
695
+ li.yith-plugin-fw-tab-element:hover {
696
+ cursor : pointer;
697
  }
698
+
699
+ li.nav-subtab-item {
700
+ padding : 3px 0 0;
701
  }
702
+
703
  li.nav-subtab-item a {
704
+ font-size : 12px;
705
+ text-decoration : none;
706
+ letter-spacing : 0.05em;
707
+ color : #336374;
708
  }
709
+
710
+ li.nav-subtab-item a:hover {
711
+ color : #228fb6;
712
  }
713
 
714
  li.yith-plugin-fw-tab-element a:hover .nav-subtab-wrap,
715
  li.yith-plugin-fw-tab-element:hover .nav-subtab-wrap {
716
+ visibility : visible; /* shows sub-menu */
717
  }
718
 
719
  li.yith-plugin-fw-tab-element a:hover ul.nav-subtab,
720
+ li.yith-plugin-fw-tab-element:hover ul.nav-subtab {
721
+ max-height : 200px;
722
+ -webkit-box-shadow : -2px 2px 10px rgba(0, 111, 101, 0.27);
723
+ -moz-box-shadow : -2px 2px 10px rgba(0, 111, 101, 0.27);
724
+ box-shadow : -2px 2px 10px rgba(0, 111, 101, 0.27);
725
+ opacity : 1;
726
+ transition-delay : 0s, 0s, 0.3s;
727
+ min-width : 180px;
728
  }
729
 
730
  li.yith-plugin-fw-tab-element a.nav-tab i {
731
+ margin-left : 10px;
732
+ font-size : 12px;
733
  }
734
 
735
  li.yith-plugin-fw-tab-element a.nav-tab i:before {
736
+ color : #fff;
737
  }
738
 
739
+ .yith-plugin-fw-panel .woocommerce-page {
740
+ margin-top : -2px;
741
  }
742
 
743
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container {
744
+ margin-top : 0;
745
+ padding-top : 0;
746
  }
747
 
748
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .yit-admin-panel-container,
749
+ .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .wrap.subnav-wrap {
750
+ border : 1px solid #d8d8d8;
751
+ border-top : 0;
752
+ margin : -2px 15px 0 0;
753
+ background : #fff;
754
+ padding : 20px;
755
+ box-sizing : border-box;
756
  }
757
 
758
  .yith-plugin-ui .yith-plugin-fw-sub-tabs-nav ~ .wrap.subnav-wrap .wrap,
759
  .yith-plugin-ui .yit-admin-panel-content-wrap.has-subnav {
760
+ margin : -20px 15px 0 0;
761
  }
762
 
763
  /* === Responsive === */
plugin-fw/assets/css/yit-upgrade-to-pro.css CHANGED
@@ -1,77 +1,83 @@
1
  /* === Upgrade to Premium Landing page === */
2
 
3
- #upgrade-to-premium{
4
- width: 900px;
5
  }
6
- #upgrade-to-premium h1{
7
- font-family: 'Raleway',san-serif;
8
- text-transform: uppercase;
9
- font-size: 30px;
10
- font-weight: 700;
11
- color: #808a97;
 
12
  }
13
 
14
- #upgrade-to-premium h3{
15
- font-family: 'Raleway',san-serif;
16
- font-size: 20px;
17
- line-height: 29px;
18
- font-weight: 700;
19
- color: #808a97;
20
  }
21
 
22
- #upgrade-to-premium p{
23
- font-family: 'Open Sans',san-serif;
24
- font-size: 15px;
25
- line-height: 29px;
26
- font-weight: 400;
27
- color: #6a6a6b;
28
  }
29
- #upgrade-to-premium p.highlighted{
30
- font-family: 'Raleway',san-serif;
31
- font-size: 20px;
32
- line-height: 27px;
33
- color: #808a97;
34
- font-weight: 400;
 
35
  }
36
- #upgrade-to-premium ol{
37
- counter-reset: item;
38
- list-style-type: none;
39
- margin-left: 0;
 
40
  }
41
- #upgrade-to-premium li.step{
42
- font-family: 'open sans',san-serif;
43
- font-size: 15px;
44
- color: #6a6a6b;
45
- font-weight: 400;
46
- position: relative;
47
- padding-left: 50px;
48
- line-height: 25px;
49
- margin-bottom: 25px;
 
50
  }
51
- #upgrade-to-premium li.step:before{
52
- content: counters(item, ".") " ";
53
- counter-increment: item;
54
- position: absolute;
55
- left: 0;
56
- top: 0;
57
- border: 1px solid #808a97;
58
- width: 30px;
59
- height: 30px;
60
- border-radius: 16px;
61
- background-color: #808a97;
62
- color: #ffffff;
63
- font-weight: 700;
64
- font-size: 18px;
65
- text-align: center;
66
- line-height: 27px;
 
67
  }
68
- #upgrade-to-premium li.step img{
69
- border: 1px solid #b8b8b8;
70
- width: 600px;
71
- display: block;
72
- margin: 15px 0 25px 0;
 
73
  }
74
 
75
  #cboxLoadedContent {
76
- margin-bottom: 60px!important;
77
  }
1
  /* === Upgrade to Premium Landing page === */
2
 
3
+ #upgrade-to-premium {
4
+ width : 900px;
5
  }
6
+
7
+ #upgrade-to-premium h1 {
8
+ font-family : 'Raleway', sans-serif;
9
+ text-transform : uppercase;
10
+ font-size : 30px;
11
+ font-weight : 700;
12
+ color : #808a97;
13
  }
14
 
15
+ #upgrade-to-premium h3 {
16
+ font-family : 'Raleway', sans-serif;
17
+ font-size : 20px;
18
+ line-height : 29px;
19
+ font-weight : 700;
20
+ color : #808a97;
21
  }
22
 
23
+ #upgrade-to-premium p {
24
+ font-family : 'Open Sans', sans-serif;
25
+ font-size : 15px;
26
+ line-height : 29px;
27
+ font-weight : 400;
28
+ color : #6a6a6b;
29
  }
30
+
31
+ #upgrade-to-premium p.highlighted {
32
+ font-family : 'Raleway', sans-serif;
33
+ font-size : 20px;
34
+ line-height : 27px;
35
+ color : #808a97;
36
+ font-weight : 400;
37
  }
38
+
39
+ #upgrade-to-premium ol {
40
+ counter-reset : item;
41
+ list-style-type : none;
42
+ margin-left : 0;
43
  }
44
+
45
+ #upgrade-to-premium li.step {
46
+ font-family : 'open sans', sans-serif;
47
+ font-size : 15px;
48
+ color : #6a6a6b;
49
+ font-weight : 400;
50
+ position : relative;
51
+ padding-left : 50px;
52
+ line-height : 25px;
53
+ margin-bottom : 25px;
54
  }
55
+
56
+ #upgrade-to-premium li.step:before {
57
+ content : counters(item, ".") " ";
58
+ counter-increment : item;
59
+ position : absolute;
60
+ left : 0;
61
+ top : 0;
62
+ border : 1px solid #808a97;
63
+ width : 30px;
64
+ height : 30px;
65
+ border-radius : 16px;
66
+ background-color : #808a97;
67
+ color : #ffffff;
68
+ font-weight : 700;
69
+ font-size : 18px;
70
+ text-align : center;
71
+ line-height : 27px;
72
  }
73
+
74
+ #upgrade-to-premium li.step img {
75
+ border : 1px solid #b8b8b8;
76
+ width : 600px;
77
+ display : block;
78
+ margin : 15px 0 25px 0;
79
  }
80
 
81
  #cboxLoadedContent {
82
+ margin-bottom : 60px !important;
83
  }
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -102,7 +102,7 @@
102
  line-height : 27px;
103
  }
104
 
105
- .yith-plugin-fw textarea {
106
  width : 400px;
107
  max-width : 100%;
108
  padding : 5px;
@@ -191,19 +191,19 @@ ul.yit-icons-manager-list li.active {
191
  }
192
 
193
  /* ------- Image Gallery ------- */
194
- .yith-plugin-fw .image-gallery ul li {
195
  display : inline-block;
196
  width : 80px;
197
  margin-left : 10px;
198
  position : relative;
199
  }
200
 
201
- .yith-plugin-fw .image-gallery ul li img {
202
  width : 80px;
203
  border : 1px solid #ccc;
204
  }
205
 
206
- .yith-plugin-fw .image-gallery ul li ul {
207
  position : absolute;
208
  top : -6px;
209
  right : -1px;
@@ -211,7 +211,7 @@ ul.yit-icons-manager-list li.active {
211
  height : 20px;
212
  }
213
 
214
- .yith-plugin-fw .image-gallery ul a.delete {
215
  background : url(../images/x.png) no-repeat;
216
  width : 20px;
217
  height : 20px;
@@ -822,8 +822,7 @@ YITH UI
822
 
823
  .yith-plugin-ui h2 {
824
  color : #2a8db0;
825
- font-size : 15px;
826
- text-transform : uppercase;
827
  border : 1px solid #d8d8d8;
828
  border-bottom : 0;
829
  background-color : #fff;
@@ -888,7 +887,7 @@ YITH UI
888
  /*** General Input Style ***/
889
 
890
  .yith-plugin-ui .yith-plugin-fw select,
891
- .yith-plugin-ui textarea,
892
  .yith-plugin-ui input[type=number],
893
  .yith-plugin-ui.metaboxes-tab input[type=number],
894
  .yith-plugin-ui input[type=text],
@@ -899,7 +898,7 @@ YITH UI
899
  .yith-plugin-fw.yith-plugin-ui input[type=text]:not(.select2-search__field),
900
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text]:not(.select2-search__field),
901
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table select,
902
- .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea,
903
  .woocommerce .yith-plugin-fw table.form-table input[type=password],
904
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number],
905
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text] {
@@ -912,9 +911,10 @@ YITH UI
912
  color : #716269;
913
  }
914
 
915
- .yith-plugin-ui textarea,
916
- .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea {
917
- height : auto;
 
918
  }
919
 
920
  .yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
@@ -938,10 +938,6 @@ YITH UI
938
  border : 1px solid #d9d9d9;
939
  }
940
 
941
- .yith-plugin-ui textarea {
942
- height : auto;
943
- padding : 8px;
944
- }
945
 
946
  .yith-plugin-ui select:focus,
947
  .yith-plugin-ui input:focus {
@@ -949,6 +945,7 @@ YITH UI
949
  }
950
 
951
  .woocommerce .yith-plugin-ui table.form-table select,
 
952
  .yith-plugin-ui select {
953
  -webkit-appearance : none;
954
  line-height : 1.2em;
@@ -956,7 +953,7 @@ YITH UI
956
  background : url("../images/arrow_down.svg") no-repeat right center;
957
  background-size : 35px 13px;
958
  border-radius : 8px;
959
- padding-left : 10px;
960
  }
961
 
962
  .yith-plugin-ui .form-table th {
@@ -1737,14 +1734,14 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1737
  border : 1px solid #d9d9d9;
1738
  }
1739
 
1740
- .yith-plugin-ui .yith-single-colorpicker {
1741
- display : inline-block;
1742
- width : 220px;
1743
- margin-top: 20px;
1744
  }
1745
 
1746
- .yith-plugin-ui .yith-single-colorpicker:nth-child(-n+3) {
1747
- margin-top: 0;
 
 
1748
  }
1749
 
1750
  .yith-plugin-ui .yith-single-colorpicker > label {
@@ -2037,21 +2034,27 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2037
  padding-left : 0;
2038
  }
2039
 
 
 
 
 
 
 
 
 
 
2040
  .yith-plugin-ui .yith-plugin-fw-list-table h2 {
2041
  border : 0;
2042
- padding : 35px 0 15px;
2043
  display : inline-block;
2044
  margin-right : 10px;
 
2045
  }
2046
 
2047
  .yith-plugin-ui .form-table .yith-plugin-fw-list-table table th {
2048
  vertical-align : middle;
2049
  }
2050
 
2051
- .yith-plugin-ui .yith-plugin-fw-list-table-container {
2052
- padding : 0 20px;
2053
- }
2054
-
2055
  .yith-plugin-ui #doaction, .yith-plugin-ui #doaction2,
2056
  .yith-plugin-ui #post-query-submit,
2057
  .yith-plugin-ui #search-submit,
@@ -2213,6 +2216,7 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2213
  margin : 0;
2214
  align-items : flex-end;
2215
  max-width : 400px;
 
2216
  }
2217
 
2218
  .yith-plugin-fw-dimensions__dimension {
@@ -2222,7 +2226,8 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2222
 
2223
  .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2224
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2225
- .yith-plugin-ui .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number {
 
2226
  width : 100%;
2227
  min-width : 0;
2228
  border-radius : 0;
@@ -2235,7 +2240,8 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2235
 
2236
  .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2237
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2238
- .yith-plugin-ui .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
 
2239
  border-left : 1px solid #d8d8d8;
2240
  border-radius : 6px 0 0 6px;
2241
  }
102
  line-height : 27px;
103
  }
104
 
105
+ .yith-plugin-fw textarea:not(.wp-editor-area) {
106
  width : 400px;
107
  max-width : 100%;
108
  padding : 5px;
191
  }
192
 
193
  /* ------- Image Gallery ------- */
194
+ .yith-plugin-fw .yith-plugin-fw-image-gallery ul li {
195
  display : inline-block;
196
  width : 80px;
197
  margin-left : 10px;
198
  position : relative;
199
  }
200
 
201
+ .yith-plugin-fw .yith-plugin-fw-image-gallery ul li img {
202
  width : 80px;
203
  border : 1px solid #ccc;
204
  }
205
 
206
+ .yith-plugin-fw .yith-plugin-fw-image-gallery ul li ul {
207
  position : absolute;
208
  top : -6px;
209
  right : -1px;
211
  height : 20px;
212
  }
213
 
214
+ .yith-plugin-fw .yith-plugin-fw-image-gallery ul a.delete {
215
  background : url(../images/x.png) no-repeat;
216
  width : 20px;
217
  height : 20px;
822
 
823
  .yith-plugin-ui h2 {
824
  color : #2a8db0;
825
+ font-size : 16px;
 
826
  border : 1px solid #d8d8d8;
827
  border-bottom : 0;
828
  background-color : #fff;
887
  /*** General Input Style ***/
888
 
889
  .yith-plugin-ui .yith-plugin-fw select,
890
+ .yith-plugin-ui textarea:not(.wp-editor-area),
891
  .yith-plugin-ui input[type=number],
892
  .yith-plugin-ui.metaboxes-tab input[type=number],
893
  .yith-plugin-ui input[type=text],
898
  .yith-plugin-fw.yith-plugin-ui input[type=text]:not(.select2-search__field),
899
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text]:not(.select2-search__field),
900
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table select,
901
+ .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area),
902
  .woocommerce .yith-plugin-fw table.form-table input[type=password],
903
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=number],
904
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text] {
911
  color : #716269;
912
  }
913
 
914
+ .yith-plugin-ui textarea:not(.wp-editor-area),
915
+ .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table textarea:not(.wp-editor-area) {
916
+ height : auto;
917
+ padding : 8px;
918
  }
919
 
920
  .yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
938
  border : 1px solid #d9d9d9;
939
  }
940
 
 
 
 
 
941
 
942
  .yith-plugin-ui select:focus,
943
  .yith-plugin-ui input:focus {
945
  }
946
 
947
  .woocommerce .yith-plugin-ui table.form-table select,
948
+ .woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table select,
949
  .yith-plugin-ui select {
950
  -webkit-appearance : none;
951
  line-height : 1.2em;
953
  background : url("../images/arrow_down.svg") no-repeat right center;
954
  background-size : 35px 13px;
955
  border-radius : 8px;
956
+ padding-right : 30px;
957
  }
958
 
959
  .yith-plugin-ui .form-table th {
1734
  border : 1px solid #d9d9d9;
1735
  }
1736
 
1737
+ .yith-plugin-ui .yith-plugin-fw-multi-colorpicker {
1738
+ margin-top : -20px;
 
 
1739
  }
1740
 
1741
+ .yith-plugin-ui .yith-single-colorpicker {
1742
+ display : inline-block;
1743
+ width : 220px;
1744
+ margin-top : 20px;
1745
  }
1746
 
1747
  .yith-plugin-ui .yith-single-colorpicker > label {
2034
  padding-left : 0;
2035
  }
2036
 
2037
+ .yith-plugin-ui .yith-plugin-fw-list-table .list-table-title {
2038
+ margin-bottom : 20px;
2039
+ line-height : 1.2;
2040
+ }
2041
+
2042
+ .yith-plugin-ui .yith-plugin-fw-list-table .list-table-title > * {
2043
+ vertical-align : middle;
2044
+ }
2045
+
2046
  .yith-plugin-ui .yith-plugin-fw-list-table h2 {
2047
  border : 0;
2048
+ padding : 0;
2049
  display : inline-block;
2050
  margin-right : 10px;
2051
+ line-height : inherit;
2052
  }
2053
 
2054
  .yith-plugin-ui .form-table .yith-plugin-fw-list-table table th {
2055
  vertical-align : middle;
2056
  }
2057
 
 
 
 
 
2058
  .yith-plugin-ui #doaction, .yith-plugin-ui #doaction2,
2059
  .yith-plugin-ui #post-query-submit,
2060
  .yith-plugin-ui #search-submit,
2216
  margin : 0;
2217
  align-items : flex-end;
2218
  max-width : 400px;
2219
+ width : 400px;
2220
  }
2221
 
2222
  .yith-plugin-fw-dimensions__dimension {
2226
 
2227
  .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2228
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2229
+ .yith-plugin-ui .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2230
+ .woocommerce .yith-plugin-fw table.form-table .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number {
2231
  width : 100%;
2232
  min-width : 0;
2233
  border-radius : 0;
2240
 
2241
  .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2242
  .woocommerce.yith-plugin-fw-panel .yith-plugin-ui .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2243
+ .yith-plugin-ui .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number,
2244
+ .woocommerce .yith-plugin-fw table.form-table .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
2245
  border-left : 1px solid #d8d8d8;
2246
  border-radius : 6px 0 0 6px;
2247
  }
plugin-fw/assets/js/metabox.js CHANGED
@@ -8,59 +8,59 @@
8
  */
9
  ( function ( $ ) {
10
 
11
- $( '.metaboxes-tab' ).each( function () {
12
- $( '.tabs-panel', this ).hide();
13
-
14
- var active_tab = wpCookies.get( 'active_metabox_tab' );
15
- if ( active_tab == null ) {
16
- active_tab = $( 'ul.metaboxes-tabs li:first-child a', this ).attr( 'href' );
17
- } else {
18
- active_tab = '#' + active_tab;
19
- }
20
-
21
- $( active_tab ).show();
22
-
23
- $( '.metaboxes-tabs a', this ).click( function ( e ) {
24
- if ( $( this ).parent().hasClass( 'tabs' ) ) {
25
- e.preventDefault();
26
- return;
27
- }
28
-
29
- var t = $( this ).attr( 'href' );
30
- $( this ).parent().addClass( 'tabs' ).siblings( 'li' ).removeClass( 'tabs' );
31
- $( this ).closest( '.metaboxes-tab' ).find( '.tabs-panel' ).hide();
32
- $( t ).show();
33
-
34
- return false;
35
- } );
36
- } );
37
-
38
- var act_page_option = $( '#_active_page_options-container' ).parent().html();
39
- $( '#_active_page_options-container' ).parent().remove();
40
- $( act_page_option ).insertAfter( '#yit-post-setting .handlediv' );
41
- $( act_page_option ).insertAfter( '#yit-page-setting .handlediv' );
42
-
43
-
44
- $( '#_active_page_options-container' ).on( 'click', function () {
45
- if ( $( '#_active_page_options' ).is( ":checked" ) ) {
46
- $( '#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab' ).css( {
47
- 'opacity' : 1,
48
- 'pointer-events': 'auto'
49
- } );
50
- } else {
51
- $( '#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab' ).css( {
52
- 'opacity' : 0.5,
53
- 'pointer-events': 'none'
54
- } );
55
- }
56
- } ).click();
57
-
58
-
59
- //dependencies handler
60
- $( document.body ).on( 'yith-plugin-fw-metabox-init-deps', function () {
61
- $( document.body ).trigger( 'yith-plugin-fw-init-radio' );
62
- $( '.metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)' ).each( function () {
63
- var t = $( this );
64
 
65
  var field = '#' + t.data( 'dep-target' ),
66
  dep = '#' + t.data( 'dep-id' ),
@@ -68,112 +68,101 @@
68
  type = t.data( 'dep-type' );
69
 
70
 
71
- dependencies_handler( field, dep, value.toString(), type );
72
 
73
  $( dep ).on( 'change', function () {
74
  dependencies_handler( field, dep, value.toString(), type );
75
  } ).change();
76
 
77
- t.addClass( 'yith-plugin-fw-metabox-deps-initialized' );
78
- } );
79
- } ).trigger( 'yith-plugin-fw-metabox-init-deps' );
80
-
81
- //Handle dependencies.
82
- function dependencies_handler( id, deps, values, type ) {
83
- var result = true;
84
-
85
-
86
- //Single dependency
87
- if ( typeof ( deps ) == 'string' ) {
88
- if ( deps.substr( 0, 6 ) == ':radio' ) {
89
- deps = deps + ':checked';
90
- }
91
-
92
- var val = $( deps ).val();
93
-
94
- if ( $( deps ).attr( 'type' ) == 'checkbox' ) {
95
- var thisCheck = $( deps );
96
- if ( thisCheck.is( ':checked' ) ) {
97
- val = 'yes';
98
- } else {
99
- val = 'no';
100
- }
101
- }
102
-
103
- values = values.split( ',' );
104
-
105
- for ( var i = 0; i < values.length; i++ ) {
106
- if ( val != values[ i ] ) {
107
- result = false;
108
- } else {
109
- result = true;
110
- break;
111
- }
112
- }
113
- }
114
-
115
- var $current_field = $( id ),
116
- $current_container = $( id + '-container' ).parent();
117
-
118
- var types = type.split( '-' ), j;
119
- for ( j in types ) {
120
- var current_type = types[ j ];
121
-
122
- if ( !result ) {
123
- switch ( current_type ) {
124
- case 'disable':
125
- $current_container.addClass( 'yith-disabled' );
126
- $current_field.attr( 'disabled', true );
127
- break;
128
- case 'hideNow':
129
- $current_container.hide();
130
- break;
131
- case 'hideme':
132
- $current_field.hide();
133
- break;
134
- case 'fadeInOut':
135
- case 'fadeOut':
136
- $current_container.hide( 500 );
137
- break;
138
- case 'fadeIn':
139
- $current_container.hide();
140
- break;
141
- default:
142
- if( ! $current_container.hasClass('fade-in')){
143
- $current_container.hide();
144
- $current_container.css({'opacity':'0'});
145
- }else{
146
- $current_container.fadeTo("slow" , 0, function(){
147
- $(this).hide().removeClass('fade-in');
148
- });
149
- }
150
- }
151
-
152
- } else {
153
- switch ( current_type ) {
154
- case 'disable':
155
- $current_container.removeClass( 'yith-disabled' );
156
- $current_field.attr( 'disabled', false );
157
- break;
158
- case 'hideNow':
159
- $current_container.show();
160
- break;
161
- case 'hideme':
162
- $current_field.show();
163
- break;
164
- case 'fadeInOut':
165
- case 'fadeIn':
166
- $current_container.show( 500 );
167
- break;
168
- case 'fadeOut':
169
- $current_container.show();
170
- break;
171
- default:
172
- $current_container.show();
173
- $current_container.fadeTo("slow" , 1).addClass('fade-in');
174
- }
175
- }
176
- }
177
- }
178
 
179
  } )( jQuery );
8
  */
9
  ( function ( $ ) {
10
 
11
+ $( '.metaboxes-tab' ).each( function () {
12
+ $( '.tabs-panel', this ).hide();
13
+
14
+ var active_tab = wpCookies.get( 'active_metabox_tab' );
15
+ if ( active_tab == null ) {
16
+ active_tab = $( 'ul.metaboxes-tabs li:first-child a', this ).attr( 'href' );
17
+ } else {
18
+ active_tab = '#' + active_tab;
19
+ }
20
+
21
+ $( active_tab ).show();
22
+
23
+ $( '.metaboxes-tabs a', this ).click( function ( e ) {
24
+ if ( $( this ).parent().hasClass( 'tabs' ) ) {
25
+ e.preventDefault();
26
+ return;
27
+ }
28
+
29
+ var t = $( this ).attr( 'href' );
30
+ $( this ).parent().addClass( 'tabs' ).siblings( 'li' ).removeClass( 'tabs' );
31
+ $( this ).closest( '.metaboxes-tab' ).find( '.tabs-panel' ).hide();
32
+ $( t ).show();
33
+
34
+ return false;
35
+ } );
36
+ } );
37
+
38
+ var act_page_option = $( '#_active_page_options-container' ).parent().html();
39
+ $( '#_active_page_options-container' ).parent().remove();
40
+ $( act_page_option ).insertAfter( '#yit-post-setting .handlediv' );
41
+ $( act_page_option ).insertAfter( '#yit-page-setting .handlediv' );
42
+
43
+
44
+ $( '#_active_page_options-container' ).on( 'click', function () {
45
+ if ( $( '#_active_page_options' ).is( ":checked" ) ) {
46
+ $( '#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab' ).css( {
47
+ 'opacity' : 1,
48
+ 'pointer-events': 'auto'
49
+ } );
50
+ } else {
51
+ $( '#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab' ).css( {
52
+ 'opacity' : 0.5,
53
+ 'pointer-events': 'none'
54
+ } );
55
+ }
56
+ } ).click();
57
+
58
+
59
+ //dependencies handler
60
+ $( document.body ).on( 'yith-plugin-fw-metabox-init-deps', function () {
61
+ $( document.body ).trigger( 'yith-plugin-fw-init-radio' );
62
+ $( '.metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)' ).each( function () {
63
+ var t = $( this );
64
 
65
  var field = '#' + t.data( 'dep-target' ),
66
  dep = '#' + t.data( 'dep-id' ),
68
  type = t.data( 'dep-type' );
69
 
70
 
71
+ dependencies_handler( field, dep, value.toString(), type );
72
 
73
  $( dep ).on( 'change', function () {
74
  dependencies_handler( field, dep, value.toString(), type );
75
  } ).change();
76
 
77
+ t.addClass( 'yith-plugin-fw-metabox-deps-initialized' );
78
+ } );
79
+ } ).trigger( 'yith-plugin-fw-metabox-init-deps' );
80
+
81
+ //Handle dependencies.
82
+ function dependencies_handler( id, deps, values, type ) {
83
+ var result = true;
84
+
85
+
86
+ //Single dependency
87
+ if ( typeof ( deps ) == 'string' ) {
88
+ if ( deps.substr( 0, 6 ) == ':radio' ) {
89
+ deps = deps + ':checked';
90
+ }
91
+
92
+ var val = $( deps ).val();
93
+
94
+ if ( $( deps ).attr( 'type' ) == 'checkbox' ) {
95
+ var thisCheck = $( deps );
96
+ if ( thisCheck.is( ':checked' ) ) {
97
+ val = 'yes';
98
+ } else {
99
+ val = 'no';
100
+ }
101
+ }
102
+
103
+ values = values.split( ',' );
104
+
105
+ for ( var i = 0; i < values.length; i++ ) {
106
+ if ( val != values[ i ] ) {
107
+ result = false;
108
+ } else {
109
+ result = true;
110
+ break;
111
+ }
112
+ }
113
+ }
114
+
115
+ var $current_field = $( id ),
116
+ $current_container = $( id + '-container' ).parent();
117
+
118
+ var types = type.split( '-' ), j;
119
+ for ( j in types ) {
120
+ var current_type = types[ j ];
121
+
122
+ if ( !result ) {
123
+ switch ( current_type ) {
124
+ case 'disable':
125
+ $current_container.addClass( 'yith-disabled' );
126
+ $current_field.attr( 'disabled', true );
127
+ break;
128
+ case 'hide':
129
+ case 'hideNow':
130
+ $current_container.hide();
131
+ break;
132
+ case 'hideme':
133
+ $current_field.hide();
134
+ break;
135
+ case 'fadeInOut':
136
+ case 'fadeOut':
137
+ $current_container.hide( 500 );
138
+ break;
139
+ case 'fadeIn':
140
+ default:
141
+ $current_container.hide();
142
+ }
143
+ } else {
144
+ switch ( current_type ) {
145
+ case 'disable':
146
+ $current_container.removeClass( 'yith-disabled' );
147
+ $current_field.attr( 'disabled', false );
148
+ break;
149
+ case 'hide':
150
+ case 'hideNow':
151
+ $current_container.show();
152
+ break;
153
+ case 'hideme':
154
+ $current_field.show();
155
+ break;
156
+ case 'fadeOut':
157
+ $current_container.show();
158
+ break;
159
+ case 'fadeInOut':
160
+ case 'fadeIn':
161
+ default:
162
+ $current_container.show( 500 );
163
+ }
164
+ }
165
+ }
166
+ }
 
 
 
 
 
 
 
 
 
 
 
167
 
168
  } )( jQuery );
plugin-fw/assets/js/metabox.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(".metaboxes-tab").each(function(){e(".tabs-panel",this).hide();var t=wpCookies.get("active_metabox_tab");t=null==t?e("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+t,e(t).show(),e(".metaboxes-tabs a",this).click(function(t){if(!e(this).parent().hasClass("tabs")){var a=e(this).attr("href");return e(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),e(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),e(a).show(),!1}t.preventDefault()})});var t=e("#_active_page_options-container").parent().html();function a(t,a,i,s){var n=!0;if("string"==typeof a){":radio"==a.substr(0,6)&&(a+=":checked");var o=e(a).val();if("checkbox"==e(a).attr("type"))o=e(a).is(":checked")?"yes":"no";i=i.split(",");for(var d=0;d<i.length;d++){if(o==i[d]){n=!0;break}n=!1}}var r,c=e(t),h=e(t+"-container").parent(),b=s.split("-");for(r in b){var l=b[r];if(n)switch(l){case"disable":h.removeClass("yith-disabled"),c.attr("disabled",!1);break;case"hideNow":h.show();break;case"hideme":c.show();break;case"fadeInOut":case"fadeIn":h.show(500);break;case"fadeOut":h.show();break;default:h.show(),h.fadeTo("slow",1).addClass("fade-in")}else switch(l){case"disable":h.addClass("yith-disabled"),c.attr("disabled",!0);break;case"hideNow":h.hide();break;case"hideme":c.hide();break;case"fadeInOut":case"fadeOut":h.hide(500);break;case"fadeIn":h.hide();break;default:h.hasClass("fade-in")?h.fadeTo("slow",0,function(){e(this).hide().removeClass("fade-in")}):(h.hide(),h.css({opacity:"0"}))}}}e("#_active_page_options-container").parent().remove(),e(t).insertAfter("#yit-post-setting .handlediv"),e(t).insertAfter("#yit-page-setting .handlediv"),e("#_active_page_options-container").on("click",function(){e("#_active_page_options").is(":checked")?e("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):e("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,"pointer-events":"none"})}).click(),e(document.body).on("yith-plugin-fw-metabox-init-deps",function(){e(document.body).trigger("yith-plugin-fw-init-radio"),e(".metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)").each(function(){var t=e(this),i="#"+t.data("dep-target"),s="#"+t.data("dep-id"),n=t.data("dep-value"),o=t.data("dep-type");a(i,s,n.toString(),o),e(s).on("change",function(){a(i,s,n.toString(),o)}).change(),t.addClass("yith-plugin-fw-metabox-deps-initialized")})}).trigger("yith-plugin-fw-metabox-init-deps")}(jQuery);
1
+ !function(e){e(".metaboxes-tab").each(function(){e(".tabs-panel",this).hide();var t=wpCookies.get("active_metabox_tab");t=null==t?e("ul.metaboxes-tabs li:first-child a",this).attr("href"):"#"+t,e(t).show(),e(".metaboxes-tabs a",this).click(function(t){if(!e(this).parent().hasClass("tabs")){var a=e(this).attr("href");return e(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),e(this).closest(".metaboxes-tab").find(".tabs-panel").hide(),e(a).show(),!1}t.preventDefault()})});var t=e("#_active_page_options-container").parent().html();function a(t,a,i,s){var n=!0;if("string"==typeof a){":radio"==a.substr(0,6)&&(a+=":checked");var o=e(a).val();if("checkbox"==e(a).attr("type"))o=e(a).is(":checked")?"yes":"no";i=i.split(",");for(var d=0;d<i.length;d++){if(o==i[d]){n=!0;break}n=!1}}var r,c=e(t),h=e(t+"-container").parent(),b=s.split("-");for(r in b){var p=b[r];if(n)switch(p){case"disable":h.removeClass("yith-disabled"),c.attr("disabled",!1);break;case"hide":case"hideNow":h.show();break;case"hideme":c.show();break;case"fadeOut":h.show();break;case"fadeInOut":case"fadeIn":default:h.show(500)}else switch(p){case"disable":h.addClass("yith-disabled"),c.attr("disabled",!0);break;case"hide":case"hideNow":h.hide();break;case"hideme":c.hide();break;case"fadeInOut":case"fadeOut":h.hide(500);break;case"fadeIn":default:h.hide()}}}e("#_active_page_options-container").parent().remove(),e(t).insertAfter("#yit-post-setting .handlediv"),e(t).insertAfter("#yit-page-setting .handlediv"),e("#_active_page_options-container").on("click",function(){e("#_active_page_options").is(":checked")?e("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:1,"pointer-events":"auto"}):e("#yit-page-setting .inside .metaboxes-tab, #yit-post-setting .inside .metaboxes-tab").css({opacity:.5,"pointer-events":"none"})}).click(),e(document.body).on("yith-plugin-fw-metabox-init-deps",function(){e(document.body).trigger("yith-plugin-fw-init-radio"),e(".metaboxes-tab [data-dep-target]:not(.yith-plugin-fw-metabox-deps-initialized)").each(function(){var t=e(this),i="#"+t.data("dep-target"),s="#"+t.data("dep-id"),n=t.data("dep-value"),o=t.data("dep-type");a(i,s,n.toString(),o),e(s).on("change",function(){a(i,s,n.toString(),o)}).change(),t.addClass("yith-plugin-fw-metabox-deps-initialized")})}).trigger("yith-plugin-fw-metabox-init-deps")}(jQuery);
plugin-fw/assets/js/select2/select2.min.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Select2 4.0.3
3
+ * https://select2.github.io
4
+ *
5
+ * Released under the MIT license
6
+ * https://github.com/select2/select2/blob/master/LICENSE.md
7
+ */
8
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)t=e.fn.select2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};/**
9
+ * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
10
+ * Available via the MIT or new BSD license.
11
+ * see: http://github.com/jrburke/almond for details
12
+ */
13
+ var e,n,i;!function(t){function r(e,t){return $.call(e,t)}function s(e,t){var n,i,r,s,o,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(o=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[o])&&(e[o]=e[o].replace(b,"")),e=h.slice(0,h.length-1).concat(e),u=0;u<e.length;u+=1)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(1===u&&(".."===e[2]||".."===e[0]))break;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||g)&&f){for(u=(n=e.split("/")).length;u>0;u-=1){if(i=n.slice(0,u).join("/"),h)for(d=h.length;d>0;d-=1)if((r=f[h.slice(0,d).join("/")])&&(r=r[i])){s=r,a=u;break}if(s)break;!l&&g&&g[i]&&(l=g[i],c=u)}!s&&l&&(s=l,a=c),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function o(e,n){return function(){var i=w.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),h.apply(t,i.concat([e,n]))}}function a(e){return function(t){return s(t,e)}}function l(e){return function(t){m[e]=t}}function c(e){if(r(v,e)){var n=v[e];delete v[e],_[e]=!0,p.apply(t,n)}if(!r(m,e)&&!r(_,e))throw new Error("No "+e);return m[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function d(e){return function(){return y&&y.config&&y.config[e]||{}}}var p,h,f,g,m={},v={},y={},_={},$=Object.prototype.hasOwnProperty,w=[].slice,b=/\.js$/;f=function(e,t){var n,i=u(e),r=i[0];return e=i[1],r&&(n=c(r=s(r,t))),r?e=n&&n.normalize?n.normalize(e,a(t)):s(e,t):(r=(i=u(e=s(e,t)))[0],e=i[1],r&&(n=c(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},g={require:function(e){return o(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:d(e)}}},p=function(e,n,i,s){var a,u,d,p,h,y,$=[],w=typeof i;if(s=s||e,"undefined"===w||"function"===w){for(n=!n.length&&i.length?["require","exports","module"]:n,h=0;h<n.length;h+=1)if(p=f(n[h],s),"require"===(u=p.f))$[h]=g.require(e);else if("exports"===u)$[h]=g.exports(e),y=!0;else if("module"===u)a=$[h]=g.module(e);else if(r(m,u)||r(v,u)||r(_,u))$[h]=c(u);else{if(!p.p)throw new Error(e+" missing "+u);p.p.load(p.n,o(s,!0),l(u),{}),$[h]=m[u]}d=i?i.apply(m[e],$):undefined,e&&(a&&a.exports!==t&&a.exports!==m[e]?m[e]=a.exports:d===t&&y||(m[e]=d))}else e&&(m[e]=i)},e=n=h=function(e,n,i,r,s){if("string"==typeof e)return g[e]?g[e](n):c(f(e,n).f);if(!e.splice){if((y=e).deps&&h(y.deps,y.callback),!n)return;n.splice?(e=n,n=i,i=null):e=t}return n=n||function(){},"function"==typeof i&&(i=r,r=s),r?p(t,e,n,i):setTimeout(function(){p(t,e,n,i)},4),h},h.config=function(e){return h(e)},e._defined=m,(i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),r(m,e)||r(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=i}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var i in t)"function"==typeof t[i]&&"constructor"!==i&&n.push(i);return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var r in t)i.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function i(){var t=Array.prototype.unshift,i=n.prototype.constructor.length,r=e.prototype.constructor;i>0&&(t.call(arguments,e.prototype.constructor),r=n.prototype.constructor),r.apply(this,arguments)}var r=t(n),s=t(e);n.displayName=e.displayName,i.prototype=new function(){this.constructor=i};for(var o=0;o<s.length;o++){var a=s[o];i.prototype[a]=e.prototype[a]}for(var l=0;l<r.length;l++){var c=r[l];i.prototype[c]=function(e){var t=function(){};e in i.prototype&&(t=i.prototype[e]);var r=n.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),r.apply(this,arguments)}}(c)}return i};var i=function(){this.listeners={}};return i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},n.Observable=i,n.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},n.bind=function(e,t){return function(){e.apply(t,arguments)}},n._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var s=n[r];(s=s.substring(0,1).toLowerCase()+s.substring(1))in i||(i[s]={}),r==n.length-1&&(i[s]=e[t]),i=i[s]}delete e[t]}}return e},n.hasScroll=function(t,n){var i=e(n),r=n.style.overflowX,s=n.style.overflowY;return(r!==s||"hidden"!==s&&"visible"!==s)&&("scroll"===r||"scroll"===s||(i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth))},n.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},n}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var i=e.map(n,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var t=e(this),n=e.data(this,"data"),r=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(r,i)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]);for(var r in i){var s=i[r];n.setAttribute(r,s)}if(t.children){var o=e(n),a=document.createElement("strong");a.className="select2-results__group";e(a);this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var u=t.children[c],d=this.option(u);l.push(d)}var p=e("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});p.append(l),o.append(a),o.append(p)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this,r=t.id+"-results";this.$results.attr("id",r),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var r=n-1;0===e.length&&(r=0);var s=t.eq(r);s.trigger("mouseenter");var o=i.$results.offset().top,a=s.offset().top,l=i.$results.scrollTop()+(a-o);0===r?i.$results.scrollTop(0):a-o<0&&i.$results.scrollTop(l)}}),t.on("results:next",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),a=i.$results.scrollTop()+o-s;0===n?i.$results.scrollTop(0):o>s&&i.$results.scrollTop(a)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,r=e.deltaY>0&&t-e.deltaY<=0,s=e.deltaY<0&&n<=i.$results.height();r?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):s&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var n=e(this),r=n.data("data");"true"!==n.attr("aria-selected")?i.trigger("select",{originalEvent:t,data:r}):i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:r}):i.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),s=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),s=i(t,n);null==s?n.style.display="none":"string"==typeof s?n.innerHTML=r(s):e(n).append(s)},n}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,r=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),e.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,function(t){var n=e(t.target).closest(".select2");e(".select2.select2-container--open").each(function(){var t=e(this);this!=n[0]&&t.data("element").select2("close")})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.focus()}),e.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,n){var r=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!r.options.get("disabled")){var n=e(this).parent().data("data");r.trigger("unselect",{originalEvent:t,data:n})}})},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var r=e[i],s=this.selectionContainer(),o=this.display(r,s);s.append(o),s.prop("title",r.title||r.text),s.data("data",r),t.push(s)}var a=this.$selection.find(".select2-selection__rendered");n.appendMany(a,t)}},i}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),t.define("select2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),r=0;r<i.length;r++){var s={data:i[r]};if(this.trigger("unselect",s),s.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var i=e('<span class="select2-selection__clear">&times;</span>');i.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(i)}},n}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var r=this;e.call(this,t,i),t.on("open",function(){r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){r.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(t.length>0){var i=t.data("data");r.searchRemoveChoice(i),e.preventDefault()}}});var s=document.documentMode,o=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){o?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(o&&"input"===e.type)r.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&r.handleSearch(e)}})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";e=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",e)},i}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var r=this,s=["open","opening","close","closing","select","selecting","unselect","unselecting"],o=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,s)){n=n||{};var i=e.Event("select2:"+t,{params:n});r.$element.trigger(i),-1!==e.inArray(t,o)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),r=i.item(e);t.push(r)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var r=[];(e=[e]).push.apply(e,i);for(var s=0;s<e.length;s++){var o=e[s].id;-1===n.inArray(o,r)&&r.push(o)}t.$element.val(r),t.$element.trigger("change")});else{var i=e.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,n(e.element).is("option"))return e.element.selected=!1,void this.$element.trigger("change");this.current(function(i){for(var r=[],s=0;s<i.length;s++){var o=i[s].id;o!==e.id&&-1===n.inArray(o,r)&&r.push(o)}t.$element.val(r),t.$element.trigger("change")})}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(e,t){var i=[],r=this;this.$element.children().each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var s=r.item(t),o=r.matches(e,s);null!==o&&i.push(o)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:(t=document.createElement("option")).textContent!==undefined?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var i=n(t),r=this._normalizeItem(e);return r.element=t,n.data(t,"data",r),i},i.prototype.item=function(e){var t={};if(null!=(t=n.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var i=e.children("option"),r=[],s=0;s<i.length;s++){var o=n(i[s]),a=this.item(o);r.push(a)}t.children=r}return t=this._normalizeItem(t),t.element=e[0],n.data(e[0],"data",t),t},i.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e});var t={selected:!1,disabled:!1};return null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){for(var i=this,r=this.$element.find("option"),s=r.map(function(){return i.item(n(this)).id}).get(),o=[],a=0;a<e.length;a++){var l=this._normalizeItem(e[a]);if(n.inArray(l.id,s)>=0){var c=r.filter(function(e){return function(){return n(this).val()==e.id}}(l)),u=this.item(c),d=n.extend(!0,{},l,u),p=this.option(d);c.replaceWith(p)}else{var h=this.option(l);if(l.children){var f=this.convertToOptions(l.children);t.appendMany(h,f)}o.push(h)}}return o},i}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var r=n.ajax(e);return r.then(t),r.fail(i),r}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){function i(){var i=s.transport(s,function(i){var s=r.processResults(i,e);r.options.get("debug")&&window.console&&console.error&&(s&&s.results&&n.isArray(s.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(s)},function(){i.status&&"0"===i.status||r.trigger("results:message",{message:"errorLoading"})});r._request=i}var r=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var s=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof s.url&&(s.url=s.url.call(this.$element,e)),"function"==typeof s.data&&(s.data=s.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,i){var r=i.get("tags"),s=i.get("createTag");s!==undefined&&(this.createTag=s);var o=i.get("insertTag");if(o!==undefined&&(this.insertTag=o),t.call(this,n,i),e.isArray(r))for(var a=0;a<r.length;a++){var l=r[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return t.prototype.query=function(e,t,n){function i(e,s){for(var o=e.results,a=0;a<o.length;a++){var l=o[a],c=null!=l.children&&!i({results:l.children},!0);if(l.text===t.term||c)return!s&&(e.data=o,void n(e))}if(s)return!0;var u=r.createTag(t);if(null!=u){var d=r.option(u);d.attr("data-select2-tag",!0),r.addOptions([d]),r.insertTag(o,u)}e.results=o,n(e)}var r=this;this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,i):e.call(this,t,n)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");i!==undefined&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){function r(e){s.trigger("select",{data:e})}var s=this;n.term=n.term||"";var o=this.tokenizer(n,this.options,function(t){var n=s._normalizeItem(t);if(!s.$element.find("option").filter(function(){return e(this).val()===n.id}).length){var i=s.option(n);i.attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([i])}r(n)});o.term!==n.term&&(this.$search.length&&(this.$search.val(o.term),this.$search.focus()),n.term=o.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,r){for(var s=i.get("tokenSeparators")||[],o=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<o.length;){var c=o[a];if(-1!==e.inArray(c,s)){var u=o.substr(0,a),d=l(e.extend({},n,{term:u}));null!=d?(r(d),o=o.substr(a+1)||"",a=0):a++}else a++}return{term:o}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var i=this;this.current(function(r){var s=null!=r?r.length:0;i.maximumSelectionLength>0&&s>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e.call(i,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var r=this;t.call(this,n,i),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),n.on("open",function(){r.$search.attr("tabindex",0),r.$search.focus(),window.setTimeout(function(){r.$search.focus()},0)}),n.on("close",function(){r.$search.attr("tabindex",-1),r.$search.val("")}),n.on("focus",function(){n.isOpen()&&r.$search.focus()}),n.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var r=this;t.call(this,n,i),n.on("query",function(e){r.lastParams=e,r.loading=!0}),n.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,r.$loadingMore[0]);!r.loading&&t&&r.$results.offset().top+r.$results.outerHeight(!1)+50>=r.$loadingMore.offset().top+r.$loadingMore.outerHeight(!1)&&r.loadMore()})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var r=this,s="scroll.select2."+i.id,o="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(s,function(t){var n=e(this).data("select2-scroll-position");e(this).scrollTop(n.y)}),e(window).on(s+" "+o+" "+a,function(e){r._positionDropdown(),r._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,s="resize.select2."+i.id,o="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+s+" "+o)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),r=null,s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=s.top,o.bottom=s.top+o.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<s.top-a.height,u=l.bottom>s.bottom+a.height,d={left:s.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();d.top-=h.top,d.left-=h.left,n||i||(r="below"),u||!c||n?!c&&u&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(d.top=o.top-h.top-a.height),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}function t(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=Infinity),e.call(this,t,n,i)}return t.prototype.showSearch=function(t,n){return!(e(n.data.results)<this.minimumResultsForSearch)&&t.call(this,n)},t}),t.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=i.data("data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,i,r,s,o,a,l,c,u,d,p,h,f,g,m,v,y,_,$,w,b,A,x,E,C,O,S){function T(){this.reset()}return T.prototype.apply=function(d){if(null==(d=e.extend(!0,{},this.defaults,d)).dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=h:d.dataAdapter=p,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,_)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null!=d.query){var S=t(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,S)}if(null!=d.initSelection){var T=t(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,T)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,A)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,b)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,C))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=$;else{var D=c.Decorate($,w);d.dropdownAdapter=D}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,E)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,O)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var q=t(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,q)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,x)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=r:d.selectionAdapter=i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,o)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var L=t(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,L)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var j=d.language.split("-")[0];d.language=[d.language,j]}else d.language=[d.language];if(e.isArray(d.language)){var P=new u;d.language.push("en");for(var k=d.language,I=0;I<k.length;I++){var R=k[I],M={};try{M=u.loadPath(R)}catch(z){try{R=this.defaults.amdLanguageBase+R,M=u.loadPath(R)}catch(N){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+R+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(M)}d.translations=P}else{var U=u.loadPath(this.defaults.amdLanguageBase+"en"),H=new u(d.language);H.extend(U),d.translations=H}return d},T.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return d[e]||e})}function n(i,r){if(""===e.trim(i.term))return r;if(r.children&&r.children.length>0){for(var s=e.extend(!0,{},r),o=r.children.length-1;o>=0;o--)null==n(i,r.children[o])&&s.children.splice(o,1);return s.children.length>0?s:n(i,s)}var a=t(r.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?r:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:S,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},T.prototype.set=function(t,n){var i={};i[e.camelCase(t)]=n;var r=c._convertData(i);e.extend(this.defaults,r)},new T}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function r(t,r){if(this.options=t,null!=r&&this.fromElement(r),this.options=n.apply(this.options),r&&r.is("input")){var s=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,s)}}return r.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var r={};r=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var s=t.extend(!0,{},r);s=i._convertData(s);for(var o in s)t.inArray(o,n)>-1||(t.isPlainObject(this.options[o])?t.extend(this.options[o],s[o]):this.options[o]=s[o]);return this},r.prototype.get=function(e){return this.options[e]},r.prototype.set=function(e,t){this.options[e]=t},r}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var r=function(e,n){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new t(n,e),r.__super__.constructor.call(this);var i=e.attr("tabindex")||0;e.data("old-tabindex",i),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var o=this.render();this._placeContainer(o);var a=this.options.get("selectionAdapter");this.selection=new a(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,o);var l=this.options.get("dropdownAdapter");this.dropdown=new l(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,o);var c=this.options.get("resultsAdapter");this.results=new c(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){u.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return n.Extend(r,n.Observable),r.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t=t.replace(/(:|\.|\[|\]|,)/g,""),t="select2-"+t},r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var s=e.attr("style");if("string"!=typeof s)return null;for(var o=s.split(";"),a=0,l=o.length;a<l;a+=1){var c=o[a].replace(/\s/g,"").match(n);if(null!==c&&c.length>=1)return c[1]}return null}return t},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){e.each(n,t._syncA),e.each(n,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},r.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,r){-1===e.inArray(i,n)&&t.trigger(i,r)})},r.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},r.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var r=0;r<t.addedNodes.length;r++)t.addedNodes[r].selected&&(n=!0);else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},r.prototype.trigger=function(e,t){var n=r.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(t===undefined&&(t={}),e in i){var s=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,s,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},r.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.trigger("query",{})},r.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},r.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},r.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},r.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},r.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},r.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},r}),t.define("jquery-mousewheel",["jquery"],function(e){return e}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,i){if(null==e.fn.select2){var r=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,s)}),e.inArray(t,r)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n});
plugin-fw/assets/js/yit-plugin-panel.js CHANGED
@@ -8,129 +8,122 @@
8
  */
9
 
10
  jQuery( function ( $ ) {
11
- // Handle dependencies.
12
- function dependencies_handler( id, deps, values, type ) {
13
- var result = true;
14
- //Single dependency
15
- if ( typeof ( deps ) == 'string' ) {
16
- // ??
17
- if ( deps.substr( 0, 6 ) == ':radio' ) {
18
- deps = deps + ':checked';
19
- }
20
-
21
- var input_type = $( deps ).data( 'type' ),
22
- val = $( deps ).val();
23
-
24
- if ( 'checkbox' === input_type ) {
25
- val = $( deps ).is( ':checked' ) ? 'yes' : 'no';
26
- }
27
- else if ( 'radio' === input_type ) {
28
- val = $( deps ).find('input[type="radio"]').filter(':checked').val();
29
- }
30
-
31
- if( $( deps + '-wrapper' ).data( 'type' ) === 'select-images' ){
32
- val = $( deps + '-wrapper' ).find( 'select' ).first().val();
33
- }
34
-
35
- values = values.split( ',' );
36
-
37
- for ( var i = 0; i < values.length; i++ ) {
38
- if ( val != values[ i ] ) {
39
- result = false;
40
- } else {
41
- result = true;
42
- break;
43
- }
44
- }
45
- }
46
-
47
- var $current_field = $( id ),
48
- $current_container = $( id + '-container' ).closest( 'tr' ); // container for YIT Plugin Panel
49
-
50
- if ( $current_container.length < 1 ) {
51
- // container for YIT Plugin Panel WooCommerce
52
- $current_container = $current_field.closest( '.yith-plugin-fw-panel-wc-row, .yith-toggle-content-row' );
53
- }
54
-
55
- var types = type.split( '-' ), j;
56
- for ( j in types ) {
57
- var current_type = types[ j ];
58
-
59
- if ( !result ) {
60
- switch ( current_type ) {
61
- case 'disable':
62
- $current_container.addClass( 'yith-disabled' );
63
- $current_field.attr( 'disabled', true );
64
- break;
65
- case 'hideNow':
66
- $current_container.hide();
67
- break;
68
- case 'hideme':
69
- $current_field.hide();
70
- break;
71
- case 'fadeInOut':
72
- case 'fadeOut':
73
- $current_container.hide( 500 );
74
- break;
75
- case 'fadeIn':
76
- $current_container.hide();
77
- break;
78
- default:
79
- if ( ! $current_container.hasClass( 'fade-in' ) ) {
80
- $current_container.hide();
81
- $current_container.css( { 'opacity': '0' } );
82
- } else {
83
- $current_container.fadeTo( "slow", 0, function () {
84
- $( this ).hide().removeClass( 'fade-in' );
85
- } );
86
- }
87
-
88
- }
89
-
90
- } else {
91
- switch ( current_type ) {
92
- case 'disable':
93
- $current_container.removeClass( 'yith-disabled' );
94
- $current_field.attr( 'disabled', false );
95
- break;
96
- case 'hideNow':
97
- $current_container.hide();
98
- break;
99
- case 'hideme':
100
- $current_field.show();
101
- break;
102
- case 'fadeInOut':
103
- case 'fadeIn':
104
- $current_container.show( 500 );
105
- break;
106
- case 'fadeOut':
107
- $current_container.show();
108
- break;
109
- default:
110
- $current_container.show();
111
- $current_container.fadeTo( "slow", 1 ).addClass( 'fade-in' );
112
- }
113
- }
114
- }
115
- }
116
- function init_dependencies() {
117
- $( '[data-dep-target]:not( .deps-initialized )' ).each( function () {
118
- var t = $( this );
119
-
120
- // init field deps
121
- t.addClass( 'deps-initialized' );
122
-
123
- var field = '#' + t.data( 'dep-target' ),
124
- dep = '#' + t.data( 'dep-id' ),
125
- value = t.data( 'dep-value' ),
126
- type = t.data( 'dep-type' ),
127
- event = 'change',
128
- wrapper = $( dep + '-wrapper' ),
129
- field_type = wrapper.data( 'type' );
130
-
131
- if( field_type === 'select-images' ){
132
- event = 'yith_select_images_value_changed';
133
- }
134
 
135
  $( dep ).on( event, function () {
136
  dependencies_handler( field, dep, value.toString(), type );
@@ -138,89 +131,88 @@ jQuery( function ( $ ) {
138
  } );
139
  }
140
 
141
- init_dependencies();
142
- // re-init deps after an add toggle action
143
- $( document ).on( 'yith-add-box-button-toggle', init_dependencies );
144
-
145
- //connected list
146
- $( '.rm_connectedlist' ).each( function () {
147
- var ul = $( this ).find( 'ul' );
148
- var input = $( this ).find( ':hidden' );
149
- var sortable = ul.sortable( {
150
- connectWith: ul,
151
- update : function ( event, ui ) {
152
- var value = {};
153
-
154
- ul.each( function () {
155
- var options = {};
156
-
157
- $( this ).children().each( function () {
158
- options[ $( this ).data( 'option' ) ] = $( this ).text();
159
- } );
160
-
161
- value[ $( this ).data( 'list' ) ] = options;
162
- } );
163
-
164
- input.val( ( JSON.stringify( value ) ).replace( /[\\"']/g, '\\$&' ).replace( /\u0000/g, '\\0' ) );
165
- }
166
- } ).disableSelection();
167
- } );
168
-
169
- //google analytics generation
170
- $( function () {
171
- $( '.google-analytic-generate' ).click( function () {
172
- var editor = $( '#' + $( this ).data( 'textarea' ) ).data( 'codemirrorInstance' );
173
- var gatc = $( '#' + $( this ).data( 'input' ) ).val();
174
- var basename = $( this ).data( 'basename' );
175
-
176
- var text = "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n";
177
- text += "(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\n";
178
- text += "m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n";
179
- text += "})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n";
180
- text += "ga('create', '" + gatc + "', '" + basename + "');\n";
181
- text += "ga('send', 'pageview');\n";
182
- editor.replaceRange(
183
- text,
184
- editor.getCursor( 'start' ),
185
- editor.getCursor( 'end' )
186
- );
187
- } );
188
- } );
189
-
190
-
191
- // prevents the WC message for changes when leaving the panel page
192
- $( '.yith-plugin-fw-panel .woo-nav-tab-wrapper' ).removeClass( 'woo-nav-tab-wrapper' ).addClass( 'yith-nav-tab-wrapper' );
193
-
194
- var wrap = $( '.wrap.yith-plugin-ui' ).first(),
195
- notices = $( 'div.updated, div.error, div.notice' );
196
-
197
- // prevent moving notices into the wrapper
198
- notices.addClass( 'inline' );
199
- if ( wrap.length ) {
200
- wrap.prepend( notices );
201
- }
202
-
203
-
204
- // TAB MENU AND SUB TABS
205
- var active_subnav = $(document).find( '.yith-nav-sub-tab.nav-tab-active' );
206
-
207
- if( active_subnav.length ){
208
- // WP page
209
- var mainWrapper = $(document).find( '.yith-plugin-fw-wp-page-wrapper' );
210
- if( ! mainWrapper.length ){
211
- mainWrapper = $(document).find( '#wpbody-content > .yith-plugin-ui' );
212
- }
213
-
214
- if( mainWrapper ){
215
- // serach first for deafult wrap
216
- var wrap = mainWrapper.find( '.yit-admin-panel-content-wrap' );
217
- if( wrap.length ) {
218
- wrap.addClass( 'has-subnav' );
219
- }
220
- else {
221
- // try to wrap a generic wrap div in main wrapper
222
- mainWrapper.find('.wrap').wrap('<div class="wrap subnav-wrap"></div>');
223
- }
224
- }
225
- }
226
  } );
8
  */
9
 
10
  jQuery( function ( $ ) {
11
+ // Handle dependencies.
12
+ function dependencies_handler( id, deps, values, type ) {
13
+ var result = true;
14
+ //Single dependency
15
+ if ( typeof ( deps ) == 'string' ) {
16
+ // ??
17
+ if ( deps.substr( 0, 6 ) == ':radio' ) {
18
+ deps = deps + ':checked';
19
+ }
20
+
21
+ var input_type = $( deps ).data( 'type' ),
22
+ val = $( deps ).val();
23
+
24
+ if ( 'checkbox' === input_type ) {
25
+ val = $( deps ).is( ':checked' ) ? 'yes' : 'no';
26
+ } else if ( 'radio' === input_type ) {
27
+ val = $( deps ).find( 'input[type="radio"]' ).filter( ':checked' ).val();
28
+ }
29
+
30
+ if ( $( deps + '-wrapper' ).data( 'type' ) === 'select-images' ) {
31
+ val = $( deps + '-wrapper' ).find( 'select' ).first().val();
32
+ }
33
+
34
+ values = values.split( ',' );
35
+
36
+ for ( var i = 0; i < values.length; i++ ) {
37
+ if ( val != values[ i ] ) {
38
+ result = false;
39
+ } else {
40
+ result = true;
41
+ break;
42
+ }
43
+ }
44
+ }
45
+
46
+ var $current_field = $( id ),
47
+ $current_container = $( id + '-container' ).closest( 'tr' ); // container for YIT Plugin Panel
48
+
49
+ if ( $current_container.length < 1 ) {
50
+ // container for YIT Plugin Panel WooCommerce
51
+ $current_container = $current_field.closest( '.yith-plugin-fw-panel-wc-row, .yith-toggle-content-row' );
52
+ }
53
+
54
+ var types = type.split( '-' ), j;
55
+ for ( j in types ) {
56
+ var current_type = types[ j ];
57
+
58
+ if ( !result ) {
59
+ switch ( current_type ) {
60
+ case 'disable':
61
+ $current_container.addClass( 'yith-disabled' );
62
+ $current_field.attr( 'disabled', true );
63
+ break;
64
+ case 'hide':
65
+ case 'hideNow':
66
+ $current_container.hide();
67
+ break;
68
+ case 'hideme':
69
+ $current_field.hide();
70
+ break;
71
+ case 'fadeInOut':
72
+ case 'fadeOut':
73
+ $current_container.hide( 500 );
74
+ break;
75
+ case 'fadeIn':
76
+ default:
77
+ $current_container.hide();
78
+ }
79
+ } else {
80
+ switch ( current_type ) {
81
+ case 'disable':
82
+ $current_container.removeClass( 'yith-disabled' );
83
+ $current_field.attr( 'disabled', false );
84
+ break;
85
+ case 'hide':
86
+ case 'hideNow':
87
+ $current_container.show();
88
+ break;
89
+ case 'hideme':
90
+ $current_field.show();
91
+ break;
92
+ case 'fadeOut':
93
+ $current_container.show();
94
+ break;
95
+ case 'fadeInOut':
96
+ case 'fadeIn':
97
+ default:
98
+ $current_container.show( 500 );
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
+ function init_dependencies() {
105
+ $( '[data-dep-target]:not( .deps-initialized )' ).each( function () {
106
+ var t = $( this );
107
+
108
+ if ( t.closest( '.metaboxes-tab' ).length ) {
109
+ // Let meta-boxes handle their own deps.
110
+ return;
111
+ }
112
+
113
+ // init field deps
114
+ t.addClass( 'deps-initialized' );
115
+
116
+ var field = '#' + t.data( 'dep-target' ),
117
+ dep = '#' + t.data( 'dep-id' ),
118
+ value = t.data( 'dep-value' ),
119
+ type = t.data( 'dep-type' ),
120
+ event = 'change',
121
+ wrapper = $( dep + '-wrapper' ),
122
+ field_type = wrapper.data( 'type' );
123
+
124
+ if ( field_type === 'select-images' ) {
125
+ event = 'yith_select_images_value_changed';
126
+ }
 
 
 
 
 
 
 
127
 
128
  $( dep ).on( event, function () {
129
  dependencies_handler( field, dep, value.toString(), type );
131
  } );
132
  }
133
 
134
+ init_dependencies();
135
+ // re-init deps after an add toggle action
136
+ $( document ).on( 'yith-add-box-button-toggle', init_dependencies );
137
+
138
+ //connected list
139
+ $( '.rm_connectedlist' ).each( function () {
140
+ var ul = $( this ).find( 'ul' );
141
+ var input = $( this ).find( ':hidden' );
142
+ var sortable = ul.sortable( {
143
+ connectWith: ul,
144
+ update : function ( event, ui ) {
145
+ var value = {};
146
+
147
+ ul.each( function () {
148
+ var options = {};
149
+
150
+ $( this ).children().each( function () {
151
+ options[ $( this ).data( 'option' ) ] = $( this ).text();
152
+ } );
153
+
154
+ value[ $( this ).data( 'list' ) ] = options;
155
+ } );
156
+
157
+ input.val( ( JSON.stringify( value ) ).replace( /[\\"']/g, '\\$&' ).replace( /\u0000/g, '\\0' ) );
158
+ }
159
+ } ).disableSelection();
160
+ } );
161
+
162
+ //google analytics generation
163
+ $( function () {
164
+ $( '.google-analytic-generate' ).click( function () {
165
+ var editor = $( '#' + $( this ).data( 'textarea' ) ).data( 'codemirrorInstance' );
166
+ var gatc = $( '#' + $( this ).data( 'input' ) ).val();
167
+ var basename = $( this ).data( 'basename' );
168
+
169
+ var text = "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n";
170
+ text += "(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\n";
171
+ text += "m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n";
172
+ text += "})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n";
173
+ text += "ga('create', '" + gatc + "', '" + basename + "');\n";
174
+ text += "ga('send', 'pageview');\n";
175
+ editor.replaceRange(
176
+ text,
177
+ editor.getCursor( 'start' ),
178
+ editor.getCursor( 'end' )
179
+ );
180
+ } );
181
+ } );
182
+
183
+
184
+ // prevents the WC message for changes when leaving the panel page
185
+ $( '.yith-plugin-fw-panel .woo-nav-tab-wrapper' ).removeClass( 'woo-nav-tab-wrapper' ).addClass( 'yith-nav-tab-wrapper' );
186
+
187
+ var wrap = $( '.wrap.yith-plugin-ui' ).first(),
188
+ notices = $( 'div.updated, div.error, div.notice' );
189
+
190
+ // prevent moving notices into the wrapper
191
+ notices.addClass( 'inline' );
192
+ if ( wrap.length ) {
193
+ wrap.prepend( notices );
194
+ }
195
+
196
+
197
+ // TAB MENU AND SUB TABS
198
+ var active_subnav = $( document ).find( '.yith-nav-sub-tab.nav-tab-active' );
199
+
200
+ if ( active_subnav.length ) {
201
+ // WP page
202
+ var mainWrapper = $( document ).find( '.yith-plugin-fw-wp-page-wrapper' );
203
+ if ( !mainWrapper.length ) {
204
+ mainWrapper = $( document ).find( '#wpbody-content > .yith-plugin-ui' );
205
+ }
206
+
207
+ if ( mainWrapper ) {
208
+ // serach first for deafult wrap
209
+ var wrap = mainWrapper.find( '.yit-admin-panel-content-wrap' );
210
+ if ( wrap.length ) {
211
+ wrap.addClass( 'has-subnav' );
212
+ } else {
213
+ // try to wrap a generic wrap div in main wrapper
214
+ mainWrapper.find( '.wrap' ).wrap( '<div class="wrap subnav-wrap"></div>' );
215
+ }
216
+ }
217
+ }
 
218
  } );
plugin-fw/assets/js/yit-plugin-panel.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){function a(){e("[data-dep-target]:not( .deps-initialized )").each(function(){var a=e(this);a.addClass("deps-initialized");var t="#"+a.data("dep-target"),i="#"+a.data("dep-id"),n=a.data("dep-value"),d=a.data("dep-type"),s="change";"select-images"===e(i+"-wrapper").data("type")&&(s="yith_select_images_value_changed"),e(i).on(s,function(){!function(a,t,i,n){var d=!0;if("string"==typeof t){":radio"==t.substr(0,6)&&(t+=":checked");var s=e(t).data("type"),r=e(t).val();"checkbox"===s?r=e(t).is(":checked")?"yes":"no":"radio"===s&&(r=e(t).find('input[type="radio"]').filter(":checked").val()),"select-images"===e(t+"-wrapper").data("type")&&(r=e(t+"-wrapper").find("select").first().val()),i=i.split(",");for(var c=0;c<i.length;c++){if(r==i[c]){d=!0;break}d=!1}}var o=e(a),l=e(a+"-container").closest("tr");l.length<1&&(l=o.closest(".yith-plugin-fw-panel-wc-row, .yith-toggle-content-row"));var h,p=n.split("-");for(h in p){var f=p[h];if(d)switch(f){case"disable":l.removeClass("yith-disabled"),o.attr("disabled",!1);break;case"hideNow":l.hide();break;case"hideme":o.show();break;case"fadeInOut":case"fadeIn":l.show(500);break;case"fadeOut":l.show();break;default:l.show(),l.fadeTo("slow",1).addClass("fade-in")}else switch(f){case"disable":l.addClass("yith-disabled"),o.attr("disabled",!0);break;case"hideNow":l.hide();break;case"hideme":o.hide();break;case"fadeInOut":case"fadeOut":l.hide(500);break;case"fadeIn":l.hide();break;default:l.hasClass("fade-in")?l.fadeTo("slow",0,function(){e(this).hide().removeClass("fade-in")}):(l.hide(),l.css({opacity:"0"}))}}}(t,i,n.toString(),d)}).trigger(s)})}a(),e(document).on("yith-add-box-button-toggle",a),e(".rm_connectedlist").each(function(){var a=e(this).find("ul"),t=e(this).find(":hidden");a.sortable({connectWith:a,update:function(i,n){var d={};a.each(function(){var a={};e(this).children().each(function(){a[e(this).data("option")]=e(this).text()}),d[e(this).data("list")]=a}),t.val(JSON.stringify(d).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()}),e(function(){e(".google-analytic-generate").click(function(){var a=e("#"+e(this).data("textarea")).data("codemirrorInstance"),t="(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n";t+="(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\n",t+="m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n",t+="})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n",t+="ga('create', '"+e("#"+e(this).data("input")).val()+"', '"+e(this).data("basename")+"');\n",t+="ga('send', 'pageview');\n",a.replaceRange(t,a.getCursor("start"),a.getCursor("end"))})}),e(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper");var t=e(".wrap.yith-plugin-ui").first(),i=e("div.updated, div.error, div.notice");if(i.addClass("inline"),t.length&&t.prepend(i),e(document).find(".yith-nav-sub-tab.nav-tab-active").length){var n=e(document).find(".yith-plugin-fw-wp-page-wrapper");if(n.length||(n=e(document).find("#wpbody-content > .yith-plugin-ui")),n)(t=n.find(".yit-admin-panel-content-wrap")).length?t.addClass("has-subnav"):n.find(".wrap").wrap('<div class="wrap subnav-wrap"></div>')}});
1
+ jQuery(function(e){function a(){e("[data-dep-target]:not( .deps-initialized )").each(function(){var a=e(this);if(!a.closest(".metaboxes-tab").length){a.addClass("deps-initialized");var t="#"+a.data("dep-target"),i="#"+a.data("dep-id"),n=a.data("dep-value"),s=a.data("dep-type"),d="change";"select-images"===e(i+"-wrapper").data("type")&&(d="yith_select_images_value_changed"),e(i).on(d,function(){!function(a,t,i,n){var s=!0;if("string"==typeof t){":radio"==t.substr(0,6)&&(t+=":checked");var d=e(t).data("type"),r=e(t).val();"checkbox"===d?r=e(t).is(":checked")?"yes":"no":"radio"===d&&(r=e(t).find('input[type="radio"]').filter(":checked").val()),"select-images"===e(t+"-wrapper").data("type")&&(r=e(t+"-wrapper").find("select").first().val()),i=i.split(",");for(var c=0;c<i.length;c++){if(r==i[c]){s=!0;break}s=!1}}var o=e(a),l=e(a+"-container").closest("tr");l.length<1&&(l=o.closest(".yith-plugin-fw-panel-wc-row, .yith-toggle-content-row"));var h,p=n.split("-");for(h in p){var g=p[h];if(s)switch(g){case"disable":l.removeClass("yith-disabled"),o.attr("disabled",!1);break;case"hide":case"hideNow":l.show();break;case"hideme":o.show();break;case"fadeOut":l.show();break;case"fadeInOut":case"fadeIn":default:l.show(500)}else switch(g){case"disable":l.addClass("yith-disabled"),o.attr("disabled",!0);break;case"hide":case"hideNow":l.hide();break;case"hideme":o.hide();break;case"fadeInOut":case"fadeOut":l.hide(500);break;case"fadeIn":default:l.hide()}}}(t,i,n.toString(),s)}).trigger(d)}})}a(),e(document).on("yith-add-box-button-toggle",a),e(".rm_connectedlist").each(function(){var a=e(this).find("ul"),t=e(this).find(":hidden");a.sortable({connectWith:a,update:function(i,n){var s={};a.each(function(){var a={};e(this).children().each(function(){a[e(this).data("option")]=e(this).text()}),s[e(this).data("list")]=a}),t.val(JSON.stringify(s).replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0"))}}).disableSelection()}),e(function(){e(".google-analytic-generate").click(function(){var a=e("#"+e(this).data("textarea")).data("codemirrorInstance"),t="(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n";t+="(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement( o ),\n",t+="m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n",t+="})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n",t+="ga('create', '"+e("#"+e(this).data("input")).val()+"', '"+e(this).data("basename")+"');\n",t+="ga('send', 'pageview');\n",a.replaceRange(t,a.getCursor("start"),a.getCursor("end"))})}),e(".yith-plugin-fw-panel .woo-nav-tab-wrapper").removeClass("woo-nav-tab-wrapper").addClass("yith-nav-tab-wrapper");var t=e(".wrap.yith-plugin-ui").first(),i=e("div.updated, div.error, div.notice");if(i.addClass("inline"),t.length&&t.prepend(i),e(document).find(".yith-nav-sub-tab.nav-tab-active").length){var n=e(document).find(".yith-plugin-fw-wp-page-wrapper");if(n.length||(n=e(document).find("#wpbody-content > .yith-plugin-ui")),n)(t=n.find(".yit-admin-panel-content-wrap")).length?t.addClass("has-subnav"):n.find(".wrap").wrap('<div class="wrap subnav-wrap"></div>')}});
plugin-fw/assets/js/yith-date-format.js ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* globals ajaxurl */
2
+ jQuery( function ( $ ) {
3
+
4
+ $( document ).on( 'click', '.yith-plugin-fw-date-format__option', function () {
5
+ var $t = $( this ),
6
+ $wrapper = $t.closest( '.yith-plugin-fw-date-format' ),
7
+ $example = $wrapper.find( '.example' );
8
+
9
+ $example.text( $t.data( 'preview' ) );
10
+ $wrapper.find( '.yith-date-format-custom' ).val( $t.val() );
11
+ } );
12
+
13
+ $( document ).on( 'click input', '.yith-date-format-custom', function () {
14
+ var $t = $( this ),
15
+ $wrapper = $t.closest( '.yith-plugin-fw-radio__row' );
16
+
17
+ $wrapper.find( 'input[type=radio]' ).prop( 'checked', true );
18
+ } );
19
+
20
+ $( document ).on( 'input yith-date-format-change', '.yith-date-format-custom', function () {
21
+ var $t = $( this ),
22
+ $wrapper = $t.closest( '.yith-plugin-fw-date-format' ),
23
+ dataType = $wrapper.data( 'format' ),
24
+ js = $wrapper.data( 'js' ),
25
+ now = $wrapper.data( 'current' ),
26
+ example = $wrapper.find( '.example' ),
27
+ spinner = $wrapper.find( '.spinner' );
28
+
29
+ if ( 'yes' === js ) {
30
+ var newDate = new Date( now );
31
+ newDate = $.datepicker.formatDate( $t.val(), newDate );
32
+ example.text( newDate );
33
+ } else {
34
+ clearTimeout( $.data( this, 'timer' ) );
35
+ $t.data( 'timer', setTimeout(
36
+ function () {
37
+ if ( $t.val() ) {
38
+ spinner.addClass( 'is-active' );
39
+ // Call WP ajax action.
40
+ var data = {
41
+ action: dataType + '_format',
42
+ date : $t.val()
43
+ };
44
+
45
+ $.post( ajaxurl, data, function ( response ) {
46
+ spinner.removeClass( 'is-active' );
47
+ example.text( response );
48
+ } );
49
+ }
50
+ },
51
+ 500 )
52
+ );
53
+ }
54
+ } );
55
+
56
+ $( document ).on( 'yith-plugin-fw-date-format-init', function () {
57
+ $( '.yith-date-format-custom' ).trigger( 'yith-date-format-change' );
58
+ } ).trigger( 'yith-plugin-fw-date-format-init' );
59
+
60
+ } );
plugin-fw/assets/js/yith-date-format.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(t){t(document).on("click",".yith-plugin-fw-date-format__option",function(){var a=t(this),i=a.closest(".yith-plugin-fw-date-format");i.find(".example").text(a.data("preview")),i.find(".yith-date-format-custom").val(a.val())}),t(document).on("click input",".yith-date-format-custom",function(){t(this).closest(".yith-plugin-fw-radio__row").find("input[type=radio]").prop("checked",!0)}),t(document).on("input yith-date-format-change",".yith-date-format-custom",function(){var a=t(this),i=a.closest(".yith-plugin-fw-date-format"),e=i.data("format"),o=i.data("js"),n=i.data("current"),r=i.find(".example"),f=i.find(".spinner");if("yes"===o){var d=new Date(n);d=t.datepicker.formatDate(a.val(),d),r.text(d)}else clearTimeout(t.data(this,"timer")),a.data("timer",setTimeout(function(){if(a.val()){f.addClass("is-active");var i={action:e+"_format",date:a.val()};t.post(ajaxurl,i,function(t){f.removeClass("is-active"),r.text(t)})}},500))}),t(document).on("yith-plugin-fw-date-format-init",function(){t(".yith-date-format-custom").trigger("yith-date-format-change")}).trigger("yith-plugin-fw-date-format-init")});
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -1,801 +1,811 @@
 
1
  ( function ( $ ) {
2
-
3
- /* global yith_framework_fw_fields*/
4
-
5
- var yith_fields_init = function () {
6
- var $datepicker = $( '.yith-plugin-fw-datepicker' ),
7
- $colorpicker = $( '.yith-plugin-fw-colorpicker' ),
8
- $upload = {
9
- imgPreviewHandler : '.yith-plugin-fw-upload-img-preview',
10
- uploadButtonHandler: '.yith-plugin-fw-upload-button',
11
- imgUrlHandler : '.yith-plugin-fw-upload-img-url',
12
- resetButtonHandler : '.yith-plugin-fw-upload-button-reset',
13
- imgUrl : $( '.yith-plugin-fw-upload-img-url' )
14
- },
15
- $wpAddMedia = $( '.add_media' ),
16
- $imageGallery = {
17
- sliderWrapper: $( '.yith-plugin-fw .image-gallery ul.slides-wrapper' ),
18
- buttonHandler: '.yith-plugin-fw .image-gallery-button'
19
- },
20
- $sidebars = $( '.yith-plugin-fw-sidebar-layout' ),
21
- $slider = $( '.yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal' ),
22
- $codemirror = $( '.codemirror' ),
23
- $icons = $( '.yit-icons-manager-wrapper' ),
24
- $checkgroup = $( ".yith-plugin-ui td.forminp-checkbox" );
25
-
26
- /* Datepicker */
27
- $datepicker.each( function () {
28
- var args = $( this ).data();
29
-
30
- // set animation to false to prevent style 'glitches' when removing class on closing
31
- args.showAnim = false;
32
- args.beforeShow = function ( input, instance ) {
33
- instance.dpDiv.addClass( 'yith-plugin-fw-datepicker-div' );
34
- };
35
- args.onClose = function ( selectedDate, instance ) {
36
- instance.dpDiv.removeClass( 'yith-plugin-fw-datepicker-div' );
37
- };
38
-
39
- $( this ).datepicker( args );
40
- } );
41
-
42
- /* Colorpicker */
43
- $colorpicker.wpColorPicker( {
44
- palettes: false,
45
- width : 200,
46
- mode : 'hsl',
47
- clear : function () {
48
- var input = $( this );
49
- input.val( input.data( 'default-color' ) );
50
- input.change();
51
- }
52
- } );
53
-
54
-
55
- $colorpicker.each( function () {
56
- var select_label = $( this ).data( 'variations-label' ),
57
- wrap_main1 = $( this ).closest( '.yith-plugin-fw-colorpicker-field-wrapper' ),
58
- wrap_main2 = $( this ).closest( '.yith-single-colorpicker' ),
59
- wrap1 = wrap_main1.find( '.wp-picker-input-wrap' ),
60
- wrap2 = wrap_main2.find( '.wp-picker-input-wrap' );
61
-
62
- wrap1.length && wrap_main1.find( 'a.wp-color-result' ).attr( 'title', select_label );
63
- wrap_main2.length && wrap_main2.find( 'a.wp-color-result' ).attr( 'title', select_label );
64
-
65
- if ( ! wrap1.find( '.wp-picker-default-custom' ).length ) {
66
- var button = $( '<span/>' ).attr( {
67
- class: "wp-picker-default-custom"
68
- } );
69
- wrap1.find( '.wp-picker-default' ).wrap( button );
70
- }
71
-
72
- if ( ! wrap2.find( '.wp-picker-default-custom' ).length ) {
73
- var button = $( '<span/>' ).attr( {
74
- class: "wp-picker-default-custom"
75
- } );
76
- wrap2.find( '.wp-picker-default' ).wrap( button );
77
- }
78
- } );
79
-
80
-
81
- /* Upload */
82
- if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
83
- var _custom_media = true;
84
- // preview
85
- $upload.imgUrl.change( function () {
86
- var url = $( this ).val(),
87
- re = new RegExp( "(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)" ),
88
- preview = $( this ).parent().find( $upload.imgPreviewHandler ).first();
89
-
90
- if ( preview.length < 1 ) {
91
- preview = $( this ).parent().parent().find( $upload.imgPreviewHandler ).first();
92
- }
93
-
94
- if ( re.test( url ) ) {
95
- preview.html( '<img src="' + url + '" style="max-width:100px; max-height:100px;" />' );
96
- } else {
97
- preview.html( '' );
98
- }
99
- } ).trigger( 'change' );
100
-
101
- $( document ).on( 'click', $upload.uploadButtonHandler, function ( e ) {
102
- e.preventDefault();
103
-
104
- var t = $( this ),
105
- custom_uploader,
106
- id = t.attr( 'id' ).replace( /-button$/, '' ).replace(/(\[|\])/g, '\\$1');
107
-
108
- //If the uploader object has already been created, reopen the dialog
109
- if ( custom_uploader ) {
110
- custom_uploader.open();
111
- return;
112
- }
113
-
114
- var custom_uploader_states = [
115
- // Main states.
116
- new wp.media.controller.Library( {
117
- library : wp.media.query(),
118
- multiple : false,
119
- title : 'Choose Image',
120
- priority : 20,
121
- filterable: 'uploaded'
122
- } )
123
- ];
124
-
125
- // Create the media frame.
126
- custom_uploader = wp.media.frames.downloadable_file = wp.media( {
127
- // Set the title of the modal.
128
- title : 'Choose Image',
129
- library : {
130
- type: ''
131
- },
132
- button : {
133
- text: 'Choose Image'
134
- },
135
- multiple: false,
136
- states : custom_uploader_states
137
- } );
138
-
139
- //When a file is selected, grab the URL and set it as the text field's value
140
- custom_uploader.on( 'select', function () {
141
- var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
142
-
143
- $( "#" + id ).val( attachment.url );
144
- // Save the id of the selected element to an element which name is the same with a suffix "-yith-attachment-id"
145
- if ( $( "#" + id + "-yith-attachment-id" ) ) {
146
- $( "#" + id + "-yith-attachment-id" ).val( attachment.id );
147
- }
148
- $upload.imgUrl.trigger( 'change' );
149
- } );
150
-
151
- //Open the uploader dialog
152
- custom_uploader.open();
153
- } );
154
-
155
- $( document ).on( 'click', $upload.resetButtonHandler, function ( e ) {
156
- var t = $( this ),
157
- id = t.attr( 'id' ).replace(/(\[|\])/g, '\\$1'),
158
- input_id = t.attr( 'id' ).replace( /-button-reset$/, '' ).replace(/(\[|\])/g, '\\$1'),
159
- default_value = $( '#' + id ).data( 'default' );
160
-
161
- $( "#" + input_id ).val( default_value );
162
- $upload.imgUrl.trigger( 'change' );
163
- } );
164
- }
165
-
166
- $wpAddMedia.on( 'click', function () {
167
- _custom_media = false;
168
- } );
169
-
170
- /* Image Gallery */
171
- if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
172
- $( document ).on( 'click', $imageGallery.buttonHandler, function ( e ) {
173
- var $t = $( this ),
174
- $container = $t.closest( '.image-gallery' ),
175
- $image_gallery_ids = $container.find( '.image_gallery_ids' ),
176
- attachment_ids = $image_gallery_ids.val(),
177
- $gallery_images_wrapper = $container.find( 'ul.slides-wrapper' );
178
-
179
- // Create the media frame.
180
- var image_gallery_frame = wp.media.frames.image_gallery = wp.media( {
181
- // Set the title of the modal.
182
- title : $t.data( 'choose' ),
183
- button: {
184
- text: $t.data( 'update' )
185
- },
186
- states: [
187
- new wp.media.controller.Library( {
188
- title : $t.data( 'choose' ),
189
- filterable: 'all',
190
- multiple : true
191
- } )
192
- ]
193
- } );
194
-
195
- // When an image is selected, run a callback.
196
- image_gallery_frame.on( 'select', function () {
197
- var selection = image_gallery_frame.state().get( 'selection' );
198
- selection.map( function ( attachment ) {
199
- attachment = attachment.toJSON();
200
-
201
- if ( attachment.id ) {
202
- attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;
203
- $gallery_images_wrapper.append( '<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment.sizes.thumbnail.url + '"/><ul class="actions"><li><a href="#" class="delete" title="' + $t.data( 'delete' ) + '">x</a></li></ul></li>' );
204
- }
205
- } );
206
-
207
- $image_gallery_ids.val( attachment_ids );
208
- } );
209
-
210
- image_gallery_frame.open();
211
-
212
- } );
213
-
214
- // Image ordering
215
- $imageGallery.sliderWrapper.each( function () {
216
- var $t = $( this );
217
- $t.sortable( {
218
- items : 'li.image',
219
- cursor : 'move',
220
- scrollSensitivity : 40,
221
- forcePlaceholderSize: true,
222
- forceHelperSize : false,
223
- helper : 'clone',
224
- opacity : 0.65,
225
- start : function ( event, ui ) {
226
- ui.item.css( 'background-color', '#f6f6f6' );
227
- },
228
- stop : function ( event, ui ) {
229
- ui.item.removeAttr( 'style' );
230
- },
231
- update : function ( event, ui ) {
232
- var attachment_ids = '';
233
-
234
- $t.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
235
- var attachment_id = $( this ).attr( 'data-attachment_id' );
236
- attachment_ids = attachment_ids + attachment_id + ',';
237
- } );
238
-
239
- $t.closest( '.image-gallery' ).find( '.image_gallery_ids' ).val( attachment_ids );
240
- }
241
- } );
242
- } );
243
-
244
- // Remove images
245
- $imageGallery.sliderWrapper.on( 'click', 'a.delete', function () {
246
- var $wrapper = $( this ).closest( '.image-gallery' ),
247
- $gallery = $( this ).closest( '.image-gallery ul.slides-wrapper' ),
248
- $image_gallery_ids = $wrapper.find( '.image_gallery_ids' ),
249
- attachment_ids = '';
250
-
251
- $( this ).closest( 'li.image' ).remove();
252
-
253
- $gallery.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
254
- var attachment_id = $( this ).attr( 'data-attachment_id' );
255
- attachment_ids = attachment_ids + attachment_id + ',';
256
- } );
257
-
258
- $image_gallery_ids.val( attachment_ids );
259
- } );
260
- }
261
-
262
-
263
- /* Sidebars */
264
- $sidebars.each( function () {
265
- var $images = $( this ).find( 'img' );
266
- $images.on( 'click', function () {
267
- var $container = $( this ).closest( '.yith-plugin-fw-sidebar-layout' ),
268
- $left = $container.find( '.yith-plugin-fw-sidebar-layout-sidebar-left-container' ),
269
- $right = $container.find( '.yith-plugin-fw-sidebar-layout-sidebar-right-container' ),
270
- type = $( this ).data( 'type' );
271
-
272
- $( this ).parent().children( ':radio' ).attr( 'checked', false );
273
- $( this ).prev( ':radio' ).attr( 'checked', true );
274
-
275
- if ( typeof type != 'undefined' ) {
276
- switch ( type ) {
277
- case 'left':
278
- $left.show();
279
- $right.hide();
280
- break;
281
- case 'right':
282
- $right.show();
283
- $left.hide();
284
- break;
285
- case 'double':
286
- $left.show();
287
- $right.show();
288
- break;
289
- default:
290
- $left.hide();
291
- $right.hide();
292
- break;
293
- }
294
- }
295
- } );
296
- } );
297
-
298
- /* Slider */
299
- $slider.each( function () {
300
- var val = $( this ).data( 'val' ),
301
- minValue = $( this ).data( 'min' ),
302
- maxValue = $( this ).data( 'max' ),
303
- step = $( this ).data( 'step' ),
304
- labels = $( this ).data( 'labels' );
305
-
306
- $( this ).slider( {
307
- value: val,
308
- min : minValue,
309
- max : maxValue,
310
- range: 'min',
311
- step : step,
312
-
313
- create: function () {
314
- $( this ).find( '.ui-slider-handle' ).text( $( this ).slider( "value" ) );
315
- },
316
-
317
-
318
- slide: function ( event, ui ) {
319
- $( this ).find( 'input' ).val( ui.value );
320
- $( this ).find( '.ui-slider-handle' ).text( ui.value );
321
- $( this ).siblings( '.feedback' ).find( 'strong' ).text( ui.value + labels );
322
- }
323
- } );
324
- } );
325
-
326
- /* codemirror */
327
- $codemirror.each( function ( i, v ) {
328
- var editor = CodeMirror.fromTextArea( v, {
329
- lineNumbers : 1,
330
- mode : 'javascript',
331
- showCursorWhenSelecting: true
332
- } );
333
-
334
- $( v ).data( 'codemirrorInstance', editor );
335
- } );
336
-
337
- /* Select All - Deselect All */
338
- $( document ).on( 'click', '.yith-plugin-fw-select-all', function () {
339
- var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
340
- $targetSelect.find( 'option' ).prop( 'selected', true ).trigger( 'change' );
341
- } );
342
-
343
- $( document ).on( 'click', '.yith-plugin-fw-deselect-all', function () {
344
- var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
345
- $targetSelect.find( 'option' ).prop( 'selected', false ).trigger( 'change' );
346
- } );
347
-
348
-
349
- $icons.each( function () {
350
- var $container = $( this ),
351
- $preview = $container.find( '.yit-icons-manager-icon-preview' ).first(),
352
- $text = $container.find( '.yit-icons-manager-icon-text' );
353
-
354
- $container.on( 'click', '.yit-icons-manager-list li', function ( event ) {
355
- var $target = $( event.target ).closest( 'li' ),
356
- font = $target.data( 'font' ),
357
- icon = $target.data( 'icon' ),
358
- key = $target.data( 'key' ),
359
- name = $target.data( 'name' );
360
-
361
- $preview.attr( 'data-font', font );
362
- $preview.attr( 'data-icon', icon );
363
- $preview.attr( 'data-key', key );
364
- $preview.attr( 'data-name', name );
365
-
366
- $text.val( font + ':' + name );
367
-
368
- $container.find( '.yit-icons-manager-list li' ).removeClass( 'active' );
369
- $target.addClass( 'active' );
370
- } );
371
-
372
- $container.on( 'click', '.yit-icons-manager-action-set-default', function () {
373
- $container.find( '.yit-icons-manager-list li.default' ).trigger( 'click' );
374
- } );
375
- } );
376
-
377
- /** Select Images */
378
- $( document ).on( 'click', '.yith-plugin-fw-select-images__item', function () {
379
- var item = $( this ),
380
- key = item.data( 'key' ),
381
- wrapper = item.closest( '.yith-plugin-fw-select-images__wrapper' ),
382
- items = wrapper.find( '.yith-plugin-fw-select-images__item' ),
383
- select = wrapper.find( 'select' ).first();
384
-
385
- if ( select.length ) {
386
- select.val( key ).trigger('yith_select_images_value_changed');
387
- items.removeClass( 'yith-plugin-fw-select-images__item--selected' );
388
- item.addClass( 'yith-plugin-fw-select-images__item--selected' );
389
- }
390
- } );
391
-
392
- $( document.body ).trigger( 'wc-enhanced-select-init' );
393
-
394
- $( document ).find( '.ui-sortable .yith-toggle-elements' ).sortable(
395
- {
396
- cursor : 'move',
397
- axis : 'y',
398
- scrollSensitivity : 40,
399
- forcePlaceholderSize: true,
400
- helper : 'clone',
401
-
402
- stop: function ( event, ui ) {
403
- var keys = jQuery( '.ui-sortable-handle' ),
404
- i = 0,
405
- array_keys = new Array();
406
- for ( i = 0; i < keys.length; i++ ) {
407
- array_keys[ i ] = $( keys[ i ] ).data( 'item_key' );
408
- }
409
- if ( array_keys.length > 0 ) {
410
- var toggle = $( this ).closest( '.toggle-element' );
411
- toggle.saveToggleElement( null, array_keys );
412
- }
413
- }
414
- }
415
- );
416
-
417
- $( document.body ).trigger( 'yith-framework-enhanced-select-init' );
418
- };
419
-
420
- $( document ).on( 'yith_fields_init', yith_fields_init ).trigger( 'yith_fields_init' );
421
-
422
- /* on-off */
423
- $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
424
- var input = $( this ).prev( 'input' ),
425
- checked = input.prop( 'checked' );
426
-
427
- if ( checked ) {
428
- input.prop( 'checked', false ).attr( 'value', 'no' ).removeClass( 'onoffchecked' );
429
- } else {
430
- input.prop( 'checked', true ).attr( 'value', 'yes' ).addClass( 'onoffchecked' );
431
- }
432
-
433
- input.change();
434
- } );
435
-
436
-
437
- /** Toggle **/
438
-
439
-
440
-
441
- //TOGGLE ELEMENT
442
- $.fn.saveToggleElement = function ( spinner, array_keys ) {
443
- var toggle = $( this ),
444
- action = 'yith_plugin_fw_save_toggle_element',
445
- formdata = toggle.serializeToggleElement(),
446
- wrapper = toggle.find( '.yith-toggle_wrapper' ),
447
- id = wrapper.attr( 'id' ),
448
- current_tab = $.urlParam( 'tab' );
449
-
450
- formdata.append( 'security', wrapper.data( 'nonce' ) );
451
-
452
- if ( typeof array_keys != 'undefined' && array_keys.length > 0 ) {
453
- formdata.append( 'yith_toggle_elements_order_keys', array_keys );
454
- }
455
-
456
- if ( toggle.closest( '.metaboxes-tab.yith-plugin-ui' ).length ) {
457
- action = 'yith_plugin_fw_save_toggle_element_metabox';
458
- post_id = $( this ).closest( 'form#post' ).find( '#post_ID' ).val();
459
- yit_metaboxes_nonce = $( this ).closest( 'form#post' ).find( '#yit_metaboxes_nonce' ).val();
460
- metabox_tab = $( this ).closest( '.tabs-panel' ).attr( 'id' );
461
- url = yith_framework_fw_fields.ajax_url +
462
- '?action=' + action +
463
- "&post_ID=" + post_id +
464
- '&yit_metaboxes_nonce=' + yit_metaboxes_nonce +
465
- "&toggle_id=" + id +
466
- "&metabox_tab=" + metabox_tab;
467
- } else {
468
- url = yith_framework_fw_fields.admin_url + '?action=' + action + '&tab=' + current_tab + "&toggle_id=" + id;
469
- }
470
-
471
- $.ajax( {
472
- type : "POST",
473
- url : url,
474
- data : formdata,
475
- contentType: false,
476
- processData: false,
477
- success : function ( result ) {
478
- if ( spinner ) {
479
- spinner.removeClass( 'show' );
480
- }
481
-
482
- $( document ).trigger( 'yith_save_toggle_element_done', [result, toggle] );
483
- }
484
- } );
485
- };
486
-
487
- $.fn.serializeToggleElement = function () {
488
- var obj = $( this );
489
- /* ADD FILE TO PARAM AJAX */
490
- var formData = new FormData();
491
- var params = $( obj ).find( ":input" ).serializeArray();
492
-
493
- $.each( params, function ( i, val ) {
494
- el_name = val.name;
495
- formData.append( val.name, val.value );
496
- } );
497
-
498
- return formData;
499
- };
500
-
501
- $.fn.formatToggleTitle = function () {
502
- var toggle_el = $( this ),
503
- fields = toggle_el.find( ':input' ),
504
- title = toggle_el.find( 'span.title' ).data( 'title_format' ),
505
- subtitle = toggle_el.find( '.subtitle' ).data( 'subtitle_format' ),
506
- regExp = new RegExp( "[^%%]+(?=[%%])", 'g' );
507
-
508
- if ( typeof title != 'undefined' ) {
509
- var res = title.match( regExp );
510
- }
511
-
512
- if ( typeof subtitle != 'undefined' ) {
513
- var ressub = subtitle.match( regExp );
514
- }
515
-
516
- $.each( fields, function ( i, field ) {
517
- if ( typeof $( field ).attr( 'id' ) != 'undefined' ) {
518
- $field_id = $( field ).attr( 'id' );
519
- $field_array = $field_id.split( '_' );
520
- $field_array.pop();
521
- $field_id = $field_array.join( '_' );
522
- $field_val = $( field ).val();
523
-
524
- if ( res != null && typeof res != 'undefined' && res.indexOf( $field_id ) !== -1 ) {
525
- title = title.replace( '%%' + $field_id + '%%', $field_val );
526
- }
527
- if ( ressub != null && typeof ressub != 'undefined' && ressub.indexOf( $field_id ) !== -1 ) {
528
- subtitle = subtitle.replace( '%%' + $field_id + '%%', $field_val );
529
- }
530
- }
531
- } );
532
-
533
- if ( '' !== title ) {
534
- toggle_el.find( 'span.title' ).html( title );
535
- }
536
-
537
- if ( '' !== subtitle ) {
538
- toggle_el.find( '.subtitle' ).html( subtitle );
539
- }
540
-
541
- $( document ).trigger( 'yith-toggle-element-item-title', [toggle_el] );
542
- };
543
-
544
- $.urlParam = function ( name ) {
545
- var results = new RegExp( '[\?&]' + name + '=([^&#]*)' )
546
- .exec( window.location.search );
547
-
548
- return ( results !== null ) ? results[ 1 ] || 0 : false;
549
- };
550
-
551
- $( document ).on( 'click', '.yith-toggle-title', function ( event ) {
552
- var _toggle = $( event.target ),
553
- _section = _toggle.closest( '.yith-toggle-row' ),
554
- _content = _section.find( '.yith-toggle-content' );
555
-
556
- if ( _toggle.hasClass( 'yith-plugin-fw-onoff' ) || _toggle.hasClass( 'yith-icon-drag' ) ) {
557
- return false;
558
- }
559
-
560
- if ( _section.is( '.yith-toggle-row-opened' ) ) {
561
- _content.slideUp( 400 );
562
- } else {
563
- _content.slideDown( 400 );
564
- }
565
- _section.toggleClass( 'yith-toggle-row-opened' );
566
- } );
567
-
568
- /**Add new box toggle**/
569
- $( document ).on( 'click', '.yith-add-box-button', function ( event ) {
570
- event.preventDefault();
571
- var $this = $( this ),
572
- target_id = $this.data( 'box_id' ),
573
- closed_label = $this.data( 'closed_label' ),
574
- label = $this.data( 'opened_label' ),
575
- id = $this.closest( '.yith-toggle_wrapper' ).attr( 'id' ),
576
- template = wp.template( 'yith-toggle-element-add-box-content-' + id );
577
-
578
- if ( '' !== target_id ) {
579
- $( '#' + target_id ).html( template( { index: 'box_id' } ) ).slideToggle();
580
- if ( closed_label !== '' ) {
581
- if ( $this.html() === closed_label ) {
582
- $this.html( label ).removeClass( 'closed' );
583
- } else {
584
- $this.html( closed_label ).addClass( 'closed' );
585
- }
586
- }
587
-
588
- $( document ).trigger( 'yith_fields_init' );
589
- $( document ).trigger( 'yith-add-box-button-toggle', [$this] );
590
- }
591
- } );
592
-
593
- $( document ).on( 'click', '.yith-add-box-buttons .yith-save-button', function ( event ) {
594
-
595
- event.preventDefault();
596
- var add_box = $( this ).parents( '.yith-add-box' ),
597
- id = $( this ).closest( '.yith-toggle_wrapper' ).attr( 'id' ),
598
- spinner = add_box.find( '.spinner' ),
599
- toggle_element = $( this ).parents( '.toggle-element' ),
600
- fields = add_box.find( ':input' ),
601
- counter = toggle_element.find( '.yith-toggle-row' ).length,
602
- hidden_obj = $( '<input type="hidden">' );
603
-
604
- hidden_obj.val( counter );
605
-
606
- $( document ).trigger( 'yith-toggle-change-counter', [hidden_obj, add_box] );
607
-
608
- counter = hidden_obj.val();
609
- var template = wp.template( 'yith-toggle-element-item-' + id ),
610
- toggle_el = $( template( { index: counter } ) );
611
-
612
- spinner.addClass( 'show' );
613
-
614
- $.each( fields, function ( i, field ) {
615
- if ( typeof $( field ).attr( 'id' ) != 'undefined' ) {
616
-
617
- $field_id = $( field ).attr( 'id' );
618
- $field_val = $( field ).val();
619
-
620
- if ( 'radio' == $( field ).attr( 'type' ) ) {
621
- $field_id = $field_id.replace( 'new_', '' );
622
- $field_id = $field_id.replace( '-' + $field_val, '' );
623
- $field_id = $field_id + '_dataindex-' + $field_val;
624
- } else {
625
- $field_id = $field_id.replace( 'new_', '' ) + '_' + counter;
626
- }
627
-
628
- if ( $( field ).is( ':checked' ) ) {
629
- $( toggle_el ).find( '#' + $field_id ).prop( 'checked', true );
630
- }
631
-
632
- if ( $( field ).hasClass( 'yith-post-search' ) || $( field ).hasClass( 'yith-term-search' ) ) {
633
- $( toggle_el ).find( '#' + $field_id ).html( $( '#' + $( field ).attr( 'id' ) ).html() );
634
- }
635
-
636
- $( toggle_el ).find( '#' + $field_id ).val( $field_val );
637
-
638
- }
639
-
640
- } );
641
-
642
- $( toggle_el ).formatToggleTitle();
643
- var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
644
- $( document ).trigger( 'yith-toggle-element-item-before-add', [add_box, toggle_el, form_is_valid] );
645
-
646
- var delayInMilliseconds = 1000; //1 second
647
- setTimeout( function () {
648
- if ( form_is_valid.val() === 'yes' ) {
649
- $( toggle_element ).find( '.yith-toggle-elements' ).append( toggle_el );
650
- $( add_box ).find( '.yith-plugin-fw-datepicker' ).datepicker( 'destroy' );
651
- $( add_box ).html( '' );
652
- $( add_box ).prev( '.yith-add-box-button' ).trigger( 'click' );
653
- toggle_element.saveToggleElement();
654
-
655
- var delayInMilliseconds = 2000; //1 second
656
- setTimeout( function () {
657
- $( toggle_element ).find( '.highlight' ).removeClass( 'highlight' );
658
- }, delayInMilliseconds );
659
-
660
-
661
- $( document ).trigger( 'yith_fields_init' );
662
- }
663
- }, delayInMilliseconds );
664
-
665
-
666
- } );
667
-
668
- $( document ).on( 'click', '.yith-toggle-row .yith-save-button', function ( event ) {
669
- event.preventDefault();
670
- var toggle = $( this ).closest( '.toggle-element' ),
671
- toggle_row = $( this ).closest( '.yith-toggle-row' ),
672
- spinner = toggle_row.find( '.spinner' );
673
- toggle_row.formatToggleTitle();
674
-
675
- var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
676
- $( document ).trigger( 'yith-toggle-element-item-before-update', [toggle, toggle_row, form_is_valid] );
677
- if ( form_is_valid.val() === 'yes' ) {
678
- spinner.addClass( 'show' );
679
- toggle.saveToggleElement( spinner );
680
- }
681
- } );
682
-
683
- //register remove the dome and save the toggle
684
- $( document ).on( 'click', '.yith-toggle-row .yith-delete-button', function ( event ) {
685
- event.preventDefault();
686
- var toggle = $( this ).closest( '.toggle-element' ),
687
- toggle_row = $( this ).closest( '.yith-toggle-row' );
688
- toggle_row.remove();
689
- toggle.saveToggleElement();
690
- } );
691
-
692
- //register onoff status
693
- $( document ).on( 'click', '.yith-toggle-onoff', function ( event ) {
694
- event.preventDefault();
695
- var toggle = $( this ).closest( '.toggle-element' );
696
- toggle.saveToggleElement();
697
- } );
698
-
699
- // Radio
700
- $( document ).on( 'click', '.yith-plugin-fw-radio input[type=radio]', function () {
701
- var _radioContainer = $( this ).closest( '.yith-plugin-fw-radio' ),
702
- _value = $( this ).val();
703
-
704
- _radioContainer.val( _value ).data( 'value', _value ).trigger( 'change' );
705
- } );
706
-
707
- $( document.body ).on( 'yith-plugin-fw-init-radio', function () {
708
- $( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
709
- $( this ).val( $( this ).data( 'value' ) );
710
- $( this ).addClass( 'yith-plugin-fw-radio--initialized' );
711
- } );
712
- } ).trigger( 'yith-plugin-fw-init-radio' );
713
-
714
- // Password Eye field
715
- $( document ).on( 'click', '.yith-password-eye', function () {
716
- var $this = $( this ),
717
- inp = $( this ).closest( '.yith-password-wrapper' ).find( 'input' );
718
- if ( inp.attr( 'type' ) === "password" ) {
719
- inp.attr( 'type', 'text' );
720
- $this.addClass( 'yith-password-eye-closed' );
721
- } else {
722
- inp.attr( 'type', 'password' );
723
- $this.removeClass( 'yith-password-eye-closed' );
724
- }
725
- } );
726
-
727
- /**
728
- * Select2 - add class to stylize it with the new plugin-fw style
729
- */
730
- $( document ).on( 'select2:open', function ( e ) {
731
- if ( $( e.target ).closest( '.yith-plugin-ui' ).length ) {
732
- $( '.select2-results' ).closest( '.select2-container' ).addClass( 'yith-plugin-fw-select2-container' );
733
- }
734
- } );
735
- /**
736
- * Dimensions
737
- */
738
- var fw_dimensions = {
739
- selectors : {
740
- wrapper : '.yith-plugin-fw-dimensions',
741
- units : {
742
- wrapper : '.yith-plugin-fw-dimensions__units',
743
- single : '.yith-plugin-fw-dimensions__unit',
744
- value : '.yith-plugin-fw-dimensions__unit__value',
745
- selectedClass: 'yith-plugin-fw-dimensions__unit--selected'
746
- },
747
- linked : {
748
- button : '.yith-plugin-fw-dimensions__linked',
749
- value : '.yith-plugin-fw-dimensions__linked__value',
750
- wrapperActiveClass: 'yith-plugin-fw-dimensions--linked-active'
751
- },
752
- dimensions: {
753
- number: '.yith-plugin-fw-dimensions__dimension__number'
754
- }
755
- },
756
- init : function () {
757
- var self = fw_dimensions;
758
- $( document ).on( 'click', self.selectors.units.single, self.unitChange );
759
- $( document ).on( 'click', self.selectors.linked.button, self.linkedChange );
760
- $( document ).on( 'change keyup', self.selectors.dimensions.number, self.numberChange );
761
- },
762
- unitChange : function ( e ) {
763
- var unit = $( this ).closest( fw_dimensions.selectors.units.single ),
764
- wrapper = unit.closest( fw_dimensions.selectors.units.wrapper ),
765
- units = wrapper.find( fw_dimensions.selectors.units.single ),
766
- valueField = wrapper.find( fw_dimensions.selectors.units.value ).first(),
767
- value = unit.data( 'value' );
768
-
769
- units.removeClass( fw_dimensions.selectors.units.selectedClass );
770
- unit.addClass( fw_dimensions.selectors.units.selectedClass );
771
- valueField.val( value );
772
- },
773
- linkedChange: function () {
774
- var button = $( this ).closest( fw_dimensions.selectors.linked.button ),
775
- mainWrapper = button.closest( fw_dimensions.selectors.wrapper ),
776
- valueField = button.find( fw_dimensions.selectors.linked.value ),
777
- value = valueField.val();
778
-
779
- if ( 'yes' === value ) {
780
- mainWrapper.removeClass( fw_dimensions.selectors.linked.wrapperActiveClass );
781
- valueField.val( 'no' );
782
- } else {
783
- mainWrapper.addClass( fw_dimensions.selectors.linked.wrapperActiveClass );
784
- valueField.val( 'yes' );
785
-
786
- mainWrapper.find( fw_dimensions.selectors.dimensions.number ).first().trigger( 'change' );
787
- }
788
- },
789
- numberChange: function ( e ) {
790
- var number = $( this ).closest( fw_dimensions.selectors.dimensions.number ),
791
- mainWrapper = number.closest( fw_dimensions.selectors.wrapper );
792
- if ( mainWrapper.hasClass( fw_dimensions.selectors.linked.wrapperActiveClass ) ) {
793
- var numbers = mainWrapper.find( fw_dimensions.selectors.dimensions.number );
794
-
795
- numbers.val( number.val() );
796
- }
797
- }
798
- };
799
- fw_dimensions.init();
 
 
 
 
 
 
 
 
 
800
 
801
  } )( jQuery );
1
+ /* globals yith_framework_fw_fields, wp */
2
  ( function ( $ ) {
3
+ var yith_fields_init = function () {
4
+ var $datepicker = $( '.yith-plugin-fw-datepicker' ),
5
+ $colorpicker = $( '.yith-plugin-fw-colorpicker' ),
6
+ $upload = {
7
+ imgPreviewHandler : '.yith-plugin-fw-upload-img-preview',
8
+ uploadButtonHandler: '.yith-plugin-fw-upload-button',
9
+ imgUrlHandler : '.yith-plugin-fw-upload-img-url',
10
+ resetButtonHandler : '.yith-plugin-fw-upload-button-reset',
11
+ imgUrl : $( '.yith-plugin-fw-upload-img-url' )
12
+ },
13
+ $wpAddMedia = $( '.add_media' ),
14
+ $imageGallery = {
15
+ rootSelector : '.yith-plugin-fw-image-gallery',
16
+ buttonSelector: '.yith-plugin-fw-image-gallery .image-gallery-button',
17
+ sliderWrapper : $( '.yith-plugin-fw-image-gallery ul.slides-wrapper' )
18
+ },
19
+ $sidebars = $( '.yith-plugin-fw-sidebar-layout' ),
20
+ $slider = $( '.yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal' ),
21
+ $icons = $( '.yit-icons-manager-wrapper' ),
22
+ $checkgroup = $( ".yith-plugin-ui td.forminp-checkbox" );
23
+
24
+ /* Datepicker */
25
+ $datepicker.each( function () {
26
+ var args = $( this ).data();
27
+
28
+ // set animation to false to prevent style 'glitches' when removing class on closing
29
+ args.showAnim = false;
30
+ args.beforeShow = function ( input, instance ) {
31
+ instance.dpDiv.addClass( 'yith-plugin-fw-datepicker-div' );
32
+ };
33
+ args.onClose = function ( selectedDate, instance ) {
34
+ instance.dpDiv.removeClass( 'yith-plugin-fw-datepicker-div' );
35
+ };
36
+
37
+ $( this ).datepicker( args );
38
+ } );
39
+
40
+ /* Colorpicker */
41
+ $colorpicker.wpColorPicker( {
42
+ palettes: false,
43
+ width : 200,
44
+ mode : 'hsl',
45
+ clear : function () {
46
+ var input = $( this );
47
+ input.val( input.data( 'default-color' ) );
48
+ input.change();
49
+ }
50
+ } );
51
+
52
+
53
+ $colorpicker.each( function () {
54
+ var select_label = $( this ).data( 'variations-label' ),
55
+ wrap_main1 = $( this ).closest( '.yith-plugin-fw-colorpicker-field-wrapper' ),
56
+ wrap_main2 = $( this ).closest( '.yith-single-colorpicker' ),
57
+ wrap1 = wrap_main1.find( '.wp-picker-input-wrap' ),
58
+ wrap2 = wrap_main2.find( '.wp-picker-input-wrap' );
59
+
60
+ wrap1.length && wrap_main1.find( 'a.wp-color-result' ).attr( 'title', select_label );
61
+ wrap_main2.length && wrap_main2.find( 'a.wp-color-result' ).attr( 'title', select_label );
62
+
63
+ if ( !wrap1.find( '.wp-picker-default-custom' ).length ) {
64
+ var button = $( '<span/>' ).attr( {
65
+ class: "wp-picker-default-custom"
66
+ } );
67
+ wrap1.find( '.wp-picker-default' ).wrap( button );
68
+ }
69
+
70
+ if ( !wrap2.find( '.wp-picker-default-custom' ).length ) {
71
+ var button = $( '<span/>' ).attr( {
72
+ class: "wp-picker-default-custom"
73
+ } );
74
+ wrap2.find( '.wp-picker-default' ).wrap( button );
75
+ }
76
+ } );
77
+
78
+
79
+ /* Upload */
80
+ if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
81
+ var _custom_media = true;
82
+ // preview
83
+ $upload.imgUrl.change( function () {
84
+ var url = $( this ).val(),
85
+ re = new RegExp( "(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)" ),
86
+ preview = $( this ).parent().find( $upload.imgPreviewHandler ).first();
87
+
88
+ if ( preview.length < 1 ) {
89
+ preview = $( this ).parent().parent().find( $upload.imgPreviewHandler ).first();
90
+ }
91
+
92
+ if ( re.test( url ) ) {
93
+ preview.html( '<img src="' + url + '" style="max-width:100px; max-height:100px;" />' );
94
+ } else {
95
+ preview.html( '' );
96
+ }
97
+ } ).trigger( 'change' );
98
+
99
+ $( document ).on( 'click', $upload.uploadButtonHandler, function ( e ) {
100
+ e.preventDefault();
101
+
102
+ var t = $( this ),
103
+ custom_uploader,
104
+ id = t.attr( 'id' ).replace( /-button$/, '' ).replace( /(\[|\])/g, '\\$1' );
105
+
106
+ //If the uploader object has already been created, reopen the dialog
107
+ if ( custom_uploader ) {
108
+ custom_uploader.open();
109
+ return;
110
+ }
111
+
112
+ var custom_uploader_states = [
113
+ // Main states.
114
+ new wp.media.controller.Library( {
115
+ library : wp.media.query(),
116
+ multiple : false,
117
+ title : 'Choose Image',
118
+ priority : 20,
119
+ filterable: 'uploaded'
120
+ } )
121
+ ];
122
+
123
+ // Create the media frame.
124
+ custom_uploader = wp.media.frames.downloadable_file = wp.media( {
125
+ // Set the title of the modal.
126
+ title : 'Choose Image',
127
+ library : {
128
+ type: ''
129
+ },
130
+ button : {
131
+ text: 'Choose Image'
132
+ },
133
+ multiple: false,
134
+ states : custom_uploader_states
135
+ } );
136
+
137
+ //When a file is selected, grab the URL and set it as the text field's value
138
+ custom_uploader.on( 'select', function () {
139
+ var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
140
+
141
+ $( "#" + id ).val( attachment.url );
142
+ // Save the id of the selected element to an element which name is the same with a suffix "-yith-attachment-id"
143
+ if ( $( "#" + id + "-yith-attachment-id" ) ) {
144
+ $( "#" + id + "-yith-attachment-id" ).val( attachment.id );
145
+ }
146
+ $upload.imgUrl.trigger( 'change' );
147
+ } );
148
+
149
+ //Open the uploader dialog
150
+ custom_uploader.open();
151
+ } );
152
+
153
+ $( document ).on( 'click', $upload.resetButtonHandler, function ( e ) {
154
+ var t = $( this ),
155
+ id = t.attr( 'id' ).replace( /(\[|\])/g, '\\$1' ),
156
+ input_id = t.attr( 'id' ).replace( /-button-reset$/, '' ).replace( /(\[|\])/g, '\\$1' ),
157
+ default_value = $( '#' + id ).data( 'default' );
158
+
159
+ $( "#" + input_id ).val( default_value );
160
+ $upload.imgUrl.trigger( 'change' );
161
+ } );
162
+ }
163
+
164
+ $wpAddMedia.on( 'click', function () {
165
+ _custom_media = false;
166
+ } );
167
+
168
+ /* Image Gallery */
169
+ if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
170
+ $( document ).on( 'click', $imageGallery.buttonSelector, function ( e ) {
171
+ var $t = $( this ),
172
+ $container = $t.closest( $imageGallery.rootSelector ),
173
+ $image_gallery_ids = $container.find( '.image_gallery_ids' ),
174
+ attachment_ids = $image_gallery_ids.val(),
175
+ $gallery_images_wrapper = $container.find( 'ul.slides-wrapper' );
176
+
177
+ // Create the media frame.
178
+ var image_gallery_frame = wp.media.frames.image_gallery = wp.media( {
179
+ // Set the title of the modal.
180
+ title : $t.data( 'choose' ),
181
+ button: {
182
+ text: $t.data( 'update' )
183
+ },
184
+ states: [
185
+ new wp.media.controller.Library( {
186
+ title : $t.data( 'choose' ),
187
+ filterable: 'all',
188
+ multiple : true
189
+ } )
190
+ ]
191
+ } );
192
+
193
+ // When an image is selected, run a callback.
194
+ image_gallery_frame.on( 'select', function () {
195
+ var selection = image_gallery_frame.state().get( 'selection' );
196
+ selection.map( function ( attachment ) {
197
+ attachment = attachment.toJSON();
198
+
199
+ if ( attachment.id ) {
200
+ attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;
201
+ $gallery_images_wrapper.append( '<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment.sizes.thumbnail.url + '"/><ul class="actions"><li><a href="#" class="delete" title="' + $t.data( 'delete' ) + '">x</a></li></ul></li>' );
202
+ }
203
+ } );
204
+
205
+ $image_gallery_ids.val( attachment_ids );
206
+ } );
207
+
208
+ image_gallery_frame.open();
209
+
210
+ } );
211
+
212
+ // Image ordering
213
+ $imageGallery.sliderWrapper.each( function () {
214
+ var $t = $( this );
215
+ $t.sortable( {
216
+ items : 'li.image',
217
+ cursor : 'move',
218
+ scrollSensitivity : 40,
219
+ forcePlaceholderSize: true,
220
+ forceHelperSize : false,
221
+ helper : 'clone',
222
+ opacity : 0.65,
223
+ start : function ( event, ui ) {
224
+ ui.item.css( 'background-color', '#f6f6f6' );
225
+ },
226
+ stop : function ( event, ui ) {
227
+ ui.item.removeAttr( 'style' );
228
+ },
229
+ update : function ( event, ui ) {
230
+ var attachment_ids = '';
231
+
232
+ $t.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
233
+ var attachment_id = $( this ).attr( 'data-attachment_id' );
234
+ attachment_ids = attachment_ids + attachment_id + ',';
235
+ } );
236
+
237
+ $t.closest( $imageGallery.rootSelector ).find( '.image_gallery_ids' ).val( attachment_ids );
238
+ }
239
+ } );
240
+ } );
241
+
242
+ // Remove images
243
+ $imageGallery.sliderWrapper.on( 'click', 'a.delete', function ( e ) {
244
+ e.preventDefault();
245
+ var $wrapper = $( this ).closest( $imageGallery.rootSelector ),
246
+ $gallery = $wrapper.find( 'ul.slides-wrapper' ),
247
+ $image_gallery_ids = $wrapper.find( '.image_gallery_ids' ),
248
+ attachment_ids = '';
249
+
250
+ $( this ).closest( 'li.image' ).remove();
251
+
252
+ $gallery.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
253
+ var attachment_id = $( this ).attr( 'data-attachment_id' );
254
+ attachment_ids = attachment_ids + attachment_id + ',';
255
+ } );
256
+
257
+ $image_gallery_ids.val( attachment_ids );
258
+ } );
259
+ }
260
+
261
+
262
+ /* Sidebars */
263
+ $sidebars.each( function () {
264
+ var $images = $( this ).find( 'img' );
265
+ $images.on( 'click', function () {
266
+ var $container = $( this ).closest( '.yith-plugin-fw-sidebar-layout' ),
267
+ $left = $container.find( '.yith-plugin-fw-sidebar-layout-sidebar-left-container' ),
268
+ $right = $container.find( '.yith-plugin-fw-sidebar-layout-sidebar-right-container' ),
269
+ type = $( this ).data( 'type' );
270
+
271
+ $( this ).parent().children( ':radio' ).attr( 'checked', false );
272
+ $( this ).prev( ':radio' ).attr( 'checked', true );
273
+
274
+ if ( typeof type != 'undefined' ) {
275
+ switch ( type ) {
276
+ case 'left':
277
+ $left.show();
278
+ $right.hide();
279
+ break;
280
+ case 'right':
281
+ $right.show();
282
+ $left.hide();
283
+ break;
284
+ case 'double':
285
+ $left.show();
286
+ $right.show();
287
+ break;
288
+ default:
289
+ $left.hide();
290
+ $right.hide();
291
+ break;
292
+ }
293
+ }
294
+ } );
295
+ } );
296
+
297
+ /* Slider */
298
+ $slider.each( function () {
299
+ var val = $( this ).data( 'val' ),
300
+ minValue = $( this ).data( 'min' ),
301
+ maxValue = $( this ).data( 'max' ),
302
+ step = $( this ).data( 'step' ),
303
+ labels = $( this ).data( 'labels' );
304
+
305
+ $( this ).slider( {
306
+ value: val,
307
+ min : minValue,
308
+ max : maxValue,
309
+ range: 'min',
310
+ step : step,
311
+
312
+ create: function () {
313
+ $( this ).find( '.ui-slider-handle' ).text( $( this ).slider( "value" ) );
314
+ },
315
+
316
+
317
+ slide: function ( event, ui ) {
318
+ $( this ).find( 'input' ).val( ui.value );
319
+ $( this ).find( '.ui-slider-handle' ).text( ui.value );
320
+ $( this ).siblings( '.feedback' ).find( 'strong' ).text( ui.value + labels );
321
+ }
322
+ } );
323
+ } );
324
+
325
+ // Codemirror.
326
+ $( function () {
327
+ var codemirrorInit = function () {
328
+ if ( typeof wp !== 'undefined' && typeof wp.codeEditor !== 'undefined' ) {
329
+ $( '.codemirror:not(.codemirror--initialized)' ).each( function () {
330
+ var settings = $( this ).data( 'settings' ),
331
+ editor = wp.codeEditor.initialize( $( this ), settings );
332
+
333
+ $( this ).addClass( 'codemirror--initialized' );
334
+ $( this ).data( 'codemirrorInstance', editor );
335
+ } );
336
+ }
337
+ };
338
+ $( document ).on( 'yith-plugin-fw-codemirror-init', codemirrorInit ).trigger( 'yith-plugin-fw-codemirror-init' );
339
+ } );
340
+
341
+ /* Select All - Deselect All */
342
+ $( document ).on( 'click', '.yith-plugin-fw-select-all', function () {
343
+ var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
344
+ $targetSelect.find( 'option' ).prop( 'selected', true ).trigger( 'change' );
345
+ } );
346
+
347
+ $( document ).on( 'click', '.yith-plugin-fw-deselect-all', function () {
348
+ var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
349
+ $targetSelect.find( 'option' ).prop( 'selected', false ).trigger( 'change' );
350
+ } );
351
+
352
+
353
+ $icons.each( function () {
354
+ var $container = $( this ),
355
+ $preview = $container.find( '.yit-icons-manager-icon-preview' ).first(),
356
+ $text = $container.find( '.yit-icons-manager-icon-text' );
357
+
358
+ $container.on( 'click', '.yit-icons-manager-list li', function ( event ) {
359
+ var $target = $( event.target ).closest( 'li' ),
360
+ font = $target.data( 'font' ),
361
+ icon = $target.data( 'icon' ),
362
+ key = $target.data( 'key' ),
363
+ name = $target.data( 'name' );
364
+
365
+ $preview.attr( 'data-font', font );
366
+ $preview.attr( 'data-icon', icon );
367
+ $preview.attr( 'data-key', key );
368
+ $preview.attr( 'data-name', name );
369
+
370
+ $text.val( font + ':' + name );
371
+
372
+ $container.find( '.yit-icons-manager-list li' ).removeClass( 'active' );
373
+ $target.addClass( 'active' );
374
+ } );
375
+
376
+ $container.on( 'click', '.yit-icons-manager-action-set-default', function () {
377
+ $container.find( '.yit-icons-manager-list li.default' ).trigger( 'click' );
378
+ } );
379
+ } );
380
+
381
+ /** Select Images */
382
+ $( document ).on( 'click', '.yith-plugin-fw-select-images__item', function () {
383
+ var item = $( this ),
384
+ key = item.data( 'key' ),
385
+ wrapper = item.closest( '.yith-plugin-fw-select-images__wrapper' ),
386
+ items = wrapper.find( '.yith-plugin-fw-select-images__item' ),
387
+ select = wrapper.find( 'select' ).first();
388
+
389
+ if ( select.length ) {
390
+ select.val( key ).trigger( 'yith_select_images_value_changed' );
391
+ items.removeClass( 'yith-plugin-fw-select-images__item--selected' );
392
+ item.addClass( 'yith-plugin-fw-select-images__item--selected' );
393
+ }
394
+ } );
395
+
396
+ $( document.body ).trigger( 'wc-enhanced-select-init' );
397
+
398
+ $( document ).find( '.ui-sortable .yith-toggle-elements' ).sortable(
399
+ {
400
+ cursor : 'move',
401
+ axis : 'y',
402
+ scrollSensitivity : 40,
403
+ forcePlaceholderSize: true,
404
+ helper : 'clone',
405
+
406
+ stop: function ( event, ui ) {
407
+ var keys = jQuery( '.ui-sortable-handle' ),
408
+ i = 0,
409
+ array_keys = new Array();
410
+ for ( i = 0; i < keys.length; i++ ) {
411
+ array_keys[ i ] = $( keys[ i ] ).data( 'item_key' );
412
+ }
413
+ if ( array_keys.length > 0 ) {
414
+ var toggle = $( this ).closest( '.toggle-element' );
415
+ toggle.saveToggleElement( null, array_keys );
416
+ }
417
+ }
418
+ }
419
+ );
420
+
421
+ $( document.body ).trigger( 'yith-framework-enhanced-select-init' );
422
+ };
423
+
424
+ $( document ).on( 'yith_fields_init', yith_fields_init ).trigger( 'yith_fields_init' );
425
+
426
+ /* on-off */
427
+ $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
428
+ var input = $( this ).prev( 'input' ),
429
+ checked = input.prop( 'checked' );
430
+
431
+ if ( checked ) {
432
+ input.prop( 'checked', false ).attr( 'value', 'no' ).removeClass( 'onoffchecked' );
433
+ } else {
434
+ input.prop( 'checked', true ).attr( 'value', 'yes' ).addClass( 'onoffchecked' );
435
+ }
436
+
437
+ input.change();
438
+ } );
439
+
440
+
441
+ /** Toggle **/
442
+
443
+
444
+ //TOGGLE ELEMENT
445
+ $.fn.saveToggleElement = function ( spinner, array_keys ) {
446
+ var toggle = $( this ),
447
+ action = 'yith_plugin_fw_save_toggle_element',
448
+ formdata = toggle.serializeToggleElement(),
449
+ wrapper = toggle.find( '.yith-toggle_wrapper' ),
450
+ id = wrapper.attr( 'id' ),
451
+ current_tab = $.urlParam( 'tab' );
452
+
453
+ formdata.append( 'security', wrapper.data( 'nonce' ) );
454
+
455
+ if ( typeof array_keys != 'undefined' && array_keys.length > 0 ) {
456
+ formdata.append( 'yith_toggle_elements_order_keys', array_keys );
457
+ }
458
+
459
+ if ( toggle.closest( '.metaboxes-tab.yith-plugin-ui' ).length ) {
460
+ action = 'yith_plugin_fw_save_toggle_element_metabox';
461
+ post_id = $( this ).closest( 'form#post' ).find( '#post_ID' ).val();
462
+ yit_metaboxes_nonce = $( this ).closest( 'form#post' ).find( '#yit_metaboxes_nonce' ).val();
463
+ metabox_tab = $( this ).closest( '.tabs-panel' ).attr( 'id' );
464
+ url = yith_framework_fw_fields.ajax_url +
465
+ '?action=' + action +
466
+ "&post_ID=" + post_id +
467
+ '&yit_metaboxes_nonce=' + yit_metaboxes_nonce +
468
+ "&toggle_id=" + id +
469
+ "&metabox_tab=" + metabox_tab;
470
+ } else {
471
+ url = yith_framework_fw_fields.admin_url + '?action=' + action + '&tab=' + current_tab + "&toggle_id=" + id;
472
+ }
473
+
474
+ $.ajax( {
475
+ type : "POST",
476
+ url : url,
477
+ data : formdata,
478
+ contentType: false,
479
+ processData: false,
480
+ success : function ( result ) {
481
+ if ( spinner ) {
482
+ spinner.removeClass( 'show' );
483
+ }
484
+
485
+ $( document ).trigger( 'yith_save_toggle_element_done', [result, toggle] );
486
+ }
487
+ } );
488
+ };
489
+
490
+ $.fn.serializeToggleElement = function () {
491
+ var obj = $( this );
492
+ /* ADD FILE TO PARAM AJAX */
493
+ var formData = new FormData();
494
+ var params = $( obj ).find( ":input" ).serializeArray();
495
+
496
+ $.each( params, function ( i, val ) {
497
+ el_name = val.name;
498
+ formData.append( val.name, val.value );
499
+ } );
500
+
501
+ return formData;
502
+ };
503
+
504
+ $.fn.formatToggleTitle = function () {
505
+ var toggle_el = $( this ),
506
+ fields = toggle_el.find( ':input' ),
507
+ title = toggle_el.find( 'span.title' ).data( 'title_format' ),
508
+ subtitle = toggle_el.find( '.subtitle' ).data( 'subtitle_format' ),
509
+ regExp = new RegExp( "[^%%]+(?=[%%])", 'g' );
510
+
511
+ if ( typeof title != 'undefined' ) {
512
+ var res = title.match( regExp );
513
+ }
514
+
515
+ if ( typeof subtitle != 'undefined' ) {
516
+ var ressub = subtitle.match( regExp );
517
+ }
518
+
519
+ $.each( fields, function ( i, field ) {
520
+ if ( typeof $( field ).attr( 'id' ) != 'undefined' ) {
521
+ $field_id = $( field ).attr( 'id' );
522
+ $field_array = $field_id.split( '_' );
523
+ $field_array.pop();
524
+ $field_id = $field_array.join( '_' );
525
+ $field_val = $( field ).val();
526
+
527
+ if ( res != null && typeof res != 'undefined' && res.indexOf( $field_id ) !== -1 ) {
528
+ title = title.replace( '%%' + $field_id + '%%', $field_val );
529
+ }
530
+ if ( ressub != null && typeof ressub != 'undefined' && ressub.indexOf( $field_id ) !== -1 ) {
531
+ subtitle = subtitle.replace( '%%' + $field_id + '%%', $field_val );
532
+ }
533
+ }
534
+ } );
535
+
536
+ if ( '' !== title ) {
537
+ toggle_el.find( 'span.title' ).html( title );
538
+ }
539
+
540
+ if ( '' !== subtitle ) {
541
+ toggle_el.find( '.subtitle' ).html( subtitle );
542
+ }
543
+
544
+ $( document ).trigger( 'yith-toggle-element-item-title', [toggle_el] );
545
+ };
546
+
547
+ $.urlParam = function ( name ) {
548
+ var results = new RegExp( '[\?&]' + name + '=([^&#]*)' )
549
+ .exec( window.location.search );
550
+
551
+ return ( results !== null ) ? results[ 1 ] || 0 : false;
552
+ };
553
+
554
+ $( document ).on( 'click', '.yith-toggle-title', function ( event ) {
555
+ var _toggle = $( event.target ),
556
+ _section = _toggle.closest( '.yith-toggle-row' ),
557
+ _content = _section.find( '.yith-toggle-content' );
558
+
559
+ if ( _toggle.hasClass( 'yith-plugin-fw-onoff' ) || _toggle.hasClass( 'yith-icon-drag' ) ) {
560
+ return false;
561
+ }
562
+
563
+ if ( _section.is( '.yith-toggle-row-opened' ) ) {
564
+ _content.slideUp( 400 );
565
+ } else {
566
+ _content.slideDown( 400 );
567
+ }
568
+ _section.toggleClass( 'yith-toggle-row-opened' );
569
+ } );
570
+
571
+ /**Add new box toggle**/
572
+ $( document ).on( 'click', '.yith-add-box-button', function ( event ) {
573
+ event.preventDefault();
574
+ var $this = $( this ),
575
+ target_id = $this.data( 'box_id' ),
576
+ closed_label = $this.data( 'closed_label' ),
577
+ label = $this.data( 'opened_label' ),
578
+ id = $this.closest( '.yith-toggle_wrapper' ).attr( 'id' ),
579
+ template = wp.template( 'yith-toggle-element-add-box-content-' + id );
580
+
581
+ if ( '' !== target_id ) {
582
+ $( '#' + target_id ).html( template( { index: 'box_id' } ) ).slideToggle();
583
+ if ( closed_label !== '' ) {
584
+ if ( $this.html() === closed_label ) {
585
+ $this.html( label ).removeClass( 'closed' );
586
+ } else {
587
+ $this.html( closed_label ).addClass( 'closed' );
588
+ }
589
+ }
590
+
591
+ $( document ).trigger( 'yith_fields_init' );
592
+ $( document ).trigger( 'yith-add-box-button-toggle', [$this] );
593
+ }
594
+ } );
595
+
596
+ $( document ).on( 'click', '.yith-add-box-buttons .yith-save-button', function ( event ) {
597
+
598
+ event.preventDefault();
599
+ var add_box = $( this ).parents( '.yith-add-box' ),
600
+ id = $( this ).closest( '.yith-toggle_wrapper' ).attr( 'id' ),
601
+ spinner = add_box.find( '.spinner' ),
602
+ toggle_element = $( this ).parents( '.toggle-element' ),
603
+ fields = add_box.find( ':input' ),
604
+ counter = 0,
605
+ hidden_obj = $( '<input type="hidden">' );
606
+
607
+ toggle_element.find( '.yith-toggle-row' ).each( function() {
608
+ var key = parseInt( $( this ).data( 'item_key' ) );
609
+ if( counter <= key ) {
610
+ counter = key + 1;
611
+ }
612
+ });
613
+
614
+ hidden_obj.val( counter );
615
+
616
+ $( document ).trigger( 'yith-toggle-change-counter', [hidden_obj, add_box] );
617
+
618
+ counter = hidden_obj.val();
619
+ var template = wp.template( 'yith-toggle-element-item-' + id ),
620
+ toggle_el = $( template( { index: counter } ) );
621
+
622
+ spinner.addClass( 'show' );
623
+
624
+ $.each( fields, function ( i, field ) {
625
+ if ( typeof $( field ).attr( 'id' ) !== 'undefined' ) {
626
+
627
+ var _field_id = $( field ).attr( 'id' ),
628
+ _field_val = $( field ).val();
629
+
630
+ if ( 'radio' === $( field ).attr( 'type' ) ) {
631
+ _field_id = $( field ).closest( '.yith-plugin-fw-radio' ).attr( 'id' );
632
+ _field_id = _field_id.replace( 'new_', '' ) + '_' + counter;
633
+ _field_id = _field_id + '-' + _field_val;
634
+ } else {
635
+ _field_id = _field_id.replace( 'new_', '' ) + '_' + counter;
636
+ }
637
+
638
+ if ( $( field ).is( ':checked' ) ) {
639
+ $( toggle_el ).find( '#' + _field_id ).prop( 'checked', true );
640
+ }
641
+
642
+ if ( $( field ).hasClass( 'yith-post-search' ) || $( field ).hasClass( 'yith-term-search' ) ) {
643
+ $( toggle_el ).find( '#' + _field_id ).html( $( '#' + $( field ).attr( 'id' ) ).html() );
644
+ }
645
+
646
+ $( toggle_el ).find( '#' + _field_id ).val( _field_val );
647
+
648
+ }
649
+
650
+ } );
651
+
652
+ $( toggle_el ).formatToggleTitle();
653
+ var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
654
+ $( document ).trigger( 'yith-toggle-element-item-before-add', [add_box, toggle_el, form_is_valid] );
655
+
656
+ var delayInMilliseconds = 1000; //1 second
657
+ setTimeout( function () {
658
+ if ( form_is_valid.val() === 'yes' ) {
659
+ $( toggle_element ).find( '.yith-toggle-elements' ).append( toggle_el );
660
+ $( add_box ).find( '.yith-plugin-fw-datepicker' ).datepicker( 'destroy' );
661
+ $( add_box ).html( '' );
662
+ $( add_box ).prev( '.yith-add-box-button' ).trigger( 'click' );
663
+ toggle_element.saveToggleElement();
664
+
665
+ var delayInMilliseconds = 2000; //1 second
666
+ setTimeout( function () {
667
+ $( toggle_element ).find( '.highlight' ).removeClass( 'highlight' );
668
+ }, delayInMilliseconds );
669
+
670
+
671
+ $( document ).trigger( 'yith_fields_init' );
672
+ }
673
+ }, delayInMilliseconds );
674
+
675
+
676
+ } );
677
+
678
+ $( document ).on( 'click', '.yith-toggle-row .yith-save-button', function ( event ) {
679
+ event.preventDefault();
680
+ var toggle = $( this ).closest( '.toggle-element' ),
681
+ toggle_row = $( this ).closest( '.yith-toggle-row' ),
682
+ spinner = toggle_row.find( '.spinner' );
683
+ toggle_row.formatToggleTitle();
684
+
685
+ var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
686
+ $( document ).trigger( 'yith-toggle-element-item-before-update', [toggle, toggle_row, form_is_valid] );
687
+ if ( form_is_valid.val() === 'yes' ) {
688
+ spinner.addClass( 'show' );
689
+ toggle.saveToggleElement( spinner );
690
+ }
691
+ } );
692
+
693
+ //register remove the dome and save the toggle
694
+ $( document ).on( 'click', '.yith-toggle-row .yith-delete-button', function ( event ) {
695
+ event.preventDefault();
696
+ var toggle = $( this ).closest( '.toggle-element' ),
697
+ toggle_row = $( this ).closest( '.yith-toggle-row' );
698
+ toggle_row.remove();
699
+ toggle.saveToggleElement();
700
+ } );
701
+
702
+ //register onoff status
703
+ $( document ).on( 'click', '.yith-toggle-onoff', function ( event ) {
704
+ event.preventDefault();
705
+ var toggle = $( this ).closest( '.toggle-element' );
706
+ toggle.saveToggleElement();
707
+ } );
708
+
709
+ // Radio
710
+ $( document ).on( 'click', '.yith-plugin-fw-radio input[type=radio]', function () {
711
+ var _radioContainer = $( this ).closest( '.yith-plugin-fw-radio' ),
712
+ _value = $( this ).val();
713
+
714
+ _radioContainer.val( _value ).data( 'value', _value ).trigger( 'change' );
715
+ } );
716
+
717
+ $( document.body ).on( 'yith-plugin-fw-init-radio', function () {
718
+ $( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
719
+ $( this ).val( $( this ).data( 'value' ) );
720
+ $( this ).addClass( 'yith-plugin-fw-radio--initialized' );
721
+ } );
722
+ } ).trigger( 'yith-plugin-fw-init-radio' );
723
+
724
+ // Password Eye field
725
+ $( document ).on( 'click', '.yith-password-eye', function () {
726
+ var $this = $( this ),
727
+ inp = $( this ).closest( '.yith-password-wrapper' ).find( 'input' );
728
+ if ( inp.attr( 'type' ) === "password" ) {
729
+ inp.attr( 'type', 'text' );
730
+ $this.addClass( 'yith-password-eye-closed' );
731
+ } else {
732
+ inp.attr( 'type', 'password' );
733
+ $this.removeClass( 'yith-password-eye-closed' );
734
+ }
735
+ } );
736
+
737
+ /**
738
+ * Select2 - add class to stylize it with the new plugin-fw style
739
+ */
740
+ $( document ).on( 'select2:open', function ( e ) {
741
+ if ( $( e.target ).closest( '.yith-plugin-ui' ).length ) {
742
+ $( '.select2-results' ).closest( '.select2-container' ).addClass( 'yith-plugin-fw-select2-container' );
743
+ }
744
+ } );
745
+ /**
746
+ * Dimensions
747
+ */
748
+ var fw_dimensions = {
749
+ selectors : {
750
+ wrapper : '.yith-plugin-fw-dimensions',
751
+ units : {
752
+ wrapper : '.yith-plugin-fw-dimensions__units',
753
+ single : '.yith-plugin-fw-dimensions__unit',
754
+ value : '.yith-plugin-fw-dimensions__unit__value',
755
+ selectedClass: 'yith-plugin-fw-dimensions__unit--selected'
756
+ },
757
+ linked : {
758
+ button : '.yith-plugin-fw-dimensions__linked',
759
+ value : '.yith-plugin-fw-dimensions__linked__value',
760
+ wrapperActiveClass: 'yith-plugin-fw-dimensions--linked-active'
761
+ },
762
+ dimensions: {
763
+ number: '.yith-plugin-fw-dimensions__dimension__number'
764
+ }
765
+ },
766
+ init : function () {
767
+ var self = fw_dimensions;
768
+ $( document ).on( 'click', self.selectors.units.single, self.unitChange );
769
+ $( document ).on( 'click', self.selectors.linked.button, self.linkedChange );
770
+ $( document ).on( 'change keyup', self.selectors.dimensions.number, self.numberChange );
771
+ },
772
+ unitChange : function ( e ) {
773
+ var unit = $( this ).closest( fw_dimensions.selectors.units.single ),
774
+ wrapper = unit.closest( fw_dimensions.selectors.units.wrapper ),
775
+ units = wrapper.find( fw_dimensions.selectors.units.single ),
776
+ valueField = wrapper.find( fw_dimensions.selectors.units.value ).first(),
777
+ value = unit.data( 'value' );
778
+
779
+ units.removeClass( fw_dimensions.selectors.units.selectedClass );
780
+ unit.addClass( fw_dimensions.selectors.units.selectedClass );
781
+ valueField.val( value );
782
+ },
783
+ linkedChange: function () {
784
+ var button = $( this ).closest( fw_dimensions.selectors.linked.button ),
785
+ mainWrapper = button.closest( fw_dimensions.selectors.wrapper ),
786
+ valueField = button.find( fw_dimensions.selectors.linked.value ),
787
+ value = valueField.val();
788
+
789
+ if ( 'yes' === value ) {
790
+ mainWrapper.removeClass( fw_dimensions.selectors.linked.wrapperActiveClass );
791
+ valueField.val( 'no' );
792
+ } else {
793
+ mainWrapper.addClass( fw_dimensions.selectors.linked.wrapperActiveClass );
794
+ valueField.val( 'yes' );
795
+
796
+ mainWrapper.find( fw_dimensions.selectors.dimensions.number ).first().trigger( 'change' );
797
+ }
798
+ },
799
+ numberChange: function ( e ) {
800
+ var number = $( this ).closest( fw_dimensions.selectors.dimensions.number ),
801
+ mainWrapper = number.closest( fw_dimensions.selectors.wrapper );
802
+ if ( mainWrapper.hasClass( fw_dimensions.selectors.linked.wrapperActiveClass ) ) {
803
+ var numbers = mainWrapper.find( fw_dimensions.selectors.dimensions.number );
804
+
805
+ numbers.val( number.val() );
806
+ }
807
+ }
808
+ };
809
+ fw_dimensions.init();
810
 
811
  } )( jQuery );
plugin-fw/assets/js/yith-fields.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(document).on("yith_fields_init",function(){var t=e(".yith-plugin-fw-datepicker"),i=e(".yith-plugin-fw-colorpicker"),a={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:e(".yith-plugin-fw-upload-img-url")},n=e(".add_media"),l={sliderWrapper:e(".yith-plugin-fw .image-gallery ul.slides-wrapper"),buttonHandler:".yith-plugin-fw .image-gallery-button"},s=e(".yith-plugin-fw-sidebar-layout"),o=e(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),r=e(".codemirror"),d=e(".yit-icons-manager-wrapper");e(".yith-plugin-ui td.forminp-checkbox");t.each(function(){var t=e(this).data();t.showAnim=!1,t.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},t.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},e(this).datepicker(t)}),i.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.change()}}),i.each(function(){var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),a=e(this).closest(".yith-single-colorpicker"),n=i.find(".wp-picker-input-wrap"),l=a.find(".wp-picker-input-wrap");if(n.length&&i.find("a.wp-color-result").attr("title",t),a.length&&a.find("a.wp-color-result").attr("title",t),!n.find(".wp-picker-default-custom").length){var s=e("<span/>").attr({"class":"wp-picker-default-custom"});n.find(".wp-picker-default").wrap(s)}l.find(".wp-picker-default-custom").length||(s=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(s))}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(a.imgUrl.change(function(){var t=e(this).val(),i=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),n=e(this).parent().find(a.imgPreviewHandler).first();n.length<1&&(n=e(this).parent().parent().find(a.imgPreviewHandler).first()),i.test(t)?n.html('<img src="'+t+'" style="max-width:100px; max-height:100px;" />'):n.html("")}).trigger("change"),e(document).on("click",a.uploadButtonHandler,function(t){t.preventDefault();var i,n=e(this).attr("id").replace(/-button$/,"").replace(/(\[|\])/g,"\\$1");if(i)i.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(i=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var t=i.state().get("selection").first().toJSON();e("#"+n).val(t.url),e("#"+n+"-yith-attachment-id")&&e("#"+n+"-yith-attachment-id").val(t.id),a.imgUrl.trigger("change")}),i.open()}}),e(document).on("click",a.resetButtonHandler,function(t){var i=e(this),n=i.attr("id").replace(/(\[|\])/g,"\\$1"),l=i.attr("id").replace(/-button-reset$/,"").replace(/(\[|\])/g,"\\$1"),s=e("#"+n).data("default");e("#"+l).val(s),a.imgUrl.trigger("change")}));n.on("click",function(){}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("click",l.buttonHandler,function(t){var i=e(this),a=i.closest(".image-gallery"),n=a.find(".image_gallery_ids"),l=n.val(),s=a.find("ul.slides-wrapper"),o=wp.media.frames.image_gallery=wp.media({title:i.data("choose"),button:{text:i.data("update")},states:[new wp.media.controller.Library({title:i.data("choose"),filterable:"all",multiple:!0})]});o.on("select",function(){o.state().get("selection").map(function(e){(e=e.toJSON()).id&&(l=l?l+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+i.data("delete")+'">x</a></li></ul></li>'))}),n.val(l)}),o.open()}),l.sliderWrapper.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(i,a){var n="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");n=n+t+","}),t.closest(".image-gallery").find(".image_gallery_ids").val(n)}})}),l.sliderWrapper.on("click","a.delete",function(){var t=e(this).closest(".image-gallery"),i=e(this).closest(".image-gallery ul.slides-wrapper"),a=t.find(".image_gallery_ids"),n="";e(this).closest("li.image").remove(),i.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");n=n+t+","}),a.val(n)})),s.each(function(){e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),a=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),n=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==n)switch(n){case"left":i.show(),a.hide();break;case"right":a.show(),i.hide();break;case"double":i.show(),a.show();break;default:i.hide(),a.hide()}})}),o.each(function(){var t=e(this).data("val"),i=e(this).data("min"),a=e(this).data("max"),n=e(this).data("step"),l=e(this).data("labels");e(this).slider({value:t,min:i,max:a,range:"min",step:n,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+l)}})}),r.each(function(t,i){var a=CodeMirror.fromTextArea(i,{lineNumbers:1,mode:"javascript",showCursorWhenSelecting:!0});e(i).data("codemirrorInstance",a)}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),d.each(function(){var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),a=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(n){var l=e(n.target).closest("li"),s=l.data("font"),o=l.data("icon"),r=l.data("key"),d=l.data("name");i.attr("data-font",s),i.attr("data-icon",o),i.attr("data-key",r),i.attr("data-name",d),a.val(s+":"+d),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),a=t.closest(".yith-plugin-fw-select-images__wrapper"),n=a.find(".yith-plugin-fw-select-images__item"),l=a.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed"),n.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document.body).trigger("wc-enhanced-select-init"),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var a=jQuery(".ui-sortable-handle"),n=0,l=new Array;for(n=0;n<a.length;n++)l[n]=e(a[n]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("checked")?t.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):t.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),t.change()}),e.fn.saveToggleElement=function(t,i){var a=e(this),n="yith_plugin_fw_save_toggle_element",l=a.serializeToggleElement(),s=a.find(".yith-toggle_wrapper"),o=s.attr("id"),r=e.urlParam("tab");l.append("security",s.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),a.closest(".metaboxes-tab.yith-plugin-ui").length?(n="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+n+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+o+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+n+"&tab="+r+"&toggle_id="+o,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,a])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,a=e(t).find(":input").serializeArray();return e.each(a,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),a=t.find("span.title").data("title_format"),n=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==a)var s=a.match(l);if(void 0!==n)var o=n.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)))}),""!==a&&t.find("span.title").html(a),""!==n&&t.find(".subtitle").html(n),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),a=i.closest(".yith-toggle-row"),n=a.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;a.is(".yith-toggle-row-opened")?n.slideUp(400):n.slideDown(400),a.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),a=i.data("box_id"),n=i.data("closed_label"),l=i.data("opened_label"),s=i.closest(".yith-toggle_wrapper").attr("id"),o=wp.template("yith-toggle-element-add-box-content-"+s);""!==a&&(e("#"+a).html(o({index:"box_id"})).slideToggle(),""!==n&&(i.html()===n?i.html(l).removeClass("closed"):i.html(n).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),a=e(this).closest(".yith-toggle_wrapper").attr("id"),n=i.find(".spinner"),l=e(this).parents(".toggle-element"),s=i.find(":input"),o=l.find(".yith-toggle-row").length,r=e('<input type="hidden">');r.val(o),e(document).trigger("yith-toggle-change-counter",[r,i]),o=r.val();var d=wp.template("yith-toggle-element-item-"+a),c=e(d({index:o}));n.addClass("show"),e.each(s,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_val=e(i).val(),"radio"==e(i).attr("type")?($field_id=$field_id.replace("new_",""),$field_id=$field_id.replace("-"+$field_val,""),$field_id=$field_id+"_dataindex-"+$field_val):$field_id=$field_id.replace("new_","")+"_"+o,e(i).is(":checked")&&e(c).find("#"+$field_id).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(c).find("#"+$field_id).html(e("#"+e(i).attr("id")).html()),e(c).find("#"+$field_id).val($field_val))}),e(c).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,c,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(c),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),a=e(this).closest(".yith-toggle-row"),n=a.find(".spinner");a.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,a,l]),"yes"===l.val()&&(n.addClass("show"),i.saveToggleElement(n))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).val(e(this).data("value")),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var t={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var i=t;e(document).on("click",i.selectors.units.single,i.unitChange),e(document).on("click",i.selectors.linked.button,i.linkedChange),e(document).on("change keyup",i.selectors.dimensions.number,i.numberChange)},unitChange:function(i){var a=e(this).closest(t.selectors.units.single),n=a.closest(t.selectors.units.wrapper),l=n.find(t.selectors.units.single),s=n.find(t.selectors.units.value).first(),o=a.data("value");l.removeClass(t.selectors.units.selectedClass),a.addClass(t.selectors.units.selectedClass),s.val(o)},linkedChange:function(){var i=e(this).closest(t.selectors.linked.button),a=i.closest(t.selectors.wrapper),n=i.find(t.selectors.linked.value);"yes"===n.val()?(a.removeClass(t.selectors.linked.wrapperActiveClass),n.val("no")):(a.addClass(t.selectors.linked.wrapperActiveClass),n.val("yes"),a.find(t.selectors.dimensions.number).first().trigger("change"))},numberChange:function(i){var a=e(this).closest(t.selectors.dimensions.number),n=a.closest(t.selectors.wrapper);n.hasClass(t.selectors.linked.wrapperActiveClass)&&n.find(t.selectors.dimensions.number).val(a.val())}};t.init()}(jQuery);
1
+ !function(e){e(document).on("yith_fields_init",function(){var t=e(".yith-plugin-fw-datepicker"),i=e(".yith-plugin-fw-colorpicker"),n={imgPreviewHandler:".yith-plugin-fw-upload-img-preview",uploadButtonHandler:".yith-plugin-fw-upload-button",imgUrlHandler:".yith-plugin-fw-upload-img-url",resetButtonHandler:".yith-plugin-fw-upload-button-reset",imgUrl:e(".yith-plugin-fw-upload-img-url")},a=e(".add_media"),l={rootSelector:".yith-plugin-fw-image-gallery",buttonSelector:".yith-plugin-fw-image-gallery .image-gallery-button",sliderWrapper:e(".yith-plugin-fw-image-gallery ul.slides-wrapper")},o=e(".yith-plugin-fw-sidebar-layout"),s=e(".yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal"),r=e(".yit-icons-manager-wrapper");e(".yith-plugin-ui td.forminp-checkbox");t.each(function(){var t=e(this).data();t.showAnim=!1,t.beforeShow=function(e,t){t.dpDiv.addClass("yith-plugin-fw-datepicker-div")},t.onClose=function(e,t){t.dpDiv.removeClass("yith-plugin-fw-datepicker-div")},e(this).datepicker(t)}),i.wpColorPicker({palettes:!1,width:200,mode:"hsl",clear:function(){var t=e(this);t.val(t.data("default-color")),t.change()}}),i.each(function(){var t=e(this).data("variations-label"),i=e(this).closest(".yith-plugin-fw-colorpicker-field-wrapper"),n=e(this).closest(".yith-single-colorpicker"),a=i.find(".wp-picker-input-wrap"),l=n.find(".wp-picker-input-wrap");if(a.length&&i.find("a.wp-color-result").attr("title",t),n.length&&n.find("a.wp-color-result").attr("title",t),!a.find(".wp-picker-default-custom").length){var o=e("<span/>").attr({"class":"wp-picker-default-custom"});a.find(".wp-picker-default").wrap(o)}l.find(".wp-picker-default-custom").length||(o=e("<span/>").attr({"class":"wp-picker-default-custom"}),l.find(".wp-picker-default").wrap(o))}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(n.imgUrl.change(function(){var t=e(this).val(),i=new RegExp("(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)"),a=e(this).parent().find(n.imgPreviewHandler).first();a.length<1&&(a=e(this).parent().parent().find(n.imgPreviewHandler).first()),i.test(t)?a.html('<img src="'+t+'" style="max-width:100px; max-height:100px;" />'):a.html("")}).trigger("change"),e(document).on("click",n.uploadButtonHandler,function(t){t.preventDefault();var i,a=e(this).attr("id").replace(/-button$/,"").replace(/(\[|\])/g,"\\$1");if(i)i.open();else{var l=[new wp.media.controller.Library({library:wp.media.query(),multiple:!1,title:"Choose Image",priority:20,filterable:"uploaded"})];(i=wp.media.frames.downloadable_file=wp.media({title:"Choose Image",library:{type:""},button:{text:"Choose Image"},multiple:!1,states:l})).on("select",function(){var t=i.state().get("selection").first().toJSON();e("#"+a).val(t.url),e("#"+a+"-yith-attachment-id")&&e("#"+a+"-yith-attachment-id").val(t.id),n.imgUrl.trigger("change")}),i.open()}}),e(document).on("click",n.resetButtonHandler,function(t){var i=e(this),a=i.attr("id").replace(/(\[|\])/g,"\\$1"),l=i.attr("id").replace(/-button-reset$/,"").replace(/(\[|\])/g,"\\$1"),o=e("#"+a).data("default");e("#"+l).val(o),n.imgUrl.trigger("change")}));a.on("click",function(){}),"undefined"!=typeof wp&&"undefined"!=typeof wp.media&&(e(document).on("click",l.buttonSelector,function(t){var i=e(this),n=i.closest(l.rootSelector),a=n.find(".image_gallery_ids"),o=a.val(),s=n.find("ul.slides-wrapper"),r=wp.media.frames.image_gallery=wp.media({title:i.data("choose"),button:{text:i.data("update")},states:[new wp.media.controller.Library({title:i.data("choose"),filterable:"all",multiple:!0})]});r.on("select",function(){r.state().get("selection").map(function(e){(e=e.toJSON()).id&&(o=o?o+","+e.id:e.id,s.append('<li class="image" data-attachment_id="'+e.id+'"><img src="'+e.sizes.thumbnail.url+'"/><ul class="actions"><li><a href="#" class="delete" title="'+i.data("delete")+'">x</a></li></ul></li>'))}),a.val(o)}),r.open()}),l.sliderWrapper.each(function(){var t=e(this);t.sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(e,t){t.item.removeAttr("style")},update:function(i,n){var a="";t.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");a=a+t+","}),t.closest(l.rootSelector).find(".image_gallery_ids").val(a)}})}),l.sliderWrapper.on("click","a.delete",function(t){t.preventDefault();var i=e(this).closest(l.rootSelector),n=i.find("ul.slides-wrapper"),a=i.find(".image_gallery_ids"),o="";e(this).closest("li.image").remove(),n.find("li.image").css("cursor","default").each(function(){var t=e(this).attr("data-attachment_id");o=o+t+","}),a.val(o)})),o.each(function(){e(this).find("img").on("click",function(){var t=e(this).closest(".yith-plugin-fw-sidebar-layout"),i=t.find(".yith-plugin-fw-sidebar-layout-sidebar-left-container"),n=t.find(".yith-plugin-fw-sidebar-layout-sidebar-right-container"),a=e(this).data("type");if(e(this).parent().children(":radio").attr("checked",!1),e(this).prev(":radio").attr("checked",!0),void 0!==a)switch(a){case"left":i.show(),n.hide();break;case"right":n.show(),i.hide();break;case"double":i.show(),n.show();break;default:i.hide(),n.hide()}})}),s.each(function(){var t=e(this).data("val"),i=e(this).data("min"),n=e(this).data("max"),a=e(this).data("step"),l=e(this).data("labels");e(this).slider({value:t,min:i,max:n,range:"min",step:a,create:function(){e(this).find(".ui-slider-handle").text(e(this).slider("value"))},slide:function(t,i){e(this).find("input").val(i.value),e(this).find(".ui-slider-handle").text(i.value),e(this).siblings(".feedback").find("strong").text(i.value+l)}})}),e(function(){e(document).on("yith-plugin-fw-codemirror-init",function(){"undefined"!=typeof wp&&"undefined"!=typeof wp.codeEditor&&e(".codemirror:not(.codemirror--initialized)").each(function(){var t=e(this).data("settings"),i=wp.codeEditor.initialize(e(this),t);e(this).addClass("codemirror--initialized"),e(this).data("codemirrorInstance",i)})}).trigger("yith-plugin-fw-codemirror-init")}),e(document).on("click",".yith-plugin-fw-select-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!0).trigger("change")}),e(document).on("click",".yith-plugin-fw-deselect-all",function(){e("#"+e(this).data("select-id")).find("option").prop("selected",!1).trigger("change")}),r.each(function(){var t=e(this),i=t.find(".yit-icons-manager-icon-preview").first(),n=t.find(".yit-icons-manager-icon-text");t.on("click",".yit-icons-manager-list li",function(a){var l=e(a.target).closest("li"),o=l.data("font"),s=l.data("icon"),r=l.data("key"),d=l.data("name");i.attr("data-font",o),i.attr("data-icon",s),i.attr("data-key",r),i.attr("data-name",d),n.val(o+":"+d),t.find(".yit-icons-manager-list li").removeClass("active"),l.addClass("active")}),t.on("click",".yit-icons-manager-action-set-default",function(){t.find(".yit-icons-manager-list li.default").trigger("click")})}),e(document).on("click",".yith-plugin-fw-select-images__item",function(){var t=e(this),i=t.data("key"),n=t.closest(".yith-plugin-fw-select-images__wrapper"),a=n.find(".yith-plugin-fw-select-images__item"),l=n.find("select").first();l.length&&(l.val(i).trigger("yith_select_images_value_changed"),a.removeClass("yith-plugin-fw-select-images__item--selected"),t.addClass("yith-plugin-fw-select-images__item--selected"))}),e(document.body).trigger("wc-enhanced-select-init"),e(document).find(".ui-sortable .yith-toggle-elements").sortable({cursor:"move",axis:"y",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",stop:function(t,i){var n=jQuery(".ui-sortable-handle"),a=0,l=new Array;for(a=0;a<n.length;a++)l[a]=e(n[a]).data("item_key");l.length>0&&e(this).closest(".toggle-element").saveToggleElement(null,l)}}),e(document.body).trigger("yith-framework-enhanced-select-init")}).trigger("yith_fields_init"),e(document).on("click",".yith-plugin-fw-onoff-container span",function(){var t=e(this).prev("input");t.prop("checked")?t.prop("checked",!1).attr("value","no").removeClass("onoffchecked"):t.prop("checked",!0).attr("value","yes").addClass("onoffchecked"),t.change()}),e.fn.saveToggleElement=function(t,i){var n=e(this),a="yith_plugin_fw_save_toggle_element",l=n.serializeToggleElement(),o=n.find(".yith-toggle_wrapper"),s=o.attr("id"),r=e.urlParam("tab");l.append("security",o.data("nonce")),void 0!==i&&i.length>0&&l.append("yith_toggle_elements_order_keys",i),n.closest(".metaboxes-tab.yith-plugin-ui").length?(a="yith_plugin_fw_save_toggle_element_metabox",post_id=e(this).closest("form#post").find("#post_ID").val(),yit_metaboxes_nonce=e(this).closest("form#post").find("#yit_metaboxes_nonce").val(),metabox_tab=e(this).closest(".tabs-panel").attr("id"),url=yith_framework_fw_fields.ajax_url+"?action="+a+"&post_ID="+post_id+"&yit_metaboxes_nonce="+yit_metaboxes_nonce+"&toggle_id="+s+"&metabox_tab="+metabox_tab):url=yith_framework_fw_fields.admin_url+"?action="+a+"&tab="+r+"&toggle_id="+s,e.ajax({type:"POST",url:url,data:l,contentType:!1,processData:!1,success:function(i){t&&t.removeClass("show"),e(document).trigger("yith_save_toggle_element_done",[i,n])}})},e.fn.serializeToggleElement=function(){var t=e(this),i=new FormData,n=e(t).find(":input").serializeArray();return e.each(n,function(e,t){el_name=t.name,i.append(t.name,t.value)}),i},e.fn.formatToggleTitle=function(){var t=e(this),i=t.find(":input"),n=t.find("span.title").data("title_format"),a=t.find(".subtitle").data("subtitle_format"),l=new RegExp("[^%%]+(?=[%%])","g");if(void 0!==n)var o=n.match(l);if(void 0!==a)var s=a.match(l);e.each(i,function(t,i){void 0!==e(i).attr("id")&&($field_id=e(i).attr("id"),$field_array=$field_id.split("_"),$field_array.pop(),$field_id=$field_array.join("_"),$field_val=e(i).val(),null!=o&&void 0!==o&&-1!==o.indexOf($field_id)&&(n=n.replace("%%"+$field_id+"%%",$field_val)),null!=s&&void 0!==s&&-1!==s.indexOf($field_id)&&(a=a.replace("%%"+$field_id+"%%",$field_val)))}),""!==n&&t.find("span.title").html(n),""!==a&&t.find(".subtitle").html(a),e(document).trigger("yith-toggle-element-item-title",[t])},e.urlParam=function(e){var t=new RegExp("[?&]"+e+"=([^&#]*)").exec(window.location.search);return null!==t&&(t[1]||0)},e(document).on("click",".yith-toggle-title",function(t){var i=e(t.target),n=i.closest(".yith-toggle-row"),a=n.find(".yith-toggle-content");if(i.hasClass("yith-plugin-fw-onoff")||i.hasClass("yith-icon-drag"))return!1;n.is(".yith-toggle-row-opened")?a.slideUp(400):a.slideDown(400),n.toggleClass("yith-toggle-row-opened")}),e(document).on("click",".yith-add-box-button",function(t){t.preventDefault();var i=e(this),n=i.data("box_id"),a=i.data("closed_label"),l=i.data("opened_label"),o=i.closest(".yith-toggle_wrapper").attr("id"),s=wp.template("yith-toggle-element-add-box-content-"+o);""!==n&&(e("#"+n).html(s({index:"box_id"})).slideToggle(),""!==a&&(i.html()===a?i.html(l).removeClass("closed"):i.html(a).addClass("closed")),e(document).trigger("yith_fields_init"),e(document).trigger("yith-add-box-button-toggle",[i]))}),e(document).on("click",".yith-add-box-buttons .yith-save-button",function(t){t.preventDefault();var i=e(this).parents(".yith-add-box"),n=e(this).closest(".yith-toggle_wrapper").attr("id"),a=i.find(".spinner"),l=e(this).parents(".toggle-element"),o=i.find(":input"),s=0,r=e('<input type="hidden">');l.find(".yith-toggle-row").each(function(){var t=parseInt(e(this).data("item_key"));s<=t&&(s=t+1)}),r.val(s),e(document).trigger("yith-toggle-change-counter",[r,i]),s=r.val();var d=wp.template("yith-toggle-element-item-"+n),c=e(d({index:s}));a.addClass("show"),e.each(o,function(t,i){if(void 0!==e(i).attr("id")){var n=e(i).attr("id"),a=e(i).val();n="radio"===e(i).attr("type")?(n=(n=e(i).closest(".yith-plugin-fw-radio").attr("id")).replace("new_","")+"_"+s)+"-"+a:n.replace("new_","")+"_"+s,e(i).is(":checked")&&e(c).find("#"+n).prop("checked",!0),(e(i).hasClass("yith-post-search")||e(i).hasClass("yith-term-search"))&&e(c).find("#"+n).html(e("#"+e(i).attr("id")).html()),e(c).find("#"+n).val(a)}}),e(c).formatToggleTitle();var u=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-add",[i,c,u]);setTimeout(function(){if("yes"===u.val()){e(l).find(".yith-toggle-elements").append(c),e(i).find(".yith-plugin-fw-datepicker").datepicker("destroy"),e(i).html(""),e(i).prev(".yith-add-box-button").trigger("click"),l.saveToggleElement();setTimeout(function(){e(l).find(".highlight").removeClass("highlight")},2e3),e(document).trigger("yith_fields_init")}},1e3)}),e(document).on("click",".yith-toggle-row .yith-save-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element"),n=e(this).closest(".yith-toggle-row"),a=n.find(".spinner");n.formatToggleTitle();var l=e('<input type="hidden">').val("yes");e(document).trigger("yith-toggle-element-item-before-update",[i,n,l]),"yes"===l.val()&&(a.addClass("show"),i.saveToggleElement(a))}),e(document).on("click",".yith-toggle-row .yith-delete-button",function(t){t.preventDefault();var i=e(this).closest(".toggle-element");e(this).closest(".yith-toggle-row").remove(),i.saveToggleElement()}),e(document).on("click",".yith-toggle-onoff",function(t){t.preventDefault(),e(this).closest(".toggle-element").saveToggleElement()}),e(document).on("click",".yith-plugin-fw-radio input[type=radio]",function(){var t=e(this).closest(".yith-plugin-fw-radio"),i=e(this).val();t.val(i).data("value",i).trigger("change")}),e(document.body).on("yith-plugin-fw-init-radio",function(){e(".yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)").each(function(){e(this).val(e(this).data("value")),e(this).addClass("yith-plugin-fw-radio--initialized")})}).trigger("yith-plugin-fw-init-radio"),e(document).on("click",".yith-password-eye",function(){var t=e(this),i=e(this).closest(".yith-password-wrapper").find("input");"password"===i.attr("type")?(i.attr("type","text"),t.addClass("yith-password-eye-closed")):(i.attr("type","password"),t.removeClass("yith-password-eye-closed"))}),e(document).on("select2:open",function(t){e(t.target).closest(".yith-plugin-ui").length&&e(".select2-results").closest(".select2-container").addClass("yith-plugin-fw-select2-container")});var t={selectors:{wrapper:".yith-plugin-fw-dimensions",units:{wrapper:".yith-plugin-fw-dimensions__units",single:".yith-plugin-fw-dimensions__unit",value:".yith-plugin-fw-dimensions__unit__value",selectedClass:"yith-plugin-fw-dimensions__unit--selected"},linked:{button:".yith-plugin-fw-dimensions__linked",value:".yith-plugin-fw-dimensions__linked__value",wrapperActiveClass:"yith-plugin-fw-dimensions--linked-active"},dimensions:{number:".yith-plugin-fw-dimensions__dimension__number"}},init:function(){var i=t;e(document).on("click",i.selectors.units.single,i.unitChange),e(document).on("click",i.selectors.linked.button,i.linkedChange),e(document).on("change keyup",i.selectors.dimensions.number,i.numberChange)},unitChange:function(i){var n=e(this).closest(t.selectors.units.single),a=n.closest(t.selectors.units.wrapper),l=a.find(t.selectors.units.single),o=a.find(t.selectors.units.value).first(),s=n.data("value");l.removeClass(t.selectors.units.selectedClass),n.addClass(t.selectors.units.selectedClass),o.val(s)},linkedChange:function(){var i=e(this).closest(t.selectors.linked.button),n=i.closest(t.selectors.wrapper),a=i.find(t.selectors.linked.value);"yes"===a.val()?(n.removeClass(t.selectors.linked.wrapperActiveClass),a.val("no")):(n.addClass(t.selectors.linked.wrapperActiveClass),a.val("yes"),n.find(t.selectors.dimensions.number).first().trigger("change"))},numberChange:function(i){var n=e(this).closest(t.selectors.dimensions.number),a=n.closest(t.selectors.wrapper);a.hasClass(t.selectors.linked.wrapperActiveClass)&&a.find(t.selectors.dimensions.number).val(n.val())}};t.init()}(jQuery);
plugin-fw/assets/js/yith-gutenberg.js CHANGED
@@ -113,7 +113,8 @@
113
 
114
  $.each($props.attributes, function ($attribute_name, $attribute_args) {
115
  var ComponentControl = null,
116
- block_type = $attribute_args.blocktype;
 
117
  if (typeof block_type != 'undefined') {
118
  switch (block_type) {
119
  case 'select':
@@ -176,11 +177,11 @@
176
  min: $attribute_args.min,
177
  max: $attribute_args.max,
178
  multiple: $attribute_args.multiple,
179
- onChange: function (new_value, attribute_name = $attribute_name) {
180
- args = onChangeEvent(new_value, attribute_name, args, block_type);
181
  },
182
- onChangeComplete: function (new_value, attribute_name = $attribute_name) {
183
- args = onChangeEvent(new_value, attribute_name, args, block_type);
184
  },
185
  },
186
  )
113
 
114
  $.each($props.attributes, function ($attribute_name, $attribute_args) {
115
  var ComponentControl = null,
116
+ block_type = $attribute_args.blocktype,
117
+ name = $attribute_name;
118
  if (typeof block_type != 'undefined') {
119
  switch (block_type) {
120
  case 'select':
177
  min: $attribute_args.min,
178
  max: $attribute_args.max,
179
  multiple: $attribute_args.multiple,
180
+ onChange: function (new_value) {
181
+ args = onChangeEvent(new_value, name, args, block_type);
182
  },
183
+ onChangeComplete: function (new_value) {
184
+ args = onChangeEvent(new_value, name, args, block_type);
185
  },
186
  },
187
  )
plugin-fw/assets/js/yith-gutenberg.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){wp.i18n.__;var t=wp.element.createElement,o=wp.element.Fragment,n=(wp.components.PanelBody,wp.blocks.registerBlockType),c=(wp.editor.RichText,wp.editor.BlockControls,wp.editor.InspectorControls),r=(wp.editor.AlignmentToolbar,wp.components,wp.element.RawHTML),a=wp.components.SelectControl,i=wp.components.ToggleControl,s=wp.components.CheckboxControl,l=wp.components.RangeControl,p=wp.components.ColorPicker,u=wp.components.RadioControl,d=wp.components.TextControl,h=wp.components.TextareaControl;const C=t("svg",{width:22,height:22},t("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));function b(o,n,c){var a="",i="";if("undefined"!=typeof n.callback&&"function"==typeof e[n.callback])a=e[n.callback](o,n);else{var s="["+n.shortcode_name;e.each(o.attributes,function(e,t){if("undefined"!=typeof n.attributes&&"undefined"!=typeof n.attributes[e]){s+=" "+e+"=";var o=n.attributes[e].remove_quotes;s+=1==o?t:'"'+t+'"'}}),s+="]";var l=md5(s);i='<span class="yith_block_'+l+'">'+s+"</span>","edit"==c&&0!=n.do_shortcode&&function(t){var o=null;return e(document).trigger("yith_plugin_fw_gutenberg_before_do_shortcode",[s,t]),e.ajax({async:!0,url:yith_gutenberg_ajax.ajaxurl,method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:s},success:function(n){""!=(o=n)&&(e(".yith_block_"+t).html(o),e(document).trigger("yith_plugin_fw_gutenberg_success_do_shortcode",[s,t,o]))}}),e(document).trigger("yith_plugin_fw_gutenberg_after_do_shortcode",[s,t,o]),o}(l),a=t(r,null,i)}return a}function g(e,t,o,n){var c={};return"colorpicker"!=n&&"color"!=n||(e=e.hex),c[t]=e,o.setAttributes(c),o}e.each(yith_gutenberg,function(r,f){n("yith/"+r,{title:f.title,description:f.description,category:f.category,attributes:f.attributes,icon:"undefined"!=typeof f.icon?f.icon:C,keywords:f.keywords,edit:function(n){var r=new Array;return e.each(f.attributes,function(e,o){var c=null,C=o.blocktype;if(void 0!==C){switch(C){case"select":c=a;break;case"text":c=d;break;case"textarea":c=h;break;case"toggle":c=i;break;case"checkbox":c=s;break;case"number":case"range":c=l;break;case"color":case"colorpicker":c=p;break;case"radio":c=u}if(null!=c){var b=helpMessageUncheked="";"undefined"!=typeof o.helps&&"undefined"!=typeof o.helps.checked&&"undefined"!=typeof o.helps.unchecked?(b=o.helps.checked,helpMessageUncheked=o.helps.unchecked):"undefined"!=typeof o.help&&(b=helpMessageUncheked=o.help),r.push(t(c,{value:n.attributes[e],options:o.options,label:o.label,checked:n.attributes[e],selected:n.attributes[e],help:n.attributes[e]?b:helpMessageUncheked,disableAlpha:o.disableAlpha,min:o.min,max:o.max,multiple:o.multiple,onChange:function(t,o=e){n=g(t,o,n,C)},onChangeComplete:function(t,o=e){n=g(t,o,n,C)}}))}}}),sc=b(n,f,"edit"),[t(o,null,t(c,null,r),sc)]},save:function(e){return b(e,f,"save")}})})}(jQuery);
1
+ !function(e){wp.i18n.__;var t=wp.element.createElement,o=wp.element.Fragment,n=(wp.components.PanelBody,wp.blocks.registerBlockType),c=(wp.editor.RichText,wp.editor.BlockControls,wp.editor.InspectorControls),r=(wp.editor.AlignmentToolbar,wp.components,wp.element.RawHTML),a=wp.components.SelectControl,i=wp.components.ToggleControl,s=wp.components.CheckboxControl,l=wp.components.RangeControl,p=wp.components.ColorPicker,u=wp.components.RadioControl,d=wp.components.TextControl,h=wp.components.TextareaControl;const C=t("svg",{width:22,height:22},t("path",{d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));function b(o,n,c){var a="",i="";if("undefined"!=typeof n.callback&&"function"==typeof e[n.callback])a=e[n.callback](o,n);else{var s="["+n.shortcode_name;e.each(o.attributes,function(e,t){if("undefined"!=typeof n.attributes&&"undefined"!=typeof n.attributes[e]){s+=" "+e+"=";var o=n.attributes[e].remove_quotes;s+=1==o?t:'"'+t+'"'}}),s+="]";var l=md5(s);i='<span class="yith_block_'+l+'">'+s+"</span>","edit"==c&&0!=n.do_shortcode&&function(t){var o=null;return e(document).trigger("yith_plugin_fw_gutenberg_before_do_shortcode",[s,t]),e.ajax({async:!0,url:yith_gutenberg_ajax.ajaxurl,method:"post",data:{action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:s},success:function(n){""!=(o=n)&&(e(".yith_block_"+t).html(o),e(document).trigger("yith_plugin_fw_gutenberg_success_do_shortcode",[s,t,o]))}}),e(document).trigger("yith_plugin_fw_gutenberg_after_do_shortcode",[s,t,o]),o}(l),a=t(r,null,i)}return a}function g(e,t,o,n){var c={};return"colorpicker"!=n&&"color"!=n||(e=e.hex),c[t]=e,o.setAttributes(c),o}e.each(yith_gutenberg,function(r,f){n("yith/"+r,{title:f.title,description:f.description,category:f.category,attributes:f.attributes,icon:"undefined"!=typeof f.icon?f.icon:C,keywords:f.keywords,edit:function(n){var r=new Array;return e.each(f.attributes,function(e,o){var c=null,C=o.blocktype,b=e;if(void 0!==C){switch(C){case"select":c=a;break;case"text":c=d;break;case"textarea":c=h;break;case"toggle":c=i;break;case"checkbox":c=s;break;case"number":case"range":c=l;break;case"color":case"colorpicker":c=p;break;case"radio":c=u}if(null!=c){var f=helpMessageUncheked="";"undefined"!=typeof o.helps&&"undefined"!=typeof o.helps.checked&&"undefined"!=typeof o.helps.unchecked?(f=o.helps.checked,helpMessageUncheked=o.helps.unchecked):"undefined"!=typeof o.help&&(f=helpMessageUncheked=o.help),r.push(t(c,{value:n.attributes[e],options:o.options,label:o.label,checked:n.attributes[e],selected:n.attributes[e],help:n.attributes[e]?f:helpMessageUncheked,disableAlpha:o.disableAlpha,min:o.min,max:o.max,multiple:o.multiple,onChange:function(e){n=g(e,b,n,C)},onChangeComplete:function(e){n=g(e,b,n,C)}}))}}}),sc=b(n,f,"edit"),[t(o,null,t(c,null,r),sc)]},save:function(e){return b(e,f,"save")}})})}(jQuery);
plugin-fw/includes/class-yit-ajax.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * AJAX Class. AJAX Event Handler.
4
+ *
5
+ * @class YIT_Ajax
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Ajax' ) ) {
12
+ /**
13
+ * YIT_Ajax class.
14
+ *
15
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
16
+ */
17
+ class YIT_Ajax {
18
+
19
+ /**
20
+ * The single instance of the class.
21
+ *
22
+ * @var YIT_Ajax
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Singleton implementation.
28
+ *
29
+ * @return YIT_Ajax
30
+ */
31
+ public static function instance() {
32
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
33
+ }
34
+
35
+ /**
36
+ * YIT_Ajax constructor.
37
+ */
38
+ private function __construct() {
39
+ $ajax_actions = array(
40
+ 'json_search_posts',
41
+ 'json_search_products',
42
+ 'json_search_orders',
43
+ 'json_search_terms',
44
+ );
45
+
46
+ foreach ( $ajax_actions as $ajax_action ) {
47
+ add_action( 'wp_ajax_yith_plugin_fw_' . $ajax_action, array( $this, $ajax_action ) );
48
+ add_action( 'wp_ajax_nopriv_yith_plugin_fw_' . $ajax_action, array( $this, $ajax_action ) );
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Post Search
54
+ *
55
+ * @param array $request The request.
56
+ */
57
+ public function json_search_posts( $request = array() ) {
58
+ ob_start();
59
+
60
+ // Make sure request is an array.
61
+ $request = is_array( $request ) ? $request : array();
62
+
63
+ if ( empty( $request ) ) {
64
+ check_ajax_referer( 'search-posts', 'security' );
65
+ }
66
+
67
+ $term = isset( $request['term'] ) ? $request['term'] : ( isset( $_REQUEST['term'] ) ? (string) sanitize_text_field( wp_unslash( $_REQUEST['term'] ) ) : '' );
68
+ if ( empty( $term ) ) {
69
+ die();
70
+ }
71
+
72
+ $found_posts = array();
73
+ $args = array(
74
+ 'post_type' => 'post',
75
+ 'post_status' => 'publish',
76
+ 'numberposts' => 20,
77
+ 'orderby' => 'title',
78
+ 'order' => 'asc',
79
+ 'suppress_filters' => 0,
80
+ 'include' => '',
81
+ 'exclude' => '',
82
+ );
83
+
84
+ foreach ( $args as $key => $default_value ) {
85
+ if ( ! empty( $_REQUEST[ $key ] ) ) {
86
+ $args[ $key ] = sanitize_text_field( wp_unslash( $_REQUEST[ $key ] ) );
87
+ }
88
+ }
89
+
90
+ if ( isset( $_REQUEST['post_parent'] ) ) {
91
+ $args['post_parent'] = intval( $_REQUEST['post_parent'] );
92
+ }
93
+
94
+ // Merge with passed request data.
95
+ $args = array_merge( $args, $request );
96
+ $show_id = ! empty( $_REQUEST['show_id'] );
97
+
98
+ $args['s'] = $term;
99
+ $args['fields'] = 'ids';
100
+
101
+ $posts = get_posts( $args );
102
+
103
+ if ( ! empty( $posts ) ) {
104
+ foreach ( $posts as $post_id ) {
105
+ if ( ! current_user_can( 'read_post', $post_id ) ) {
106
+ continue;
107
+ }
108
+ $title = get_the_title( $post_id ) . ( $show_id ? " (#{$post_id})" : '' );
109
+ $found_posts[ $post_id ] = apply_filters( 'yith_plugin_fw_json_search_found_post_title', rawurldecode( $title ), $post_id, $request );
110
+ }
111
+ }
112
+
113
+ $found_posts = apply_filters( 'yith_plugin_fw_json_search_found_posts', $found_posts, $request );
114
+ wp_send_json( $found_posts );
115
+ }
116
+
117
+ /**
118
+ * Product Search
119
+ */
120
+ public function json_search_products() {
121
+ check_ajax_referer( 'search-posts', 'security' );
122
+
123
+ $term = isset( $_REQUEST['term'] ) ? (string) wc_clean( wp_unslash( $_REQUEST['term'] ) ) : false;
124
+ if ( empty( $term ) ) {
125
+ die();
126
+ }
127
+
128
+ $request = array( 'post_type' => 'product' );
129
+ $request_include = isset( $_REQUEST['include'] ) && ! is_array( $_REQUEST['include'] ) ? explode( ',', sanitize_text_field( wp_unslash( $_REQUEST['include'] ) ) ) : array();
130
+
131
+ if ( ! empty( $_REQUEST['product_type'] ) ) {
132
+ $product_type = sanitize_text_field( wp_unslash( $_REQUEST['product_type'] ) );
133
+ $product_type_term = get_term_by( 'slug', $product_type, 'product_type' );
134
+
135
+ if ( $product_type_term ) {
136
+ $posts_in = array_unique( (array) get_objects_in_term( $product_type_term->term_id, 'product_type' ) );
137
+ if ( ! ! $request_include ) {
138
+ $posts_in = array_intersect( $posts_in, $request_include );
139
+ }
140
+
141
+ if ( ! ! $posts_in ) {
142
+ $request['include'] = implode( ',', $posts_in );
143
+ } else {
144
+ $request['include'] = '-1';
145
+ }
146
+ }
147
+ }
148
+
149
+ $request = apply_filters( 'yith_plugin_fw_json_search_products_request', $request );
150
+ $this->json_search_posts( $request );
151
+ }
152
+
153
+ /**
154
+ * Order Search
155
+ */
156
+ public function json_search_orders() {
157
+ global $wpdb;
158
+ ob_start();
159
+
160
+ check_ajax_referer( 'search-posts', 'security' );
161
+
162
+ $term = isset( $_REQUEST['term'] ) ? intval( $_REQUEST['term'] ) : false;
163
+
164
+ if ( empty( $term ) ) {
165
+ die();
166
+ }
167
+
168
+ $found_orders = array();
169
+ $term = apply_filters( 'yith_plugin_fw_json_search_order_number', $term );
170
+ $search = '%' . intval( $term ) . '%';
171
+
172
+ $query_orders = $wpdb->get_results(
173
+ $wpdb->prepare(
174
+ "SELECT ID, post_title FROM {$wpdb->posts} AS posts WHERE posts.post_type = 'shop_order' AND posts.ID LIKE %s",
175
+ $search
176
+ )
177
+ );
178
+
179
+ if ( $query_orders ) {
180
+ foreach ( $query_orders as $item ) {
181
+ $order_number = apply_filters( 'yith_plugin_fw_order_number', '#' . $item->ID, $item->ID );
182
+ $found_orders[ $item->ID ] = esc_html( $order_number ) . ' &ndash; ' . esc_html( $item->post_title );
183
+ }
184
+ }
185
+
186
+ wp_send_json( $found_orders );
187
+ }
188
+
189
+ /**
190
+ * Order Search
191
+ */
192
+ public function json_search_terms() {
193
+ ob_start();
194
+
195
+ check_ajax_referer( 'search-terms', 'security' );
196
+
197
+ $term = isset( $_REQUEST['term'] ) ? (string) sanitize_text_field( wp_unslash( $_REQUEST['term'] ) ) : false;
198
+
199
+ if ( empty( $term ) ) {
200
+ die();
201
+ }
202
+
203
+ $args = apply_filters(
204
+ 'yith_plugin_fw_json_search_terms_default_args',
205
+ array(
206
+ 'taxonomy' => 'category',
207
+ 'hide_empty' => false,
208
+ 'order' => 'ASC',
209
+ 'orderby' => 'name',
210
+ 'include' => '',
211
+ 'exclude' => '',
212
+ 'exclude_tree' => '',
213
+ 'number' => '',
214
+ 'hierarchical' => true,
215
+ 'child_of' => 0,
216
+ 'parent' => '',
217
+ 'term_field' => 'id',
218
+ )
219
+ );
220
+
221
+ foreach ( $args as $key => $default_value ) {
222
+ if ( ! empty( $_REQUEST[ $key ] ) ) {
223
+ $args[ $key ] = sanitize_text_field( wp_unslash( $_REQUEST[ $key ] ) );
224
+ }
225
+ }
226
+
227
+ $args = apply_filters( 'yith_plugin_fw_json_search_terms_args', $args );
228
+
229
+ $args['name__like'] = $term;
230
+ $args['fields'] = 'id=>name';
231
+
232
+ if ( ! taxonomy_exists( $args['taxonomy'] ) ) {
233
+ die();
234
+ }
235
+
236
+ $terms = yith_get_terms( $args );
237
+
238
+ if ( 'id' !== $args['term_field'] ) {
239
+ $temp_terms = $terms;
240
+ $terms = array();
241
+ foreach ( $temp_terms as $term_id => $term_name ) {
242
+ $current_term_field = get_term_field( $args['term_field'], $term_id, $args['taxonomy'] );
243
+ $terms[ $current_term_field ] = $term_name;
244
+ }
245
+ }
246
+
247
+ wp_send_json( $terms );
248
+ }
249
+ }
250
+ }
251
+
252
+ YIT_Ajax::instance();
plugin-fw/includes/class-yit-assets.php ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Assets Class. Assets Handler.
4
+ *
5
+ * @class YIT_Assets
6
+ * @package YITH\PluginFramework\Classes
7
+ * @since 3.0.0
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
11
+
12
+ if ( ! class_exists( 'YIT_Assets' ) ) {
13
+ /**
14
+ * YIT_Assets class.
15
+ *
16
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
17
+ */
18
+ class YIT_Assets {
19
+ /**
20
+ * The framework version
21
+ *
22
+ * @var string
23
+ */
24
+ public $version = '1.0.0';
25
+
26
+ /**
27
+ * The single instance of the class.
28
+ *
29
+ * @var YIT_Assets
30
+ */
31
+ private static $instance;
32
+
33
+ /**
34
+ * Singleton implementation.
35
+ *
36
+ * @return YIT_Assets
37
+ */
38
+ public static function instance() {
39
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
40
+ }
41
+
42
+ /**
43
+ * YIT_Assets constructor.
44
+ */
45
+ private function __construct() {
46
+ $this->version = yith_plugin_fw_get_version();
47
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
48
+ }
49
+
50
+ /**
51
+ * Register styles and scripts
52
+ */
53
+ public function register_styles_and_scripts() {
54
+ global $wp_scripts, $woocommerce, $wp_version;
55
+
56
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
57
+
58
+ // Register scripts.
59
+ wp_register_script( 'yith-colorpicker', YIT_CORE_PLUGIN_URL . '/assets/js/yith-colorpicker.min.js', array( 'jquery', 'wp-color-picker' ), '3.0.0', true );
60
+ wp_register_script( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/js/yith-fields' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'yith-colorpicker', 'jquery-ui-slider', 'jquery-ui-sortable' ), $this->version, true );
61
+ wp_register_script( 'yith-date-format', YIT_CORE_PLUGIN_URL . '/assets/js/yith-date-format' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker' ), $this->version, true );
62
+
63
+ wp_register_script( 'yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'yith-plugin-fw-fields' ), $this->version, true );
64
+ wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-sortable', 'yith-plugin-fw-fields' ), $this->version, true );
65
+ wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox' . $suffix . '.js', array( 'jquery' ), '1.6.3', true );
66
+ wp_register_script( 'yith_how_to', YIT_CORE_PLUGIN_URL . '/assets/js/how-to' . $suffix . '.js', array( 'jquery' ), $this->version, true );
67
+ wp_register_script( 'yith-plugin-fw-wp-pages', YIT_CORE_PLUGIN_URL . '/assets/js/wp-pages' . $suffix . '.js', array( 'jquery' ), $this->version, false );
68
+
69
+ // Register styles.
70
+ wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', array(), $this->version );
71
+ wp_register_style( 'jquery-ui-style', YIT_CORE_PLUGIN_URL . '/assets/css/jquery-ui/jquery-ui.min.css', array(), '1.11.4' );
72
+ wp_register_style( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/css/colorbox.css', array(), $this->version );
73
+ wp_register_style( 'yit-upgrade-to-pro', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrade-to-pro.css', array( 'colorbox' ), $this->version );
74
+ wp_register_style( 'yit-plugin-metaboxes', YIT_CORE_PLUGIN_URL . '/assets/css/metaboxes.css', array(), $this->version );
75
+ wp_register_style( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/css/yith-fields.css', false, $this->version );
76
+
77
+ wp_register_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700,800,900', array(), $this->version );
78
+
79
+ $wc_version_suffix = '';
80
+ if ( function_exists( 'WC' ) || ! empty( $woocommerce ) ) {
81
+ $woocommerce_version = function_exists( 'WC' ) ? WC()->version : $woocommerce->version;
82
+ $wc_version_suffix = version_compare( $woocommerce_version, '3.0.0', '>=' ) ? '' : '-wc-2.6';
83
+
84
+ wp_register_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css', array(), $woocommerce_version );
85
+ } else {
86
+ wp_register_script( 'select2', YIT_CORE_PLUGIN_URL . '/assets/js/select2/select2.min.js', array( 'jquery' ), '4.0.3', true );
87
+ wp_register_style( 'yith-select2-no-wc', YIT_CORE_PLUGIN_URL . '/assets/css/yith-select2-no-wc.css', false, $this->version );
88
+ }
89
+
90
+ wp_register_script( 'yith-enhanced-select', YIT_CORE_PLUGIN_URL . '/assets/js/yith-enhanced-select' . $wc_version_suffix . $suffix . '.js', array( 'jquery', 'select2' ), $this->version, true );
91
+ wp_localize_script(
92
+ 'yith-enhanced-select',
93
+ 'yith_framework_enhanced_select_params',
94
+ array(
95
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
96
+ 'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
97
+ 'search_terms_nonce' => wp_create_nonce( 'search-terms' ),
98
+ 'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
99
+ )
100
+ );
101
+
102
+ wp_localize_script(
103
+ 'yith-plugin-fw-fields',
104
+ 'yith_framework_fw_fields',
105
+ array(
106
+ 'admin_url' => admin_url( 'admin.php' ),
107
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
108
+ )
109
+ );
110
+
111
+ // Localize color-picker to avoid issues with WordPress 5.5.
112
+ if ( version_compare( $wp_version, '5.5-RC', '>=' ) ) {
113
+ wp_localize_script(
114
+ 'yith-colorpicker',
115
+ 'wpColorPickerL10n',
116
+ array(
117
+ 'clear' => __( 'Clear' ),
118
+ 'clearAriaLabel' => __( 'Clear color' ),
119
+ 'defaultString' => __( 'Default' ),
120
+ 'defaultAriaLabel' => __( 'Select default color' ),
121
+ 'pick' => __( 'Select Color' ),
122
+ 'defaultLabel' => __( 'Color value' ),
123
+ )
124
+ );
125
+ }
126
+
127
+ wp_enqueue_style( 'yith-plugin-fw-admin', YIT_CORE_PLUGIN_URL . '/assets/css/admin.css', array(), $this->version );
128
+ }
129
+ }
130
+ }
131
+
132
+ YIT_Assets::instance();
plugin-fw/includes/class-yit-cpt-unlimited.php ADDED
@@ -0,0 +1,1905 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Custom-Post-Type Unlimited Class.
4
+ * Manage the custom post types as Portfolio, Contact Forms and similar (called CPTU)
5
+ *
6
+ * @class YIT_CPT_Unlimited
7
+ * @package YITH\PluginFramework\Classes
8
+ * @deprecated 3.5 | This will be removed, so please don't use it
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
12
+
13
+ if ( ! class_exists( 'YIT_CPT_Unlimited' ) ) {
14
+
15
+ /**
16
+ * Class YIT_CPT_Unlimited
17
+ *
18
+ * @deprecated 3.5 | This will be removed, so please don't use it
19
+ */
20
+ class YIT_CPT_Unlimited {
21
+
22
+ /**
23
+ * The name of main post type of CPTU.
24
+ *
25
+ * @var string
26
+ */
27
+ protected $name = '';
28
+
29
+ /**
30
+ * The prefix of each post type created by the post of main CPTU
31
+ *
32
+ * @var string
33
+ */
34
+ protected $prefix_cpt = '';
35
+
36
+ /**
37
+ * Labels defined for the main CPTU
38
+ *
39
+ * @var string
40
+ */
41
+ protected $labels = '';
42
+
43
+ /**
44
+ * The configuration arguments of post type
45
+ *
46
+ * @var string
47
+ */
48
+ protected $args = '';
49
+
50
+ /**
51
+ * All post types created by the post of main CPTU
52
+ *
53
+ * @var array
54
+ */
55
+ public $post_types = array();
56
+
57
+ /**
58
+ * Array with all portfolio layouts available for this site
59
+ *
60
+ * @var array
61
+ */
62
+ public $layouts = array();
63
+
64
+ /**
65
+ * The pathname of template folder
66
+ *
67
+ * @var string
68
+ */
69
+ protected $template_path = '';
70
+
71
+ /**
72
+ * The URL of template folder
73
+ *
74
+ * @var string
75
+ */
76
+ protected $template_url = '';
77
+
78
+ /**
79
+ * Unique sequential ID to differentiate same shortcodes in the same page
80
+ *
81
+ * @var int
82
+ */
83
+ public $index = 0;
84
+
85
+ /**
86
+ * Temporary attribute to load automatically the settings for each layout
87
+ *
88
+ * @var string
89
+ */
90
+ private $layout = '';
91
+
92
+ /**
93
+ * YIT_CPT_Unlimited constructor.
94
+ *
95
+ * @param array $args Configuration arguments of post type.
96
+ */
97
+ public function __construct( $args = array() ) {
98
+
99
+ $defaults = array(
100
+ 'name' => '',
101
+ 'post_type_prefix' => '',
102
+ 'labels' => array(
103
+ 'main_name' => '',
104
+ 'singular' => '',
105
+ 'plural' => '',
106
+ 'menu' => '',
107
+ ),
108
+ 'manage_layouts' => false,
109
+ 'add_multiuploader' => false,
110
+ 'sortable' => false,
111
+ 'has_single' => false,
112
+ 'has_taxonomy' => false,
113
+ 'label_item_sing' => '',
114
+ 'label_item_plur' => '',
115
+ 'shortcode_name' => '',
116
+ 'shortcode_icon' => '', // URL or icon name from http://melchoyce.github.io/dashicons/.
117
+ 'layout_option' => '_type', // The option ID of layout meta-box.
118
+ );
119
+ $this->args = wp_parse_args( $args, $defaults );
120
+
121
+ // Fix the labels.
122
+ if ( empty( $this->args['labels']['main_name'] ) ) {
123
+ $this->args['labels']['main_name'] = $this->args['labels']['singular'];
124
+ }
125
+ if ( empty( $this->args['labels']['menu'] ) ) {
126
+ $this->args['labels']['menu'] = $this->args['labels']['singular'];
127
+ }
128
+
129
+ // Populate.
130
+ $this->name = $this->args['name'];
131
+ $this->prefix_cpt = $this->args['post_type_prefix'];
132
+ $this->labels = $this->args['labels'];
133
+
134
+ add_action( 'init', array( $this, 'register_post_type' ) );
135
+ add_action( 'init', array( $this, 'register_cptu_post_types' ) );
136
+
137
+ add_action( 'save_post', array( $this, 'rewrite_flush' ) );
138
+
139
+ // Admin interface.
140
+ add_action( 'admin_head', array( $this, 'add_cptu_menu_item' ) );
141
+ add_action( 'admin_init', array( $this, 'add_quick_links_metaboxes' ) );
142
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_assets' ) );
143
+
144
+ // Meta-boxes.
145
+ if ( is_admin() ) {
146
+ add_action( 'init', array( $this, 'add_metabox_cptu' ) );
147
+ add_action( 'init', array( $this, 'add_metabox_item_fields' ) );
148
+ }
149
+
150
+ // Multi-uploader.
151
+ if ( $this->args['add_multiuploader'] ) {
152
+ add_action( 'admin_footer', array( $this, 'add_button_multiuploader' ) );
153
+ add_action( 'wp_ajax_yit_cptu_multiuploader', array( $this, 'post_multiuploader' ) );
154
+ }
155
+
156
+ // Layouts.
157
+ if ( $this->args['manage_layouts'] ) {
158
+ $this->get_layouts();
159
+ }
160
+
161
+ // Single layout.
162
+ if ( $this->args['has_single'] ) {
163
+ add_action( 'yit_loop', array( $this, 'single_template' ) );
164
+ add_action( 'wp', array( $this, 'single_template_config' ) );
165
+
166
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
167
+ add_action( 'init', array( $this, 'single_template_config' ) );
168
+ }
169
+ }
170
+
171
+ // Archive template.
172
+ add_action( 'wp', array( $this, 'archive_template' ) );
173
+
174
+ // Enqueue the assets of each layout.
175
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_assets' ) );
176
+
177
+ // Add the shortcode, used to show the frontend.
178
+ if ( ! empty( $this->args['shortcode_name'] ) ) {
179
+ add_shortcode( $this->args['shortcode_name'], array( &$this, 'add_shortcode' ) );
180
+ add_filter( 'yit_shortcode_' . $this->args['shortcode_name'] . '_icon', array( $this, 'shortcode_icon' ) );
181
+ add_filter( 'yit-shortcode-plugin-init', array( $this, 'add_shortcode_to_box' ) );
182
+ }
183
+
184
+ // Add sortable feature.
185
+ if ( $this->args['sortable'] ) {
186
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_sortable_assets' ) );
187
+ add_action( 'wp_ajax_cpt_sort_posts', array( $this, 'sort_posts' ) );
188
+ add_action( 'admin_init', array( $this, 'init_menu_order' ) );
189
+ add_filter( 'pre_get_posts', array( $this, 'filter_active' ) );
190
+ add_filter( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
191
+ add_filter( 'get_next_post_where', array( $this, 'sorted_next_post_where' ) );
192
+ add_filter( 'get_previous_post_where', array( $this, 'sorted_prev_post_where' ) );
193
+ add_filter( 'get_next_post_sort', array( $this, 'sorted_next_post_sort' ) );
194
+ add_filter( 'get_previous_post_sort', array( $this, 'sorted_prev_post_sort' ) );
195
+ }
196
+
197
+ // Add default columns to post type table list.
198
+ add_filter( 'manage_edit-' . $this->name . '_columns', array( $this, 'cptu_define_columns' ) );
199
+ add_action( 'manage_' . $this->name . '_posts_custom_column', array( $this, 'cptu_change_columns' ), 10, 2 );
200
+
201
+ // Add required post type for WordPress importer.
202
+ add_filter( 'wp_import_post_data_raw', array( $this, 'add_importer_required_post_type' ) );
203
+ add_filter( 'wp_import_terms', array( $this, 'add_importer_required_taxonomy' ) );
204
+ add_action( 'wp_import_set_post_terms', array( $this, 'recount_terms_post' ), 10, 3 );
205
+
206
+ }
207
+
208
+ /**
209
+ * Enqueue the assets for the sortable feature
210
+ *
211
+ * @return void
212
+ * @since 1.0
213
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
214
+ */
215
+ public function admin_sortable_assets() {
216
+ global $post;
217
+
218
+ if ( ! isset( $post->post_type ) || ! $this->is_valid( $post->post_type ) ) {
219
+ return;
220
+ }
221
+
222
+ wp_enqueue_script( 'yit-cptu-sortable-posts', YIT_CORE_PLUGIN_URL . '/assets/js/yit-cptu-sortable-posts.js', array( 'jquery', 'jquery-ui-sortable' ), '1.0', true );
223
+ }
224
+
225
+ /**
226
+ * Init menu order
227
+ *
228
+ * @param array $post_types The post types.
229
+ */
230
+ public function init_menu_order( $post_types = array() ) {
231
+ global $wpdb;
232
+
233
+ if ( empty( $post_types ) ) {
234
+ $post_types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_type FROM $wpdb->posts WHERE post_type LIKE %s", str_replace( '_', '\_', $this->prefix_cpt ) . '%' ) );
235
+ } elseif ( ! is_array( $post_types ) ) {
236
+ $post_types = array( $post_types );
237
+ }
238
+
239
+ foreach ( $post_types as $post_type ) {
240
+ $count = $wpdb->get_var(
241
+ $wpdb->prepare(
242
+ "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = %s AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') AND menu_order = 0",
243
+ $post_type
244
+ )
245
+ );
246
+
247
+ if ( empty( $count ) ) {
248
+ continue;
249
+ }
250
+
251
+ $results = $wpdb->get_results(
252
+ $wpdb->prepare(
253
+ "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') ORDER BY post_date DESC",
254
+ $post_type
255
+ )
256
+ );
257
+
258
+ foreach ( $results as $key => $result ) {
259
+ $wpdb->update( $wpdb->posts, array( 'menu_order' => $key + 1 ), array( 'ID' => $result->ID ) );
260
+ }
261
+ }
262
+ }
263
+
264
+ /**
265
+ * Save the order of posts from sortable feature
266
+ *
267
+ * @return void
268
+ * @since 1.0
269
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
270
+ */
271
+ public function sort_posts() {
272
+ global $wpdb;
273
+
274
+ parse_str( $_REQUEST['order'], $data ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput
275
+
276
+ if ( is_array( $data ) ) {
277
+ $id_arr = array();
278
+ foreach ( $data as $key => $values ) {
279
+ foreach ( $values as $position => $id ) {
280
+ $id_arr[] = $id;
281
+ }
282
+ }
283
+
284
+ $menu_order_arr = array();
285
+ foreach ( $id_arr as $key => $id ) {
286
+ $results = $wpdb->get_results( $wpdb->prepare( "SELECT menu_order FROM $wpdb->posts WHERE ID = %d", $id ) );
287
+ foreach ( $results as $result ) {
288
+ $menu_order_arr[] = $result->menu_order;
289
+ }
290
+ }
291
+
292
+ sort( $menu_order_arr );
293
+
294
+ foreach ( $data as $key => $values ) {
295
+ foreach ( $values as $position => $id ) {
296
+ $wpdb->update( $wpdb->posts, array( 'menu_order' => $menu_order_arr[ $position ] ), array( 'ID' => $id ) );
297
+ }
298
+ }
299
+ }
300
+
301
+ die();
302
+ }
303
+
304
+ /**
305
+ * Filter Active
306
+ *
307
+ * @param WC_Query $wp_query The query.
308
+ *
309
+ * @return mixed
310
+ */
311
+ public function filter_active( $wp_query ) {
312
+ if ( is_admin() && isset( $wp_query->query['suppress_filters'] ) ) {
313
+ $wp_query->query['suppress_filters'] = false;
314
+ }
315
+ if ( is_admin() && isset( $wp_query->query_vars['suppress_filters'] ) ) {
316
+ $wp_query->query_vars['suppress_filters'] = false;
317
+ }
318
+
319
+ return $wp_query;
320
+ }
321
+
322
+ /**
323
+ * Pre get post.
324
+ *
325
+ * @param WP_Query $wp_query The query.
326
+ */
327
+ public function pre_get_posts( $wp_query ) {
328
+ if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
329
+ if ( isset( $wp_query->query['post_type'] ) ) {
330
+ $post_types = (array) $wp_query->query['post_type'];
331
+ foreach ( $post_types as $post_type ) {
332
+ if ( $this->is_valid( $post_type ) ) {
333
+ $wp_query->set( 'orderby', 'menu_order' );
334
+ $wp_query->set( 'order', 'ASC' );
335
+ }
336
+ }
337
+ }
338
+ } else {
339
+ $active = false;
340
+ if ( isset( $wp_query->query['suppress_filters'] ) || isset( $wp_query->query['post_type'] ) ) {
341
+ $post_types = (array) $wp_query->query['post_type'];
342
+ foreach ( $post_types as $post_type ) {
343
+ if ( $this->is_valid( $post_type ) ) {
344
+ $active = true;
345
+ }
346
+ }
347
+ }
348
+
349
+ if ( $active ) {
350
+ if ( ! isset( $wp_query->query['orderby'] ) || 'post_date' === $wp_query->query['orderby'] ) {
351
+ $wp_query->set( 'orderby', 'menu_order' );
352
+ }
353
+ if ( ! isset( $wp_query->query['order'] ) || 'DESC' === $wp_query->query['order'] ) {
354
+ $wp_query->set( 'order', 'ASC' );
355
+ }
356
+ }
357
+ }
358
+ }
359
+
360
+ /**
361
+ * Filters where clause for get next post
362
+ *
363
+ * @param string $where The 'where'.
364
+ *
365
+ * @return string
366
+ * @since 1.0
367
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
368
+ */
369
+ public function sorted_next_post_where( $where ) {
370
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
371
+ global $post;
372
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['post_id'] ) ) {
373
+ $post = get_post( absint( $_REQUEST['post_id'] ) ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
374
+ } else {
375
+ $post = get_post(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
376
+ }
377
+
378
+ if ( ! $post || ! $this->is_valid( $post->post_type ) ) {
379
+ return $where;
380
+ }
381
+
382
+ $result = str_replace( "'" . $post->post_date . "'", $post->menu_order, $where );
383
+ $result = str_replace( 'p.post_date', 'p.menu_order', $result );
384
+
385
+ return $result;
386
+ // phpcs:enable
387
+ }
388
+
389
+ /**
390
+ * Filters where clause for get prev post
391
+ *
392
+ * @param string $where The 'where'.
393
+ *
394
+ * @return string
395
+ * @since 1.0
396
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
397
+ */
398
+ public function sorted_prev_post_where( $where ) {
399
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
400
+ global $post;
401
+
402
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['post_id'] ) ) {
403
+ $post = get_post( absint( $_REQUEST['post_id'] ) ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
404
+ } else {
405
+ $post = get_post(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
406
+ }
407
+
408
+ if ( ! $post || ! $this->is_valid( $post->post_type ) ) {
409
+ return $where;
410
+ }
411
+
412
+ $result = str_replace( "'" . $post->post_date . "'", $post->menu_order, $where );
413
+ $result = str_replace( 'p.post_date', 'p.menu_order', $result );
414
+
415
+ return $result;
416
+ // phpcs:enable
417
+ }
418
+
419
+ /**
420
+ * Filters sort clause for get next post
421
+ *
422
+ * @param string $sort The 'sort' param.
423
+ *
424
+ * @return string
425
+ * @since 1.0
426
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
427
+ */
428
+ public function sorted_next_post_sort( $sort ) {
429
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
430
+ global $post;
431
+
432
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['post_id'] ) ) {
433
+ $post = get_post( absint( $_REQUEST['post_id'] ) ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
434
+ } else {
435
+ $post = get_post(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
436
+ }
437
+
438
+ if ( ! $post || ! $this->is_valid( $post->post_type ) ) {
439
+ return $sort;
440
+ }
441
+
442
+ return str_replace( 'p.post_date', 'p.menu_order', $sort );
443
+ // phpcs:enable
444
+ }
445
+
446
+ /**
447
+ * Filters sort clause for get prev post
448
+ *
449
+ * @param string $sort The 'sort' param.
450
+ *
451
+ * @return string
452
+ * @since 1.0
453
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
454
+ */
455
+ public function sorted_prev_post_sort( $sort ) {
456
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
457
+ global $post;
458
+
459
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['post_id'] ) ) {
460
+ $post = get_post( absint( $_REQUEST['post_id'] ) ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
461
+ } else {
462
+ $post = get_post(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
463
+ }
464
+
465
+ if ( ! $post || ! $this->is_valid( $post->post_type ) ) {
466
+ return $sort;
467
+ }
468
+
469
+ return str_replace( 'p.post_date', 'p.menu_order', $sort );
470
+ // phpcs:enable
471
+ }
472
+
473
+ /**
474
+ * Register post type
475
+ * Register the post type for the creation of portfolios
476
+ *
477
+ * @return void
478
+ * @since 1.0
479
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
480
+ */
481
+ public function register_post_type() {
482
+ $labels = array(
483
+ 'name' => ucfirst( $this->labels['main_name'] ),
484
+ 'singular_name' => ucfirst( $this->labels['singular'] ),
485
+ // translators: %s is the singular name of the post type.
486
+ 'add_new' => sprintf( __( 'Add %s', 'yith-plugin-fw' ), ucfirst( $this->labels['singular'] ) ),
487
+ // translators: %s is the singular name of the post type.
488
+ 'add_new_item' => sprintf( __( 'Add New %s', 'yith-plugin-fw' ), ucfirst( $this->labels['singular'] ) ),
489
+ // translators: %s is the singular name of the post type.
490
+ 'edit_item' => sprintf( __( 'Edit %s', 'yith-plugin-fw' ), ucfirst( $this->labels['singular'] ) ),
491
+ // translators: %s is the singular name of the post type.
492
+ 'new_item' => sprintf( __( 'New %s', 'yith-plugin-fw' ), ucfirst( $this->labels['singular'] ) ),
493
+ // translators: %s is the plural name of the post type.
494
+ 'all_items' => sprintf( __( 'All %s', 'yith-plugin-fw' ), ucfirst( $this->labels['plural'] ) ),
495
+ // translators: %s is the singular name of the post type.
496
+ 'view_item' => sprintf( __( 'View %s', 'yith-plugin-fw' ), ucfirst( $this->labels['singular'] ) ),
497
+ // translators: %s is the plural name of the post type.
498
+ 'search_items' => sprintf( __( 'Search %s', 'yith-plugin-fw' ), ucfirst( $this->labels['plural'] ) ),
499
+ // translators: %s is the plural name of the post type.
500
+ 'not_found' => sprintf( __( 'No %s found', 'yith-plugin-fw' ), ucfirst( $this->labels['plural'] ) ),
501
+ // translators: %s is the plural name of the post type.
502
+ 'not_found_in_trash' => sprintf( __( 'No %s found in Trash', 'yith-plugin-fw' ), ucfirst( $this->labels['plural'] ) ),
503
+ 'parent_item_colon' => '',
504
+ 'menu_name' => ucfirst( $this->labels['menu'] ),
505
+ );
506
+
507
+ $args = array(
508
+ 'labels' => apply_filters( 'yit_' . $this->name . '_labels', $labels ),
509
+ 'public' => false,
510
+ 'publicly_queryable' => false,
511
+ 'show_ui' => true,
512
+ 'show_in_menu' => true,
513
+ 'query_var' => false,
514
+ 'capability_type' => 'post',
515
+ 'hierarchical' => false,
516
+ 'menu_position' => null,
517
+ 'supports' => array( 'title' ),
518
+ );
519
+
520
+ if ( ! empty( $this->args['menu_icon'] ) ) {
521
+ $args['menu_icon'] = $this->args['menu_icon'];
522
+ }
523
+
524
+ register_post_type( $this->name, apply_filters( 'yit_' . $this->name . '_args', $args ) );
525
+ }
526
+
527
+ /**
528
+ * Retrieve the values configured inside the custom post type
529
+ *
530
+ * @param WP_Post $post The post where get the arguments configured in the cpt.
531
+ *
532
+ * @return array
533
+ * @since 1.0
534
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
535
+ */
536
+ protected function cpt_args( $post ) {
537
+ if ( ! isset( $post->ID ) ) {
538
+ return;
539
+ }
540
+
541
+ $args = apply_filters(
542
+ 'yit_cptu_register_post_type_args',
543
+ array(
544
+ 'layout' => get_post_meta( $post->ID, $this->args['layout_option'], true ),
545
+ 'rewrite' => get_post_meta( $post->ID, '_rewrite', true ),
546
+ 'label_singular' => ! empty( $this->args['label_item_sing'] ) ? $this->args['label_item_sing'] : get_post_meta( $post->ID, '_label_singular', true ),
547
+ 'label_plural' => ! empty( $this->args['label_item_plur'] ) ? $this->args['label_item_plur'] : get_post_meta( $post->ID, '_label_plural', true ),
548
+ 'taxonomy' => get_post_meta( $post->ID, '_taxonomy', true ),
549
+ 'taxonomy_rewrite' => get_post_meta( $post->ID, '_taxonomy_rewrite', true ),
550
+ ),
551
+ $this->name,
552
+ $post
553
+ );
554
+
555
+ $title = $post->post_title;
556
+
557
+ if ( empty( $args['label_singular'] ) ) {
558
+ $args['label_singular'] = $title;
559
+ }
560
+
561
+ if ( empty( $args['label_plural'] ) ) {
562
+ $args['label_plural'] = $title;
563
+ }
564
+
565
+ return $args;
566
+ }
567
+
568
+ /**
569
+ * Retrieve the post types created for this CPTU
570
+ *
571
+ * @return array The link changed
572
+ * @since 1.0
573
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
574
+ */
575
+ public function get_post_types() {
576
+ if ( ! empty( $this->post_types ) ) {
577
+ return $this->post_types;
578
+ }
579
+
580
+ $args = array(
581
+ 'post_type' => $this->name,
582
+ 'posts_per_page' => - 1,
583
+ 'post_status' => 'publish',
584
+ );
585
+ $this->post_types = get_posts( $args );
586
+
587
+ return $this->post_types;
588
+ }
589
+
590
+ /**
591
+ * Register portfolio post types
592
+ * Register the post types for each portfolio created by admin
593
+ *
594
+ * @return void
595
+ * @since 1.0
596
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
597
+ */
598
+ public function register_cptu_post_types() {
599
+ $post_types = $this->get_post_types();
600
+ $pts = array();
601
+
602
+ foreach ( $post_types as $pt ) {
603
+ extract( $this->cpt_args( $pt ) ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
604
+ /**
605
+ * Fields.
606
+ *
607
+ * @var string $label_singular The singular label.
608
+ * @var string $label_plural The plural label.
609
+ * @var string $layout The layout.
610
+ */
611
+
612
+ $name = $pt->post_name;
613
+ $title = $pt->post_title;
614
+
615
+ $labels = array(
616
+ 'name' => $title,
617
+ 'singular_name' => $label_singular,
618
+ // translators: $s is the singular name of the post type.
619
+ 'add_new' => sprintf( __( 'Add %s', 'yith-plugin-fw' ), $label_singular ),
620
+ // translators: $s is the singular name of the post type.
621
+ 'add_new_item' => sprintf( __( 'Add New %s', 'yith-plugin-fw' ), $label_singular ),
622
+ // translators: $s is the singular name of the post type.
623
+ 'edit_item' => sprintf( __( 'Edit %s', 'yith-plugin-fw' ), $label_singular ),
624
+ // translators: $s is the singular name of the post type.
625
+ 'new_item' => sprintf( __( 'New %s', 'yith-plugin-fw' ), $label_singular ),
626
+ // translators: $s is the plural name of the post type.
627
+ 'all_items' => sprintf( __( 'All %s', 'yith-plugin-fw' ), $label_plural ),
628
+ // translators: $s is the singular name of the post type.
629
+ 'view_item' => sprintf( __( 'View %s', 'yith-plugin-fw' ), $label_singular ),
630
+ // translators: $s is the plural name of the post type.
631
+ 'search_items' => sprintf( __( 'Search %s', 'yith-plugin-fw' ), $label_plural ),
632
+ // translators: $s is the plural name of the post type.
633
+ 'not_found' => sprintf( __( 'No %s found', 'yith-plugin-fw' ), $label_plural ),
634
+ // translators: $s is the plural name of the post type.
635
+ 'not_found_in_trash' => sprintf( __( 'No %s found in Trash', 'yith-plugin-fw' ), $label_plural ),
636
+ 'parent_item_colon' => '',
637
+ 'menu_name' => $title,
638
+ );
639
+
640
+ $args = array(
641
+ 'labels' => apply_filters( 'yit_' . $this->prefix_cpt . $name . '_labels', $labels ),
642
+ 'public' => true,
643
+ 'publicly_queryable' => true,
644
+ 'show_ui' => true,
645
+ 'show_in_menu' => false,
646
+ 'query_var' => true,
647
+ 'capability_type' => 'post',
648
+ 'hierarchical' => false,
649
+ 'menu_position' => null,
650
+ 'supports' => array( 'title', 'editor', 'thumbnail' ),
651
+ );
652
+
653
+ if ( ! $this->args['has_single'] ) {
654
+ $args['public'] = false;
655
+ $args['publicly_queryable'] = false;
656
+ $args['query_var'] = false;
657
+ }
658
+
659
+ if ( $this->args['manage_layouts'] && isset( $this->layouts[ $layout ] ) && ! $this->layouts[ $layout ]['support']['description'] ) {
660
+ unset( $args['supports'][1] ); // Remove 'editor'.
661
+ }
662
+
663
+ if ( ! empty( $rewrite ) ) {
664
+ $args['rewrite'] = array( 'slug' => $rewrite );
665
+ }
666
+
667
+ $post_type = yit_avoid_duplicate( str_replace( '-', '_', substr( $this->prefix_cpt . $name, 0, 16 ) ), $post_types );
668
+ register_post_type( $post_type, apply_filters( 'yit_' . $this->prefix_cpt . $name . '_args', $args, $pt ) );
669
+
670
+ update_post_meta( $pt->ID, '_post_type', $post_type );
671
+ $pts[] = $post_type;
672
+
673
+ if ( $this->args['has_taxonomy'] && ! empty( $taxonomy ) ) {
674
+ $labels = array(
675
+ // translators: %s is the singular name of the post type.
676
+ 'name' => sprintf( _x( '%s Categories', 'taxonomy general name', 'yith-plugin-fw' ), $label_singular ),
677
+ 'singular_name' => _x( 'Category', 'taxonomy singular name', 'yith-plugin-fw' ),
678
+ 'search_items' => __( 'Search Categories', 'yith-plugin-fw' ),
679
+ 'all_items' => __( 'All Categories', 'yith-plugin-fw' ),
680
+ 'parent_item' => __( 'Parent Category', 'yith-plugin-fw' ),
681
+ 'parent_item_colon' => __( 'Parent Category:', 'yith-plugin-fw' ),
682
+ 'edit_item' => __( 'Edit Category', 'yith-plugin-fw' ),
683
+ 'update_item' => __( 'Update Category', 'yith-plugin-fw' ),
684
+ 'add_new_item' => __( 'Add New Category', 'yith-plugin-fw' ),
685
+ 'new_item_name' => __( 'New Category Name', 'yith-plugin-fw' ),
686
+ 'menu_name' => __( 'Category', 'yith-plugin-fw' ),
687
+ );
688
+
689
+ $args = array(
690
+ 'hierarchical' => true,
691
+ 'labels' => $labels,
692
+ 'show_ui' => true,
693
+ 'show_admin_column' => true,
694
+ 'query_var' => true,
695
+ );
696
+
697
+ if ( ! empty( $taxonomy_rewrite ) ) {
698
+ $args['rewrite'] = array( 'slug' => $taxonomy_rewrite );
699
+ }
700
+
701
+ register_taxonomy( substr( $taxonomy, 0, 32 ), $post_type, $args );
702
+ }
703
+ }
704
+
705
+ wp_cache_set( 'yit_cptu_post_types', $post_types );
706
+ }
707
+
708
+ /**
709
+ * Flush Rewrite Rules
710
+ * rewrite rules when a cpt unlimited is saved
711
+ *
712
+ * @param int $post The post ID.
713
+ *
714
+ * @return void
715
+ * @since 1.0
716
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
717
+ */
718
+ public function rewrite_flush( $post ) {
719
+ if ( isset( $post ) && $this->is_valid( get_post_type( intval( $post ) ) ) ) {
720
+ flush_rewrite_rules();
721
+ }
722
+ }
723
+
724
+ /**
725
+ * Add the item for each portfolio under "Portfolios"
726
+ *
727
+ * @return void
728
+ * @since 1.0
729
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
730
+ */
731
+ public function add_cptu_menu_item() {
732
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended,WordPress.WP.GlobalVariablesOverride.Prohibited
733
+ global $submenu, $post, $parent_file, $pagenow;
734
+
735
+ if ( isset( $post->post_type ) ) {
736
+ $post_type = $post->post_type;
737
+ } elseif ( isset( $_REQUEST['post_type'] ) ) {
738
+ $post_type = sanitize_key( wp_unslash( $_REQUEST['post_type'] ) );
739
+ } else {
740
+ return;
741
+ }
742
+
743
+ $item = 'edit.php?post_type=' . $this->name;
744
+
745
+ if ( strpos( $post_type, $this->prefix_cpt ) !== false ) {
746
+ global $wpdb;
747
+ $portfolio = $wpdb->get_row( $wpdb->prepare( "SELECT p.* FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s AND p.post_type = %s", '_post_type', $post_type, $this->name ) );
748
+
749
+ if ( ! isset( $portfolio->ID ) ) {
750
+ return;
751
+ }
752
+
753
+ $label_singular = ! empty( $this->args['label_item_sing'] ) ? $this->args['label_item_sing'] : get_post_meta( $portfolio->ID, '_label_singular', true );
754
+ $label_plural = ! empty( $this->args['label_item_plur'] ) ? $this->args['label_item_plur'] : get_post_meta( $portfolio->ID, '_label_plural', true );
755
+
756
+ if ( empty( $label_plural ) ) {
757
+ $label_plural = $portfolio->post_title;
758
+ }
759
+
760
+ if ( empty( $label_singular ) ) {
761
+ $label_singular = $portfolio->post_title;
762
+ }
763
+
764
+ $submenu[ $item ][15] = array( ucfirst( $label_plural ), 'edit_posts', 'edit.php?post_type=' . $post_type );
765
+ $submenu[ $item ][20] = array(
766
+ sprintf(
767
+ // translators: %s is the singular name of the post type.
768
+ __( 'Add %s', 'yith-plugin-fw' ),
769
+ ucfirst( $label_singular )
770
+ ),
771
+ 'edit_posts',
772
+ 'post-new.php?post_type=' . $post_type,
773
+ );
774
+
775
+ global $wp_taxonomies;
776
+ $taxonomy = get_post_meta( $portfolio->ID, '_taxonomy', true );
777
+ if ( isset( $wp_taxonomies[ $taxonomy ] ) ) {
778
+ $submenu[ $item ][25] = array( __( 'Categories', 'yith-plugin-fw' ), 'edit_posts', 'edit-tags.php?taxonomy=' . $taxonomy . '&post_type=' . $post_type );
779
+ }
780
+ }
781
+
782
+ // Set the parent item inside the single of each post type.
783
+ if ( 'post.php' === $pagenow && isset( $_GET['post'] ) && $this->is_valid( get_post_type( intval( $_GET['post'] ) ) ) ) {
784
+ $parent_file = 'edit.php?post_type=' . $this->name;
785
+ }
786
+
787
+ // phpcs:enable
788
+ }
789
+
790
+ /**
791
+ * Locate folder of CPTU templates, if there isn't a layouts management
792
+ *
793
+ * @return string
794
+ * @since 1.0
795
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
796
+ */
797
+ public function template_path() {
798
+ if ( ! empty( $this->template_path ) ) {
799
+ return $this->template_path;
800
+ }
801
+
802
+ $stylesheet_path_1 = get_stylesheet_directory() . '/theme/templates/' . $this->name . '/';
803
+ $stylesheet_path_2 = get_template_directory() . '/theme/templates/' . $this->name . '/';
804
+ $template_path_1 = get_stylesheet_directory() . '/' . $this->name . '/';
805
+ $template_path_2 = get_template_directory() . '/' . $this->name . '/';
806
+ $plugin_path = $this->args['plugin_path'] . '/templates/';
807
+
808
+ foreach ( array( 'stylesheet_path_1', 'stylesheet_path_2', 'template_path_1', 'template_path_2', 'plugin_path' ) as $var ) {
809
+ $path = ${$var};
810
+
811
+ if ( file_exists( $path ) ) {
812
+ $this->template_path = $path;
813
+ }
814
+ }
815
+
816
+ return $this->template_path;
817
+ }
818
+
819
+ /**
820
+ * Locate folder of CPTU templates, if there isn't a layouts management
821
+ *
822
+ * @return string
823
+ * @since 1.0
824
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
825
+ */
826
+ public function template_url() {
827
+ if ( ! empty( $this->template_url ) ) {
828
+ return $this->template_path;
829
+ }
830
+
831
+ $this->template_url = str_replace(
832
+ array(
833
+ get_stylesheet_directory(),
834
+ get_template_directory(),
835
+ $this->args['plugin_path'],
836
+ ),
837
+ array(
838
+ get_stylesheet_directory_uri(),
839
+ get_template_directory_uri(),
840
+ $this->args['plugin_url'],
841
+ ),
842
+ $this->template_path()
843
+ );
844
+
845
+ return $this->template_url;
846
+ }
847
+
848
+ /**
849
+ * Retrieve all layouts to manage by custom post type added in the site in this order:
850
+ * 1. Child theme (if exists)
851
+ * 2. Theme
852
+ * 3. Plugin
853
+ * It also load the config.php file of each layout
854
+ *
855
+ * @return void
856
+ * @since 1.0
857
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
858
+ */
859
+ public function get_layouts() {
860
+ $stylesheet_path_1 = get_stylesheet_directory() . '/theme/templates/' . $this->name . '/';
861
+ $stylesheet_path_2 = get_template_directory() . '/theme/templates/' . $this->name . '/';
862
+ $template_path_1 = get_stylesheet_directory() . '/' . $this->name . '/';
863
+ $template_path_2 = get_template_directory() . '/' . $this->name . '/';
864
+ $plugin_path = $this->args['plugin_path'] . '/templates/';
865
+
866
+ foreach ( array( 'stylesheet_path_1', 'stylesheet_path_2', 'template_path_1', 'template_path_2', 'plugin_path' ) as $var ) {
867
+ $path = ${$var};
868
+
869
+ if ( file_exists( $path ) ) {
870
+ foreach ( scandir( $path ) as $scan ) {
871
+ if ( ! isset( $this->layouts[ $scan ] ) && is_dir( $path . $scan ) && ! in_array( $scan, array( '.', '..', '.svn' ), true ) && '_' !== $scan[0] ) {
872
+ $this->layouts[ $scan ] = array(
873
+ 'name' => ucfirst( str_replace( '-', ' ', $scan ) ),
874
+ 'path' => $path . $scan,
875
+ 'url' => str_replace(
876
+ array(
877
+ get_stylesheet_directory(),
878
+ get_template_directory(),
879
+ $this->args['plugin_path'],
880
+ ),
881
+ array(
882
+ get_stylesheet_directory_uri(),
883
+ get_template_directory_uri(),
884
+ $this->args['plugin_url'],
885
+ ),
886
+ $path . $scan
887
+ ),
888
+ 'css' => array(),
889
+ 'js' => array(),
890
+ 'support' => array(
891
+ 'description' => true,
892
+ ),
893
+ 'columns' => array(),
894
+ );
895
+
896
+ // Set the vars for config.php.
897
+ $layout = $scan;
898
+ $this->layout = $layout; // temporary attribute to load automatically the configuration inside the config.php, for this layout.
899
+
900
+ if ( ! in_array( $scan, array( 'single' ), true ) && file_exists( $path . $scan . '/config.php' ) ) {
901
+ include_once $path . $scan . '/config.php';
902
+ }
903
+ }
904
+ }
905
+ }
906
+ }
907
+ }
908
+
909
+ /**
910
+ * Say if you want to set description for the current layout or not. This method must be used only inside the
911
+ * config.php file of layout
912
+ *
913
+ * @param string $v 'yes' or 'no'.
914
+ *
915
+ * @return void
916
+ * @since 1.0
917
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
918
+ */
919
+ public function add_description_field( $v ) {
920
+ $this->layouts[ $this->layout ]['support']['description'] = 'yes' === $v;
921
+ }
922
+
923
+ /**
924
+ * Add the extra fields for the specific layout type of portfolio
925
+ *
926
+ * @param array $fields The fields to add.
927
+ *
928
+ * @return void
929
+ * @since 1.0
930
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
931
+ */
932
+ public function add_layout_fields( $fields = array() ) {
933
+ foreach ( $fields as $id => $val ) {
934
+ unset( $fields[ $id ] );
935
+ $id = $this->layout . '_' . $id;
936
+ $fields[ $id ] = $val;
937
+ }
938
+
939
+ $this->layouts[ $this->layout ]['fields'] = $fields;
940
+ }
941
+
942
+ /**
943
+ * Add fields to add to the metabox of each item of each post type created
944
+ *
945
+ * @param array $fields The fields to add.
946
+ *
947
+ * @return void
948
+ * @since 1.0
949
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
950
+ */
951
+ public function add_item_fields( $fields = array() ) {
952
+ foreach ( $fields as $id => $val ) {
953
+ unset( $fields[ $id ] );
954
+ $fields[ $id ] = $val;
955
+ }
956
+ $this->layouts[ $this->layout ]['item_fields'] = $fields;
957
+ }
958
+
959
+ /**
960
+ * Add columns to the table list
961
+ *
962
+ * @param array $columns The columns to add in the table list.
963
+ *
964
+ * @return void
965
+ * @since 1.0
966
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
967
+ */
968
+ public function add_table_columns( $columns ) {
969
+ $this->layouts[ $this->layout ]['columns'] = $columns;
970
+ }
971
+
972
+ /**
973
+ * Enqueue the css files of layout
974
+ *
975
+ * @param string $handle Name of the stylesheet.
976
+ * @param string|bool $src Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
977
+ * @param array $deps An array of registered style handles this stylesheet depends on. Default empty array.
978
+ * @param string|bool $ver String specifying the stylesheet version number, if it has one. This parameter is used
979
+ * to ensure that the correct version is sent to the client regardless of caching, and so
980
+ * should be included if a version number is available and makes sense for the stylesheet.
981
+ * @param string $media Optional. The media for which this stylesheet has been defined.
982
+ * Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print',
983
+ * 'screen', 'tty', or 'tv'.
984
+ *
985
+ * @return void
986
+ * @since 1.0
987
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
988
+ */
989
+ public function enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
990
+ $this->layouts[ $this->layout ]['css'][] = compact( 'handle', 'src', 'deps', 'ver', 'media' );
991
+ }
992
+
993
+ /**
994
+ * Enqueue the js files of layout
995
+ *
996
+ * @param string $handle Name of the script.
997
+ * @param string|bool $src Path to the script from the root directory of WordPress. Example: '/js/myscript.js'.
998
+ * @param array $deps An array of registered handles this script depends on. Default empty array.
999
+ * @param string|bool $ver Optional. String specifying the script version number, if it has one. This parameter
1000
+ * is used to ensure that the correct version is sent to the client regardless of caching,
1001
+ * and so should be included if a version number is available and makes sense for the script.
1002
+ * @param bool $in_footer Optional. Whether to enqueue the script before </head> or before </body>.
1003
+ * Default 'false'. Accepts 'false' or 'true'.
1004
+ *
1005
+ * @return void
1006
+ * @since 1.0
1007
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1008
+ */
1009
+ public function enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {
1010
+ $this->layouts[ $this->layout ]['js'][] = compact( 'handle', 'src', 'deps', 'ver', 'in_footer' );
1011
+ }
1012
+
1013
+ /**
1014
+ * Enqueue the assets for the frontend
1015
+ *
1016
+ * @return void
1017
+ * @since 1.0
1018
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1019
+ */
1020
+ public function frontend_assets() {
1021
+ global $post;
1022
+
1023
+ // Not single.
1024
+ if ( ! is_single() || ! isset( $post->post_type ) || ! $this->is_valid( $post->post_type ) ) {
1025
+ $posts = get_posts(
1026
+ array(
1027
+ 'post_type' => $this->name,
1028
+ 'posts_per_page' => - 1,
1029
+ 'post_status' => 'publish',
1030
+ 'fields' => 'ids',
1031
+ )
1032
+ );
1033
+
1034
+ $enqueued = array();
1035
+
1036
+ foreach ( $posts as $post_id ) {
1037
+ $layout = get_post_meta( $post_id, $this->args['layout_option'], true );
1038
+
1039
+ if ( in_array( $layout, array( $enqueued ), true ) || ! isset( $this->layouts[ $layout ]['css'] ) ) {
1040
+ continue;
1041
+ }
1042
+
1043
+ foreach ( $this->layouts[ $layout ]['css'] as $asset ) {
1044
+ if ( empty( $asset ) ) {
1045
+ continue;
1046
+ }
1047
+ yit_enqueue_style( $asset['handle'], empty( $asset['src'] ) ? false : $this->locate_url( $layout ) . $asset['src'], $asset['deps'], $asset['ver'], $asset['media'] );
1048
+ }
1049
+
1050
+ $enqueued[] = $layout;
1051
+ }
1052
+ } else {
1053
+ // Load assets of single template.
1054
+ $layout = 'single';
1055
+
1056
+ if ( ! isset( $this->layouts[ $layout ]['css'] ) ) {
1057
+ return;
1058
+ }
1059
+
1060
+ foreach ( $this->layouts[ $layout ]['css'] as $asset ) {
1061
+ if ( empty( $asset ) ) {
1062
+ continue;
1063
+ }
1064
+ yit_enqueue_style( $asset['handle'], $this->locate_url( $layout ) . $asset['src'], $asset['deps'], $asset['ver'], $asset['media'] );
1065
+ }
1066
+ }
1067
+
1068
+ }
1069
+
1070
+ /**
1071
+ * Register Metaboxes options
1072
+ * Add the metabox for the portfolio settings
1073
+ *
1074
+ * @return void
1075
+ * @since 1.0
1076
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1077
+ */
1078
+ public function add_metabox_cptu() {
1079
+
1080
+ // Reorganize layouts.
1081
+ if ( $this->args['manage_layouts'] ) {
1082
+ $layouts = array();
1083
+ foreach ( $this->layouts as $layout_id => $layout ) {
1084
+ if ( 'single' === $layout_id ) {
1085
+ continue;
1086
+ }
1087
+ $layouts[ $layout_id ] = $layout['name'];
1088
+ }
1089
+
1090
+ $layouts = apply_filters( 'yit_cptu_' . $this->name . '_layout_values', $layouts );
1091
+ }
1092
+
1093
+ $single_layouts = apply_filters( 'yit_cptu_' . $this->name . '_single_layout_values', array() );
1094
+
1095
+ $metabox_args = array(
1096
+ 'label' => sprintf(
1097
+ // translators: %s is the singular name of the post type.
1098
+ __( '%s Settings', 'yith-plugin-fw' ),
1099
+ $this->labels['singular']
1100
+ ),
1101
+ 'pages' => $this->name,
1102
+ 'context' => 'normal',
1103
+ 'priority' => 'default',
1104
+ 'tabs' => array(
1105
+ 'settings' => array(
1106
+ 'label' => __( 'Settings', 'yith-plugin-fw' ),
1107
+ 'fields' => apply_filters(
1108
+ 'yit_cptu_fields',
1109
+ array(
1110
+ 'type' => array(
1111
+ 'label' => __( 'Type', 'yith-plugin-fw' ),
1112
+ 'desc' => sprintf(
1113
+ // translators: %s is the singular name of the post type.
1114
+ __( 'Layout for this %s', 'yith-plugin-fw' ),
1115
+ strtolower( $this->labels['singular'] )
1116
+ ),
1117
+ 'type' => 'select',
1118
+ 'options' => isset( $layouts ) ? $layouts : array(),
1119
+ 'std' => '',
1120
+ ),
1121
+ 'rewrite' => array(
1122
+ 'label' => __( 'Rewrite', 'yith-plugin-fw' ),
1123
+ 'desc' => __( 'Univocal identification name in the URL for each product (slug from post if empty)', 'yith-plugin-fw' ),
1124
+ 'type' => 'text',
1125
+ 'std' => '',
1126
+ ),
1127
+ 'label_singular' => array(
1128
+ 'label' => __( 'Label in Singular', 'yith-plugin-fw' ),
1129
+ 'desc' => __( 'Set a label in singular (title of portfolio if empty)', 'yith-plugin-fw' ),
1130
+ 'type' => 'text',
1131
+ 'std' => '',
1132
+ ),
1133
+ 'label_plural' => array(
1134
+ 'label' => __( 'Label in Plural', 'yith-plugin-fw' ),
1135
+ 'desc' => __( 'Set a label in plural (title of portfolio if empty)', 'yith-plugin-fw' ),
1136
+ 'type' => 'text',
1137
+ 'std' => '',
1138
+ ),
1139
+ 'taxonomy' => array(
1140
+ 'label' => __( 'Taxonomy', 'yith-plugin-fw' ),
1141
+ 'desc' => __( 'If you want to use categories in the portfolio, set a name for taxonomy. Name should be a slug (must not contain capital letters nor spaces) and must not be more than 32 characters long (database structure restriction).', 'yith-plugin-fw' ),
1142
+ 'type' => 'text',
1143
+ 'std' => '',
1144
+ ),
1145
+ 'taxonomy_rewrite' => array(
1146
+ 'label' => __( 'Taxonomy Rewrite', 'yith-plugin-fw' ),
1147
+ 'desc' => __( 'Set univocal name for each category page URL.', 'yith-plugin-fw' ),
1148
+ 'type' => 'text',
1149
+ 'std' => '',
1150
+ ),
1151
+ 'single_layout' => array(
1152
+ 'label' => __( 'Single layout', 'yith-plugin-fw' ),
1153
+ 'desc' => __( 'Layout for single page of this portfolio', 'yith-plugin-fw' ),
1154
+ 'type' => 'select',
1155
+ 'options' => $single_layouts,
1156
+ 'std' => '',
1157
+ ),
1158
+ )
1159
+ ),
1160
+ ),
1161
+ ),
1162
+
1163
+ );
1164
+
1165
+ if ( ! $this->args['has_single'] ) {
1166
+ unset( $metabox_args['tabs']['settings']['fields']['rewrite'] );
1167
+ }
1168
+
1169
+ if ( ! $this->args['has_taxonomy'] ) {
1170
+ unset( $metabox_args['tabs']['settings']['fields']['taxonomy'] );
1171
+ unset( $metabox_args['tabs']['settings']['fields']['taxonomy_rewrite'] );
1172
+ }
1173
+
1174
+ if ( ! empty( $this->args['label_item_sing'] ) ) {
1175
+ unset( $metabox_args['tabs']['settings']['fields']['label_singular'] );
1176
+ }
1177
+
1178
+ if ( ! empty( $this->args['label_item_plur'] ) ) {
1179
+ unset( $metabox_args['tabs']['settings']['fields']['label_plural'] );
1180
+ }
1181
+
1182
+ if ( $this->args['manage_layouts'] ) {
1183
+
1184
+ if ( count( $layouts ) < 1 ) {
1185
+ unset( $metabox_args['tabs']['settings']['fields']['type'] );
1186
+ }
1187
+
1188
+ // Layouts options.
1189
+ foreach ( $this->layouts as $layout => $args ) {
1190
+ if ( ! isset( $args['fields'] ) ) {
1191
+ continue;
1192
+ }
1193
+
1194
+ // Section title.
1195
+ $metabox_args['tabs']['settings']['fields'][ $layout . '_title' ] = array(
1196
+ 'desc' => $args['name'] . ' ' . __( 'layout settings', 'yith-plugin-fw' ),
1197
+ 'type' => 'title',
1198
+ 'deps' => array(
1199
+ 'ids' => '_type',
1200
+ 'values' => $layout,
1201
+ ),
1202
+ );
1203
+
1204
+ // Options.
1205
+ foreach ( $args['fields'] as $field_id => $field ) {
1206
+ $metabox_args['tabs']['settings']['fields'][ $field_id ] = $field;
1207
+ $metabox_args['tabs']['settings']['fields'][ $field_id ]['deps'] = array(
1208
+ 'ids' => '_type',
1209
+ 'values' => $layout,
1210
+ );
1211
+ }
1212
+ }
1213
+ } else {
1214
+ unset( $metabox_args['tabs']['settings']['fields']['type'] );
1215
+ }
1216
+
1217
+ if ( count( $single_layouts ) < 1 ) {
1218
+ unset( $metabox_args['tabs']['settings']['fields']['single_layout'] );
1219
+ }
1220
+
1221
+ // Undo if tab empty.
1222
+ if ( empty( $metabox_args['tabs']['settings']['fields'] ) ) {
1223
+ return;
1224
+ }
1225
+
1226
+ $metabox = YIT_Metabox( $this->name . '_cptu_settings' );
1227
+ $metabox->init( $metabox_args );
1228
+ }
1229
+
1230
+ /**
1231
+ * Register Metaboxes options
1232
+ * Add the metabox for the portfolio settings
1233
+ *
1234
+ * @return void
1235
+ * @since 1.0
1236
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1237
+ */
1238
+ public function add_metabox_item_fields() {
1239
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended,WordPress.WP.GlobalVariablesOverride.Prohibited
1240
+ global $pagenow, $post_type;
1241
+
1242
+ // Get the actual post type, to add the metabox only if necessary.
1243
+ if ( 'post.php' === $pagenow && isset( $_REQUEST['post'] ) ) {
1244
+ $post_type = get_post_type( intval( $_REQUEST['post'] ) );
1245
+ } elseif ( 'post.php' === $pagenow && isset( $_REQUEST['post_ID'] ) ) {
1246
+ $post_type = get_post_type( intval( $_REQUEST['post_ID'] ) );
1247
+ } elseif ( 'post-new.php' === $pagenow && isset( $_REQUEST['post_type'] ) ) {
1248
+ $post_type = sanitize_key( wp_unslash( $_REQUEST['post_type'] ) );
1249
+ } else {
1250
+ return;
1251
+ }
1252
+
1253
+ $layout = get_post_meta( $this->get_id_by_name( $post_type ), $this->args['layout_option'], true );
1254
+
1255
+ if ( empty( $this->layouts[ $layout ]['item_fields'] ) ) {
1256
+ return;
1257
+ }
1258
+
1259
+ $metabox_args = array(
1260
+ 'label' => __( 'Settings', 'yith-plugin-fw' ),
1261
+ 'pages' => $post_type,
1262
+ 'context' => 'normal',
1263
+ 'priority' => 'default',
1264
+ 'tabs' => array(
1265
+ 'settings' => array(
1266
+ 'label' => __( 'Settings', 'yith-plugin-fw' ),
1267
+ 'fields' => $this->layouts[ $layout ]['item_fields'],
1268
+ ),
1269
+ ),
1270
+ );
1271
+
1272
+ $metabox = YIT_Metabox( $post_type . '_item_fields' );
1273
+ $metabox->init( $metabox_args );
1274
+
1275
+ // phpcs:enable
1276
+ }
1277
+
1278
+ /**
1279
+ * Add quick links inside the editing page of CPTU and Custom Post Types
1280
+ *
1281
+ * @return void
1282
+ * @since 1.0
1283
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1284
+ */
1285
+ public function add_quick_links_metaboxes() {
1286
+ add_meta_box( $this->name . '_quick_links', __( 'Quick links', 'yith-plugin-fw' ), array( $this, 'quick_links_cptu_inner' ), $this->name, 'side', 'high' );
1287
+
1288
+ $args = array(
1289
+ 'post_type' => $this->name,
1290
+ 'posts_per_page' => - 1,
1291
+ 'post_status' => 'publish',
1292
+ );
1293
+ $post_types = get_posts( $args );
1294
+
1295
+ foreach ( $post_types as $post ) {
1296
+ $post_type = get_post_meta( $post->ID, '_post_type', true );
1297
+ add_meta_box( $post->post_type . '_quick_links', __( 'Quick links', 'yith-plugin-fw' ), array( $this, 'quick_links_cpt_inner' ), $post_type, 'side', 'high' );
1298
+ }
1299
+ }
1300
+
1301
+ /**
1302
+ * Link to: "View Items", inside the CPTU
1303
+ *
1304
+ * @param WP_Post $post The post.
1305
+ *
1306
+ * @return void
1307
+ * @since 1.0
1308
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1309
+ */
1310
+ public function quick_links_cptu_inner( $post ) {
1311
+ extract( $this->cpt_args( $post ) ); //phpcs:ignore WordPress.PHP.DontExtract.extract_extract
1312
+ /**
1313
+ * Extracted fields.
1314
+ *
1315
+ * @var string $label_plural The plural label.
1316
+ */
1317
+ ?>
1318
+ <a href="<?php echo esc_url( admin_url( 'edit.php?post_type=' . get_post_meta( $post->ID, '_post_type', true ) ) ); ?>">
1319
+ <?php
1320
+ echo esc_html(
1321
+ sprintf(
1322
+ // translators: %s is the plural label of the post type.
1323
+ __( 'View %s', 'yith-plugin-fw' ),
1324
+ $label_plural
1325
+ )
1326
+ );
1327
+ ?>
1328
+ </a>
1329
+ <?php
1330
+ }
1331
+
1332
+ /**
1333
+ * Link to: "Edit %s", inside the CPTU
1334
+ *
1335
+ * @param WP_Post $post The Post.
1336
+ *
1337
+ * @return void
1338
+ * @since 1.0
1339
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1340
+ */
1341
+ public function quick_links_cpt_inner( $post ) {
1342
+ $post = get_post( $this->get_id_by_name( $post->post_type ) );
1343
+ $url = admin_url( "post.php?post={$post->ID}&action=edit" );
1344
+ ?>
1345
+ <a href="<?php echo esc_url( $url ); ?>">
1346
+ <?php
1347
+ echo esc_html(
1348
+ sprintf(
1349
+ // translators: %s is the post title.
1350
+ __( 'Edit %s', 'yith-plugin-fw' ),
1351
+ $post->post_title
1352
+ )
1353
+ );
1354
+ ?>
1355
+ </a>
1356
+ <?php
1357
+ }
1358
+
1359
+ /**
1360
+ * Define the columns to use in the list table of main sliders post type
1361
+ *
1362
+ * @param array $columns The columns used in the list table.
1363
+ *
1364
+ * @return array
1365
+ * @since 1.0
1366
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1367
+ */
1368
+ public function cptu_define_columns( $columns ) {
1369
+ unset( $columns['date'] );
1370
+
1371
+ $columns['actions'] = '';
1372
+
1373
+ return $columns;
1374
+ }
1375
+
1376
+ /**
1377
+ * Change the content of each column of the table list
1378
+ *
1379
+ * @param string $column The current column.
1380
+ * @param int $post_id The current post ID.
1381
+ *
1382
+ * @return void
1383
+ * @since 1.0
1384
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1385
+ */
1386
+ public function cptu_change_columns( $column, $post_id ) {
1387
+ $post = get_post( $post_id );
1388
+ extract( $this->cpt_args( $post ) ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
1389
+ /**
1390
+ * Extracted fields.
1391
+ *
1392
+ * @var string $label_plural The plural label.
1393
+ */
1394
+
1395
+ switch ( $column ) {
1396
+ case 'actions':
1397
+ $edit_url = admin_url( "post.php?post={$post_id}&action=edit" );
1398
+ $view_url = admin_url( 'edit.php?post_type=' . get_post_meta( $post_id, '_post_type', true ) );
1399
+ $edit_label = sprintf(
1400
+ // translators: %s is the singular name of the post type.
1401
+ __( 'Edit %s', 'yith-plugin-fw' ),
1402
+ ucfirst( $this->labels['singular'] )
1403
+ );
1404
+ $view_label = sprintf(
1405
+ // translators: %s is the plural name of the post type.
1406
+ __( 'View %s', 'yith-plugin-fw' ),
1407
+ $label_plural
1408
+ );
1409
+ echo '<a href="' . esc_url( $edit_url ) . '" class="button-secondary">' . esc_html( $edit_label ) . '</a> ';
1410
+ echo '<a href="' . esc_url( $view_url ) . '" class="button-secondary">' . esc_html( $view_label ) . '</a> ';
1411
+ break;
1412
+ }
1413
+ }
1414
+
1415
+ /**
1416
+ * Retrieve the path of layout specified in parameter
1417
+ *
1418
+ * @param string $layout The layout.
1419
+ * @param string $file The file to find.
1420
+ *
1421
+ * @return bool|string
1422
+ * @since 1.0
1423
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1424
+ */
1425
+ public function locate_file( $layout, $file = '' ) {
1426
+ if ( ! $this->args['manage_layouts'] ) {
1427
+ return $this->template_path() . '/' . ( ! empty( $file ) ? $file . '.php' : '' );
1428
+ }
1429
+
1430
+ if ( ! isset( $this->layouts[ $layout ] ) ) {
1431
+ $layout = 'default';
1432
+ }
1433
+
1434
+ return $this->layouts[ $layout ]['path'] . '/' . ( ! empty( $file ) ? $file . '.php' : '' );
1435
+ }
1436
+
1437
+ /**
1438
+ * Retrieve the URL of layout specified in parameter
1439
+ *
1440
+ * @param string $layout The layout.
1441
+ * @param string $file The file to find.
1442
+ *
1443
+ * @return bool|string
1444
+ * @since 1.0
1445
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1446
+ */
1447
+ public function locate_url( $layout, $file = '' ) {
1448
+ if ( ! $this->args['manage_layouts'] ) {
1449
+ return $this->template_url();
1450
+
1451
+ }
1452
+
1453
+ if ( ! isset( $this->layouts[ $layout ] ) ) {
1454
+ $layout = 'default';
1455
+ }
1456
+
1457
+ return $this->layouts[ $layout ]['url'] . '/' . ( ! empty( $file ) ? $file . '.php' : '' );
1458
+ }
1459
+
1460
+ /**
1461
+ * Retrieve the post ID relative to the post of post type
1462
+ *
1463
+ * @param string $name the name.
1464
+ *
1465
+ * @return mixed
1466
+ * @since 1.0
1467
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1468
+ */
1469
+ protected function get_id_by_name( $name ) {
1470
+ global $wpdb;
1471
+
1472
+ return $wpdb->get_var( $wpdb->prepare( "SELECT pm.post_id FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s AND p.post_type = %s", '_post_type', $name, $this->name ) );
1473
+ }
1474
+
1475
+ /**
1476
+ * Retrieve the post_type of portfolio by portfolio name
1477
+ *
1478
+ * @param string $name the name.
1479
+ *
1480
+ * @return mixed
1481
+ * @since 1.0
1482
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1483
+ */
1484
+ protected function get_post_type_by_name( $name ) {
1485
+ global $wpdb;
1486
+
1487
+ return $wpdb->get_var( $wpdb->prepare( "SELECT pm.meta_value FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND p.post_name = %s AND p.post_type = %s", '_post_type', $name, $this->name ) );
1488
+ }
1489
+
1490
+ /**
1491
+ * The shortcode used to show the frontend
1492
+ *
1493
+ * @param array $atts Attributes.
1494
+ * @param string|null $content The content.
1495
+ *
1496
+ * @return string|null
1497
+ * @since 1.0
1498
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1499
+ */
1500
+ public function add_shortcode( $atts, $content = null ) {
1501
+ $atts = wp_parse_args(
1502
+ $atts,
1503
+ array(
1504
+ 'name' => null,
1505
+ 'cat' => array(),
1506
+ 'posts_per_page' => false,
1507
+ 'style' => null,
1508
+ )
1509
+ );
1510
+
1511
+ // Don't show the slider if 'name' is empty or is 'none'.
1512
+ if ( empty( $atts['name'] ) || 'none' === $atts['name'] ) {
1513
+ return null;
1514
+ }
1515
+
1516
+ // Compatibility fix: remove prefix if exists in portfolio object.
1517
+ if ( function_exists( 'YIT_Portfolio' ) && method_exists( YIT_Portfolio(), 'is' ) && YIT_Portfolio()->is( $atts['name'] ) ) {
1518
+ $atts['name'] = str_replace( YIT_Portfolio()->post_type_prefix, '', $atts['name'] );
1519
+ }
1520
+
1521
+ // Pass vars to template.
1522
+ $atts['post_type'] = $this->get_post_type_by_name( $atts['name'] );
1523
+ $atts['layout'] = $this->args['manage_layouts'] ? get_post_meta( $this->get_id_by_name( $atts['post_type'] ), $this->args['layout_option'], true ) : '';
1524
+ extract( apply_filters( 'yit_cptu_frontend_vars', $atts, $this->name ) ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
1525
+
1526
+ /**
1527
+ * Extracted fields.
1528
+ *
1529
+ * @var string $layout The layout.
1530
+ */
1531
+
1532
+ // Add the javascript assets.
1533
+ if ( $this->args['manage_layouts'] && isset( $this->layouts[ $layout ]['js'] ) && ! empty( $this->layouts[ $layout ]['js'] ) ) {
1534
+ foreach ( $this->layouts[ $layout ]['js'] as $asset ) {
1535
+ if ( empty( $asset ) ) {
1536
+ continue;
1537
+ }
1538
+
1539
+ if ( empty( $asset['src'] ) ) {
1540
+ wp_enqueue_script( $asset['handle'] );
1541
+ continue;
1542
+ }
1543
+
1544
+ yit_enqueue_script( $asset['handle'], $this->locate_url( $layout ) . $asset['src'], $asset['deps'], $asset['ver'], $asset['in_footer'] );
1545
+ }
1546
+ }
1547
+
1548
+ // Unique sequential index to differentiate more cpt in the same page.
1549
+ ++ $this->index;
1550
+
1551
+ ob_start();
1552
+ include $this->locate_file( $layout, 'markup' );
1553
+
1554
+ return ob_get_clean();
1555
+ }
1556
+
1557
+ /**
1558
+ * Shortcode icon
1559
+ * Return the shortcode icone to display on shortcode panel
1560
+ *
1561
+ * @param string $icon_url Icone url found by yit_shortcode plugin.
1562
+ *
1563
+ * @return string
1564
+ * @since 1.0.0
1565
+ * @author Antonino Scarfi' <antonio.scarfi@yithemes.it>
1566
+ */
1567
+ public function shortcode_icon( $icon_url ) {
1568
+ return ! empty( $this->args['shortcode_icon'] ) ? $this->args['shortcode_icon'] : $icon_url;
1569
+ }
1570
+
1571
+ /**
1572
+ * Return an array with cptu options to shortcode panel
1573
+ * All definition settings to add cptu shortcode to Yit Shortcode Panel
1574
+ *
1575
+ * @param array $shortcodes Shortcodes.
1576
+ *
1577
+ * @return array
1578
+ * @since 1.0
1579
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1580
+ */
1581
+ public function add_shortcode_to_box( $shortcodes ) {
1582
+ $post_types = array();
1583
+
1584
+ foreach ( $this->get_post_types() as $post ) {
1585
+ $post_types[ $post->post_name ] = $post->post_title;
1586
+ }
1587
+
1588
+ $args = array(
1589
+ $this->args['shortcode_name'] => array(
1590
+ 'title' => $this->labels['singular'],
1591
+ 'description' => sprintf(
1592
+ // translators: %s is the name of the post type.
1593
+ __( 'Show frontend of the %s', 'yith-plugin-fw' ),
1594
+ $this->labels['main_name']
1595
+ ),
1596
+ 'tab' => 'cpt',
1597
+ 'create' => false,
1598
+ 'has_content' => false,
1599
+ 'in_visual_composer' => true,
1600
+ 'attributes' => array(
1601
+ 'name' => array(
1602
+ 'title' => __( 'Name', 'yith-plugin-fw' ),
1603
+ 'type' => 'select',
1604
+ 'options' => $post_types,
1605
+ 'std' => '',
1606
+ ),
1607
+ ),
1608
+ ),
1609
+ );
1610
+
1611
+ return array_merge( $shortcodes, $args );
1612
+ }
1613
+
1614
+ /**
1615
+ * Check the post type passed in parameter, if is generated by this CPTU
1616
+ *
1617
+ * @param string $post_type The post type to check.
1618
+ *
1619
+ * @return bool
1620
+ * @since 1.0
1621
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1622
+ */
1623
+ protected function is_valid( $post_type ) {
1624
+ return (bool) ( strpos( $post_type, $this->args['post_type_prefix'] ) !== false );
1625
+ }
1626
+
1627
+ /**
1628
+ * Add as a valid post type all cptu when importing dummy data
1629
+ *
1630
+ * @param array $post The post object.
1631
+ *
1632
+ * @return array
1633
+ * @since 1.0
1634
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
1635
+ */
1636
+ public function add_importer_required_post_type( $post ) {
1637
+ // phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
1638
+ global $wp_post_types, $wp_taxonomies;
1639
+
1640
+ if ( strpos( $post['post_type'], $this->prefix_cpt ) === false ) {
1641
+ return $post;
1642
+ }
1643
+
1644
+ if ( ! isset( $wp_post_types[ $post['post_type'] ] ) ) {
1645
+ $wp_post_types[ $post['post_type'] ] = array( 'name' => '' );
1646
+ }
1647
+
1648
+ if ( ! empty( $post['terms'] ) ) {
1649
+ foreach ( $post['terms'] as $term ) {
1650
+ if ( ! isset( $wp_taxonomies[ $term['domain'] ] ) ) {
1651
+ $wp_taxonomies[ $term['domain'] ] = array( 'name' => '' );
1652
+ }
1653
+ }
1654
+ }
1655
+
1656
+ return $post;
1657
+ // phpcs:enable
1658
+ }
1659
+
1660
+ /**
1661
+ * Add taxonomy when importing dummy data
1662
+ *
1663
+ * @param array $terms Array of terms.
1664
+ *
1665
+ * @return array
1666
+ * @since 1.0
1667
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
1668
+ */
1669
+ public function add_importer_required_taxonomy( $terms ) {
1670
+ // phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
1671
+ global $wp_taxonomies;
1672
+
1673
+ if ( ! empty( $terms ) ) {
1674
+ foreach ( $terms as $term ) {
1675
+ if ( isset( $term['domain'] ) && ! isset( $wp_taxonomies[ $term['domain'] ] ) ) {
1676
+ $wp_taxonomies[ $term['domain'] ] = array( 'name' => '' );
1677
+ }
1678
+ }
1679
+ }
1680
+
1681
+ return $terms;
1682
+ // phpcs:enable
1683
+ }
1684
+
1685
+ /**
1686
+ * Force terms recount for imported taxonomy
1687
+ *
1688
+ * @param array $tt_ids Terms ids.
1689
+ * @param array $ids Post ids.
1690
+ * @param string $tax Taxonomy name.
1691
+ *
1692
+ * @return void
1693
+ * @since 1.0
1694
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
1695
+ */
1696
+ public function recount_terms_post( $tt_ids, $ids, $tax ) {
1697
+ wp_update_term_count( $tt_ids, $tax );
1698
+ }
1699
+
1700
+ // ### ASSETS ###
1701
+
1702
+ /**
1703
+ * Enqueue the assets for the admin
1704
+ *
1705
+ * @return void
1706
+ * @since 1.0
1707
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1708
+ */
1709
+ public function admin_assets() {
1710
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
1711
+ wp_enqueue_media();
1712
+ wp_enqueue_script( 'yit-cptu', YIT_CORE_PLUGIN_URL . '/assets/js/yit-cpt-unlimited' . $suffix . '.js', array( 'jquery' ), '1.0.0', true );
1713
+ }
1714
+
1715
+ /**
1716
+ * Add the button to the top of the list table page of CPTU
1717
+ *
1718
+ * @return void
1719
+ * @since 1.0
1720
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1721
+ */
1722
+ public function add_button_multiuploader() {
1723
+ global $pagenow, $post_type, $wpdb;
1724
+
1725
+ if ( 'edit.php' !== $pagenow ) {
1726
+ return;
1727
+ }
1728
+
1729
+ $cptu = $wpdb->get_var( $wpdb->prepare( "SELECT p.post_type FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s", '_post_type', $post_type ) );
1730
+
1731
+ $post = get_post( $this->get_id_by_name( $post_type ) );
1732
+ if ( empty( $post ) ) {
1733
+ return;
1734
+ }
1735
+ extract( $this->cpt_args( $post ) ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
1736
+
1737
+ /**
1738
+ * Extracted fields.
1739
+ *
1740
+ * @var string $label_plural The plural label.
1741
+ */
1742
+
1743
+ if ( $cptu !== $this->name || ! $this->is_valid( $post_type ) ) {
1744
+ return;
1745
+ }
1746
+
1747
+ $uploader_title = sprintf(
1748
+ // translators: %s is the plural name of the post type.
1749
+ __( 'Add %s from images', 'yith-plugin-fw' ),
1750
+ $label_plural
1751
+ );
1752
+
1753
+ $uploader_button_text = sprintf(
1754
+ // translators: %s is the plural name of the post type.
1755
+ __( 'Add %s', 'yith-plugin-fw' ),
1756
+ $label_plural
1757
+ );
1758
+ ?>
1759
+ <script>
1760
+ ( function ( $ ) {
1761
+ "use strict";
1762
+
1763
+ var button = $( '<a />', {
1764
+ href : '#',
1765
+ class : 'multi-uploader add-new-h2',
1766
+ 'data-uploader_title' : '<?php esc_html( $uploader_title ); ?>',
1767
+ 'data-uploader_button_text': '<?php esc_html( $uploader_button_text ); ?>',
1768
+ 'data-nonce' : '<?php echo esc_html( wp_create_nonce( 'cpt-unlimited-multiuploader' ) ); ?>'
1769
+ } ).text( '<?php esc_html_e( 'Upload multiple files', 'yith-plugin-fw' ); ?>' );
1770
+
1771
+ var spinner = $( '<span />', {
1772
+ class: 'spinner',
1773
+ style: 'float: none;'
1774
+ } );
1775
+
1776
+ button.appendTo( '.wrap h2, .wrap h1' ).after( spinner );
1777
+
1778
+ } )( jQuery );
1779
+ </script>
1780
+ <?php
1781
+ }
1782
+
1783
+ /**
1784
+ * Add more posts by multiupload
1785
+ *
1786
+ * @return void
1787
+ * @since 1.0
1788
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1789
+ */
1790
+ public function post_multiuploader() {
1791
+ check_ajax_referer( 'cpt-unlimited-multiuploader' );
1792
+
1793
+ if ( ! isset( $_REQUEST['images'] ) || ! isset( $_REQUEST['post_type'] ) && $this->is_valid( sanitize_key( wp_unslash( $_REQUEST['post_type'] ) ) ) ) {
1794
+ return;
1795
+ }
1796
+
1797
+ foreach ( $_REQUEST['images'] as $the ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
1798
+ // Create post object.
1799
+ $arg = array(
1800
+ 'post_title' => $the['title'],
1801
+ 'post_type' => sanitize_key( wp_unslash( $_REQUEST['post_type'] ) ),
1802
+ );
1803
+ $post_id = wp_insert_post( $arg );
1804
+ set_post_thumbnail( $post_id, $the['id'] );
1805
+ }
1806
+
1807
+ die();
1808
+ }
1809
+
1810
+
1811
+ // ###### SINGLE TEMPLATE ######
1812
+
1813
+ /**
1814
+ * Load the single template file
1815
+ *
1816
+ * @return void
1817
+ * @since 1.0
1818
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1819
+ */
1820
+ public function single_template() {
1821
+ global $post, $wpdb;
1822
+
1823
+ if ( ( ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && ! is_single() ) || ! isset( $post->post_type ) || ! $this->is_valid( $post->post_type ) ) {
1824
+ return;
1825
+ }
1826
+
1827
+ // Add the javascript assets.
1828
+ if ( $this->args['manage_layouts'] ) {
1829
+ foreach ( $this->layouts['single']['js'] as $asset ) {
1830
+ yit_enqueue_script( $asset['handle'], $this->locate_url( 'single' ) . $asset['src'], $asset['deps'], $asset['ver'], $asset['in_footer'] );
1831
+ }
1832
+ }
1833
+
1834
+ $post_name = $wpdb->get_var( $wpdb->prepare( "SELECT p.post_name FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s AND p.post_type = %s", '_post_type', $post->post_type, $this->name ) );
1835
+ extract( apply_filters( 'yit_cptu_frontend_vars', array( 'name' => $post_name ), $this->name ) ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
1836
+
1837
+ include $this->locate_file( 'single', 'markup' );
1838
+ }
1839
+
1840
+ /**
1841
+ * Load a file for the configuration of single template page of portfolio
1842
+ *
1843
+ * @return void
1844
+ * @since 1.0
1845
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1846
+ */
1847
+ public function single_template_config() {
1848
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended,WordPress.WP.GlobalVariablesOverride.Prohibited
1849
+ global $post, $wpdb;
1850
+
1851
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['post_id'] ) ) {
1852
+ $post = get_post( absint( $_REQUEST['post_id'] ) );
1853
+ }
1854
+
1855
+ if ( ( ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && ! is_single() ) || ! isset( $post->post_type ) || ! $this->is_valid( $post->post_type ) ) {
1856
+ return;
1857
+ }
1858
+
1859
+ $this->layout = 'single';
1860
+ $path = $this->locate_file( 'single', 'config' );
1861
+
1862
+ if ( file_exists( $path ) ) {
1863
+ $post_name = $wpdb->get_var( $wpdb->prepare( "SELECT p.post_name FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s AND p.post_type = %s", '_post_type', $post->post_type, $this->name ) );
1864
+ extract( apply_filters( 'yit_cptu_frontend_vars', array( 'name' => $post_name ), $this->name ) ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
1865
+
1866
+ include $path;
1867
+ }
1868
+ // phpcs:enable
1869
+ }
1870
+
1871
+ // ########################## ARCHIVE TEMPLATE ###############################
1872
+
1873
+ /**
1874
+ * Load the template for archive page
1875
+ *
1876
+ * @return void
1877
+ * @since 1.0
1878
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1879
+ */
1880
+ public function archive_template() {
1881
+ global $wp_query;
1882
+
1883
+ // Check if we are in archive template.
1884
+ if ( ! ( ! is_admin() && is_archive() && isset( $wp_query->post ) && $this->is_valid( $wp_query->post->post_type ) ) ) {
1885
+ return;
1886
+ }
1887
+
1888
+ // Remove the action from loop of theme.
1889
+ remove_action( 'yit_content_loop', 'yit_content_loop', 10 );
1890
+ add_action( 'yit_content_loop', array( $this, 'archive_template_loop' ), 10 );
1891
+ }
1892
+
1893
+ /**
1894
+ * Load loop for the archive template
1895
+ *
1896
+ * @return void
1897
+ * @since 1.0
1898
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1899
+ */
1900
+ public function archive_template_loop() {
1901
+ global $wp_query;
1902
+ echo $this->add_shortcode( array( 'name' => $wp_query->post->post_type ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1903
+ }
1904
+ }
1905
+ }
plugin-fw/includes/class-yit-gradients.php ADDED
@@ -0,0 +1,505 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Plugin Gradients Class.
4
+ *
5
+ * @class YIT_Gradients
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Gradients' ) ) {
12
+
13
+ /**
14
+ * YIT_Gradients class.
15
+ *
16
+ * @deprecated 3.5
17
+ */
18
+ class YIT_Gradients {
19
+ /**
20
+ * An array of colors to use for a gradient.
21
+ *
22
+ * @var array
23
+ */
24
+ public $colors_gradient = array();
25
+
26
+ /**
27
+ * Set property
28
+ *
29
+ * @param string $key The key.
30
+ * @param mixed $value The value.
31
+ *
32
+ * @internal param array $colors_gradient
33
+ */
34
+ public function set( $key, $value ) {
35
+ if ( property_exists( $this, $key ) ) {
36
+ $this->{$key} = $value;
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Get property
42
+ *
43
+ * @param string $key The key.
44
+ *
45
+ * @return mixed
46
+ */
47
+ public function get( $key ) {
48
+ if ( property_exists( $this, $key ) ) {
49
+ return $this->{$key};
50
+ }
51
+
52
+ return false;
53
+ }
54
+
55
+ /**
56
+ * Add a color to use in a gradient.
57
+ *
58
+ * @param string $color The color.
59
+ * @param int $position The position.
60
+ */
61
+ public function add_color_gradient( $color, $position ) {
62
+ $the_color['color'] = $color;
63
+ $the_color['position'] = $position;
64
+
65
+ array_push( $this->colors_gradient, $the_color );
66
+ }
67
+
68
+ /**
69
+ * Generate the CSS code for a gradient.
70
+ *
71
+ * @param string $role The role.
72
+ * @param string $direction The direction.
73
+ *
74
+ * @return string|bool
75
+ */
76
+ public function gradient( $role, $direction ) {
77
+ if ( ! empty( $this->colors_gradient ) ) {
78
+
79
+ $css = array(
80
+ 'old' => $this->make_old_gradient( $this->colors_gradient[0]['color'] ), // Old browsers support.
81
+ 'ff3' => $this->make_modern_gradient( $this->colors_gradient, $direction, 'moz' ), // Firefox 3.6+ support.
82
+ 'chr_saf4' => $this->make_chr_saf4_gradient( $this->colors_gradient, $direction ), // Chrome and safari4+ support.
83
+ 'chr10_saf5' => $this->make_modern_gradient( $this->colors_gradient, $direction, 'webkit' ), // Chrome10+ and safari5+ support.
84
+ 'opera' => $this->make_modern_gradient( $this->colors_gradient, $direction, 'o' ), // Opera11.10+ support.
85
+ 'ie10' => $this->make_modern_gradient( $this->colors_gradient, $direction, 'ms' ), // Internet explorer 10+ support.
86
+ 'w3c' => $this->make_modern_gradient( $this->colors_gradient, $direction, 'w3c' ), // W3c support.
87
+ 'ie6_9' => $this->make_ie6_gradient( $this->colors_gradient, $direction ), // Ie6-9 support.
88
+ );
89
+
90
+ $css = $role . '{' . implode( ';', $css ) . '}';
91
+
92
+ $this->colors_gradient = array();
93
+
94
+ return $css;
95
+ }
96
+
97
+ return '';
98
+ }
99
+
100
+ /**
101
+ * Reverse a gradient. This method should be used only before calling ::make_gradient(). Otherwise it will not works.
102
+ */
103
+ public function reverse_gradient() {
104
+ $colors_gradient = array_reverse( $this->get( 'colors_gradient' ) );
105
+ $colors_gradient_count = count( $colors_gradient );
106
+ for ( $i = 0; $i < $colors_gradient_count; $i ++ ) {
107
+ $colors_gradient[ $i ]['position'] = 100 - $colors_gradient[ $i ]['position'];
108
+ }
109
+
110
+ $this->set( 'colors_gradient', $colors_gradient );
111
+ }
112
+
113
+ /**
114
+ * Generate the CSS code for a gradient.
115
+ *
116
+ * @param string $role The role.
117
+ * @param string $direction The direction.
118
+ *
119
+ * @return string|bool
120
+ */
121
+ public function get_gradient( $role, $direction ) {
122
+ return $this->gradient( $role, $direction );
123
+ }
124
+
125
+ /**
126
+ * Generate the CSS code for a gradient.
127
+ *
128
+ * @param string $role The role.
129
+ * @param string $direction The direction.
130
+ */
131
+ public function the_gradient( $role, $direction ) {
132
+ echo esc_html( $this->get_gradient( $role, $direction ) );
133
+ }
134
+
135
+ /**
136
+ * Generate the CSS code for a gradient.
137
+ *
138
+ * @param string $role The role.
139
+ * @param string $from From color.
140
+ * @param string $to To color.
141
+ * @param string $direction The direction.
142
+ *
143
+ * @return string|bool
144
+ */
145
+ public function gradient_from_to( $role, $from, $to, $direction ) {
146
+
147
+ $colors = array(
148
+ array(
149
+ 'color' => $from,
150
+ 'position' => 0,
151
+ ),
152
+ array(
153
+ 'color' => $to,
154
+ 'position' => 100,
155
+ ),
156
+ );
157
+
158
+ $this->set( 'colors_gradient', $colors );
159
+
160
+ return $this->get_gradient( $role, $direction );
161
+ }
162
+
163
+ /**
164
+ * Generate the CSS code for a gradient.
165
+ *
166
+ * @param string $role The role.
167
+ * @param string $color The color.
168
+ * @param string $direction The direction.
169
+ * @param int|string $factor The factor.
170
+ *
171
+ * @return string|bool
172
+ */
173
+ public function gradient_darker( $role, $color, $direction, $factor = 30 ) {
174
+
175
+ $colors = array(
176
+ array(
177
+ 'color' => $color,
178
+ 'position' => 0,
179
+ ),
180
+ array(
181
+ 'color' => $this->hex_darker( $color, $factor ),
182
+ 'position' => 100,
183
+ ),
184
+ );
185
+
186
+ $this->set( 'colors_gradient', $colors );
187
+
188
+ return $this->get_gradient( $role, $direction );
189
+ }
190
+
191
+ /**
192
+ * Generate the CSS code for a gradient.
193
+ *
194
+ * @param string $role The role.
195
+ * @param string $color The color.
196
+ * @param string $direction The direction.
197
+ * @param int|string $factor The factor.
198
+ *
199
+ * @return string|bool
200
+ * @since 1.0
201
+ */
202
+ public function gradient_lighter( $role, $color, $direction, $factor = 30 ) {
203
+
204
+ $colors = array(
205
+ array(
206
+ 'color' => $color,
207
+ 'position' => 0,
208
+ ),
209
+ array(
210
+ 'color' => $this->hex_lighter( $color, $factor ),
211
+ 'position' => 100,
212
+ ),
213
+ );
214
+
215
+ $this->set( 'colors_gradient', $colors );
216
+
217
+ return $this->get_gradient( $role, $direction );
218
+ }
219
+
220
+ /**
221
+ * Generate the CSS code for a gradient that not supports gradients (add only a background color).
222
+ *
223
+ * @param string $color The color.
224
+ *
225
+ * @return string|bool
226
+ */
227
+ private function make_old_gradient( $color ) {
228
+ return 'background:' . $color;
229
+ }
230
+
231
+ /**
232
+ * Generate the CSS code for a gradient in IE6-9.
233
+ *
234
+ * @param array $colors The colors.
235
+ * @param string $direction The direction.
236
+ *
237
+ * @return string|bool
238
+ */
239
+ private function make_ie6_gradient( $colors, $direction ) {
240
+ $start = $colors[0]['color'];
241
+ $end = $colors[ count( $colors ) - 1 ]['color'];
242
+ $type = 'horizontal' === $direction ? 1 : 0;
243
+ $params = implode(
244
+ ',',
245
+ array(
246
+ "startColorstr='{$start}'",
247
+ "endColorstr='{$end}'",
248
+ "GradientType={$type}",
249
+ )
250
+ );
251
+
252
+ return "filter:progid:DXImageTransform.Microsoft.gradient({$params})";
253
+ }
254
+
255
+ /**
256
+ * Make the CSS 3 for a gradient in modern browsers( FF3.6+, Chrome, Safari5+, Opera11.10+, IE10+ )
257
+ *
258
+ * @param array $colors The colors.
259
+ * @param string $direction The direction.
260
+ * @param string $browser The browser.
261
+ *
262
+ * @return string
263
+ */
264
+ private function make_modern_gradient( $colors, $direction, $browser ) {
265
+ $css = 'background:';
266
+
267
+ // Add the browser suffix.
268
+ if ( 'w3c' !== $browser ) {
269
+ $browser = '-' . $browser . '-';
270
+ } else {
271
+ $browser = '';
272
+ }
273
+
274
+ switch ( $direction ) {
275
+ case 'vertical':
276
+ $css .= $browser . 'linear-gradient(top,';
277
+ break;
278
+ case 'horizontal':
279
+ $css .= $browser . 'linear-gradient(left,';
280
+ break;
281
+ case 'diagonal-bottom':
282
+ $css .= $browser . 'linear-gradient(-45deg,';
283
+ break;
284
+ case 'diagonal-top':
285
+ $css .= $browser . 'linear-gradient(45deg,';
286
+ break;
287
+ case 'radial':
288
+ $css .= $browser . 'radial-gradient(center, ellipse cover,';
289
+ break;
290
+ }
291
+
292
+ foreach ( $colors as $stop ) {
293
+ $css .= $stop['color'] . ' ' . $stop['position'] . '%, ';
294
+ }
295
+
296
+ $css = rtrim( $css );
297
+ $css = rtrim( $css, ',' );
298
+
299
+ $css .= ')';
300
+
301
+ return $css;
302
+ }
303
+
304
+ /**
305
+ * Make the CSS 3 for a gradient in Chrome and Safari 4+
306
+ *
307
+ * @param array $colors The colors.
308
+ * @param string $direction The direction.
309
+ *
310
+ * @return string
311
+ */
312
+ private function make_chr_saf4_gradient( $colors, $direction ) {
313
+ $css = 'background:';
314
+
315
+ switch ( $direction ) {
316
+ case 'vertical':
317
+ $css .= '-webkit-gradient(linear,left top,left bottom,';
318
+ break;
319
+ case 'horizontal':
320
+ $css .= '-webkit-gradient(linear,left top,right top,';
321
+ break;
322
+ case 'diagonal-bottom':
323
+ $css .= '-webkit-gradient(linear,left top,right bottom,';
324
+ break;
325
+ case 'diagonal-top':
326
+ $css .= '-webkit-gradient(linear,left bottom,right top,';
327
+ break;
328
+ case 'radial':
329
+ $css .= '-webkit-gradient(radial,center center, 0px, center center, 100%,';
330
+ break;
331
+ }
332
+
333
+ foreach ( $colors as $stop ) {
334
+ $css .= 'color-stop(' . $stop['position'] . '%, ' . $stop['color'] . '), ';
335
+ }
336
+
337
+ $css = rtrim( $css );
338
+ $css = rtrim( $css, ',' );
339
+
340
+ $css .= ')';
341
+
342
+ return $css;
343
+ }
344
+
345
+ /**
346
+ * Return an instance of the model called
347
+ *
348
+ * @param string $class The name of class that I want the instance.
349
+ *
350
+ * @return mixed
351
+ * @deprecated 3.5 | use YIT_Gradients::get_model instead
352
+ */
353
+ public function getModel( $class ) {
354
+ return $this->get_model( $class );
355
+ }
356
+
357
+
358
+ /**
359
+ * Return an instance of the model called
360
+ *
361
+ * @param string $class The name of class that I want the instance.
362
+ *
363
+ * @return mixed
364
+ * @since 3.5
365
+ */
366
+ public function get_model( $class ) {
367
+ return class_exists( 'YIT_Registry' ) ? YIT_Registry::get_instance()->$class : false;
368
+ }
369
+
370
+
371
+ /**
372
+ * Return a color darker then $color.
373
+ *
374
+ * @param string $color The color.
375
+ * @param int $factor The factor.
376
+ *
377
+ * @return string
378
+ */
379
+ public function hex_darker( $color, $factor = 30 ) {
380
+ $color = str_replace( '#', '', $color );
381
+
382
+ $base['R'] = hexdec( substr( $color, 0, 2 ) );
383
+ $base['G'] = hexdec( substr( $color, 2, 2 ) );
384
+ $base['B'] = hexdec( substr( $color, 4, 2 ) );
385
+
386
+ $color = '#';
387
+
388
+ foreach ( $base as $k => $v ) {
389
+ $amount = $v / 100;
390
+ $amount = round( $amount * $factor );
391
+ $new_decimal = $v - $amount;
392
+
393
+ $new_hex_component = dechex( $new_decimal );
394
+
395
+ if ( strlen( $new_hex_component ) < 2 ) {
396
+ $new_hex_component = '0' . $new_hex_component;
397
+ }
398
+
399
+ $color .= $new_hex_component;
400
+ }
401
+
402
+ return $color;
403
+ }
404
+
405
+ /**
406
+ * Return a color lighter then $color.
407
+ *
408
+ * @param string $color The color.
409
+ * @param int $factor The factor.
410
+ *
411
+ * @return string
412
+ */
413
+ public function hex_lighter( $color, $factor = 30 ) {
414
+ $color = str_replace( '#', '', $color );
415
+
416
+ $base['R'] = hexdec( $color[0] . $color[1] );
417
+ $base['G'] = hexdec( $color[2] . $color[3] );
418
+ $base['B'] = hexdec( $color[4] . $color[5] );
419
+
420
+ $color = '#';
421
+
422
+ foreach ( $base as $k => $v ) {
423
+ $amount = 255 - $v;
424
+ $amount = $amount / 100;
425
+ $amount = round( $amount * $factor );
426
+ $new_decimal = $v + $amount;
427
+
428
+ $new_hex_component = dechex( $new_decimal );
429
+
430
+ if ( strlen( $new_hex_component ) < 2 ) {
431
+ $new_hex_component = '0' . $new_hex_component;
432
+ }
433
+
434
+ $color .= $new_hex_component;
435
+ }
436
+
437
+ return $color;
438
+ }
439
+
440
+ /**
441
+ * Detect if we must use a color darker or lighter then the background.
442
+ *
443
+ * @param string $color The color.
444
+ * @param string $dark The dark color.
445
+ * @param string $light The light color.
446
+ *
447
+ * @return string
448
+ * @since 1.0
449
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
450
+ */
451
+ public function light_or_dark( $color, $dark = '#000000', $light = '#FFFFFF' ) {
452
+ $hex = str_replace( '#', '', $color );
453
+
454
+ $c_r = hexdec( substr( $hex, 0, 2 ) );
455
+ $c_g = hexdec( substr( $hex, 2, 2 ) );
456
+ $c_b = hexdec( substr( $hex, 4, 2 ) );
457
+ $brightness = ( ( $c_r * 299 ) + ( $c_g * 587 ) + ( $c_b * 114 ) ) / 1000;
458
+
459
+ return ( $brightness > 155 ) ? $dark : $light;
460
+ }
461
+
462
+ /**
463
+ * Detect if we must use a color darker or lighter then the background.
464
+ *
465
+ * @param string $hex the Color.
466
+ *
467
+ * @return array Array with the rgb values.
468
+ */
469
+ public function hex2rgb( $hex ) {
470
+ $hex = str_replace( '#', '', $hex );
471
+
472
+ if ( 3 === strlen( $hex ) ) {
473
+ $r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) );
474
+ $g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) );
475
+ $b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) );
476
+ } else {
477
+ $r = hexdec( substr( $hex, 0, 2 ) );
478
+ $g = hexdec( substr( $hex, 2, 2 ) );
479
+ $b = hexdec( substr( $hex, 4, 2 ) );
480
+ }
481
+ $rgb = array( $r, $g, $b );
482
+
483
+ return $rgb;
484
+ }
485
+
486
+ /**
487
+ * Magic getter method
488
+ *
489
+ * @param string $prop The property.
490
+ *
491
+ * @return mixed
492
+ */
493
+ public function __get( $prop ) {
494
+ $value = null;
495
+ if ( 'request' === $prop ) {
496
+ if ( class_exists( 'YIT_Request' ) && ( ! isset( $this->request ) || ! $this->request instanceof YIT_Request ) ) {
497
+ $value = YIT_Registry::get_instance()->request;
498
+ $this->request = $value;
499
+ }
500
+ }
501
+
502
+ return $value;
503
+ }
504
+ }
505
+ }
plugin-fw/includes/class-yit-icons.php ADDED
@@ -0,0 +1,1180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Icons Class.
4
+ *
5
+ * @class YIT_Icons
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Icons' ) ) {
12
+ /**
13
+ * YIT_Icons class.
14
+ *
15
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
16
+ */
17
+ class YIT_Icons {
18
+
19
+ /**
20
+ * The single instance of the class.
21
+ *
22
+ * @var YIT_Icons
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Array of data
28
+ *
29
+ * @var array
30
+ */
31
+ private $data
32
+ = array(
33
+ 'font_awesome_version' => '4.6.3',
34
+ 'icons' => array(
35
+ 'FontAwesome' => array(
36
+ '\f000' => 'glass',
37
+ '\f001' => 'music',
38
+ '\f002' => 'search',
39
+ '\f003' => 'envelope-o',
40
+ '\f004' => 'heart',
41
+ '\f005' => 'star',
42
+ '\f006' => 'star-o',
43
+ '\f007' => 'user',
44
+ '\f008' => 'film',
45
+ '\f009' => 'th-large',
46
+ '\f00a' => 'th',
47
+ '\f00b' => 'th-list',
48
+ '\f00c' => 'check',
49
+ '\f00d' => 'times',
50
+ '\f00e' => 'search-plus',
51
+ '\f010' => 'search-minus',
52
+ '\f011' => 'power-off',
53
+ '\f012' => 'signal',
54
+ '\f013' => 'cog',
55
+ '\f014' => 'trash-o',
56
+ '\f015' => 'home',
57
+ '\f016' => 'file-o',
58
+ '\f017' => 'clock-o',
59
+ '\f018' => 'road',
60
+ '\f019' => 'download',
61
+ '\f01a' => 'arrow-circle-o-down',
62
+ '\f01b' => 'arrow-circle-o-up',
63
+ '\f01c' => 'inbox',
64
+ '\f01d' => 'play-circle-o',
65
+ '\f01e' => 'repeat',
66
+ '\f021' => 'refresh',
67
+ '\f022' => 'list-alt',
68
+ '\f023' => 'lock',
69
+ '\f024' => 'flag',
70
+ '\f025' => 'headphones',
71
+ '\f026' => 'volume-off',
72
+ '\f027' => 'volume-down',
73
+ '\f028' => 'volume-up',
74
+ '\f029' => 'qrcode',
75
+ '\f02a' => 'barcode',
76
+ '\f02b' => 'tag',
77
+ '\f02c' => 'tags',
78
+ '\f02d' => 'book',
79
+ '\f02e' => 'bookmark',
80
+ '\f02f' => 'print',
81
+ '\f030' => 'camera',
82
+ '\f031' => 'font',
83
+ '\f032' => 'bold',
84
+ '\f033' => 'italic',
85
+ '\f034' => 'text-height',
86
+ '\f035' => 'text-width',
87
+ '\f036' => 'align-left',
88
+ '\f037' => 'align-center',
89
+ '\f038' => 'align-right',
90
+ '\f039' => 'align-justify',
91
+ '\f03a' => 'list',
92
+ '\f03b' => 'outdent',
93
+ '\f03c' => 'indent',
94
+ '\f03d' => 'video-camera',
95
+ '\f03e' => 'picture-o',
96
+ '\f040' => 'pencil',
97
+ '\f041' => 'map-marker',
98
+ '\f042' => 'adjust',
99
+ '\f043' => 'tint',
100
+ '\f044' => 'pencil-square-o',
101
+ '\f045' => 'share-square-o',
102
+ '\f046' => 'check-square-o',
103
+ '\f047' => 'arrows',
104
+ '\f048' => 'step-backward',
105
+ '\f049' => 'fast-backward',
106
+ '\f04a' => 'backward',
107
+ '\f04b' => 'play',
108
+ '\f04c' => 'pause',
109
+ '\f04d' => 'stop',
110
+ '\f04e' => 'forward',
111
+ '\f050' => 'fast-forward',
112
+ '\f051' => 'step-forward',
113
+ '\f052' => 'eject',
114
+ '\f053' => 'chevron-left',
115
+ '\f054' => 'chevron-right',
116
+ '\f055' => 'plus-circle',
117
+ '\f056' => 'minus-circle',
118
+ '\f057' => 'times-circle',
119
+ '\f058' => 'check-circle',
120
+ '\f059' => 'question-circle',
121
+ '\f05a' => 'info-circle',
122
+ '\f05b' => 'crosshairs',
123
+ '\f05c' => 'times-circle-o',
124
+ '\f05d' => 'check-circle-o',
125
+ '\f05e' => 'ban',
126
+ '\f060' => 'arrow-left',
127
+ '\f061' => 'arrow-right',
128
+ '\f062' => 'arrow-up',
129
+ '\f063' => 'arrow-down',
130
+ '\f064' => 'share',
131
+ '\f065' => 'expand',
132
+ '\f066' => 'compress',
133
+ '\f067' => 'plus',
134
+ '\f068' => 'minus',
135
+ '\f069' => 'asterisk',
136
+ '\f06a' => 'exclamation-circle',
137
+ '\f06b' => 'gift',
138
+ '\f06c' => 'leaf',
139
+ '\f06d' => 'fire',
140
+ '\f06e' => 'eye',
141
+ '\f070' => 'eye-slash',
142
+ '\f071' => 'exclamation-triangle',
143
+ '\f072' => 'plane',
144
+ '\f073' => 'calendar',
145
+ '\f074' => 'random',
146
+ '\f075' => 'comment',
147
+ '\f076' => 'magnet',
148
+ '\f077' => 'chevron-up',
149
+ '\f078' => 'chevron-down',
150
+ '\f079' => 'retweet',
151
+ '\f07a' => 'shopping-cart',
152
+ '\f07b' => 'folder',
153
+ '\f07c' => 'folder-open',
154
+ '\f07d' => 'arrows-v',
155
+ '\f07e' => 'arrows-h',
156
+ '\f080' => 'bar-chart',
157
+ '\f081' => 'twitter-square',
158
+ '\f082' => 'facebook-square',
159
+ '\f083' => 'camera-retro',
160
+ '\f084' => 'key',
161
+ '\f085' => 'cogs',
162
+ '\f086' => 'comments',
163
+ '\f087' => 'thumbs-o-up',
164
+ '\f088' => 'thumbs-o-down',
165
+ '\f089' => 'star-half',
166
+ '\f08a' => 'heart-o',
167
+ '\f08b' => 'sign-out',
168
+ '\f08c' => 'linkedin-square',
169
+ '\f08d' => 'thumb-tack',
170
+ '\f08e' => 'external-link',
171
+ '\f090' => 'sign-in',
172
+ '\f091' => 'trophy',
173
+ '\f092' => 'github-square',
174
+ '\f093' => 'upload',
175
+ '\f094' => 'lemon-o',
176
+ '\f095' => 'phone',
177
+ '\f096' => 'square-o',
178
+ '\f097' => 'bookmark-o',
179
+ '\f098' => 'phone-square',
180
+ '\f099' => 'twitter',
181
+ '\f09a' => 'facebook',
182
+ '\f09b' => 'github',
183
+ '\f09c' => 'unlock',
184
+ '\f09d' => 'credit-card',
185
+ '\f09e' => 'rss',
186
+ '\f0a0' => 'hdd-o',
187
+ '\f0a1' => 'bullhorn',
188
+ '\f0a2' => 'bell-o',
189
+ '\f0a3' => 'certificate',
190
+ '\f0a4' => 'hand-o-right',
191
+ '\f0a5' => 'hand-o-left',
192
+ '\f0a6' => 'hand-o-up',
193
+ '\f0a7' => 'hand-o-down',
194
+ '\f0a8' => 'arrow-circle-left',
195
+ '\f0a9' => 'arrow-circle-right',
196
+ '\f0aa' => 'arrow-circle-up',
197
+ '\f0ab' => 'arrow-circle-down',
198
+ '\f0ac' => 'globe',
199
+ '\f0ad' => 'wrench',
200
+ '\f0ae' => 'tasks',
201
+ '\f0b0' => 'filter',
202
+ '\f0b1' => 'briefcase',
203
+ '\f0b2' => 'arrows-alt',
204
+ '\f0c0' => 'users',
205
+ '\f0c1' => 'link',
206
+ '\f0c2' => 'cloud',
207
+ '\f0c3' => 'flask',
208
+ '\f0c4' => 'scissors',
209
+ '\f0c5' => 'files-o',
210
+ '\f0c6' => 'paperclip',
211
+ '\f0c7' => 'floppy-o',
212
+ '\f0c8' => 'square',
213
+ '\f0c9' => 'bars',
214
+ '\f0ca' => 'list-ul',
215
+ '\f0cb' => 'list-ol',
216
+ '\f0cc' => 'strikethrough',
217
+ '\f0cd' => 'underline',
218
+ '\f0ce' => 'table',
219
+ '\f0d0' => 'magic',
220
+ '\f0d1' => 'truck',
221
+ '\f0d2' => 'pinterest',
222
+ '\f0d3' => 'pinterest-square',
223
+ '\f0d4' => 'google-plus-square',
224
+ '\f0d5' => 'google-plus',
225
+ '\f0d6' => 'money',
226
+ '\f0d7' => 'caret-down',
227
+ '\f0d8' => 'caret-up',
228
+ '\f0d9' => 'caret-left',
229
+ '\f0da' => 'caret-right',
230
+ '\f0db' => 'columns',
231
+ '\f0dc' => 'sort',
232
+ '\f0dd' => 'sort-desc',
233
+ '\f0de' => 'sort-asc',
234
+ '\f0e0' => 'envelope',
235
+ '\f0e1' => 'linkedin',
236
+ '\f0e2' => 'undo',
237
+ '\f0e3' => 'gavel',
238
+ '\f0e4' => 'tachometer',
239
+ '\f0e5' => 'comment-o',
240
+ '\f0e6' => 'comments-o',
241
+ '\f0e7' => 'bolt',
242
+ '\f0e8' => 'sitemap',
243
+ '\f0e9' => 'umbrella',
244
+ '\f0ea' => 'clipboard',
245
+ '\f0eb' => 'lightbulb-o',
246
+ '\f0ec' => 'exchange',
247
+ '\f0ed' => 'cloud-download',
248
+ '\f0ee' => 'cloud-upload',
249
+ '\f0f0' => 'user-md',
250
+ '\f0f1' => 'stethoscope',
251
+ '\f0f2' => 'suitcase',
252
+ '\f0f3' => 'bell',
253
+ '\f0f4' => 'coffee',
254
+ '\f0f5' => 'cutlery',
255
+ '\f0f6' => 'file-text-o',
256
+ '\f0f7' => 'building-o',
257
+ '\f0f8' => 'hospital-o',
258
+ '\f0f9' => 'ambulance',
259
+ '\f0fa' => 'medkit',
260
+ '\f0fb' => 'fighter-jet',
261
+ '\f0fc' => 'beer',
262
+ '\f0fd' => 'h-square',
263
+ '\f0fe' => 'plus-square',
264
+ '\f100' => 'angle-double-left',
265
+ '\f101' => 'angle-double-right',
266
+ '\f102' => 'angle-double-up',
267
+ '\f103' => 'angle-double-down',
268
+ '\f104' => 'angle-left',
269
+ '\f105' => 'angle-right',
270
+ '\f106' => 'angle-up',
271
+ '\f107' => 'angle-down',
272
+ '\f108' => 'desktop',
273
+ '\f109' => 'laptop',
274
+ '\f10a' => 'tablet',
275
+ '\f10b' => 'mobile',
276
+ '\f10c' => 'circle-o',
277
+ '\f10d' => 'quote-left',
278
+ '\f10e' => 'quote-right',
279
+ '\f110' => 'spinner',
280
+ '\f111' => 'circle',
281
+ '\f112' => 'reply',
282
+ '\f113' => 'github-alt',
283
+ '\f114' => 'folder-o',
284
+ '\f115' => 'folder-open-o',
285
+ '\f118' => 'smile-o',
286
+ '\f119' => 'frown-o',
287
+ '\f11a' => 'meh-o',
288
+ '\f11b' => 'gamepad',
289
+ '\f11c' => 'keyboard-o',
290
+ '\f11d' => 'flag-o',
291
+ '\f11e' => 'flag-checkered',
292
+ '\f120' => 'terminal',
293
+ '\f121' => 'code',
294
+ '\f122' => 'reply-all',
295
+ '\f123' => 'star-half-o',
296
+ '\f124' => 'location-arrow',
297
+ '\f125' => 'crop',
298
+ '\f126' => 'code-fork',
299
+ '\f127' => 'chain-broken',
300
+ '\f128' => 'question',
301
+ '\f129' => 'info',
302
+ '\f12a' => 'exclamation',
303
+ '\f12b' => 'superscript',
304
+ '\f12c' => 'subscript',
305
+ '\f12d' => 'eraser',
306
+ '\f12e' => 'puzzle-piece',
307
+ '\f130' => 'microphone',
308
+ '\f131' => 'microphone-slash',
309
+ '\f132' => 'shield',
310
+ '\f133' => 'calendar-o',
311
+ '\f134' => 'fire-extinguisher',
312
+ '\f135' => 'rocket',
313
+ '\f136' => 'maxcdn',
314
+ '\f137' => 'chevron-circle-left',
315
+ '\f138' => 'chevron-circle-right',
316
+ '\f139' => 'chevron-circle-up',
317
+ '\f13a' => 'chevron-circle-down',
318
+ '\f13b' => 'html5',
319
+ '\f13c' => 'css3',
320
+ '\f13d' => 'anchor',
321
+ '\f13e' => 'unlock-alt',
322
+ '\f140' => 'bullseye',
323
+ '\f141' => 'ellipsis-h',
324
+ '\f142' => 'ellipsis-v',
325
+ '\f143' => 'rss-square',
326
+ '\f144' => 'play-circle',
327
+ '\f145' => 'ticket',
328
+ '\f146' => 'minus-square',
329
+ '\f147' => 'minus-square-o',
330
+ '\f148' => 'level-up',
331
+ '\f149' => 'level-down',
332
+ '\f14a' => 'check-square',
333
+ '\f14b' => 'pencil-square',
334
+ '\f14c' => 'external-link-square',
335
+ '\f14d' => 'share-square',
336
+ '\f14e' => 'compass',
337
+ '\f150' => 'caret-square-o-down',
338
+ '\f151' => 'caret-square-o-up',
339
+ '\f152' => 'caret-square-o-right',
340
+ '\f153' => 'eur',
341
+ '\f154' => 'gbp',
342
+ '\f155' => 'usd',
343
+ '\f156' => 'inr',
344
+ '\f157' => 'jpy',
345
+ '\f158' => 'rub',
346
+ '\f159' => 'krw',
347
+ '\f15a' => 'btc',
348
+ '\f15b' => 'file',
349
+ '\f15c' => 'file-text',
350
+ '\f15d' => 'sort-alpha-asc',
351
+ '\f15e' => 'sort-alpha-desc',
352
+ '\f160' => 'sort-amount-asc',
353
+ '\f161' => 'sort-amount-desc',
354
+ '\f162' => 'sort-numeric-asc',
355
+ '\f163' => 'sort-numeric-desc',
356
+ '\f164' => 'thumbs-up',
357
+ '\f165' => 'thumbs-down',
358
+ '\f166' => 'youtube-square',
359
+ '\f167' => 'youtube',
360
+ '\f168' => 'xing',
361
+ '\f169' => 'xing-square',
362
+ '\f16a' => 'youtube-play',
363
+ '\f16b' => 'dropbox',
364
+ '\f16c' => 'stack-overflow',
365
+ '\f16d' => 'instagram',
366
+ '\f16e' => 'flickr',
367
+ '\f170' => 'adn',
368
+ '\f171' => 'bitbucket',
369
+ '\f172' => 'bitbucket-square',
370
+ '\f173' => 'tumblr',
371
+ '\f174' => 'tumblr-square',
372
+ '\f175' => 'long-arrow-down',
373
+ '\f176' => 'long-arrow-up',
374
+ '\f177' => 'long-arrow-left',
375
+ '\f178' => 'long-arrow-right',
376
+ '\f179' => 'apple',
377
+ '\f17a' => 'windows',
378
+ '\f17b' => 'android',
379
+ '\f17c' => 'linux',
380
+ '\f17d' => 'dribbble',
381
+ '\f17e' => 'skype',
382
+ '\f180' => 'foursquare',
383
+ '\f181' => 'trello',
384
+ '\f182' => 'female',
385
+ '\f183' => 'male',
386
+ '\f184' => 'gratipay',
387
+ '\f185' => 'sun-o',
388
+ '\f186' => 'moon-o',
389
+ '\f187' => 'archive',
390
+ '\f188' => 'bug',
391
+ '\f189' => 'vk',
392
+ '\f18a' => 'weibo',
393
+ '\f18b' => 'renren',
394
+ '\f18c' => 'pagelines',
395
+ '\f18d' => 'stack-exchange',
396
+ '\f18e' => 'arrow-circle-o-right',
397
+ '\f190' => 'arrow-circle-o-left',
398
+ '\f191' => 'caret-square-o-left',
399
+ '\f192' => 'dot-circle-o',
400
+ '\f193' => 'wheelchair',
401
+ '\f194' => 'vimeo-square',
402
+ '\f195' => 'try',
403
+ '\f196' => 'plus-square-o',
404
+ '\f197' => 'space-shuttle',
405
+ '\f198' => 'slack',
406
+ '\f199' => 'envelope-square',
407
+ '\f19a' => 'wordpress',
408
+ '\f19b' => 'openid',
409
+ '\f19c' => 'university',
410
+ '\f19d' => 'graduation-cap',
411
+ '\f19e' => 'yahoo',
412
+ '\f1a0' => 'google',
413
+ '\f1a1' => 'reddit',
414
+ '\f1a2' => 'reddit-square',
415
+ '\f1a3' => 'stumbleupon-circle',
416
+ '\f1a4' => 'stumbleupon',
417
+ '\f1a5' => 'delicious',
418
+ '\f1a6' => 'digg',
419
+ '\f1a7' => 'pied-piper-pp',
420
+ '\f1a8' => 'pied-piper-alt',
421
+ '\f1a9' => 'drupal',
422
+ '\f1aa' => 'joomla',
423
+ '\f1ab' => 'language',
424
+ '\f1ac' => 'fax',
425
+ '\f1ad' => 'building',
426
+ '\f1ae' => 'child',
427
+ '\f1b0' => 'paw',
428
+ '\f1b1' => 'spoon',
429
+ '\f1b2' => 'cube',
430
+ '\f1b3' => 'cubes',
431
+ '\f1b4' => 'behance',
432
+ '\f1b5' => 'behance-square',
433
+ '\f1b6' => 'steam',
434
+ '\f1b7' => 'steam-square',
435
+ '\f1b8' => 'recycle',
436
+ '\f1b9' => 'car',
437
+ '\f1ba' => 'taxi',
438
+ '\f1bb' => 'tree',
439
+ '\f1bc' => 'spotify',
440
+ '\f1bd' => 'deviantart',
441
+ '\f1be' => 'soundcloud',
442
+ '\f1c0' => 'database',
443
+ '\f1c1' => 'file-pdf-o',
444
+ '\f1c2' => 'file-word-o',
445
+ '\f1c3' => 'file-excel-o',
446
+ '\f1c4' => 'file-powerpoint-o',
447
+ '\f1c5' => 'file-image-o',
448
+ '\f1c6' => 'file-archive-o',
449
+ '\f1c7' => 'file-audio-o',
450
+ '\f1c8' => 'file-video-o',
451
+ '\f1c9' => 'file-code-o',
452
+ '\f1ca' => 'vine',
453
+ '\f1cb' => 'codepen',
454
+ '\f1cc' => 'jsfiddle',
455
+ '\f1cd' => 'life-ring',
456
+ '\f1ce' => 'circle-o-notch',
457
+ '\f1d0' => 'rebel',
458
+ '\f1d1' => 'empire',
459
+ '\f1d2' => 'git-square',
460
+ '\f1d3' => 'git',
461
+ '\f1d4' => 'hacker-news',
462
+ '\f1d5' => 'tencent-weibo',
463
+ '\f1d6' => 'qq',
464
+ '\f1d7' => 'weixin',
465
+ '\f1d8' => 'paper-plane',
466
+ '\f1d9' => 'paper-plane-o',
467
+ '\f1da' => 'history',
468
+ '\f1db' => 'circle-thin',
469
+ '\f1dc' => 'header',
470
+ '\f1dd' => 'paragraph',
471
+ '\f1de' => 'sliders',
472
+ '\f1e0' => 'share-alt',
473
+ '\f1e1' => 'share-alt-square',
474
+ '\f1e2' => 'bomb',
475
+ '\f1e3' => 'futbol-o',
476
+ '\f1e4' => 'tty',
477
+ '\f1e5' => 'binoculars',
478
+ '\f1e6' => 'plug',
479
+ '\f1e7' => 'slideshare',
480
+ '\f1e8' => 'twitch',
481
+ '\f1e9' => 'yelp',
482
+ '\f1ea' => 'newspaper-o',
483
+ '\f1eb' => 'wifi',
484
+ '\f1ec' => 'calculator',
485
+ '\f1ed' => 'paypal',
486
+ '\f1ee' => 'google-wallet',
487
+ '\f1f0' => 'cc-visa',
488
+ '\f1f1' => 'cc-mastercard',
489
+ '\f1f2' => 'cc-discover',
490
+ '\f1f3' => 'cc-amex',
491
+ '\f1f4' => 'cc-paypal',
492
+ '\f1f5' => 'cc-stripe',
493
+ '\f1f6' => 'bell-slash',
494
+ '\f1f7' => 'bell-slash-o',
495
+ '\f1f8' => 'trash',
496
+ '\f1f9' => 'copyright',
497
+ '\f1fa' => 'at',
498
+ '\f1fb' => 'eyedropper',
499
+ '\f1fc' => 'paint-brush',
500
+ '\f1fd' => 'birthday-cake',
501
+ '\f1fe' => 'area-chart',
502
+ '\f200' => 'pie-chart',
503
+ '\f201' => 'line-chart',
504
+ '\f202' => 'lastfm',
505
+ '\f203' => 'lastfm-square',
506
+ '\f204' => 'toggle-off',
507
+ '\f205' => 'toggle-on',
508
+ '\f206' => 'bicycle',
509
+ '\f207' => 'bus',
510
+ '\f208' => 'ioxhost',
511
+ '\f209' => 'angellist',
512
+ '\f20a' => 'cc',
513
+ '\f20b' => 'ils',
514
+ '\f20c' => 'meanpath',
515
+ '\f20d' => 'buysellads',
516
+ '\f20e' => 'connectdevelop',
517
+ '\f210' => 'dashcube',
518
+ '\f211' => 'forumbee',
519
+ '\f212' => 'leanpub',
520
+ '\f213' => 'sellsy',
521
+ '\f214' => 'shirtsinbulk',
522
+ '\f215' => 'simplybuilt',
523
+ '\f216' => 'skyatlas',
524
+ '\f217' => 'cart-plus',
525
+ '\f218' => 'cart-arrow-down',
526
+ '\f219' => 'diamond',
527
+ '\f21a' => 'ship',
528
+ '\f21b' => 'user-secret',
529
+ '\f21c' => 'motorcycle',
530
+ '\f21d' => 'street-view',
531
+ '\f21e' => 'heartbeat',
532
+ '\f221' => 'venus',
533
+ '\f222' => 'mars',
534
+ '\f223' => 'mercury',
535
+ '\f224' => 'transgender',
536
+ '\f225' => 'transgender-alt',
537
+ '\f226' => 'venus-double',
538
+ '\f227' => 'mars-double',
539
+ '\f228' => 'venus-mars',
540
+ '\f229' => 'mars-stroke',
541
+ '\f22a' => 'mars-stroke-v',
542
+ '\f22b' => 'mars-stroke-h',
543
+ '\f22c' => 'neuter',
544
+ '\f22d' => 'genderless',
545
+ '\f230' => 'facebook-official',
546
+ '\f231' => 'pinterest-p',
547
+ '\f232' => 'whatsapp',
548
+ '\f233' => 'server',
549
+ '\f234' => 'user-plus',
550
+ '\f235' => 'user-times',
551
+ '\f236' => 'bed',
552
+ '\f237' => 'viacoin',
553
+ '\f238' => 'train',
554
+ '\f239' => 'subway',
555
+ '\f23a' => 'medium',
556
+ '\f23b' => 'y-combinator',
557
+ '\f23c' => 'optin-monster',
558
+ '\f23d' => 'opencart',
559
+ '\f23e' => 'expeditedssl',
560
+ '\f240' => 'battery-full',
561
+ '\f241' => 'battery-three-quarters',
562
+ '\f242' => 'battery-half',
563
+ '\f243' => 'battery-quarter',
564
+ '\f244' => 'battery-empty',
565
+ '\f245' => 'mouse-pointer',
566
+ '\f246' => 'i-cursor',
567
+ '\f247' => 'object-group',
568
+ '\f248' => 'object-ungroup',
569
+ '\f249' => 'sticky-note',
570
+ '\f24a' => 'sticky-note-o',
571
+ '\f24b' => 'cc-jcb',
572
+ '\f24c' => 'cc-diners-club',
573
+ '\f24d' => 'clone',
574
+ '\f24e' => 'balance-scale',
575
+ '\f250' => 'hourglass-o',
576
+ '\f251' => 'hourglass-start',
577
+ '\f252' => 'hourglass-half',
578
+ '\f253' => 'hourglass-end',
579
+ '\f254' => 'hourglass',
580
+ '\f255' => 'hand-rock-o',
581
+ '\f256' => 'hand-paper-o',
582
+ '\f257' => 'hand-scissors-o',
583
+ '\f258' => 'hand-lizard-o',
584
+ '\f259' => 'hand-spock-o',
585
+ '\f25a' => 'hand-pointer-o',
586
+ '\f25b' => 'hand-peace-o',
587
+ '\f25c' => 'trademark',
588
+ '\f25d' => 'registered',
589
+ '\f25e' => 'creative-commons',
590
+ '\f260' => 'gg',
591
+ '\f261' => 'gg-circle',
592
+ '\f262' => 'tripadvisor',
593
+ '\f263' => 'odnoklassniki',
594
+ '\f264' => 'odnoklassniki-square',
595
+ '\f265' => 'get-pocket',
596
+ '\f266' => 'wikipedia-w',
597
+ '\f267' => 'safari',
598
+ '\f268' => 'chrome',
599
+ '\f269' => 'firefox',
600
+ '\f26a' => 'opera',
601
+ '\f26b' => 'internet-explorer',
602
+ '\f26c' => 'television',
603
+ '\f26d' => 'contao',
604
+ '\f26e' => '500px',
605
+ '\f270' => 'amazon',
606
+ '\f271' => 'calendar-plus-o',
607
+ '\f272' => 'calendar-minus-o',
608
+ '\f273' => 'calendar-times-o',
609
+ '\f274' => 'calendar-check-o',
610
+ '\f275' => 'industry',
611
+ '\f276' => 'map-pin',
612
+ '\f277' => 'map-signs',
613
+ '\f278' => 'map-o',
614
+ '\f279' => 'map',
615
+ '\f27a' => 'commenting',
616
+ '\f27b' => 'commenting-o',
617
+ '\f27c' => 'houzz',
618
+ '\f27d' => 'vimeo',
619
+ '\f27e' => 'black-tie',
620
+ '\f280' => 'fonticons',
621
+ '\f281' => 'reddit-alien',
622
+ '\f282' => 'edge',
623
+ '\f283' => 'credit-card-alt',
624
+ '\f284' => 'codiepie',
625
+ '\f285' => 'modx',
626
+ '\f286' => 'fort-awesome',
627
+ '\f287' => 'usb',
628
+ '\f288' => 'product-hunt',
629
+ '\f289' => 'mixcloud',
630
+ '\f28a' => 'scribd',
631
+ '\f28b' => 'pause-circle',
632
+ '\f28c' => 'pause-circle-o',
633
+ '\f28d' => 'stop-circle',
634
+ '\f28e' => 'stop-circle-o',
635
+ '\f290' => 'shopping-bag',
636
+ '\f291' => 'shopping-basket',
637
+ '\f292' => 'hashtag',
638
+ '\f293' => 'bluetooth',
639
+ '\f294' => 'bluetooth-b',
640
+ '\f295' => 'percent',
641
+ '\f296' => 'gitlab',
642
+ '\f297' => 'wpbeginner',
643
+ '\f298' => 'wpforms',
644
+ '\f299' => 'envira',
645
+ '\f29a' => 'universal-access',
646
+ '\f29b' => 'wheelchair-alt',
647
+ '\f29c' => 'question-circle-o',
648
+ '\f29d' => 'blind',
649
+ '\f29e' => 'audio-description',
650
+ '\f2a0' => 'volume-control-phone',
651
+ '\f2a1' => 'braille',
652
+ '\f2a2' => 'assistive-listening-systems',
653
+ '\f2a3' => 'american-sign-language-interpreting',
654
+ '\f2a4' => 'deaf',
655
+ '\f2a5' => 'glide',
656
+ '\f2a6' => 'glide-g',
657
+ '\f2a7' => 'sign-language',
658
+ '\f2a8' => 'low-vision',
659
+ '\f2a9' => 'viadeo',
660
+ '\f2aa' => 'viadeo-square',
661
+ '\f2ab' => 'snapchat',
662
+ '\f2ac' => 'snapchat-ghost',
663
+ '\f2ad' => 'snapchat-square',
664
+ '\f2ae' => 'pied-piper',
665
+ '\f2b0' => 'first-order',
666
+ '\f2b1' => 'yoast',
667
+ '\f2b2' => 'themeisle',
668
+ '\f2b3' => 'google-plus-official',
669
+ '\f2b4' => 'font-awesome',
670
+ ),
671
+ 'Dashicons' => array(
672
+ '\f100' => 'admin-appearance',
673
+ '\f101' => 'admin-comments',
674
+ '\f102' => 'admin-home',
675
+ '\f104' => 'admin-media',
676
+ '\f105' => 'admin-page',
677
+ '\f106' => 'admin-plugins',
678
+ '\f107' => 'admin-tools',
679
+ '\f108' => 'admin-settings',
680
+ '\f110' => 'admin-users',
681
+ '\f111' => 'admin-generic',
682
+ '\f112' => 'admin-network',
683
+ '\f115' => 'welcome-view-site',
684
+ '\f116' => 'welcome-widgets-menus',
685
+ '\f117' => 'welcome-comments',
686
+ '\f118' => 'welcome-learn-more',
687
+ '\f120' => 'wordpress',
688
+ '\f122' => 'format-quote',
689
+ '\f123' => 'format-aside',
690
+ '\f125' => 'format-chat',
691
+ '\f126' => 'format-video',
692
+ '\f127' => 'format-audio',
693
+ '\f128' => 'format-image',
694
+ '\f130' => 'format-status',
695
+ '\f132' => 'plus',
696
+ '\f133' => 'welcome-add-page',
697
+ '\f134' => 'align-center',
698
+ '\f135' => 'align-left',
699
+ '\f136' => 'align-right',
700
+ '\f138' => 'align-none',
701
+ '\f139' => 'arrow-right',
702
+ '\f140' => 'arrow-down',
703
+ '\f141' => 'arrow-left',
704
+ '\f142' => 'arrow-up',
705
+ '\f145' => 'calendar',
706
+ '\f147' => 'yes',
707
+ '\f148' => 'admin-collapse',
708
+ '\f153' => 'dismiss',
709
+ '\f154' => 'star-empty',
710
+ '\f155' => 'star-filled',
711
+ '\f156' => 'sort',
712
+ '\f157' => 'pressthis',
713
+ '\f158' => 'no',
714
+ '\f159' => 'marker',
715
+ '\f160' => 'lock',
716
+ '\f161' => 'format-gallery',
717
+ '\f163' => 'list-view',
718
+ '\f165' => 'image-crop',
719
+ '\f166' => 'image-rotate-left',
720
+ '\f167' => 'image-rotate-right',
721
+ '\f168' => 'image-flip-vertical',
722
+ '\f169' => 'image-flip-horizontal',
723
+ '\f171' => 'undo',
724
+ '\f172' => 'redo',
725
+ '\f173' => 'post-status',
726
+ '\f174' => 'cart',
727
+ '\f175' => 'feedback',
728
+ '\f176' => 'cloud',
729
+ '\f177' => 'visibility',
730
+ '\f178' => 'vault',
731
+ '\f179' => 'search',
732
+ '\f180' => 'screenoptions',
733
+ '\f181' => 'slides',
734
+ '\f183' => 'analytics',
735
+ '\f184' => 'chart-pie',
736
+ '\f185' => 'chart-bar',
737
+ '\f200' => 'editor-bold',
738
+ '\f201' => 'editor-italic',
739
+ '\f203' => 'editor-ul',
740
+ '\f204' => 'editor-ol',
741
+ '\f205' => 'editor-quote',
742
+ '\f206' => 'editor-alignleft',
743
+ '\f207' => 'editor-aligncenter',
744
+ '\f208' => 'editor-alignright',
745
+ '\f209' => 'editor-insertmore',
746
+ '\f210' => 'editor-spellcheck',
747
+ '\f212' => 'editor-kitchensink',
748
+ '\f213' => 'editor-underline',
749
+ '\f214' => 'editor-justify',
750
+ '\f215' => 'editor-textcolor',
751
+ '\f216' => 'editor-paste-word',
752
+ '\f217' => 'editor-paste-text',
753
+ '\f218' => 'editor-removeformatting',
754
+ '\f219' => 'editor-video',
755
+ '\f220' => 'editor-customchar',
756
+ '\f221' => 'editor-outdent',
757
+ '\f222' => 'editor-indent',
758
+ '\f223' => 'editor-help',
759
+ '\f224' => 'editor-strikethrough',
760
+ '\f225' => 'editor-unlink',
761
+ '\f226' => 'dashboard',
762
+ '\f227' => 'flag',
763
+ '\f229' => 'leftright',
764
+ '\f230' => 'location',
765
+ '\f231' => 'location-alt',
766
+ '\f232' => 'images-alt',
767
+ '\f233' => 'images-alt2',
768
+ '\f234' => 'video-alt',
769
+ '\f235' => 'video-alt2',
770
+ '\f236' => 'video-alt3',
771
+ '\f237' => 'share1',
772
+ '\f238' => 'chart-line',
773
+ '\f239' => 'chart-area',
774
+ '\f240' => 'share-alt',
775
+ '\f242' => 'share-alt2',
776
+ '\f301' => 'twitter',
777
+ '\f303' => 'rss',
778
+ '\f304' => 'facebook',
779
+ '\f305' => 'facebook-alt',
780
+ '\f306' => 'camera',
781
+ '\f307' => 'groups',
782
+ '\f308' => 'hammer',
783
+ '\f309' => 'art',
784
+ '\f310' => 'migrate',
785
+ '\f311' => 'performance',
786
+ '\f312' => 'products',
787
+ '\f313' => 'awards',
788
+ '\f314' => 'forms',
789
+ '\f316' => 'download',
790
+ '\f317' => 'upload',
791
+ '\f318' => 'category',
792
+ '\f319' => 'admin-site',
793
+ '\f320' => 'editor-rtl',
794
+ '\f321' => 'backup',
795
+ '\f322' => 'portfolio',
796
+ '\f323' => 'tag',
797
+ '\f324' => 'wordpress-alt',
798
+ '\f325' => 'networking',
799
+ '\f326' => 'translation',
800
+ '\f328' => 'smiley',
801
+ '\f330' => 'book',
802
+ '\f331' => 'book-alt',
803
+ '\f332' => 'shield',
804
+ '\f333' => 'menu',
805
+ '\f334' => 'shield-alt',
806
+ '\f335' => 'no-alt',
807
+ '\f336' => 'id',
808
+ '\f337' => 'id-alt',
809
+ '\f338' => 'businessman',
810
+ '\f339' => 'lightbulb',
811
+ '\f340' => 'arrow-left-alt',
812
+ '\f341' => 'arrow-left-alt2',
813
+ '\f342' => 'arrow-up-alt',
814
+ '\f343' => 'arrow-up-alt2',
815
+ '\f344' => 'arrow-right-alt',
816
+ '\f345' => 'arrow-right-alt2',
817
+ '\f346' => 'arrow-down-alt',
818
+ '\f347' => 'arrow-down-alt2',
819
+ '\f348' => 'info',
820
+ '\f459' => 'star-half',
821
+ '\f460' => 'minus',
822
+ '\f462' => 'googleplus',
823
+ '\f463' => 'update',
824
+ '\f464' => 'edit',
825
+ '\f465' => 'email',
826
+ '\f466' => 'email-alt',
827
+ '\f468' => 'sos',
828
+ '\f469' => 'clock',
829
+ '\f470' => 'smartphone',
830
+ '\f471' => 'tablet',
831
+ '\f472' => 'desktop',
832
+ '\f473' => 'testimonial',
833
+ '\f474' => 'editor-break',
834
+ '\f475' => 'editor-code',
835
+ '\f476' => 'editor-paragraph',
836
+ '\f478' => 'text',
837
+ '\f479' => 'tagcloud',
838
+ '\f480' => 'archive',
839
+ '\f481' => 'clipboard',
840
+ '\f482' => 'microphone',
841
+ '\f483' => 'universal-access',
842
+ '\f484' => 'nametag',
843
+ '\f486' => 'tickets',
844
+ '\f487' => 'heart',
845
+ '\f488' => 'megaphone',
846
+ '\f489' => 'schedule',
847
+ '\f490' => 'media-video',
848
+ '\f491' => 'media-text',
849
+ '\f492' => 'playlist-audio',
850
+ '\f493' => 'playlist-video',
851
+ '\f495' => 'media-spreadsheet',
852
+ '\f496' => 'media-interactive',
853
+ '\f497' => 'media-document',
854
+ '\f498' => 'media-default',
855
+ '\f499' => 'media-code',
856
+ '\f500' => 'media-audio',
857
+ '\f501' => 'media-archive',
858
+ '\f502' => 'plus-alt',
859
+ '\f503' => 'randomize',
860
+ '\f504' => 'external',
861
+ '\f506' => 'editor-contract',
862
+ '\f507' => 'universal-access-alt',
863
+ '\f508' => 'calendar-alt',
864
+ '\f509' => 'grid-view',
865
+ '\f510' => 'index-card',
866
+ '\f511' => 'carrot',
867
+ '\f512' => 'building',
868
+ '\f513' => 'store',
869
+ '\f514' => 'album',
870
+ '\f515' => 'controls-repeat',
871
+ '\f516' => 'controls-skipback',
872
+ '\f517' => 'controls-skipforward',
873
+ '\f518' => 'controls-back',
874
+ '\f519' => 'controls-forward',
875
+ '\f520' => 'controls-volumeoff',
876
+ '\f521' => 'controls-volumeon',
877
+ '\f522' => 'controls-play',
878
+ '\f523' => 'controls-pause',
879
+ '\f524' => 'tickets-alt',
880
+ '\f525' => 'phone',
881
+ '\f526' => 'money',
882
+ '\f527' => 'palmtree',
883
+ '\f528' => 'unlock',
884
+ '\f529' => 'thumbs-up',
885
+ '\f530' => 'hidden',
886
+ '\f531' => 'image-rotate',
887
+ '\f533' => 'image-filter',
888
+ '\f534' => 'warning',
889
+ '\f535' => 'editor-table',
890
+ '\f536' => 'filter',
891
+ '\f537' => 'sticky',
892
+ '\f538' => 'layout',
893
+ '\f540' => 'admin-customizer',
894
+ '\f541' => 'admin-multisite',
895
+ '\f542' => 'thumbs-down',
896
+ '\f543' => 'plus-alt2',
897
+ '\f545' => 'move',
898
+ '\f546' => 'paperclip',
899
+ '\f547' => 'laptop',
900
+ ),
901
+ ),
902
+ );
903
+
904
+
905
+ /**
906
+ * Singleton implementation.
907
+ *
908
+ * @return YIT_Icons
909
+ */
910
+ public static function instance() {
911
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
912
+ }
913
+
914
+ /**
915
+ * Deprecated singleton implementation.
916
+ * Kept for backward compatibility.
917
+ *
918
+ * @return YIT_Icons
919
+ * @deprecated 3.5 | use YIT_Icons::get_instance() instead.
920
+ */
921
+ public static function get_instance() {
922
+ return self::instance();
923
+ }
924
+
925
+ /**
926
+ * YIT_Icons constructor.
927
+ */
928
+ private function __construct() {
929
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 99 );
930
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), 99 );
931
+ }
932
+
933
+ /**
934
+ * __get function.
935
+ *
936
+ * @param string $key The key.
937
+ *
938
+ * @return mixed
939
+ */
940
+ public function __get( $key ) {
941
+ $value = isset( $this->data[ $key ] ) ? $this->data[ $key ] : false;
942
+
943
+ return $value;
944
+ }
945
+
946
+ /**
947
+ * __isset function.
948
+ *
949
+ * @param string $key The key.
950
+ *
951
+ * @return bool
952
+ */
953
+ public function __isset( $key ) {
954
+ return isset( $this->data[ $key ] );
955
+ }
956
+
957
+ /**
958
+ * Get the icons.
959
+ *
960
+ * @param string $filter_suffix The filter suffix.
961
+ *
962
+ * @return false|mixed|void
963
+ */
964
+ public function get_icons( $filter_suffix = '' ) {
965
+ $icons = $this->icons;
966
+ if ( ! empty( $filter_suffix ) ) {
967
+ $icons = apply_filters( 'yith_plugin_fw_icons_field_icons_' . sanitize_key( $filter_suffix ), $icons );
968
+ }
969
+
970
+ return $icons;
971
+ }
972
+
973
+ /**
974
+ * Get the icon data
975
+ *
976
+ * @param string $icon_string The icon string.
977
+ * @param string $filter_suffix The filter suffix.
978
+ *
979
+ * @return string
980
+ */
981
+ public function get_icon_data( $icon_string, $filter_suffix = '' ) {
982
+ $icon_data = '';
983
+ if ( $icon_string ) {
984
+ $icon_array = explode( ':', $icon_string );
985
+
986
+ if ( count( $icon_array ) < 2 ) {
987
+ return $icon_data;
988
+ }
989
+
990
+ $font_name = $icon_array[0];
991
+ $icon_name = $icon_array[1];
992
+
993
+ $icons = $this->get_icons( $filter_suffix );
994
+ if ( array_key_exists( $font_name, $icons ) ) {
995
+ $icon_key = array_search( $icon_name, $icons[ $font_name ], true );
996
+ $icon_code = '&#x' . str_replace( '\\', '', $icon_key );
997
+
998
+ $icon_data = 'data-font="' . esc_attr( $font_name ) . '" data-name="' . esc_attr( $icon_name ) . '" data-key="' . esc_attr( $icon_key ) . '" data-icon="' . $icon_code . '"';
999
+ }
1000
+ }
1001
+
1002
+ return $icon_data;
1003
+ }
1004
+
1005
+ /**
1006
+ * Retrieves the font awesome array
1007
+ * the first time retrieves the array by the Font Awesome CSS
1008
+ * [utility method]
1009
+ *
1010
+ * @return array
1011
+ */
1012
+ private function get_font_awesome_array() {
1013
+ $font_awesome_list = get_option( 'yit_font_awesome_list', array() );
1014
+ $font_awesome_version = $this->font_awesome_version;
1015
+
1016
+ $font_awesome_array = array();
1017
+
1018
+ if ( ! empty( $font_awesome_list[ $font_awesome_version ] ) ) {
1019
+ $font_awesome_array = $font_awesome_list[ $font_awesome_version ];
1020
+ } else {
1021
+ // Retrieve the array by the CSS file.
1022
+ $font_awesome_uri = "https://maxcdn.bootstrapcdn.com/font-awesome/{$font_awesome_version}/css/font-awesome.min.css";
1023
+ $pattern = '/\.(fa-(?:\w+(?:-)?)+):before{content:"\\\\(....)"}/';
1024
+
1025
+ $response = wp_remote_get( $font_awesome_uri );
1026
+
1027
+ if ( ! is_wp_error( $response ) && 200 === absint( $response['response']['code'] ) && 'OK' === $response['response']['message'] ) {
1028
+ $body = $response['body'];
1029
+
1030
+ preg_match_all( $pattern, $body, $matches, PREG_SET_ORDER );
1031
+ foreach ( $matches as $match ) {
1032
+ $font_awesome_array[ $match[2] ] = $match[1];
1033
+ }
1034
+ ksort( $font_awesome_array );
1035
+
1036
+ $font_awesome_list[ $font_awesome_version ] = $font_awesome_array;
1037
+ update_option( 'yit_font_awesome_list', $font_awesome_list );
1038
+ }
1039
+ }
1040
+
1041
+ return $font_awesome_array;
1042
+ }
1043
+
1044
+ /**
1045
+ * Retrieves the Dashicons array
1046
+ * the first time retrieves the array by the Dashicons CSS
1047
+ * [utility method]
1048
+ *
1049
+ * @return array
1050
+ */
1051
+ private function get_dashicons_array() {
1052
+ $dashicons_list = get_option( 'yit_dashicons_list', array() );
1053
+
1054
+ $dashicons_array = array();
1055
+ if ( ! empty( $dashicons_list ) ) {
1056
+ $dashicons_array = $dashicons_list;
1057
+ } else {
1058
+ // Retrieve the array by the CSS file.
1059
+ $uri = 'https://s.w.org/wp-includes/css/dashicons.min.css';
1060
+ $pattern = '/\.dashicons-((?:\w+(?:-)?)+):before{content:"\\\\(....)"/';
1061
+ $pattern = '/\.dashicons-((?:\w+(?:-)?)+):before.............../';
1062
+
1063
+ $response = wp_remote_get( $uri );
1064
+
1065
+ if ( ! is_wp_error( $response ) && 200 === absint( $response['response']['code'] ) && 'OK' === $response['response']['message'] ) {
1066
+ $body = $response['body'];
1067
+
1068
+ preg_match_all( $pattern, $body, $matches, PREG_SET_ORDER );
1069
+
1070
+ foreach ( $matches as $match ) {
1071
+ $code = str_replace( '.dashicons-' . $match[1] . ':before{content:"\\', '', $match[0] );
1072
+ if ( 4 === strlen( $code ) ) {
1073
+ $dashicons_array[ $code ] = $match[1];
1074
+ }
1075
+ }
1076
+ ksort( $dashicons_array );
1077
+ }
1078
+ }
1079
+
1080
+ return $dashicons_array;
1081
+ }
1082
+
1083
+ /**
1084
+ * Enqueue Scripts
1085
+ */
1086
+ public function enqueue_scripts() {
1087
+ wp_register_style( 'font-awesome', "https://maxcdn.bootstrapcdn.com/font-awesome/{$this->font_awesome_version}/css/font-awesome.min.css", array(), $this->font_awesome_version );
1088
+
1089
+ wp_add_inline_style( 'font-awesome', $this->get_inline_style( 'font-awesome' ) );
1090
+
1091
+ wp_add_inline_style( 'dashicons', $this->get_inline_style( 'dashicons' ) );
1092
+ }
1093
+
1094
+ /**
1095
+ * Return the icon HTML from icon_string passed
1096
+ *
1097
+ * @param string|array $icon The icon.
1098
+ * @param array $args Array of arguments (such as html_tag, class, style, filter_suffix).
1099
+ *
1100
+ * @return string
1101
+ */
1102
+ public function get_icon( $icon = '', $args = array() ) {
1103
+ $icon = is_array( $icon ) && isset( $icon['icon'] ) ? $icon['icon'] : $icon;
1104
+ $icon_html = '';
1105
+ if ( $icon ) {
1106
+ $default_args = array(
1107
+ 'html_tag' => 'span',
1108
+ 'class' => '',
1109
+ 'style' => '',
1110
+ 'filter_suffix' => '',
1111
+ );
1112
+ $args = wp_parse_args( $args, $default_args );
1113
+
1114
+ // back-ward compatibility: 'filter_icons' argument is deprecated; use 'filter_suffix' instead!
1115
+ if ( ! empty( $args['filter_icons'] ) && ! $args['filter_suffix'] ) {
1116
+ $args['filter_suffix'] = $args['filter_icons'];
1117
+ }
1118
+
1119
+ $html_tag = $args['html_tag'];
1120
+ $class = $args['class'];
1121
+ $style = $args['style'];
1122
+ $filter_suffix = $args['filter_suffix'];
1123
+
1124
+ $icon_data = $this->get_icon_data( $icon, $filter_suffix );
1125
+
1126
+ if ( $icon_data ) {
1127
+ $icon_html = "<$html_tag class=\"$class\" style=\"$style\" $icon_data></$html_tag>";
1128
+ }
1129
+ }
1130
+
1131
+ return $icon_html;
1132
+ }
1133
+
1134
+ /**
1135
+ * Get inline style.
1136
+ *
1137
+ * @param string $handle The handle.
1138
+ *
1139
+ * @return string
1140
+ */
1141
+ public function get_inline_style( $handle ) {
1142
+ $css = '';
1143
+ switch ( $handle ) {
1144
+ case 'font-awesome':
1145
+ $css = '[data-font="FontAwesome"]:before {font-family: \'FontAwesome\' !important;content: attr(data-icon) !important;speak: none !important;font-weight: normal !important;font-variant: normal !important;text-transform: none !important;line-height: 1 !important;font-style: normal !important;-webkit-font-smoothing: antialiased !important;-moz-osx-font-smoothing: grayscale !important;}';
1146
+ break;
1147
+ case 'dashicons':
1148
+ $css = '[data-font="Dashicons"]:before {font-family: \'Dashicons\' !important;content: attr(data-icon) !important;speak: none !important;font-weight: normal !important;font-variant: normal !important;text-transform: none !important;line-height: 1 !important;font-style: normal !important;-webkit-font-smoothing: antialiased !important;-moz-osx-font-smoothing: grayscale !important;}';
1149
+ }
1150
+
1151
+ return $css;
1152
+ }
1153
+
1154
+ /**
1155
+ * Get inline style
1156
+ * Deprecated for typo
1157
+ *
1158
+ * @param string $handle The handle.
1159
+ *
1160
+ * @return string
1161
+ * @deprecated 3.5 | use YIT_Icons::get_inline_style()
1162
+ */
1163
+ public function get_inline_scripts( $handle ) {
1164
+ return $this->get_inline_style( $handle );
1165
+ }
1166
+
1167
+ }
1168
+ }
1169
+ if ( ! function_exists( 'yit_icons' ) ) {
1170
+ /**
1171
+ * Return instance of YIT_Icons class.
1172
+ *
1173
+ * @return YIT_Icons
1174
+ */
1175
+ function yit_icons() {
1176
+ return YIT_Icons::instance();
1177
+ }
1178
+ }
1179
+
1180
+ yit_icons();
plugin-fw/includes/class-yit-metabox.php ADDED
@@ -0,0 +1,540 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Meta-box Class.
4
+ *
5
+ * @class YIT_Metabox
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Metabox' ) ) {
12
+ /**
13
+ * YIT_Metabox class.
14
+ *
15
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
16
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
17
+ */
18
+ class YIT_Metabox {
19
+
20
+ /**
21
+ * The ID of meta-box.
22
+ *
23
+ * @var string
24
+ */
25
+ public $id;
26
+
27
+ /**
28
+ * Meta-box options.
29
+ *
30
+ * @var array
31
+ */
32
+ private $options = array();
33
+
34
+ /**
35
+ * Meta-box tabs.
36
+ *
37
+ * @var array
38
+ */
39
+ private $tabs = array();
40
+
41
+ /**
42
+ * Array of instances of the class.
43
+ *
44
+ * @var array
45
+ */
46
+ private static $instance = array();
47
+
48
+ /**
49
+ * Retrieve a specific instance of the class
50
+ *
51
+ * @param string $id The ID of the instance.
52
+ *
53
+ * @return YIT_Metabox
54
+ * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
55
+ */
56
+ public static function instance( $id ) {
57
+ if ( ! isset( self::$instance[ $id ] ) ) {
58
+ self::$instance[ $id ] = new self( $id );
59
+ }
60
+
61
+ return self::$instance[ $id ];
62
+ }
63
+
64
+ /**
65
+ * YIT_Metabox constructor.
66
+ *
67
+ * @param string $id the ID of the meta-box.
68
+ */
69
+ public function __construct( $id = '' ) {
70
+ $this->id = $id;
71
+ }
72
+
73
+ /**
74
+ * Set options and tabs, add actions to register metabox, scripts and save data.
75
+ *
76
+ * @param array $options The meta-box options.
77
+ */
78
+ public function init( $options = array() ) {
79
+ $this->set_options( $options );
80
+ $this->set_tabs();
81
+
82
+ add_action( 'add_meta_boxes', array( $this, 'register_metabox' ), 99 );
83
+ add_action( 'save_post', array( $this, 'save_postdata' ), 10, 1 );
84
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 15 );
85
+
86
+ add_filter( 'yit_icons_screen_ids', array( $this, 'add_screen_ids_for_icons' ) );
87
+
88
+ add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element_metabox', array( $this, 'save_toggle_element' ) );
89
+ }
90
+
91
+ /**
92
+ * Add Screen ids to include icons
93
+ *
94
+ * @param array $screen_ids The screen IDs array.
95
+ *
96
+ * @return array
97
+ */
98
+ public function add_screen_ids_for_icons( $screen_ids ) {
99
+ return array_unique( array_merge( $screen_ids, (array) $this->options['pages'] ) );
100
+ }
101
+
102
+ /**
103
+ * Enqueue script and styles in admin side.
104
+ */
105
+ public function enqueue() {
106
+ $enqueue = function_exists( 'get_current_screen' ) && get_current_screen() && in_array( get_current_screen()->id, (array) $this->options['pages'], true );
107
+ $enqueue = apply_filters( 'yith_plugin_fw_metabox_enqueue_styles_and_scripts', $enqueue, $this );
108
+
109
+ if ( $enqueue ) {
110
+ wp_enqueue_media();
111
+
112
+ wp_enqueue_style( 'woocommerce_admin_styles' );
113
+
114
+ wp_enqueue_style( 'yith-plugin-fw-fields' );
115
+ wp_enqueue_style( 'wp-color-picker' );
116
+ wp_enqueue_style( 'yit-plugin-metaboxes' );
117
+ wp_enqueue_style( 'jquery-ui-style' );
118
+
119
+ wp_enqueue_script( 'yit-metabox' );
120
+ wp_enqueue_script( 'yith-plugin-fw-fields' );
121
+ }
122
+ }
123
+
124
+ /**
125
+ * Set the meta-box options.
126
+ *
127
+ * @param array $options The options.
128
+ */
129
+ public function set_options( $options = array() ) {
130
+ $this->options = $options;
131
+ }
132
+
133
+ /**
134
+ * Set the tabs.
135
+ */
136
+ public function set_tabs() {
137
+ if ( ! isset( $this->options['tabs'] ) ) {
138
+ return;
139
+ }
140
+ $this->tabs = $this->options['tabs'];
141
+ if ( isset( $this->tabs['settings']['fields'] ) ) {
142
+ $this->tabs['settings']['fields'] = array_filter( $this->tabs['settings']['fields'] );
143
+ }
144
+ }
145
+
146
+
147
+ /**
148
+ * Add tab to the meta-box
149
+ *
150
+ * @param array $tab The new tab to be added add to the meta-box.
151
+ * @param string $where Where to insert the tab: after or before the $refer.
152
+ * @param null $refer An existent tab of the meta-box.
153
+ */
154
+ public function add_tab( $tab, $where = 'after', $refer = null ) {
155
+ if ( ! is_null( $refer ) ) {
156
+ $ref_pos = array_search( $refer, array_keys( $this->tabs ), true );
157
+ if ( false !== $ref_pos ) {
158
+ if ( 'after' === $where ) {
159
+ $this->tabs = array_slice( $this->tabs, 0, $ref_pos + 1, true ) + $tab + array_slice( $this->tabs, $ref_pos + 1, count( $this->tabs ) - 1, true );
160
+ } else {
161
+ $this->tabs = array_slice( $this->tabs, 0, $ref_pos, true ) + $tab + array_slice( $this->tabs, $ref_pos, count( $this->tabs ), true );
162
+ }
163
+ }
164
+ } else {
165
+ $this->tabs = array_merge( $tab, $this->tabs );
166
+ }
167
+
168
+ }
169
+
170
+ /**
171
+ * Remove a tab from the tabs of meta-box.
172
+ *
173
+ * @param string $tab_id The tab ID.
174
+ */
175
+ public function remove_tab( $tab_id ) {
176
+ if ( isset( $this->tabs[ $tab_id ] ) ) {
177
+ unset( $this->tabs[ $tab_id ] );
178
+ }
179
+ }
180
+
181
+ /**
182
+ * Add a field inside a tab of meta-box
183
+ *
184
+ * @param string $tab_id The id of the tabs where add the field.
185
+ * @param array $args The field to add.
186
+ * @param string $where Where to insert the field: after or before the $refer.
187
+ * @param null $refer An existent field inside tab.
188
+ */
189
+ public function add_field( $tab_id, $args, $where = 'after', $refer = null ) {
190
+ if ( isset( $this->tabs[ $tab_id ] ) ) {
191
+
192
+ $cf = $this->tabs[ $tab_id ]['fields'];
193
+ if ( ! is_null( $refer ) ) {
194
+ $ref_pos = array_search( $refer, array_keys( $cf ), true );
195
+ if ( false !== $ref_pos ) {
196
+ if ( 'after' === $where ) {
197
+ $this->tabs[ $tab_id ]['fields'] = array_slice( $cf, 0, $ref_pos + 1, true ) + $args + array_slice( $cf, $ref_pos, count( $cf ) - 1, true );
198
+
199
+ } elseif ( 'before' === $where ) {
200
+ $this->tabs[ $tab_id ]['fields'] = array_slice( $cf, 0, $ref_pos, true ) + $args + array_slice( $cf, $ref_pos, count( $cf ), true );
201
+ }
202
+ }
203
+ } else {
204
+ if ( 'first' === $where ) {
205
+ $this->tabs[ $tab_id ]['fields'] = $args + $cf;
206
+ } else {
207
+ $this->tabs[ $tab_id ]['fields'] = array_merge( $this->tabs[ $tab_id ]['fields'], $args );
208
+ }
209
+ }
210
+ }
211
+ }
212
+
213
+ /**
214
+ * Remove a field from the meta-box, search inside the tabs and remove it if exists.
215
+ *
216
+ * @param string $field_id The field ID.
217
+ */
218
+ public function remove_field( $field_id ) {
219
+ foreach ( $this->tabs as $tab_name => $tab ) {
220
+ if ( isset( $tab['fields'][ $field_id ] ) ) {
221
+ unset( $this->tabs[ $tab_name ]['fields'][ $field_id ] );
222
+ }
223
+ }
224
+ }
225
+
226
+ /**
227
+ * Order tabs and fields and set id and name for each field.
228
+ */
229
+ public function reorder_tabs() {
230
+ foreach ( $this->tabs as $tab_name => $tab ) {
231
+ foreach ( $tab['fields'] as $id_field => $field ) {
232
+ $this->tabs[ $tab_name ]['fields'][ $id_field ]['private'] = ( isset( $field['private'] ) ) ? $field['private'] : true;
233
+ if ( empty( $this->tabs[ $tab_name ]['fields'][ $id_field ]['id'] ) ) {
234
+ $this->tabs[ $tab_name ]['fields'][ $id_field ]['id'] = $this->get_option_metabox_id( $id_field, $this->tabs[ $tab_name ]['fields'][ $id_field ]['private'] );
235
+ }
236
+ if ( empty( $this->tabs[ $tab_name ]['fields'][ $id_field ]['name'] ) ) {
237
+ $this->tabs[ $tab_name ]['fields'][ $id_field ]['name'] = $this->get_option_metabox_name( $this->tabs[ $tab_name ]['fields'][ $id_field ]['id'] );
238
+ }
239
+ }
240
+ }
241
+
242
+ }
243
+
244
+ /**
245
+ * Get the option key for a specific field
246
+ *
247
+ * @param string $field_id The field ID.
248
+ * @param bool $private If true, add an underscore before the ID.
249
+ *
250
+ * @return string
251
+ */
252
+ public function get_option_metabox_id( $field_id, $private = true ) {
253
+ if ( $private ) {
254
+ return '_' . $field_id;
255
+ } else {
256
+ return $field_id;
257
+ }
258
+ }
259
+
260
+ /**
261
+ * Get meta-box field name
262
+ * Return the name of the field, this name will be used as attribute name of the input field
263
+ *
264
+ * @param string $field_id The field ID.
265
+ * @param bool $private If true, add an underscore before the ID.
266
+ *
267
+ * @return string
268
+ */
269
+ public function get_option_metabox_name( $field_id, $private = true ) {
270
+ $db_name = apply_filters( 'yit_metaboxes_option_main_name', 'yit_metaboxes' );
271
+ $return = $db_name . '[';
272
+
273
+ if ( ! strpos( $field_id, '[' ) ) {
274
+ return $return . $field_id . ']';
275
+ }
276
+ $return .= substr( $field_id, 0, strpos( $field_id, '[' ) );
277
+ $return .= ']';
278
+ $return .= substr( $field_id, strpos( $field_id, '[' ) );
279
+
280
+ return $return;
281
+ }
282
+
283
+ /**
284
+ * Register the meta-box
285
+ *
286
+ * @param string $post_type The post-type.
287
+ */
288
+ public function register_metabox( $post_type ) {
289
+ if ( in_array( $post_type, (array) $this->options['pages'], true ) ) {
290
+ add_meta_box( $this->id, $this->options['label'], array( $this, 'show' ), $post_type, $this->options['context'], $this->options['priority'] );
291
+ }
292
+ }
293
+
294
+ /**
295
+ * Show the meta-box
296
+ */
297
+ public function show() {
298
+ $this->reorder_tabs();
299
+
300
+ $args = array(
301
+ 'tabs' => $this->tabs,
302
+ 'class' => isset( $this->options['class'] ) ? $this->options['class'] : '',
303
+ );
304
+
305
+ yit_plugin_get_template( YIT_CORE_PLUGIN_PATH, 'metaboxes/tab.php', $args );
306
+ }
307
+
308
+ /**
309
+ * Save the post data in the database when saving the post
310
+ *
311
+ * @param int $post_id The post ID.
312
+ *
313
+ * @return int
314
+ */
315
+ public function save_postdata( $post_id ) {
316
+ if ( ! isset( $_POST['yit_metaboxes_nonce'] ) || ! wp_verify_nonce( wp_unslash( $_POST['yit_metaboxes_nonce'] ), 'metaboxes-fields-nonce' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
317
+ return $post_id;
318
+ }
319
+
320
+ $allow_ajax = isset( $_REQUEST['yith_metabox_allow_ajax_saving'] ) && sanitize_key( wp_unslash( $_REQUEST['yith_metabox_allow_ajax_saving'] ) ) === $this->id;
321
+ if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX && ! $allow_ajax ) ) {
322
+ return $post_id;
323
+ }
324
+
325
+ if ( isset( $_POST['post_type'] ) ) {
326
+ $post_type = sanitize_key( wp_unslash( $_POST['post_type'] ) );
327
+ } else {
328
+ return $post_id;
329
+ }
330
+
331
+ if ( 'page' === $post_type ) {
332
+ if ( ! current_user_can( 'edit_page', $post_id ) ) {
333
+ return $post_id;
334
+ }
335
+ } else {
336
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
337
+ return $post_id;
338
+ }
339
+ }
340
+
341
+ if ( ! in_array( $post_type, (array) $this->options['pages'], true ) ) {
342
+ return $post_id;
343
+ }
344
+
345
+ if ( isset( $_POST['yit_metaboxes'] ) ) {
346
+ $yit_metabox_data = wp_unslash( $_POST['yit_metaboxes'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
347
+
348
+ if ( is_array( $yit_metabox_data ) ) {
349
+ foreach ( $yit_metabox_data as $field_name => $field_value ) {
350
+ if ( ! add_post_meta( $post_id, $field_name, $field_value, true ) ) {
351
+ update_post_meta( $post_id, $field_name, $field_value );
352
+ }
353
+ }
354
+ }
355
+ }
356
+
357
+ $this->sanitize_and_save_fields( $post_id );
358
+
359
+ return $post_id;
360
+ }
361
+
362
+ /**
363
+ * Sanitize fields
364
+ *
365
+ * @param int $post_id The post ID.
366
+ *
367
+ * @since 3.2.1
368
+ * @deprecated since 3.4.8
369
+ */
370
+ public function sanitize_fields( $post_id ) {
371
+ $this->sanitize_and_save_fields( $post_id );
372
+ }
373
+
374
+ /**
375
+ * Sanitize and save fields of the Meta-box.
376
+ *
377
+ * @param int $post_id The post ID.
378
+ *
379
+ * @since 3.4.8
380
+ */
381
+ public function sanitize_and_save_fields( $post_id ) {
382
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
383
+ $this->reorder_tabs();
384
+ $tabs_to_sanitize = $this->tabs;
385
+ $allow_ajax = isset( $_REQUEST['yith_metabox_allow_ajax_saving'] ) && sanitize_key( wp_unslash( $_REQUEST['yith_metabox_allow_ajax_saving'] ) ) === $this->id;
386
+ $ajax_partial_saving_tab = isset( $_REQUEST['yith_metabox_allow_ajax_partial_saving_tab'] ) ? sanitize_key( wp_unslash( $_REQUEST['yith_metabox_allow_ajax_partial_saving_tab'] ) ) : false;
387
+
388
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX && ! $allow_ajax ) {
389
+ return;
390
+ } elseif ( $ajax_partial_saving_tab ) {
391
+ if ( array_key_exists( $ajax_partial_saving_tab, $tabs_to_sanitize ) ) {
392
+ $tabs_to_sanitize = array( $ajax_partial_saving_tab => $tabs_to_sanitize[ $ajax_partial_saving_tab ] );
393
+ } else {
394
+ return;
395
+ }
396
+ }
397
+
398
+ foreach ( $tabs_to_sanitize as $tab ) {
399
+ foreach ( $tab['fields'] as $field ) {
400
+ $this->sanitize_and_save_field( $field, $post_id );
401
+ }
402
+ }
403
+ // phpcs:enable
404
+ }
405
+
406
+ /**
407
+ * Sanitize and save a single field
408
+ *
409
+ * @param array $field The field.
410
+ * @param int $post_id The post ID.
411
+ *
412
+ * @since 3.4.8
413
+ */
414
+ public function sanitize_and_save_field( $field, $post_id ) {
415
+ // phpcs:disable WordPress.Security.NonceVerification.Missing
416
+ if ( in_array( $field['type'], array( 'title' ), true ) ) {
417
+ return;
418
+ }
419
+
420
+ $meta_box_data = isset( $_POST['yit_metaboxes'] ) ? wp_unslash( $_POST['yit_metaboxes'] ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
421
+
422
+ if ( isset( $meta_box_data[ $field['id'] ] ) ) {
423
+ if ( in_array( $field['type'], array( 'onoff', 'checkbox' ), true ) ) {
424
+ update_post_meta( $post_id, $field['id'], '1' );
425
+ } elseif ( in_array( $field['type'], array( 'toggle-element' ), true ) ) {
426
+ if ( isset( $field['elements'] ) && $field['elements'] ) {
427
+ $elements_value = $meta_box_data[ $field['id'] ];
428
+ if ( $elements_value ) {
429
+ if ( isset( $elements_value['box_id'] ) ) {
430
+ unset( $elements_value['box_id'] );
431
+ }
432
+
433
+ foreach ( $field['elements'] as $element ) {
434
+ foreach ( $elements_value as $key => $element_value ) {
435
+ if ( isset( $field['onoff_field'] ) ) {
436
+ $elements_value[ $key ][ $field['onoff_field']['id'] ] = ! isset( $element_value[ $field['onoff_field']['id'] ] ) ? 0 : $element_value[ $field['onoff_field']['id'] ];
437
+ }
438
+ if ( in_array( $element['type'], array( 'onoff', 'checkbox' ), true ) ) {
439
+ $elements_value[ $key ][ $element['id'] ] = ! isset( $element_value[ $element['id'] ] ) ? 0 : 1;
440
+ }
441
+
442
+ if ( ! empty( $element['yith-sanitize-callback'] ) && is_callable( $element['yith-sanitize-callback'] ) ) {
443
+ $elements_value[ $key ][ $element['id'] ] = call_user_func( $element['yith-sanitize-callback'], $elements_value[ $key ][ $element['id'] ] );
444
+ }
445
+ }
446
+ }
447
+ }
448
+
449
+ update_post_meta( $post_id, $field['id'], maybe_serialize( $elements_value ) );
450
+ }
451
+ } else {
452
+ $value = $meta_box_data[ $field['id'] ];
453
+ if ( ! empty( $field['yith-sanitize-callback'] ) && is_callable( $field['yith-sanitize-callback'] ) ) {
454
+ $value = call_user_func( $field['yith-sanitize-callback'], $value );
455
+ }
456
+ add_post_meta( $post_id, $field['id'], $value, true ) || update_post_meta( $post_id, $field['id'], $value );
457
+ }
458
+ } elseif ( in_array( $field['type'], array( 'onoff', 'checkbox' ), true ) ) {
459
+ update_post_meta( $post_id, $field['id'], '0' );
460
+ } elseif ( in_array( $field['type'], array( 'checkbox-array' ), true ) ) {
461
+ update_post_meta( $post_id, $field['id'], array() );
462
+ } else {
463
+ delete_post_meta( $post_id, $field['id'] );
464
+ }
465
+ // phpcs:enable
466
+ }
467
+
468
+ /**
469
+ * Remove a list of fields from the meta-box, search inside the tabs and remove it if exists
470
+ *
471
+ * @param array $fields Fields.
472
+ *
473
+ * @since 2.0.0
474
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
475
+ */
476
+ public function remove_fields( $fields ) {
477
+ foreach ( $fields as $k => $field ) {
478
+ $this->remove_field( $field );
479
+ }
480
+ }
481
+
482
+ /**
483
+ * Save the element toggle via AJAX.
484
+ *
485
+ * @since 3.2.1
486
+ * @author Emanuela Castorina
487
+ */
488
+ public function save_toggle_element() {
489
+ if ( ! isset( $_REQUEST['post_ID'] ) ) {
490
+ return;
491
+ }
492
+
493
+ if ( ! isset( $_REQUEST['yit_metaboxes_nonce'] ) || ! wp_verify_nonce( wp_unslash( $_REQUEST['yit_metaboxes_nonce'] ), 'metaboxes-fields-nonce' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
494
+ return;
495
+ }
496
+
497
+ $post_id = isset( $_REQUEST['post_ID'] ) ? absint( $_REQUEST['post_ID'] ) : false;
498
+ if ( ! $post_id ) {
499
+ return;
500
+ }
501
+
502
+ if ( isset( $_REQUEST['yit_metaboxes'], $_REQUEST['toggle_id'], $_REQUEST['metabox_tab'], $_REQUEST['yit_metaboxes'][ $_REQUEST['toggle_id'] ] ) ) {
503
+ $meta_box_data = isset( $_REQUEST['yit_metaboxes'] ) ? wp_unslash( $_REQUEST['yit_metaboxes'] ) : array(); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
504
+ $metabox_tab = sanitize_key( wp_unslash( $_REQUEST['metabox_tab'] ) );
505
+ $field_id = sanitize_key( wp_unslash( $_REQUEST['toggle_id'] ) );
506
+ if ( strpos( $field_id, '_' ) === 0 ) {
507
+ $field_id = substr( $field_id, 1 );
508
+ }
509
+
510
+ if ( is_array( $meta_box_data ) ) {
511
+ $this->reorder_tabs();
512
+ $tabs = $this->tabs;
513
+
514
+ if ( isset( $tabs[ $metabox_tab ], $tabs[ $metabox_tab ]['fields'] ) && isset( $tabs[ $metabox_tab ]['fields'][ $field_id ] ) ) {
515
+ $field = $tabs[ $metabox_tab ]['fields'][ $field_id ];
516
+ if ( $field ) {
517
+ $this->sanitize_and_save_field( $field, $post_id );
518
+ }
519
+ }
520
+ }
521
+ } elseif ( isset( $_REQUEST['toggle_id'] ) ) {
522
+ $field_id = sanitize_key( wp_unslash( $_REQUEST['toggle_id'] ) );
523
+ delete_post_meta( $post_id, $field_id );
524
+ }
525
+ }
526
+ }
527
+ }
528
+
529
+ if ( ! function_exists( 'yit_metabox' ) ) {
530
+ /**
531
+ * Return the meta-box instance.
532
+ *
533
+ * @param string $id The meta-box id.
534
+ *
535
+ * @return YIT_Metabox
536
+ */
537
+ function yit_metabox( $id ) {
538
+ return YIT_Metabox::instance( $id );
539
+ }
540
+ }
plugin-fw/includes/class-yit-plugin-common.php ADDED
@@ -0,0 +1,1181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Plugin Common Class.
4
+ *
5
+ * @class YIT_Plugin_Common
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Plugin_Common' ) ) {
12
+ /**
13
+ * YIT_Plugin_Common class.
14
+ *
15
+ * @deprecated 3.5
16
+ */
17
+ class YIT_Plugin_Common {
18
+
19
+ /**
20
+ * Config array
21
+ *
22
+ * @var array
23
+ */
24
+ public static $config = array(
25
+ 'slider' => array( 'nivo', 'elegant' ),
26
+ 'awesome_icons' => array(
27
+ '' => 'no-icon',
28
+ 'f042' => 'adjust',
29
+ 'f170' => 'adn',
30
+ 'f037' => 'align-center',
31
+ 'f039' => 'align-justify',
32
+ 'f036' => 'align-left',
33
+ 'f038' => 'align-right',
34
+ 'f0f9' => 'ambulance',
35
+ 'f13d' => 'anchor',
36
+ 'f17b' => 'android',
37
+ 'f103' => 'angle-double-down',
38
+ 'f100' => 'angle-double-left',
39
+ 'f101' => 'angle-double-right',
40
+ 'f102' => 'angle-double-up',
41
+ 'f107' => 'angle-down',
42
+ 'f104' => 'angle-left',
43
+ 'f105' => 'angle-right',
44
+ 'f106' => 'angle-up',
45
+ 'f179' => 'apple',
46
+ 'f187' => 'archive',
47
+ 'f0ab' => 'arrow-circle-down',
48
+ 'f0a8' => 'arrow-circle-left',
49
+ 'f01a' => 'arrow-circle-o-down',
50
+ 'f190' => 'arrow-circle-o-left',
51
+ 'f18e' => 'arrow-circle-o-right',
52
+ 'f01b' => 'arrow-circle-o-up',
53
+ 'f0a9' => 'arrow-circle-right',
54
+ 'f0aa' => 'arrow-circle-up',
55
+ 'f063' => 'arrow-down',
56
+ 'f060' => 'arrow-left',
57
+ 'f061' => 'arrow-right',
58
+ 'f062' => 'arrow-up',
59
+ 'f047' => 'arrows',
60
+ 'f0b2' => 'arrows-alt',
61
+ 'f07e' => 'arrows-h',
62
+ 'f07d' => 'arrows-v',
63
+ 'f069' => 'asterisk',
64
+ 'f04a' => 'backward',
65
+ 'f05e' => 'ban',
66
+ 'f080' => 'bar-chart-o',
67
+ 'f02a' => 'barcode',
68
+ 'f0c9' => 'bars',
69
+ 'f0fc' => 'beer',
70
+ 'f0f3' => 'bell',
71
+ 'f0a2' => 'bell-o',
72
+ 'f171' => 'bitbucket',
73
+ 'f172' => 'bitbucket-square',
74
+ 'f032' => 'bold',
75
+ 'f0e7' => 'bolt',
76
+ 'f02d' => 'book',
77
+ 'f02e' => 'bookmark',
78
+ 'f097' => 'bookmark-o',
79
+ 'f0b1' => 'briefcase',
80
+ 'f15a' => 'btc',
81
+ 'f188' => 'bug',
82
+ 'f0f7' => 'building-o',
83
+ 'f0a1' => 'bullhorn',
84
+ 'f140' => 'bullseye',
85
+ 'f073' => 'calendar',
86
+ 'f133' => 'calendar-o',
87
+ 'f030' => 'camera',
88
+ 'f083' => 'camera-retro',
89
+ 'f0d7' => 'caret-down',
90
+ 'f0d9' => 'caret-left',
91
+ 'f0da' => 'caret-right',
92
+ 'f150' => 'caret-square-o-down',
93
+ 'f191' => 'caret-square-o-left',
94
+ 'f152' => 'caret-square-o-right',
95
+ 'f151' => 'caret-square-o-up',
96
+ 'f0d8' => 'caret-up',
97
+ 'f0a3' => 'certificate',
98
+ 'f127' => 'chain-broken',
99
+ 'f00c' => 'check',
100
+ 'f058' => 'check-circle',
101
+ 'f05d' => 'check-circle-o',
102
+ 'f14a' => 'check-square',
103
+ 'f046' => 'check-square-o',
104
+ 'f13a' => 'chevron-circle-down',
105
+ 'f137' => 'chevron-circle-left',
106
+ 'f138' => 'chevron-circle-right',
107
+ 'f139' => 'chevron-circle-up',
108
+ 'f078' => 'chevron-down',
109
+ 'f053' => 'chevron-left',
110
+ 'f054' => 'chevron-right',
111
+ 'f077' => 'chevron-up',
112
+ 'f10c' => 'circle-o',
113
+ 'f0ea' => 'clipboard',
114
+ 'f017' => 'clock-o',
115
+ 'f0c2' => 'cloud',
116
+ 'f0ed' => 'cloud-download',
117
+ 'f0ee' => 'cloud-upload',
118
+ 'f121' => 'code',
119
+ 'f126' => 'code-fork',
120
+ 'f0f4' => 'coffee',
121
+ 'f013' => 'cog',
122
+ 'f085' => 'cogs',
123
+ 'f0db' => 'columns',
124
+ 'f075' => 'comment',
125
+ 'f0e5' => 'comment-o',
126
+ 'f086' => 'comments',
127
+ 'f0e6' => 'comments-o',
128
+ 'f14e' => 'compass',
129
+ 'f066' => 'compress',
130
+ 'f09d' => 'credit-card',
131
+ 'f125' => 'crop',
132
+ 'f05b' => 'crosshairs',
133
+ 'f13c' => 'css3',
134
+ 'f0f5' => 'cutlery',
135
+ 'f108' => 'desktop',
136
+ 'f192' => 'dot-circle-o',
137
+ 'f019' => 'download',
138
+ 'f17d' => 'dribbble',
139
+ 'f16b' => 'dropbox',
140
+ 'f052' => 'eject',
141
+ 'f141' => 'ellipsis-h',
142
+ 'f142' => 'ellipsis-v',
143
+ 'f0e0' => 'envelope',
144
+ 'f003' => 'envelope-o',
145
+ 'f12d' => 'eraser',
146
+ 'f153' => 'eur',
147
+ 'f0ec' => 'exchange',
148
+ 'f12a' => 'exclamation',
149
+ 'f06a' => 'exclamation-circle',
150
+ 'f071' => 'exclamation-triangle',
151
+ 'f065' => 'expand',
152
+ 'f08e' => 'external-link',
153
+ 'f14c' => 'external-link-square',
154
+ 'f06e' => 'eye',
155
+ 'f070' => 'eye-slash',
156
+ 'f09a' => 'facebook',
157
+ 'f082' => 'facebook-square',
158
+ 'f049' => 'fast-backward',
159
+ 'f050' => 'fast-forward',
160
+ 'f182' => 'female',
161
+ 'f0fb' => 'fighter-jet',
162
+ 'f15b' => 'file',
163
+ 'f016' => 'file-o',
164
+ 'f15c' => 'file-text',
165
+ 'f0f6' => 'file-text-o',
166
+ 'f0c5' => 'files-o',
167
+ 'f008' => 'film',
168
+ 'f0b0' => 'filter',
169
+ 'f06d' => 'fire',
170
+ 'f134' => 'fire-extinguisher',
171
+ 'f024' => 'flag',
172
+ 'f11e' => 'flag-checkered',
173
+ 'f11d' => 'flag-o',
174
+ 'f0c3' => 'flask',
175
+ 'f16e' => 'flickr',
176
+ 'f0c7' => 'floppy-o',
177
+ 'f07b' => 'folder',
178
+ 'f114' => 'folder-o',
179
+ 'f07c' => 'folder-open',
180
+ 'f115' => 'folder-open-o',
181
+ 'f031' => 'font',
182
+ 'f04e' => 'forward',
183
+ 'f180' => 'foursquare',
184
+ 'f119' => 'frown-o',
185
+ 'f11b' => 'gamepad',
186
+ 'f0e3' => 'gavel',
187
+ 'f154' => 'gbp',
188
+ 'f06b' => 'gift',
189
+ 'f09b' => 'github',
190
+ 'f113' => 'github-alt',
191
+ 'f092' => 'github-square',
192
+ 'f184' => 'gittip',
193
+ 'f000' => 'glass',
194
+ 'f0ac' => 'globe',
195
+ 'f0d5' => 'google-plus',
196
+ 'f0d4' => 'google-plus-square',
197
+ 'f0fd' => 'h-square',
198
+ 'f0a7' => 'hand-o-down',
199
+ 'f0a5' => 'hand-o-left',
200
+ 'f0a4' => 'hand-o-right',
201
+ 'f0a6' => 'hand-o-up',
202
+ 'f0a0' => 'hdd-o',
203
+ 'f025' => 'headphones',
204
+ 'f004' => 'heart',
205
+ 'f08a' => 'heart-o',
206
+ 'f015' => 'home',
207
+ 'f0f8' => 'hospital-o',
208
+ 'f13b' => 'html5',
209
+ 'f01c' => 'inbox',
210
+ 'f03c' => 'indent',
211
+ 'f129' => 'info',
212
+ 'f05a' => 'info-circle',
213
+ 'f156' => 'inr',
214
+ 'f16d' => 'instagram',
215
+ 'f033' => 'italic',
216
+ 'f157' => 'jpy',
217
+ 'f084' => 'key',
218
+ 'f11c' => 'keyboard-o',
219
+ 'f159' => 'krw',
220
+ 'f109' => 'laptop',
221
+ 'f06c' => 'leaf',
222
+ 'f094' => 'lemon-o',
223
+ 'f149' => 'level-down',
224
+ 'f148' => 'level-up',
225
+ 'f0eb' => 'lightbulb-o',
226
+ 'f0c1' => 'link',
227
+ 'f0e1' => 'linkedin',
228
+ 'f08c' => 'linkedin-square',
229
+ 'f17c' => 'linux',
230
+ 'f03a' => 'list',
231
+ 'f022' => 'list-alt',
232
+ 'f0cb' => 'list-ol',
233
+ 'f0ca' => 'list-ul',
234
+ 'f124' => 'location-arrow',
235
+ 'f023' => 'lock',
236
+ 'f175' => 'long-arrow-down',
237
+ 'f177' => 'long-arrow-left',
238
+ 'f178' => 'long-arrow-right',
239
+ 'f176' => 'long-arrow-up',
240
+ 'f0d0' => 'magic',
241
+ 'f076' => 'magnet',
242
+ 'f183' => 'male',
243
+ 'f041' => 'map-marker',
244
+ 'f136' => 'maxcdn',
245
+ 'f0fa' => 'medkit',
246
+ 'f11a' => 'meh-o',
247
+ 'f130' => 'microphone',
248
+ 'f131' => 'microphone-slash',
249
+ 'f068' => 'minus',
250
+ 'f056' => 'minus-circle',
251
+ 'f146' => 'minus-square',
252
+ 'f147' => 'minus-square-o',
253
+ 'f10b' => 'mobile',
254
+ 'f0d6' => 'money',
255
+ 'f186' => 'moon-o',
256
+ 'f001' => 'music',
257
+ 'f03b' => 'outdent',
258
+ 'f18c' => 'pagelines',
259
+ 'f0c6' => 'paperclip',
260
+ 'f04c' => 'pause',
261
+ 'f040' => 'pencil',
262
+ 'f14b' => 'pencil-square',
263
+ 'f044' => 'pencil-square-o',
264
+ 'f095' => 'phone',
265
+ 'f098' => 'phone-square',
266
+ 'f03e' => 'picture-o',
267
+ 'f0d2' => 'pinterest',
268
+ 'f0d3' => 'pinterest-square',
269
+ 'f072' => 'plane',
270
+ 'f04b' => 'play',
271
+ 'f144' => 'play-circle',
272
+ 'f01d' => 'play-circle-o',
273
+ 'f067' => 'plus',
274
+ 'f055' => 'plus-circle',
275
+ 'f0fe' => 'plus-square',
276
+ 'f196' => 'plus-square-o',
277
+ 'f011' => 'power-off',
278
+ 'f02f' => 'print',
279
+ 'f12e' => 'puzzle-piece',
280
+ 'f029' => 'qrcode',
281
+ 'f128' => 'question',
282
+ 'f059' => 'question-circle',
283
+ 'f10d' => 'quote-left',
284
+ 'f10e' => 'quote-right',
285
+ 'f074' => 'random',
286
+ 'f021' => 'refresh',
287
+ 'f18b' => 'renren',
288
+ 'f01e' => 'repeat',
289
+ 'f112' => 'reply',
290
+ 'f122' => 'reply-all',
291
+ 'f079' => 'retweet',
292
+ 'f018' => 'road',
293
+ 'f135' => 'rocket',
294
+ 'f09e' => 'rss',
295
+ 'f143' => 'rss-square',
296
+ 'f158' => 'rub',
297
+ 'f0c4' => 'scissors',
298
+ 'f002' => 'search',
299
+ 'f010' => 'search-minus',
300
+ 'f00e' => 'search-plus',
301
+ 'f064' => 'share',
302
+ 'f14d' => 'share-square',
303
+ 'f045' => 'share-square-o',
304
+ 'f132' => 'shield',
305
+ 'f07a' => 'shopping-cart',
306
+ 'f090' => 'sign-in',
307
+ 'f08b' => 'sign-out',
308
+ 'f012' => 'signal',
309
+ 'f0e8' => 'sitemap',
310
+ 'f17e' => 'skype',
311
+ 'f118' => 'smile-o',
312
+ 'f0dc' => 'sort',
313
+ 'f15d' => 'sort-alpha-asc',
314
+ 'f15e' => 'sort-alpha-desc',
315
+ 'f160' => 'sort-amount-asc',
316
+ 'f161' => 'sort-amount-desc',
317
+ 'f0dd' => 'sort-asc',
318
+ 'f0de' => 'sort-desc',
319
+ 'f162' => 'sort-numeric-asc',
320
+ 'f163' => 'sort-numeric-desc',
321
+ 'f110' => 'spinner',
322
+ 'f0c8' => 'square',
323
+ 'f096' => 'square-o',
324
+ 'f18d' => 'stack-exchange',
325
+ 'f16c' => 'stack-overflow',
326
+ 'f005' => 'star',
327
+ 'f089' => 'star-half',
328
+ 'f123' => 'star-half-o',
329
+ 'f006' => 'star-o',
330
+ 'f048' => 'step-backward',
331
+ 'f051' => 'step-forward',
332
+ 'f0f1' => 'stethoscope',
333
+ 'f04d' => 'stop',
334
+ 'f0cc' => 'strikethrough',
335
+ 'f12c' => 'subscript',
336
+ 'f0f2' => 'suitcase',
337
+ 'f185' => 'sun-o',
338
+ 'f12b' => 'superscript',
339
+ 'f0ce' => 'table',
340
+ 'f10a' => 'tablet',
341
+ 'f0e4' => 'tachometer',
342
+ 'f02b' => 'tag',
343
+ 'f02c' => 'tags',
344
+ 'f0ae' => 'tasks',
345
+ 'f120' => 'terminal',
346
+ 'f034' => 'text-height',
347
+ 'f035' => 'text-width',
348
+ 'f00a' => 'th',
349
+ 'f009' => 'th-large',
350
+ 'f00b' => 'th-list',
351
+ 'f08d' => 'thumb-tack',
352
+ 'f165' => 'thumbs-down',
353
+ 'f088' => 'thumbs-o-down',
354
+ 'f087' => 'thumbs-o-up',
355
+ 'f164' => 'thumbs-up',
356
+ 'f145' => 'ticket',
357
+ 'f00d' => 'times',
358
+ 'f057' => 'times-circle',
359
+ 'f05c' => 'times-circle-o',
360
+ 'f043' => 'tint',
361
+ 'f014' => 'trash-o',
362
+ 'f181' => 'trello',
363
+ 'f091' => 'trophy',
364
+ 'f0d1' => 'truck',
365
+ 'f195' => 'try',
366
+ 'f173' => 'tumblr',
367
+ 'f174' => 'tumblr-square',
368
+ 'f099' => 'twitter',
369
+ 'f081' => 'twitter-square',
370
+ 'f0e9' => 'umbrella',
371
+ 'f0cd' => 'underline',
372
+ 'f0e2' => 'undo',
373
+ 'f09c' => 'unlock',
374
+ 'f13e' => 'unlock-alt',
375
+ 'f093' => 'upload',
376
+ 'f155' => 'usd',
377
+ 'f007' => 'user',
378
+ 'f0f0' => 'user-md',
379
+ 'f0c0' => 'users',
380
+ 'f03d' => 'video-camera',
381
+ 'f194' => 'vimeo-square',
382
+ 'f189' => 'vk',
383
+ 'f027' => 'volume-down',
384
+ 'f026' => 'volume-off',
385
+ 'f028' => 'volume-up',
386
+ 'f18a' => 'weibo',
387
+ 'f193' => 'wheelchair',
388
+ 'f17a' => 'windows',
389
+ 'f0ad' => 'wrench',
390
+ 'f168' => 'xing',
391
+ 'f169' => 'xing-square',
392
+ 'f167' => 'youtube',
393
+ 'f16a' => 'youtube-play',
394
+ 'f166' => 'youtube-square',
395
+ ),
396
+ 'awesome_icons2' => array(
397
+ '\f042' => 'adjust',
398
+ '\f170' => 'adn',
399
+ '\f037' => 'align-center',
400
+ '\f039' => 'align-justify',
401
+ '\f036' => 'align-left',
402
+ '\f038' => 'align-right',
403
+ '\f0f9' => 'ambulance',
404
+ '\f13d' => 'anchor',
405
+ '\f17b' => 'android',
406
+ '\f209' => 'angellist',
407
+ '\f103' => 'angle-double-down',
408
+ '\f100' => 'angle-double-left',
409
+ '\f101' => 'angle-double-right',
410
+ '\f102' => 'angle-double-up',
411
+ '\f107' => 'angle-down',
412
+ '\f104' => 'angle-left',
413
+ '\f105' => 'angle-right',
414
+ '\f106' => 'angle-up',
415
+ '\f179' => 'apple',
416
+ '\f187' => 'archive',
417
+ '\f1fe' => 'area-chart',
418
+ '\f0ab' => 'arrow-circle-down',
419
+ '\f0a8' => 'arrow-circle-left',
420
+ '\f01a' => 'arrow-circle-o-down',
421
+ '\f190' => 'arrow-circle-o-left',
422
+ '\f18e' => 'arrow-circle-o-right',
423
+ '\f01b' => 'arrow-circle-o-up',
424
+ '\f0a9' => 'arrow-circle-right',
425
+ '\f0aa' => 'arrow-circle-up',
426
+ '\f063' => 'arrow-down',
427
+ '\f060' => 'arrow-left',
428
+ '\f061' => 'arrow-right',
429
+ '\f062' => 'arrow-up',
430
+ '\f047' => 'arrows',
431
+ '\f0b2' => 'arrows-alt',
432
+ '\f07e' => 'arrows-h',
433
+ '\f07d' => 'arrows-v',
434
+ '\f069' => 'asterisk',
435
+ '\f1fa' => 'at',
436
+ '\f04a' => 'backward',
437
+ '\f05e' => 'ban',
438
+ '\f02a' => 'barcode',
439
+ '\f0fc' => 'beer',
440
+ '\f1b4' => 'behance',
441
+ '\f1b5' => 'behance-square',
442
+ '\f0f3' => 'bell',
443
+ '\f0a2' => 'bell-o',
444
+ '\f1f6' => 'bell-slash',
445
+ '\f1f7' => 'bell-slash-o',
446
+ '\f206' => 'bicycle',
447
+ '\f1e5' => 'binoculars',
448
+ '\f1fd' => 'birthday-cake',
449
+ '\f171' => 'bitbucket',
450
+ '\f172' => 'bitbucket-square',
451
+ '\f032' => 'bold',
452
+ '\f1e2' => 'bomb',
453
+ '\f02d' => 'book',
454
+ '\f02e' => 'bookmark',
455
+ '\f097' => 'bookmark-o',
456
+ '\f0b1' => 'briefcase',
457
+ '\f188' => 'bug',
458
+ '\f1ad' => 'building',
459
+ '\f0f7' => 'building-o',
460
+ '\f0a1' => 'bullhorn',
461
+ '\f140' => 'bullseye',
462
+ '\f207' => 'bus',
463
+ '\f20d' => 'buysellads',
464
+ '\f1ec' => 'calculator',
465
+ '\f073' => 'calendar',
466
+ '\f133' => 'calendar-o',
467
+ '\f030' => 'camera',
468
+ '\f083' => 'camera-retro',
469
+ '\f1b9' => 'car',
470
+ '\f0d7' => 'caret-down',
471
+ '\f0d9' => 'caret-left',
472
+ '\f0da' => 'caret-right',
473
+ '\f0d8' => 'caret-up',
474
+ '\f218' => 'cart-arrow-down',
475
+ '\f217' => 'cart-plus',
476
+ '\f20a' => 'cc',
477
+ '\f1f3' => 'cc-amex',
478
+ '\f1f2' => 'cc-discover',
479
+ '\f1f1' => 'cc-mastercard',
480
+ '\f1f4' => 'cc-paypal',
481
+ '\f1f5' => 'cc-stripe',
482
+ '\f1f0' => 'cc-visa',
483
+ '\f0a3' => 'certificate',
484
+ '\f00c' => 'check',
485
+ '\f058' => 'check-circle',
486
+ '\f05d' => 'check-circle-o',
487
+ '\f14a' => 'check-square',
488
+ '\f046' => 'check-square-o',
489
+ '\f13a' => 'chevron-circle-down',
490
+ '\f137' => 'chevron-circle-left',
491
+ '\f138' => 'chevron-circle-right',
492
+ '\f139' => 'chevron-circle-up',
493
+ '\f078' => 'chevron-down',
494
+ '\f053' => 'chevron-left',
495
+ '\f054' => 'chevron-right',
496
+ '\f077' => 'chevron-up',
497
+ '\f1ae' => 'child',
498
+ '\f111' => 'circle',
499
+ '\f10c' => 'circle-o',
500
+ '\f1ce' => 'circle-o-notch',
501
+ '\f017' => 'clock-o',
502
+ '\f0c2' => 'cloud',
503
+ '\f0ed' => 'cloud-download',
504
+ '\f0ee' => 'cloud-upload',
505
+ '\f121' => 'code',
506
+ '\f126' => 'code-fork',
507
+ '\f1cb' => 'codepen',
508
+ '\f0f4' => 'coffee',
509
+ '\f0db' => 'columns',
510
+ '\f075' => 'comment',
511
+ '\f0e5' => 'comment-o',
512
+ '\f086' => 'comments',
513
+ '\f0e6' => 'comments-o',
514
+ '\f14e' => 'compass',
515
+ '\f066' => 'compress',
516
+ '\f20e' => 'connectdevelop',
517
+ '\f1f9' => 'copyright',
518
+ '\f09d' => 'credit-card',
519
+ '\f125' => 'crop',
520
+ '\f05b' => 'crosshairs',
521
+ '\f13c' => 'css3',
522
+ '\f1b2' => 'cube',
523
+ '\f1b3' => 'cubes',
524
+ '\f0f5' => 'cutlery',
525
+ '\f210' => 'dashcube',
526
+ '\f1c0' => 'database',
527
+ '\f1a5' => 'delicious',
528
+ '\f108' => 'desktop',
529
+ '\f1bd' => 'deviantart',
530
+ '\f219' => 'diamond',
531
+ '\f1a6' => 'digg',
532
+ '\f192' => 'dot-circle-o',
533
+ '\f019' => 'download',
534
+ '\f17d' => 'dribbble',
535
+ '\f16b' => 'dropbox',
536
+ '\f1a9' => 'drupal',
537
+ '\f052' => 'eject',
538
+ '\f141' => 'ellipsis-h',
539
+ '\f142' => 'ellipsis-v',
540
+ '\f0e0' => 'envelope',
541
+ '\f003' => 'envelope-o',
542
+ '\f199' => 'envelope-square',
543
+ '\f12d' => 'eraser',
544
+ '\f153' => 'euro',
545
+ '\f0ec' => 'exchange',
546
+ '\f12a' => 'exclamation',
547
+ '\f06a' => 'exclamation-circle',
548
+ '\f065' => 'expand',
549
+ '\f08e' => 'external-link',
550
+ '\f14c' => 'external-link-square',
551
+ '\f06e' => 'eye',
552
+ '\f070' => 'eye-slash',
553
+ '\f1fb' => 'eyedropper',
554
+ '\f09a' => 'facebook-f',
555
+ '\f230' => 'facebook-official',
556
+ '\f082' => 'facebook-square',
557
+ '\f049' => 'fast-backward',
558
+ '\f050' => 'fast-forward',
559
+ '\f1ac' => 'fax',
560
+ '\f182' => 'female',
561
+ '\f0fb' => 'fighter-jet',
562
+ '\f15b' => 'file',
563
+ '\f1c9' => 'file-code-o',
564
+ '\f1c3' => 'file-excel-o',
565
+ '\f016' => 'file-o',
566
+ '\f1c1' => 'file-pdf-o',
567
+ '\f1c5' => 'file-picture-o',
568
+ '\f1c4' => 'file-powerpoint-o',
569
+ '\f1c7' => 'file-sound-o',
570
+ '\f15c' => 'file-text',
571
+ '\f0f6' => 'file-text-o',
572
+ '\f1c8' => 'file-video-o',
573
+ '\f1c2' => 'file-word-o',
574
+ '\f1c6' => 'file-zip-o',
575
+ '\f0c5' => 'files-o',
576
+ '\f008' => 'film',
577
+ '\f0b0' => 'filter',
578
+ '\f06d' => 'fire',
579
+ '\f134' => 'fire-extinguisher',
580
+ '\f024' => 'flag',
581
+ '\f11e' => 'flag-checkered',
582
+ '\f11d' => 'flag-o',
583
+ '\f0e7' => 'flash',
584
+ '\f0c3' => 'flask',
585
+ '\f16e' => 'flickr',
586
+ '\f07b' => 'folder',
587
+ '\f114' => 'folder-o',
588
+ '\f07c' => 'folder-open',
589
+ '\f115' => 'folder-open-o',
590
+ '\f031' => 'font',
591
+ '\f211' => 'forumbee',
592
+ '\f04e' => 'forward',
593
+ '\f180' => 'foursquare',
594
+ '\f119' => 'frown-o',
595
+ '\f11b' => 'gamepad',
596
+ '\f154' => 'gbp',
597
+ '\f1d1' => 'ge',
598
+ '\f013' => 'gear',
599
+ '\f085' => 'gears',
600
+ '\f1db' => 'genderless',
601
+ '\f06b' => 'gift',
602
+ '\f1d3' => 'git',
603
+ '\f1d2' => 'git-square',
604
+ '\f09b' => 'github',
605
+ '\f113' => 'github-alt',
606
+ '\f092' => 'github-square',
607
+ '\f000' => 'glass',
608
+ '\f0ac' => 'globe',
609
+ '\f1a0' => 'google',
610
+ '\f0d5' => 'google-plus',
611
+ '\f0d4' => 'google-plus-square',
612
+ '\f1ee' => 'google-wallet',
613
+ '\f184' => 'gratipay',
614
+ '\f0fd' => 'h-square',
615
+ '\f1d4' => 'hacker-news',
616
+ '\f0a7' => 'hand-o-down',
617
+ '\f0a5' => 'hand-o-left',
618
+ '\f0a4' => 'hand-o-right',
619
+ '\f0a6' => 'hand-o-up',
620
+ '\f0a0' => 'hdd-o',
621
+ '\f1dc' => 'header',
622
+ '\f025' => 'headphones',
623
+ '\f004' => 'heart',
624
+ '\f08a' => 'heart-o',
625
+ '\f21e' => 'heartbeat',
626
+ '\f1da' => 'history',
627
+ '\f015' => 'home',
628
+ '\f0f8' => 'hospital-o',
629
+ '\f236' => 'hotel',
630
+ '\f13b' => 'html5',
631
+ '\f01c' => 'inbox',
632
+ '\f03c' => 'indent',
633
+ '\f129' => 'info',
634
+ '\f05a' => 'info-circle',
635
+ '\f16d' => 'instagram',
636
+ '\f208' => 'ioxhost',
637
+ '\f033' => 'italic',
638
+ '\f1aa' => 'joomla',
639
+ '\f1cc' => 'jsfiddle',
640
+ '\f084' => 'key',
641
+ '\f11c' => 'keyboard-o',
642
+ '\f1ab' => 'language',
643
+ '\f109' => 'laptop',
644
+ '\f202' => 'lastfm',
645
+ '\f203' => 'lastfm-square',
646
+ '\f06c' => 'leaf',
647
+ '\f212' => 'leanpub',
648
+ '\f0e3' => 'legal',
649
+ '\f094' => 'lemon-o',
650
+ '\f149' => 'level-down',
651
+ '\f148' => 'level-up',
652
+ '\f0eb' => 'lightbulb-o',
653
+ '\f201' => 'line-chart',
654
+ '\f0c1' => 'link',
655
+ '\f0e1' => 'linkedin',
656
+ '\f08c' => 'linkedin-square',
657
+ '\f17c' => 'linux',
658
+ '\f03a' => 'list',
659
+ '\f022' => 'list-alt',
660
+ '\f0cb' => 'list-ol',
661
+ '\f0ca' => 'list-ul',
662
+ '\f124' => 'location-arrow',
663
+ '\f023' => 'lock',
664
+ '\f175' => 'long-arrow-down',
665
+ '\f177' => 'long-arrow-left',
666
+ '\f178' => 'long-arrow-right',
667
+ '\f176' => 'long-arrow-up',
668
+ '\f0d0' => 'magic',
669
+ '\f076' => 'magnet',
670
+ '\f183' => 'male',
671
+ '\f041' => 'map-marker',
672
+ '\f222' => 'mars',
673
+ '\f227' => 'mars-double',
674
+ '\f229' => 'mars-stroke',
675
+ '\f22b' => 'mars-stroke-h',
676
+ '\f22a' => 'mars-stroke-v',
677
+ '\f136' => 'maxcdn',
678
+ '\f20c' => 'meanpath',
679
+ '\f23a' => 'medium',
680
+ '\f0fa' => 'medkit',
681
+ '\f11a' => 'meh-o',
682
+ '\f223' => 'mercury',
683
+ '\f130' => 'microphone',
684
+ '\f131' => 'microphone-slash',
685
+ '\f068' => 'minus',
686
+ '\f056' => 'minus-circle',
687
+ '\f146' => 'minus-square',
688
+ '\f147' => 'minus-square-o',
689
+ '\f10b' => 'mobile-phone',
690
+ '\f0d6' => 'money',
691
+ '\f186' => 'moon-o',
692
+ '\f19d' => 'mortar-board',
693
+ '\f21c' => 'motorcycle',
694
+ '\f001' => 'music',
695
+ '\f22c' => 'neuter',
696
+ '\f1ea' => 'newspaper-o',
697
+ '\f19b' => 'openid',
698
+ '\f03b' => 'outdent',
699
+ '\f18c' => 'pagelines',
700
+ '\f1fc' => 'paint-brush',
701
+ '\f0c6' => 'paperclip',
702
+ '\f1dd' => 'paragraph',
703
+ '\f0ea' => 'paste',
704
+ '\f04c' => 'pause',
705
+ '\f1b0' => 'paw',
706
+ '\f1ed' => 'paypal',
707
+ '\f040' => 'pencil',
708
+ '\f14b' => 'pencil-square',
709
+ '\f044' => 'pencil-square-o',
710
+ '\f095' => 'phone',
711
+ '\f098' => 'phone-square',
712
+ '\f03e' => 'picture-o',
713
+ '\f200' => 'pie-chart',
714
+ '\f1a7' => 'pied-piper',
715
+ '\f1a8' => 'pied-piper-alt',
716
+ '\f0d2' => 'pinterest',
717
+ '\f231' => 'pinterest-p',
718
+ '\f0d3' => 'pinterest-square',
719
+ '\f072' => 'plane',
720
+ '\f04b' => 'play',
721
+ '\f144' => 'play-circle',
722
+ '\f01d' => 'play-circle-o',
723
+ '\f1e6' => 'plug',
724
+ '\f067' => 'plus',
725
+ '\f055' => 'plus-circle',
726
+ '\f0fe' => 'plus-square',
727
+ '\f196' => 'plus-square-o',
728
+ '\f011' => 'power-off',
729
+ '\f02f' => 'print',
730
+ '\f12e' => 'puzzle-piece',
731
+ '\f1d6' => 'qq',
732
+ '\f029' => 'qrcode',
733
+ '\f128' => 'question',
734
+ '\f059' => 'question-circle',
735
+ '\f10d' => 'quote-left',
736
+ '\f10e' => 'quote-right',
737
+ '\f074' => 'random',
738
+ '\f1d0' => 'rebel',
739
+ '\f1b8' => 'recycle',
740
+ '\f1a1' => 'reddit',
741
+ '\f1a2' => 'reddit-square',
742
+ '\f021' => 'refresh',
743
+ '\f18b' => 'renren',
744
+ '\f0c9' => 'reorder',
745
+ '\f112' => 'reply',
746
+ '\f122' => 'reply-all',
747
+ '\f079' => 'retweet',
748
+ '\f018' => 'road',
749
+ '\f135' => 'rocket',
750
+ '\f01e' => 'rotate-right',
751
+ '\f09e' => 'rss',
752
+ '\f143' => 'rss-square',
753
+ '\f158' => 'ruble',
754
+ '\f156' => 'rupee',
755
+ '\f0c7' => 'save',
756
+ '\f0c4' => 'scissors',
757
+ '\f002' => 'search',
758
+ '\f010' => 'search-minus',
759
+ '\f00e' => 'search-plus',
760
+ '\f213' => 'sellsy',
761
+ '\f1d8' => 'send',
762
+ '\f1d9' => 'send-o',
763
+ '\f233' => 'server',
764
+ '\f064' => 'share',
765
+ '\f1e0' => 'share-alt',
766
+ '\f1e1' => 'share-alt-square',
767
+ '\f14d' => 'share-square',
768
+ '\f045' => 'share-square-o',
769
+ '\f20b' => 'sheqel',
770
+ '\f132' => 'shield',
771
+ '\f21a' => 'ship',
772
+ '\f214' => 'shirtsinbulk',
773
+ '\f07a' => 'shopping-cart',
774
+ '\f090' => 'sign-in',
775
+ '\f08b' => 'sign-out',
776
+ '\f012' => 'signal',
777
+ '\f215' => 'simplybuilt',
778
+ '\f0e8' => 'sitemap',
779
+ '\f216' => 'skyatlas',
780
+ '\f17e' => 'skype',
781
+ '\f198' => 'slack',
782
+ '\f1de' => 'sliders',
783
+ '\f1e7' => 'slideshare',
784
+ '\f118' => 'smile-o',
785
+ '\f1e3' => 'soccer-ball-o',
786
+ '\f15d' => 'sort-alpha-asc',
787
+ '\f15e' => 'sort-alpha-desc',
788
+ '\f160' => 'sort-amount-asc',
789
+ '\f161' => 'sort-amount-desc',
790
+ '\f0dd' => 'sort-down',
791
+ '\f162' => 'sort-numeric-asc',
792
+ '\f163' => 'sort-numeric-desc',
793
+ '\f0de' => 'sort-up',
794
+ '\f1be' => 'soundcloud',
795
+ '\f197' => 'space-shuttle',
796
+ '\f110' => 'spinner',
797
+ '\f1b1' => 'spoon',
798
+ '\f1bc' => 'spotify',
799
+ '\f0c8' => 'square',
800
+ '\f096' => 'square-o',
801
+ '\f18d' => 'stack-exchange',
802
+ '\f16c' => 'stack-overflow',
803
+ '\f005' => 'star',
804
+ '\f089' => 'star-half',
805
+ '\f123' => 'star-half-o',
806
+ '\f006' => 'star-o',
807
+ '\f1b6' => 'steam',
808
+ '\f1b7' => 'steam-square',
809
+ '\f048' => 'step-backward',
810
+ '\f051' => 'step-forward',
811
+ '\f0f1' => 'stethoscope',
812
+ '\f04d' => 'stop',
813
+ '\f21d' => 'street-view',
814
+ '\f0cc' => 'strikethrough',
815
+ '\f1a4' => 'stumbleupon',
816
+ '\f1a3' => 'stumbleupon-circle',
817
+ '\f12c' => 'subscript',
818
+ '\f239' => 'subway',
819
+ '\f0f2' => 'suitcase',
820
+ '\f185' => 'sun-o',
821
+ '\f12b' => 'superscript',
822
+ '\f1cd' => 'support',
823
+ '\f0ce' => 'table',
824
+ '\f10a' => 'tablet',
825
+ '\f0e4' => 'tachometer',
826
+ '\f02b' => 'tag',
827
+ '\f02c' => 'tags',
828
+ '\f0ae' => 'tasks',
829
+ '\f1ba' => 'taxi',
830
+ '\f1d5' => 'tencent-weibo',
831
+ '\f120' => 'terminal',
832
+ '\f034' => 'text-height',
833
+ '\f035' => 'text-width',
834
+ '\f00a' => 'th',
835
+ '\f009' => 'th-large',
836
+ '\f00b' => 'th-list',
837
+ '\f08d' => 'thumb-tack',
838
+ '\f165' => 'thumbs-down',
839
+ '\f088' => 'thumbs-o-down',
840
+ '\f087' => 'thumbs-o-up',
841
+ '\f164' => 'thumbs-up',
842
+ '\f145' => 'ticket',
843
+ '\f00d' => 'times',
844
+ '\f057' => 'times-circle',
845
+ '\f05c' => 'times-circle-o',
846
+ '\f043' => 'tint',
847
+ '\f150' => 'toggle-down',
848
+ '\f191' => 'toggle-left',
849
+ '\f204' => 'toggle-off',
850
+ '\f205' => 'toggle-on',
851
+ '\f152' => 'toggle-right',
852
+ '\f151' => 'toggle-up',
853
+ '\f238' => 'train',
854
+ '\f224' => 'transgender',
855
+ '\f225' => 'transgender-alt',
856
+ '\f1f8' => 'trash',
857
+ '\f014' => 'trash-o',
858
+ '\f1bb' => 'tree',
859
+ '\f181' => 'trello',
860
+ '\f091' => 'trophy',
861
+ '\f0d1' => 'truck',
862
+ '\f1e4' => 'tty',
863
+ '\f173' => 'tumblr',
864
+ '\f174' => 'tumblr-square',
865
+ '\f195' => 'turkish-lira',
866
+ '\f1e8' => 'twitch',
867
+ '\f099' => 'twitter',
868
+ '\f081' => 'twitter-square',
869
+ '\f0e9' => 'umbrella',
870
+ '\f0cd' => 'underline',
871
+ '\f0e2' => 'undo',
872
+ '\f19c' => 'university',
873
+ '\f127' => 'unlink',
874
+ '\f09c' => 'unlock',
875
+ '\f13e' => 'unlock-alt',
876
+ '\f0dc' => 'unsorted',
877
+ '\f093' => 'upload',
878
+ '\f155' => 'usd',
879
+ '\f007' => 'user',
880
+ '\f0f0' => 'user-md',
881
+ '\f234' => 'user-plus',
882
+ '\f21b' => 'user-secret',
883
+ '\f235' => 'user-times',
884
+ '\f0c0' => 'users',
885
+ '\f221' => 'venus',
886
+ '\f226' => 'venus-double',
887
+ '\f228' => 'venus-mars',
888
+ '\f237' => 'viacoin',
889
+ '\f03d' => 'video-camera',
890
+ '\f194' => 'vimeo-square',
891
+ '\f1ca' => 'vine',
892
+ '\f189' => 'vk',
893
+ '\f027' => 'volume-down',
894
+ '\f026' => 'volume-off',
895
+ '\f028' => 'volume-up',
896
+ '\f071' => 'warning',
897
+ '\f18a' => 'weibo',
898
+ '\f1d7' => 'weixin',
899
+ '\f232' => 'whatsapp',
900
+ '\f193' => 'wheelchair',
901
+ '\f1eb' => 'wifi',
902
+ '\f17a' => 'windows',
903
+ '\f159' => 'won',
904
+ '\f19a' => 'wordpress',
905
+ '\f0ad' => 'wrench',
906
+ '\f168' => 'xing',
907
+ '\f169' => 'xing-square',
908
+ '\f19e' => 'yahoo',
909
+ '\f1e9' => 'yelp',
910
+ '\f157' => 'yen',
911
+ '\f167' => 'youtube',
912
+ '\f16a' => 'youtube-play',
913
+ '\f166' => 'youtube-square',
914
+ ),
915
+ 'awesome_icons_socials' => array(
916
+ 'f170' => 'adn',
917
+ 'f17b' => 'android',
918
+ 'f179' => 'apple',
919
+ 'f171' => 'bitbucket-square',
920
+ 'f02e' => 'bookmark',
921
+ 'f097' => 'bookmark-o',
922
+ 'f15a' => 'btc',
923
+ 'f13c' => 'css3',
924
+ 'f17d' => 'dribble',
925
+ 'f16b' => 'dropbox',
926
+ 'f09a' => 'facebook',
927
+ 'f082' => 'facebook-square',
928
+ 'f16e' => 'flickr',
929
+ 'f180' => 'foursquare',
930
+ 'f09b' => 'github',
931
+ 'f113' => 'github-alt',
932
+ 'f092' => 'github-square',
933
+ 'f184' => 'gittip',
934
+ 'f0d5' => 'google-plus',
935
+ 'f0d4' => 'google-plus-square',
936
+ 'f13b' => 'html5',
937
+ 'f16d' => 'instagram',
938
+ 'f0e1' => 'linkedin',
939
+ 'f08c' => 'linkedin-square',
940
+ 'f17c' => 'Linux',
941
+ 'f136' => 'maxcdn',
942
+ 'f18c' => 'pagelines',
943
+ 'f0d2' => 'pinterest',
944
+ 'f0d3' => 'pinterest-square',
945
+ 'f18b' => 'renren',
946
+ 'f09e' => 'rss',
947
+ 'f17e' => 'skype',
948
+ 'f18d' => 'stack-exchange',
949
+ 'f16c' => 'stack-overflow',
950
+ 'f181' => 'trello',
951
+ 'f173' => 'tumblr',
952
+ 'f174' => 'Tumblr Square',
953
+ 'f099' => 'twitter',
954
+ 'f081' => 'twitter-square',
955
+ 'f194' => 'vimeo-square',
956
+ 'f189' => 'vk',
957
+ 'f18a' => 'weibo',
958
+ 'f17a' => 'windows',
959
+ 'f168' => 'xing',
960
+ 'f169' => 'xing-square',
961
+ 'f167' => 'youtube',
962
+ ),
963
+ 'header_backgrounds' => array(),
964
+ 'body_backgrounds' => array(),
965
+ // Tags used in theme options (e.g. %tag%) to have some common information.
966
+ 'tag' => array(), // Example: 'themeurl' => get_template_directory_uri().
967
+ 'cycle_fx' => array(
968
+ 'blindX' => 'blindX',
969
+ 'blindY' => 'blindY',
970
+ 'blindZ' => 'blindZ',
971
+ 'cover' => 'cover',
972
+ 'curtainX' => 'curtainX',
973
+ 'curtainY' => 'curtainY',
974
+ 'fade' => 'fade',
975
+ 'fadeZoom' => 'fadeZoom',
976
+ 'growX' => 'growX',
977
+ 'growY' => 'growY',
978
+ 'scrollUp' => 'scrollUp',
979
+ 'scrollDown' => 'scrollDown',
980
+ 'scrollLeft' => 'scrollLeft',
981
+ 'scrollRight' => 'scrollRight',
982
+ 'scrollHorz' => 'scrollHorz',
983
+ 'shuffle' => 'shuffle',
984
+ 'slideX' => 'slideX',
985
+ 'slideY' => 'slideY',
986
+ 'toss' => 'toss',
987
+ 'turnUp' => 'turnUp',
988
+ 'turnLeft' => 'turnLeft',
989
+ 'turnRight' => 'turnRight',
990
+ 'uncover' => 'uncover',
991
+ 'wipe' => 'wipe',
992
+ 'zoom' => 'zoom',
993
+ 'none' => 'none',
994
+ 'turnDown' => 'turnDown',
995
+ 'scrollVert' => 'scrollVert',
996
+ ),
997
+ 'animate' => array(
998
+ '' => 'none',
999
+ 'bounce' => 'bounce',
1000
+ 'flash' => 'flash',
1001
+ 'pulse' => 'pulse',
1002
+ 'shake' => 'shake',
1003
+ 'swing' => 'swing',
1004
+ 'tada' => 'tada',
1005
+ 'wobble' => 'wobble',
1006
+ 'bounceIn' => 'bounceIn',
1007
+ 'bounceInDown' => 'bounceInDown',
1008
+ 'bounceInLeft' => 'bounceInLeft',
1009
+ 'bounceInRight' => 'bounceInRight',
1010
+ 'bounceInUp' => 'bounceInUp',
1011
+ 'fadeIn' => 'fadeIn',
1012
+ 'fadeInDown' => 'fadeInDown',
1013
+ 'fadeInDownBig' => 'fadeInDownBig',
1014
+ 'fadeInLeft' => 'fadeInLeft',
1015
+ 'fadeInLeftBig' => 'fadeInLeftBig',
1016
+ 'fadeInRight' => 'fadeInRight',
1017
+ 'fadeInRightBig' => 'fadeInRightBig',
1018
+ 'fadeInUp' => 'fadeInUp',
1019
+ 'fadeInUpBig' => 'fadeInUpBig',
1020
+ 'flip' => 'flip',
1021
+ 'flipInX' => 'flipInX',
1022
+ 'flipInY' => 'flipInY',
1023
+ 'lightSpeedIn' => 'lightSpeedIn',
1024
+ 'rotateIn' => 'rotateIn',
1025
+ 'rotateInDownLeft' => 'rotateInDownLeft',
1026
+ 'rotateInDownRight' => 'rotateInDownRight',
1027
+ 'rotateInUpLeft' => 'rotateInUpLeft',
1028
+ 'rotateInUpRight' => 'rotateInUpRight',
1029
+ 'rollIn' => 'rollIn',
1030
+ ),
1031
+ 'easings' => array(
1032
+ false => 'none',
1033
+ 'easeInQuad' => 'easeInQuad',
1034
+ 'easeOutQuad' => 'easeOutQuad',
1035
+ 'easeInOutQuad' => 'easeInOutQuad',
1036
+ 'easeInCubic' => 'easeInCubic',
1037
+ 'easeOutCubic' => 'easeOutCubic',
1038
+ 'easeInOutCubic' => 'easeInOutCubic',
1039
+ 'easeInQuart' => 'easeInQuart',
1040
+ 'easeOutQuart' => 'easeOutQuart',
1041
+ 'easeInOutQuart' => 'easeInOutQuart',
1042
+ 'easeInQuint' => 'easeInQuint',
1043
+ 'easeOutQuint' => 'easeOutQuint',
1044
+ 'easeInOutQuint' => 'easeInOutQuint',
1045
+ 'easeInSine' => 'easeInSine',
1046
+ 'easeOutSine' => 'easeOutSine',
1047
+ 'easeInOutSine' => 'easeInOutSine',
1048
+ 'easeInExpo' => 'easeInExpo',
1049
+ 'easeOutExpo' => 'easeOutExpo',
1050
+ 'easeInOutExpo' => 'easeInOutExpo',
1051
+ 'easeInCirc' => 'easeInCirc',
1052
+ 'easeOutCirc' => 'easeOutCirc',
1053
+ 'easeInOutCirc' => 'easeInOutCirc',
1054
+ 'easeInElastic' => 'easeInElastic',
1055
+ 'easeOutElastic' => 'easeOutElastic',
1056
+ 'easeInOutElastic' => 'easeInOutElastic',
1057
+ 'easeInBack' => 'easeInBack',
1058
+ 'easeOutBack' => 'easeOutBack',
1059
+ 'easeInOutBack' => 'easeInOutBack',
1060
+ 'easeInBounce' => 'easeInBounce',
1061
+ 'easeOutBounce' => 'easeOutBounce',
1062
+ 'easeInOutBounce' => 'easeInOutBounce',
1063
+ ),
1064
+ );
1065
+
1066
+ /**
1067
+ * Get configuration array
1068
+ *
1069
+ * @return array
1070
+ */
1071
+ public static function load() {
1072
+ self::load_theme_info();
1073
+
1074
+ return self::$config;
1075
+ }
1076
+
1077
+ /**
1078
+ * Return theme data
1079
+ * First the method checks if the wp_get_theme() function exists (WP 3.4.0 at least).
1080
+ * If not, the method calls the deprecated function get_template_directory()
1081
+ */
1082
+ protected static function load_theme_info() {
1083
+ $theme = wp_get_theme();
1084
+
1085
+ self::$config['theme'] = array(
1086
+ 'name' => $theme['Name'],
1087
+ 'description' => $theme['Description'],
1088
+ 'author' => $theme['Author'],
1089
+ 'authoruri' => $theme['Author URI'],
1090
+ 'version' => $theme['Version'],
1091
+ 'template' => $theme['Template'],
1092
+ 'status' => $theme['Status'],
1093
+ 'tags' => $theme['Tags'],
1094
+ );
1095
+ }
1096
+
1097
+ /**
1098
+ * Init.
1099
+ */
1100
+ public function init() {
1101
+ self::$config['header_backgrounds'] = apply_filters( 'yit_header_backgrounds', self::$config['header_backgrounds'] );
1102
+ self::$config['body_backgrounds'] = apply_filters( 'yit_body_backgrounds', self::$config['body_backgrounds'] );
1103
+ }
1104
+
1105
+ /**
1106
+ * Return the font awesome array icon
1107
+ *
1108
+ * @return array
1109
+ */
1110
+ public static function get_awesome_icons() {
1111
+ return self::$config['awesome_icons'];
1112
+ }
1113
+
1114
+ /**
1115
+ * Return the font awesome array socials icon
1116
+ *
1117
+ * @return array
1118
+ */
1119
+ public static function get_awesome_icons_socials() {
1120
+ return self::$config['awesome_icons_socials'];
1121
+ }
1122
+
1123
+
1124
+ /**
1125
+ * Return the list of icons
1126
+ *
1127
+ * @return array
1128
+ */
1129
+ public static function get_icon_list() {
1130
+
1131
+ $standard_icon_list = array(
1132
+ 'FontAwesome' => self::$config['awesome_icons2'],
1133
+ );
1134
+
1135
+ return apply_filters( 'yit_icon_list', $standard_icon_list );
1136
+ }
1137
+
1138
+ /**
1139
+ * Return the data of icon
1140
+ *
1141
+ * @param string $icon The icon.
1142
+ *
1143
+ * @return string
1144
+ */
1145
+ public static function get_icon( $icon ) {
1146
+
1147
+ $icon_list = self::get_icon_list();
1148
+ $icon_data = '';
1149
+ if ( ! ! $icon ) {
1150
+ $ic = explode( ':', $icon );
1151
+ $icon_code = array_search( $ic[1], $icon_list[ $ic[0] ], true );
1152
+
1153
+ if ( $icon_code ) {
1154
+ $icon_code = ( strpos( $icon_code, '\\' ) === 0 ) ? '&#x' . substr( $icon_code, 1 ) . ';' : $icon_code;
1155
+ }
1156
+
1157
+ $icon_data = 'data-font="' . $ic[0] . '" data-key="' . $ic[1] . '" data-icon="' . $icon_code . '"';
1158
+ }
1159
+
1160
+ return $icon_data;
1161
+ }
1162
+
1163
+ /**
1164
+ * Return the code of the relative awesome class name
1165
+ *
1166
+ * @param string $icon_key The icon key.
1167
+ *
1168
+ * @return string
1169
+ */
1170
+ public static function get_awesome_icons_code_by_value( $icon_key ) {
1171
+ $awesome_icons = self::$config['awesome_icons'];
1172
+ foreach ( $awesome_icons as $code => $key ) {
1173
+ if ( $icon_key === $key ) {
1174
+ return $code;
1175
+ }
1176
+ }
1177
+
1178
+ return '';
1179
+ }
1180
+ }
1181
+ }
plugin-fw/includes/class-yit-plugin-licence.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Plugin License Class.
4
+ *
5
+ * @class YIT_Plugin_Licence
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
12
+ /**
13
+ * YIT_Plugin_Licence class.
14
+ * Set page to manage products.
15
+ *
16
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
17
+ */
18
+ class YIT_Plugin_Licence {
19
+ /**
20
+ * The single instance of the class.
21
+ *
22
+ * @var YIT_Plugin_Licence
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Singleton implementation.
28
+ *
29
+ * @return YIT_Plugin_Licence
30
+ */
31
+ public static function instance() {
32
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
33
+ }
34
+
35
+ /**
36
+ * YIT_Plugin_Licence constructor.
37
+ */
38
+ private function __construct() {
39
+ // Silence is golden.
40
+ }
41
+
42
+ /**
43
+ * Premium products registration
44
+ *
45
+ * @param string $init The product identifier.
46
+ * @param string $secret_key The secret key.
47
+ * @param string $product_id The product id.
48
+ *
49
+ * @return void
50
+ */
51
+ public function register( $init, $secret_key, $product_id ) {
52
+ if ( ! function_exists( 'YITH_Plugin_Licence' ) ) {
53
+ // Try to load YITH_Plugin_Licence class.
54
+ yith_plugin_fw_load_update_and_licence_files();
55
+ }
56
+
57
+ if ( function_exists( 'YITH_Plugin_Licence' ) && is_callable( array( YITH_Plugin_Licence(), 'register' ) ) ) {
58
+ YITH_Plugin_Licence()->register( $init, $secret_key, $product_id );
59
+ }
60
+ }
61
+
62
+ /**
63
+ * Get license activation URL
64
+ *
65
+ * @param string $plugin_slug The plugin slug.
66
+ *
67
+ * @return string|false
68
+ * @since 3.0.17
69
+ */
70
+ public static function get_license_activation_url( $plugin_slug = '' ) {
71
+ return function_exists( 'YITH_Plugin_Licence' ) ? YITH_Plugin_Licence()->get_license_activation_url( $plugin_slug ) : false;
72
+ }
73
+
74
+ /**
75
+ * Retrieve the products
76
+ *
77
+ * @return array
78
+ */
79
+ public function get_products() {
80
+ return function_exists( 'YITH_Plugin_Licence' ) ? YITH_Plugin_Licence()->get_products() : array();
81
+ }
82
+ }
83
+ }
84
+
85
+ if ( ! function_exists( 'YIT_Plugin_Licence' ) ) {
86
+ /**
87
+ * Single instance of YIT_Plugin_Licence
88
+ *
89
+ * @return YIT_Plugin_Licence
90
+ */
91
+ function YIT_Plugin_Licence() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
92
+ return YIT_Plugin_Licence::instance();
93
+ }
94
+ }
plugin-fw/includes/class-yit-plugin-panel-woocommerce.php ADDED
@@ -0,0 +1,754 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Plugin Panel WooCommerce Class.
4
+ *
5
+ * @class YIT_Plugin_Panel_WooCommerce
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
12
+ /**
13
+ * YIT_Plugin_Panel_WooCommerce class.
14
+ *
15
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
16
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
17
+ */
18
+ class YIT_Plugin_Panel_WooCommerce extends YIT_Plugin_Panel {
19
+ /**
20
+ * Version of the class.
21
+ *
22
+ * @var string
23
+ */
24
+ public $version = '1.0.0';
25
+
26
+ /**
27
+ * List of settings parameters.
28
+ *
29
+ * @var array
30
+ */
31
+ public $settings = array();
32
+
33
+ /**
34
+ * WooCommerce types.
35
+ *
36
+ * @var array
37
+ */
38
+ public static $wc_type = array( 'checkbox', 'textarea', 'multiselect', 'multi_select_countries', 'image_width' );
39
+
40
+ /**
41
+ * Body class.
42
+ *
43
+ * @var string
44
+ */
45
+ public static $body_class = ' yith-plugin-fw-panel ';
46
+
47
+
48
+ /**
49
+ * Tab Path Files.
50
+ *
51
+ * @var array
52
+ */
53
+ protected $tabs_path_files;
54
+
55
+ /**
56
+ * Are the actions initialized?
57
+ *
58
+ * @var bool
59
+ */
60
+ protected static $actions_initialized = false;
61
+
62
+ /**
63
+ * YIT_Plugin_Panel_WooCommerce constructor.
64
+ *
65
+ * @param array $args The panel arguments.
66
+ */
67
+ public function __construct( $args = array() ) {
68
+ $args = apply_filters( 'yit_plugin_fw_wc_panel_option_args', $args );
69
+ if ( ! empty( $args ) ) {
70
+ if ( isset( $args['parent_page'] ) && 'yit_plugin_panel' === $args['parent_page'] ) {
71
+ $args['parent_page'] = 'yith_plugin_panel';
72
+ }
73
+
74
+ $this->settings = $args;
75
+ $this->tabs_path_files = $this->get_tabs_path_files();
76
+
77
+ if ( isset( $this->settings['create_menu_page'] ) && $this->settings['create_menu_page'] ) {
78
+ $this->add_menu_page();
79
+ }
80
+
81
+ if ( ! empty( $this->settings['links'] ) ) {
82
+ $this->links = $this->settings['links'];
83
+ }
84
+
85
+ add_action( 'admin_init', array( $this, 'set_default_options' ) );
86
+ add_action( 'admin_menu', array( $this, 'add_setting_page' ) );
87
+ add_action( 'admin_menu', array( $this, 'add_premium_version_upgrade_to_menu' ), 100 );
88
+ add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
89
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
90
+ add_action( 'admin_init', array( $this, 'woocommerce_update_options' ) );
91
+ add_filter( 'woocommerce_screen_ids', array( $this, 'add_allowed_screen_id' ) );
92
+
93
+ add_filter( 'woocommerce_admin_settings_sanitize_option', array( $this, 'maybe_unserialize_panel_data' ), 10, 3 );
94
+
95
+ add_action( 'yith_plugin_fw_get_field_after', array( $this, 'add_yith_ui' ) );
96
+ add_action( 'yith_plugin_fw_before_woocommerce_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
97
+ add_action( 'admin_action_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
98
+ add_filter( 'woocommerce_admin_settings_sanitize_option', array( $this, 'sanitize_onoff_value' ), 20, 3 );
99
+
100
+ add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
101
+ add_action( 'admin_init', array( $this, 'maybe_redirect_to_proper_wp_page' ) );
102
+
103
+ // Init actions once to prevent multiple initialization.
104
+ static::init_actions();
105
+ }
106
+ }
107
+
108
+ /**
109
+ * Init actions.
110
+ *
111
+ * @since 3.0.0
112
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
113
+ */
114
+ protected static function init_actions() {
115
+ if ( ! static::$actions_initialized ) {
116
+ add_action( 'woocommerce_admin_field_boxinfo', array( __CLASS__, 'add_infobox' ), 10, 1 );
117
+ add_action( 'woocommerce_admin_field_yith-field', array( __CLASS__, 'add_yith_field' ), 10, 1 );
118
+ add_filter( 'admin_body_class', array( __CLASS__, 'admin_body_class' ) );
119
+
120
+ add_filter( 'woocommerce_admin_settings_sanitize_option', array( __CLASS__, 'sanitize_option' ), 10, 3 );
121
+
122
+ // Sort plugins by name in YITH Plugins menu.
123
+ add_action( 'admin_menu', array( __CLASS__, 'sort_plugins' ), 90 );
124
+
125
+ add_filter( 'add_menu_classes', array( __CLASS__, 'add_menu_class_in_yith_plugin' ) );
126
+
127
+ static::$actions_initialized = true;
128
+ }
129
+ }
130
+
131
+ /**
132
+ * Show a tabbed panel to setting page
133
+ * a callback function called by add_setting_page => add_submenu_page
134
+ *
135
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
136
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
137
+ */
138
+ public function yit_panel() {
139
+ $additional_info = array(
140
+ 'current_tab' => $this->get_current_tab(),
141
+ 'current_sub_tab' => $this->get_current_sub_tab(),
142
+ 'available_tabs' => $this->settings['admin-tabs'],
143
+ 'default_tab' => $this->get_available_tabs( true ),
144
+ 'page' => $this->settings['page'],
145
+ 'wrap_class' => isset( $this->settings['class'] ) ? $this->settings['class'] : '',
146
+ );
147
+
148
+ $additional_info = apply_filters( 'yith_admin_tab_params', $additional_info );
149
+ $additional_info['additional_info'] = $additional_info;
150
+
151
+ extract( $additional_info ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
152
+ require YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-panel.php';
153
+ }
154
+
155
+ /**
156
+ * Show a input fields to upload images
157
+ *
158
+ * @param string $option_value The option value.
159
+ *
160
+ * @return string
161
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
162
+ */
163
+ public function yit_upload_update( $option_value ) {
164
+ return $option_value;
165
+ }
166
+
167
+ /**
168
+ * Show a input fields to upload images
169
+ *
170
+ * @param array $args The arguments.
171
+ *
172
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
173
+ */
174
+ public function yit_upload( $args = array() ) {
175
+ if ( ! empty( $args ) ) {
176
+ $args['value'] = ( get_option( $args['id'] ) ) ? get_option( $args['id'] ) : $args['default'];
177
+ extract( $args ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
178
+
179
+ include YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-upload.php';
180
+ }
181
+ }
182
+
183
+ /**
184
+ * Add the plugin woocommerce page settings in the screen ids of woocommerce
185
+ *
186
+ * @param array $screen_ids Screen IDs.
187
+ *
188
+ * @return array
189
+ * @author Antonino Scarfì <antonino.scarfi@yithemes.com>
190
+ */
191
+ public function add_allowed_screen_id( $screen_ids ) {
192
+ global $admin_page_hooks;
193
+
194
+ if ( ! isset( $admin_page_hooks[ $this->settings['parent_page'] ] ) ) {
195
+ return $screen_ids;
196
+ }
197
+
198
+ $screen_ids[] = $admin_page_hooks[ $this->settings['parent_page'] ] . '_page_' . $this->settings['page'];
199
+
200
+ return $screen_ids;
201
+ }
202
+
203
+ /**
204
+ * Returns current active tab slug
205
+ *
206
+ * @return string
207
+ * @since 2.0.0
208
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
209
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
210
+ */
211
+ public function get_current_tab() {
212
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
213
+ global $pagenow;
214
+ $tabs = $this->get_available_tabs();
215
+ $tab = $tabs[0];
216
+
217
+ if ( 'admin.php' === $pagenow && isset( $_REQUEST['tab'] ) && in_array( $_REQUEST['tab'], $tabs, true ) ) {
218
+ $tab = sanitize_key( wp_unslash( $_REQUEST['tab'] ) );
219
+ }
220
+
221
+ return apply_filters( 'yith_wc_plugin_panel_current_tab', $tab );
222
+ // phpcs:enable
223
+ }
224
+
225
+ /**
226
+ * Return available tabs
227
+ * read all options and show sections and fields
228
+ *
229
+ * @param bool $default false for all tabs slug, true for current tab.
230
+ *
231
+ * @return mixed Array tabs | String current tab
232
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
233
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
234
+ */
235
+ public function get_available_tabs( $default = false ) {
236
+ $tabs = array_keys( $this->settings['admin-tabs'] );
237
+
238
+ return $default ? $tabs[0] : $tabs;
239
+ }
240
+
241
+
242
+ /**
243
+ * Add sections and fields to setting panel
244
+ * read all options and show sections and fields
245
+ *
246
+ * @return void
247
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
248
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
249
+ */
250
+ public function add_fields() {
251
+ $yit_options = $this->get_main_array_options();
252
+ $option_key = $this->get_current_option_key();
253
+
254
+ if ( ! $option_key ) {
255
+ return;
256
+ }
257
+
258
+ woocommerce_admin_fields( $yit_options[ $option_key ] );
259
+ }
260
+
261
+ /**
262
+ * Print the panel content
263
+ * check if the tab is a wc options tab or custom tab and print the content
264
+ *
265
+ * @return void
266
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
267
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
268
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
269
+ */
270
+ public function print_panel_content() {
271
+ $yit_options = $this->get_main_array_options();
272
+ $page = $this->settings['page'];
273
+ $option_key = $this->get_current_option_key();
274
+ $custom_tab_options = $this->get_custom_tab_options( $yit_options, $option_key );
275
+
276
+ $this->print_tabs_nav();
277
+
278
+ if ( $custom_tab_options ) {
279
+ $this->print_custom_tab( $custom_tab_options );
280
+ } else {
281
+ include YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-form.php';
282
+ }
283
+ }
284
+
285
+ /**
286
+ * Update options
287
+ *
288
+ * @return void
289
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
290
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
291
+ * @see woocommerce_update_options function
292
+ * @internal fire two action (before and after update): yit_panel_wc_before_update and yit_panel_wc_after_update
293
+ */
294
+ public function woocommerce_update_options() {
295
+
296
+ if ( isset( $_POST['yit_panel_wc_options_nonce'] ) && wp_verify_nonce( sanitize_key( wp_unslash( $_POST['yit_panel_wc_options_nonce'] ) ), 'yit_panel_wc_options_' . $this->settings['page'] ) ) {
297
+
298
+ do_action( 'yit_panel_wc_before_update' );
299
+
300
+ $yit_options = $this->get_main_array_options();
301
+ $option_key = $this->get_current_option_key();
302
+ $yit_options = $this->check_for_save_single_option( $yit_options );
303
+
304
+ if ( version_compare( WC()->version, '2.4.0', '>=' ) ) {
305
+ if ( ! empty( $yit_options[ $option_key ] ) ) {
306
+ foreach ( $yit_options[ $option_key ] as $option ) {
307
+ if ( isset( $option['id'] ) && isset( $_POST[ $option['id'] ], $option['type'] ) && ! in_array( $option['type'], self::$wc_type, true ) ) {
308
+ $_POST[ $option['id'] ] = maybe_serialize( $_POST[ $option['id'] ] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
309
+ }
310
+ }
311
+ }
312
+ }
313
+
314
+ foreach ( $_POST as $name => $value ) {
315
+ // Check if current POST var name ends with a specific needle and make some stuff here.
316
+ $attachment_id_needle = '-yith-attachment-id';
317
+ $pos = strlen( $name ) - strlen( $attachment_id_needle );
318
+ $is_hidden_input = $pos >= 0 && strpos( $name, $attachment_id_needle, $pos ) !== false;
319
+ if ( $is_hidden_input ) {
320
+ // Is an input element of type "hidden" coupled with an input element for selecting an element from the media gallery.
321
+ $yit_options[ $option_key ][ $name ] = array(
322
+ 'type' => 'text',
323
+ 'id' => $name,
324
+ );
325
+ }
326
+ }
327
+
328
+ woocommerce_update_options( $yit_options[ $option_key ] );
329
+
330
+ do_action( 'yit_panel_wc_after_update' );
331
+
332
+ } elseif (
333
+ isset( $_REQUEST['yit-action'] ) && 'wc-options-reset' === sanitize_key( wp_unslash( $_REQUEST['yit-action'] ) )
334
+ &&
335
+ isset( $_POST['yith_wc_reset_options_nonce'] ) && wp_verify_nonce( sanitize_key( wp_unslash( $_POST['yith_wc_reset_options_nonce'] ) ), 'yith_wc_reset_options_' . $this->settings['page'] )
336
+ ) {
337
+
338
+ do_action( 'yit_panel_wc_before_reset' );
339
+
340
+ $yit_options = $this->get_main_array_options();
341
+ $option_key = $this->get_current_option_key();
342
+ $yit_options = $this->check_for_save_single_option( $yit_options );
343
+
344
+ // Collect an array of options to be saved as array and not as single option.
345
+ $array_options = array();
346
+
347
+ foreach ( $yit_options[ $option_key ] as $id => $option ) {
348
+ // Make sure option id is not an array.
349
+ $matches = array();
350
+ isset( $option['id'] ) && preg_match( '/(.*)\[(.*)\]/', $option['id'], $matches );
351
+
352
+ if ( ! empty( $matches ) && isset( $option['default'] ) ) {
353
+ if ( ! empty( $matches[2] ) ) {
354
+ $array_options[ $matches[1] ][ $matches[2] ] = $option['default'];
355
+ } else {
356
+ $array_options[ $matches[1] ][] = $option['default'];
357
+ }
358
+ } else {
359
+ if ( isset( $option['yith-type'] ) && 'multi-colorpicker' === $option['yith-type'] && ! empty( $option['colorpickers'] ) ) {
360
+ $default = array();
361
+ foreach ( $option['colorpickers'] as $colorpicker ) {
362
+ $default[ $colorpicker['id'] ] = isset( $colorpicker['default'] ) ? $colorpicker['default'] : '';
363
+ }
364
+ update_option( $option['id'], $default );
365
+ } elseif ( isset( $option['default'] ) ) {
366
+ update_option( $option['id'], $option['default'] );
367
+ }
368
+ }
369
+ }
370
+
371
+ // Save array options if any.
372
+ foreach ( $array_options as $key => $value ) {
373
+ update_option( $key, $value );
374
+ }
375
+
376
+ do_action( 'yit_panel_wc_after_reset' );
377
+ }
378
+ }
379
+
380
+ /**
381
+ * Add Admin WC Style and Scripts
382
+ *
383
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
384
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
385
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
386
+ */
387
+ public function admin_enqueue_scripts() {
388
+ global $woocommerce, $pagenow;
389
+
390
+ if ( 'customize.php' !== $pagenow ) {
391
+ wp_enqueue_style( 'wp-jquery-ui-dialog' );
392
+ }
393
+
394
+ $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
395
+ $assets_screen_ids = (array) apply_filters( 'yith_plugin_fw_wc_panel_screen_ids_for_assets', array() );
396
+
397
+ if ( $screen && ( 'admin.php' === $pagenow && strpos( $screen->id, $this->settings['page'] ) !== false ) || in_array( $screen->id, $assets_screen_ids, true ) ) {
398
+ $woocommerce_version = function_exists( 'WC' ) ? WC()->version : $woocommerce->version;
399
+ $woocommerce_settings_deps = array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'iris' );
400
+
401
+ if ( version_compare( '2.5', $woocommerce_version, '<=' ) ) {
402
+ $woocommerce_settings_deps[] = 'select2';
403
+ } else {
404
+ $woocommerce_settings_deps[] = 'jquery-ui-dialog';
405
+ $woocommerce_settings_deps[] = 'chosen';
406
+ }
407
+
408
+ wp_enqueue_media();
409
+
410
+ wp_enqueue_style( 'yith-plugin-fw-fields' );
411
+ wp_enqueue_style( 'woocommerce_admin_styles' );
412
+ wp_enqueue_style( 'raleway-font' );
413
+
414
+ wp_enqueue_script( 'woocommerce_settings', $woocommerce->plugin_url() . '/assets/js/admin/settings.min.js', $woocommerce_settings_deps, $woocommerce_version, true );
415
+ wp_localize_script(
416
+ 'woocommerce_settings',
417
+ 'woocommerce_settings_params',
418
+ array(
419
+ 'i18n_nav_warning' => __( 'The changes you have made will be lost if you leave this page.', 'yith-plugin-fw' ),
420
+ )
421
+ );
422
+ wp_enqueue_script( 'yith-plugin-fw-fields' );
423
+ }
424
+
425
+ if ( $screen && ( 'admin.php' === $pagenow && yith_plugin_fw_is_panel() ) || in_array( $screen->id, $assets_screen_ids, true ) ) {
426
+ wp_enqueue_media();
427
+ wp_enqueue_style( 'yit-plugin-style' );
428
+ wp_enqueue_script( 'yit-plugin-panel' );
429
+ }
430
+
431
+ if ( $screen && 'admin.php' === $pagenow && strpos( $screen->id, 'yith_upgrade_premium_version' ) !== false ) {
432
+ wp_enqueue_style( 'yit-upgrade-to-pro' );
433
+ wp_enqueue_script( 'colorbox' );
434
+ }
435
+ }
436
+
437
+ /**
438
+ * Default options
439
+ * Sets up the default options used on the settings page
440
+ */
441
+ public function set_default_options() {
442
+ // Check if the default options for this panel are already set.
443
+ $page = $this->settings['page'];
444
+ $default_options_set = get_option( 'yit_plugin_fw_panel_wc_default_options_set', array() );
445
+ if ( isset( $default_options_set[ $page ] ) && $default_options_set[ $page ] ) {
446
+ return;
447
+ }
448
+
449
+ $default_options = $this->get_main_array_options();
450
+
451
+ foreach ( $default_options as $section ) {
452
+ foreach ( $section as $value ) {
453
+ if ( ( isset( $value['std'] ) || isset( $value['default'] ) ) && isset( $value['id'] ) ) {
454
+ $default_value = ( isset( $value['default'] ) ) ? $value['default'] : $value['std'];
455
+
456
+ if ( 'image_width' === $value['type'] ) {
457
+ add_option( $value['id'] . '_width', $default_value );
458
+ add_option( $value['id'] . '_height', $default_value );
459
+ } else {
460
+ add_option( $value['id'], $default_value );
461
+ }
462
+ }
463
+ }
464
+ }
465
+
466
+ // Set the flag for the default options of this panel.
467
+ $default_options_set[ $page ] = true;
468
+ update_option( 'yit_plugin_fw_panel_wc_default_options_set', $default_options_set );
469
+ }
470
+
471
+ /**
472
+ * Delete the "default options added" option
473
+ *
474
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
475
+ */
476
+ public static function delete_default_options_set_option() {
477
+ delete_option( 'yit_plugin_fw_panel_wc_default_options_set' );
478
+ }
479
+
480
+ /**
481
+ * Add the WooCommerce body class in plugin panel page
482
+ *
483
+ * @param string $admin_body_classes The body classes.
484
+ *
485
+ * @return string Filtered body classes
486
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
487
+ * @since 2.0
488
+ */
489
+ public static function admin_body_class( $admin_body_classes ) {
490
+ global $pagenow;
491
+
492
+ $assets_screen_ids = (array) apply_filters( 'yith_plugin_fw_wc_panel_screen_ids_for_assets', array() );
493
+
494
+ if ( ( 'admin.php' === $pagenow && ( strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false || in_array( get_current_screen()->id, $assets_screen_ids, true ) ) ) ) {
495
+ $admin_body_classes = ! substr_count( $admin_body_classes, self::$body_class ) ? $admin_body_classes . self::$body_class : $admin_body_classes;
496
+ $admin_body_classes = ! substr_count( $admin_body_classes, 'woocommerce' ) ? $admin_body_classes . ' woocommerce ' : $admin_body_classes;
497
+ }
498
+
499
+ return $admin_body_classes;
500
+ }
501
+
502
+ /**
503
+ * Maybe unserialize panel data
504
+ *
505
+ * @param mixed $value Option value.
506
+ * @param mixed $option Option settings array.
507
+ * @param string $raw_value Raw option value.
508
+ *
509
+ * @return mixed Filtered return value
510
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
511
+ * @since 2.0
512
+ */
513
+ public function maybe_unserialize_panel_data( $value, $option, $raw_value ) {
514
+ if ( ! version_compare( WC()->version, '2.4.0', '>=' ) || ! isset( $option['type'] ) || in_array( $option['type'], self::$wc_type, true ) ) {
515
+ return $value;
516
+ }
517
+
518
+ $yit_options = $this->get_main_array_options();
519
+ $option_key = $this->get_current_option_key();
520
+
521
+ if ( ! empty( $yit_options[ $option_key ] ) ) {
522
+ foreach ( $yit_options[ $option_key ] as $option_array ) {
523
+ if ( isset( $option_array['id'] ) && isset( $option['id'] ) && $option_array['id'] === $option['id'] ) {
524
+ return maybe_unserialize( $value );
525
+ }
526
+ }
527
+ }
528
+
529
+ return $value;
530
+ }
531
+
532
+ /**
533
+ * Sanitize Option
534
+ *
535
+ * @param mixed $value Option value.
536
+ * @param mixed $option Option settings array.
537
+ * @param string $raw_value Raw option value.
538
+ *
539
+ * @return mixed Filtered return value
540
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
541
+ * @since 3.0.0
542
+ */
543
+ public static function sanitize_option( $value, $option, $raw_value ) {
544
+ if ( isset( $option['type'] ) && 'yith-field' === $option['type'] ) {
545
+ if ( ! empty( $option['multiple'] ) && is_null( $value ) ) {
546
+ $value = array();
547
+ }
548
+
549
+ // Sanitize the option for the checkbox field: 'yes' or 'no'.
550
+ if ( isset( $option['yith-type'] ) && in_array( $option['yith-type'], array( 'checkbox', 'onoff' ), true ) ) {
551
+ $value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
552
+ }
553
+
554
+ if ( isset( $option['yith-type'] ) && 'checkbox-array' === $option['yith-type'] ) {
555
+ $value = maybe_unserialize( $raw_value );
556
+ $value = ! ! $value && is_array( $value ) ? $value : array();
557
+ }
558
+
559
+ if ( isset( $option['yith-type'] ) && in_array( $option['yith-type'], array( 'textarea', 'textarea-editor', 'textarea-codemirror' ), true ) ) {
560
+ $value = $raw_value;
561
+ }
562
+
563
+ // Sanitize the option date-format when the user choose the custom option.
564
+ if ( isset( $option['yith-type'] ) && in_array( $option['yith-type'], array( 'date-format' ), true ) && '\c\u\s\t\o\m' === $raw_value ) {
565
+ $custom = isset( $_REQUEST[ $option['id'] . '_text' ] ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $option['id'] . '_text' ] ) ) : $option['default']; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
566
+ $value = $custom;
567
+ }
568
+
569
+ if ( isset( $option['yith-type'] ) && in_array( $option['yith-type'], array( 'toggle-element' ), true ) ) {
570
+ if ( $value && isset( $option['elements'] ) && ! empty( $option['elements'] ) ) {
571
+ $value = maybe_unserialize( $value );
572
+
573
+ if ( isset( $value['box_id'] ) ) {
574
+ unset( $value['box_id'] );
575
+ }
576
+
577
+ foreach ( $value as $index => $single_toggle ) {
578
+
579
+ if ( $value && isset( $option['onoff_field'] ) && ! empty( $option['onoff_field'] ) ) {
580
+ $onoff = $option['onoff_field'];
581
+ $onoff['type'] = 'yith-field';
582
+ $onoff['yith-type'] = 'onoff';
583
+ $onoff_id = $onoff['id'];
584
+
585
+ $value[ $index ][ $onoff_id ] = isset( $single_toggle[ $onoff_id ] ) ? self::sanitize_option( $single_toggle[ $onoff_id ], $onoff, $single_toggle[ $onoff_id ] ) : 'no';
586
+ }
587
+
588
+ foreach ( $option['elements'] as $element ) {
589
+ $element_value = isset( $value[ $index ][ $element['id'] ] ) ? $value[ $index ][ $element['id'] ] : false;
590
+ $value[ $index ][ $element['id'] ] = self::sanitize_option( $element_value, $element, $element_value );
591
+ }
592
+ }
593
+ }
594
+ }
595
+
596
+ if ( ! empty( $option['yith-sanitize-callback'] ) && is_callable( $option['yith-sanitize-callback'] ) ) {
597
+ $value = call_user_func( $option['yith-sanitize-callback'], $value );
598
+ }
599
+ }
600
+
601
+ return $value;
602
+ }
603
+
604
+ /**
605
+ * Add YITH Fields.
606
+ *
607
+ * @param array $field The field.
608
+ *
609
+ * @return void
610
+ * @since 3.0.0
611
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
612
+ */
613
+ public static function add_yith_field( $field = array() ) {
614
+ if ( ! empty( $field ) && isset( $field['yith-type'] ) ) {
615
+ $field['type'] = $field['yith-type'];
616
+ unset( $field['yith-type'] );
617
+
618
+ $field['id'] = isset( $field['id'] ) ? $field['id'] : '';
619
+ $field['name'] = $field['id'];
620
+ $field['default'] = isset( $field['default'] ) ? $field['default'] : '';
621
+
622
+ $value = apply_filters( 'yith_plugin_fw_wc_panel_pre_field_value', null, $field );
623
+ if ( is_null( $value ) ) {
624
+ if ( 'toggle-element' === $field['type'] || 'toggle-element-fixed' === $field['type'] ) {
625
+ $value = get_option( $field['id'], $field['default'] );
626
+ } else {
627
+ $value = WC_Admin_Settings::get_option( $field['id'], $field['default'] );
628
+ }
629
+ }
630
+ $field['value'] = $value;
631
+
632
+ // Let's filter field data just before print.
633
+ $field = apply_filters( 'yith_plugin_fw_wc_panel_field_data', $field );
634
+
635
+ require YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/woocommerce/woocommerce-option-row.php';
636
+ }
637
+ }
638
+
639
+ /**
640
+ * Save the content of the toggle element present inside the panel.
641
+ * Called by the action 'admin_action_yith_plugin_fw_save_toggle_element'
642
+ * via Ajax
643
+ *
644
+ * @author Emanuela Castorina
645
+ */
646
+ public function save_toggle_element_options() {
647
+
648
+ check_ajax_referer( 'save-toggle-element', 'security' );
649
+
650
+ if ( ! current_user_can( $this->settings['capability'] ) ) {
651
+ wp_die( - 1 );
652
+ }
653
+
654
+ $posted = $_POST;
655
+ $tabs = $this->get_available_tabs();
656
+ $yit_options = $this->get_main_array_options();
657
+ $current_tab = isset( $_REQUEST['tab'] ) ? sanitize_key( wp_unslash( $_REQUEST['tab'] ) ) : false;
658
+ $current_tab = ! ! $current_tab && in_array( $current_tab, $tabs, true ) ? $current_tab : $tabs[0];
659
+ $option_id = isset( $_REQUEST['toggle_id'] ) ? sanitize_key( wp_unslash( $_REQUEST['toggle_id'] ) ) : '';
660
+ $updated = false;
661
+
662
+ if ( ! empty( $yit_options[ $current_tab ] ) && ! empty( $option_id ) ) {
663
+ $tab_options = $yit_options[ $current_tab ];
664
+ foreach ( $tab_options as $key => $item ) {
665
+ if ( ! isset( $item['id'] ) ) {
666
+ unset( $tab_options[ $key ] );
667
+ }
668
+ }
669
+
670
+ $option_array = array_combine( wp_list_pluck( $tab_options, 'id' ), $tab_options );
671
+ if ( isset( $option_array[ $option_id ] ) ) {
672
+ $value = isset( $posted[ $option_id ] ) ? $posted[ $option_id ] : '';
673
+
674
+ // Drag and drop.
675
+ $order_elements = isset( $posted['yith_toggle_elements_order_keys'] ) ? explode( ',', $posted['yith_toggle_elements_order_keys'] ) : false;
676
+ if ( $order_elements ) {
677
+ $i = 0;
678
+ $new_value = array();
679
+ foreach ( $order_elements as $key ) {
680
+ $index = apply_filters( 'yith_toggle_elements_index', $i ++, $key );
681
+ $new_value[ $index ] = $value[ $key ];
682
+ }
683
+
684
+ $value = $new_value;
685
+ }
686
+ $value = self::sanitize_option( $value, $option_array[ $option_id ], $value );
687
+ $updated = update_option( $option_id, $value );
688
+ }
689
+ }
690
+
691
+ return $updated;
692
+ }
693
+
694
+ /**
695
+ * Print tabs navigation.
696
+ *
697
+ * @param array $args The arguments.
698
+ */
699
+ public function print_tabs_nav( $args = array() ) {
700
+ $defaults = array(
701
+ 'premium_class' => 'yith-premium',
702
+ 'parent_page' => '',
703
+ 'wrapper_class' => 'nav-tab-wrapper woo-nav-tab-wrapper',
704
+ );
705
+ $args = wp_parse_args( $args, $defaults );
706
+
707
+ parent::print_tabs_nav( $args );
708
+ }
709
+
710
+ /**
711
+ * Sanitize OnOff Option
712
+ *
713
+ * @param mixed $value Option value.
714
+ * @param mixed $option Option settings array.
715
+ * @param string $raw_value Raw option value.
716
+ *
717
+ * @return mixed Filtered return value
718
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
719
+ * @since 3.0.0
720
+ */
721
+ public static function sanitize_onoff_value( $value, $option, $raw_value ) {
722
+ if ( isset( $option['type'] ) && in_array( $option['type'], array( 'checkbox', 'onoff' ), true ) ) {
723
+ $value = yith_plugin_fw_is_true( $raw_value ) ? 'yes' : 'no';
724
+
725
+ if ( ! empty( $option['yith-sanitize-callback'] ) && is_callable( $option['yith-sanitize-callback'] ) ) {
726
+ $value = call_user_func( $option['yith-sanitize-callback'], $value );
727
+ }
728
+ }
729
+
730
+ return $value;
731
+ }
732
+
733
+ /**
734
+ * Check if need to save the toggle element to a single options instead of an array
735
+ *
736
+ * @param array $yit_options Original options array.
737
+ *
738
+ * @return mixed|array New options array
739
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
740
+ * @since 3.0.0
741
+ */
742
+ public function check_for_save_single_option( $yit_options ) {
743
+ foreach ( $yit_options as $key => $options_list ) {
744
+ foreach ( $options_list as $value ) {
745
+ if ( ! empty( $value['yith-type'] ) && 'toggle-element-fixed' === $value['yith-type'] && isset( $value['save_single_options'] ) && true === $value['save_single_options'] ) {
746
+ $yit_options[ $key ] = array_merge( $yit_options[ $key ], $value['elements'] );
747
+ }
748
+ }
749
+ }
750
+
751
+ return $yit_options;
752
+ }
753
+ }
754
+ }
plugin-fw/includes/class-yit-plugin-panel.php ADDED
@@ -0,0 +1,1547 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Plugin Panel Class.
4
+ *
5
+ * @class YIT_Plugin_Panel
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
12
+ /**
13
+ * Class YIT_Plugin_Panel
14
+ */
15
+ class YIT_Plugin_Panel {
16
+ /**
17
+ * Version of the class.
18
+ *
19
+ * @var string
20
+ */
21
+ public $version = '1.0.0';
22
+
23
+ /**
24
+ * List of settings parameters.
25
+ *
26
+ * @var array
27
+ */
28
+ public $settings = array();
29
+
30
+ /**
31
+ * Tab Path Files.
32
+ *
33
+ * @var array
34
+ */
35
+ protected $tabs_path_files;
36
+
37
+ /**
38
+ * Main array of options.
39
+ *
40
+ * @var array
41
+ */
42
+ protected $main_array_options;
43
+
44
+ /**
45
+ * Tabs hierarchy.
46
+ *
47
+ * @var array
48
+ */
49
+ protected $tabs_hierarchy;
50
+
51
+ /**
52
+ * Tabs in WP Pages.
53
+ *
54
+ * @var array
55
+ */
56
+ protected static $panel_tabs_in_wp_pages = array();
57
+
58
+ /**
59
+ * Array of links.
60
+ *
61
+ * @var array
62
+ */
63
+ public $links;
64
+
65
+ /**
66
+ * Are the actions initialized?
67
+ *
68
+ * @var bool
69
+ */
70
+ protected static $actions_initialized = false;
71
+
72
+ /**
73
+ * YIT_Plugin_Panel constructor.
74
+ *
75
+ * @param array $args The panel arguments.
76
+ *
77
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
78
+ */
79
+ public function __construct( $args = array() ) {
80
+ if ( ! empty( $args ) ) {
81
+ $default_args = array(
82
+ 'parent_slug' => 'edit.php?',
83
+ 'page_title' => __( 'Plugin Settings', 'yith-plugin-fw' ),
84
+ 'menu_title' => __( 'Settings', 'yith-plugin-fw' ),
85
+ 'capability' => 'manage_options',
86
+ 'icon_url' => '',
87
+ 'position' => null,
88
+ );
89
+
90
+ $args = apply_filters( 'yit_plugin_fw_panel_option_args', wp_parse_args( $args, $default_args ) );
91
+ if ( isset( $args['parent_page'] ) && 'yit_plugin_panel' === $args['parent_page'] ) {
92
+ $args['parent_page'] = 'yith_plugin_panel';
93
+ }
94
+
95
+ $this->settings = $args;
96
+ $this->tabs_path_files = $this->get_tabs_path_files();
97
+
98
+ if ( isset( $this->settings['create_menu_page'] ) && $this->settings['create_menu_page'] ) {
99
+ $this->add_menu_page();
100
+ }
101
+
102
+ if ( ! empty( $this->settings['links'] ) ) {
103
+ $this->links = $this->settings['links'];
104
+ }
105
+
106
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
107
+ add_action( 'admin_menu', array( $this, 'add_setting_page' ), 20 );
108
+ add_action( 'admin_menu', array( $this, 'add_premium_version_upgrade_to_menu' ), 100 );
109
+ add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
110
+ add_action( 'admin_init', array( $this, 'add_fields' ) );
111
+
112
+ add_action( 'admin_enqueue_scripts', array( $this, 'init_wp_with_tabs' ), 11 );
113
+ add_action( 'admin_init', array( $this, 'maybe_redirect_to_proper_wp_page' ) );
114
+
115
+ // Init actions once to prevent multiple initialization.
116
+ static::init_actions();
117
+ }
118
+
119
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
120
+
121
+ add_action( 'yith_plugin_fw_before_yith_panel', array( $this, 'add_plugin_banner' ), 10, 1 );
122
+ add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element', array( $this, 'save_toggle_element_options' ) );
123
+ }
124
+
125
+ /**
126
+ * Is this a custom post type page?
127
+ *
128
+ * @return bool
129
+ * @see YIT_Plugin_Panel::init_wp_with_tabs
130
+ * @since 3.4.17
131
+ */
132
+ protected function is_custom_post_type_page() {
133
+ global $pagenow, $post_type;
134
+ $excluded_post_types = array( 'product', 'page', 'post' );
135
+
136
+ return in_array( $pagenow, array( 'post.php', 'post-new.php', 'edit.php' ), true ) && ! in_array( $post_type, $excluded_post_types, true );
137
+ }
138
+
139
+ /**
140
+ * Is this a custom taxonomy page?
141
+ *
142
+ * @return bool
143
+ * @see YIT_Plugin_Panel::init_wp_with_tabs
144
+ * @since 3.4.17
145
+ */
146
+ protected function is_custom_taxonomy_page() {
147
+ global $pagenow, $taxonomy;
148
+ $excluded_taxonomies = array( 'category', 'post_tag', 'product_cat', 'product_tag' );
149
+
150
+ return in_array( $pagenow, array( 'edit-tags.php', 'term.php' ), true ) && ! in_array( $taxonomy, $excluded_taxonomies, true );
151
+ }
152
+
153
+ /**
154
+ * Init actions to show YITH Panel tabs in WP Pages
155
+ *
156
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
157
+ * @since 3.4.0
158
+ */
159
+ public function init_wp_with_tabs() {
160
+ if ( ! current_user_can( $this->settings['capability'] ) ) {
161
+ return;
162
+ }
163
+
164
+ global $post_type, $taxonomy;
165
+ $tabs = false;
166
+
167
+ if ( $this->is_custom_post_type_page() ) {
168
+ $tabs = $this->get_post_type_tabs( $post_type );
169
+ } elseif ( $this->is_custom_taxonomy_page() ) {
170
+ $tabs = $this->get_taxonomy_tabs( $taxonomy );
171
+ }
172
+
173
+ $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
174
+ $is_block_editor = ! ! $screen && is_callable( array( $screen, 'is_block_editor' ) ) && $screen->is_block_editor();
175
+
176
+ if ( $tabs ) {
177
+ $current_tab_args = array(
178
+ 'page' => $this->settings['page'],
179
+ 'current_tab' => isset( $tabs['tab'] ) ? $tabs['tab'] : '',
180
+ 'current_sub_tab' => isset( $tabs['sub_tab'] ) ? $tabs['sub_tab'] : '',
181
+ );
182
+
183
+ if ( ! $is_block_editor ) {
184
+ wp_enqueue_style( 'yit-plugin-style' );
185
+ wp_enqueue_style( 'yith-plugin-fw-fields' );
186
+ wp_enqueue_script( 'yith-plugin-fw-wp-pages' );
187
+ }
188
+
189
+ if ( ! self::$panel_tabs_in_wp_pages ) {
190
+ self::$panel_tabs_in_wp_pages = $current_tab_args;
191
+ if ( ! $is_block_editor ) {
192
+ add_action( 'all_admin_notices', array( $this, 'print_panel_tabs_in_wp_pages' ) );
193
+ add_action( 'admin_footer', array( $this, 'print_panel_tabs_in_wp_pages_end' ) );
194
+ }
195
+ add_filter( 'parent_file', array( $this, 'set_parent_file_to_handle_menu_for_wp_pages' ) );
196
+ add_filter( 'submenu_file', array( $this, 'set_submenu_file_to_handle_menu_for_wp_pages' ), 10, 2 );
197
+ }
198
+ }
199
+ }
200
+
201
+ /**
202
+ * Init actions.
203
+ *
204
+ * @since 3.0.0
205
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
206
+ */
207
+ protected static function init_actions() {
208
+ if ( ! static::$actions_initialized ) {
209
+ add_filter( 'admin_body_class', array( __CLASS__, 'add_body_class' ) );
210
+
211
+ // Sort plugins by name in YITH Plugins menu.
212
+ add_action( 'admin_menu', array( __CLASS__, 'sort_plugins' ), 90 );
213
+ add_filter( 'add_menu_classes', array( __CLASS__, 'add_menu_class_in_yith_plugin' ) );
214
+
215
+ static::$actions_initialized = true;
216
+ }
217
+ }
218
+
219
+ /**
220
+ * Maybe init vars
221
+ */
222
+ protected function maybe_init_vars() {
223
+ if ( ! isset( $this->main_array_options ) && ! isset( $this->tabs_hierarchy ) ) {
224
+ $options_path = $this->settings['options-path'];
225
+ $this->main_array_options = array();
226
+ $this->tabs_hierarchy = array();
227
+
228
+ foreach ( $this->settings['admin-tabs'] as $item => $v ) {
229
+ $path = trailingslashit( $options_path ) . $item . '-options.php';
230
+ $path = apply_filters( 'yith_plugin_panel_item_options_path', $path, $options_path, $item, $this );
231
+ if ( file_exists( $path ) ) {
232
+ $_tab = include $path;
233
+ $this->main_array_options = array_merge( $this->main_array_options, $_tab );
234
+ $sub_tabs = $this->get_sub_tabs( $_tab );
235
+ $current_tab_key = array_keys( $_tab )[0];
236
+
237
+ $this->tabs_hierarchy[ $current_tab_key ] = array_merge(
238
+ array(
239
+ 'parent' => '',
240
+ 'has_sub_tabs' => ! ! $sub_tabs,
241
+ ),
242
+ $this->get_tab_info_by_options( $_tab[ $current_tab_key ] )
243
+ );
244
+
245
+ foreach ( $sub_tabs as $sub_item => $sub_options ) {
246
+ if ( strpos( $sub_item, $item . '-' ) === 0 ) {
247
+ $sub_item = substr( $sub_item, strlen( $item ) + 1 );
248
+ }
249
+ $sub_tab_path = $options_path . '/' . $item . '/' . $sub_item . '-options.php';
250
+ $sub_tab_path = apply_filters( 'yith_plugin_panel_sub_tab_item_options_path', $sub_tab_path, $sub_tabs, $sub_item, $this );
251
+
252
+ if ( file_exists( $sub_tab_path ) ) {
253
+ $_sub_tab = include $sub_tab_path;
254
+ $this->main_array_options = array_merge( $this->main_array_options, $_sub_tab );
255
+
256
+ $current_sub_tab_key = array_keys( $_sub_tab )[0];
257
+ $this->tabs_hierarchy[ $current_sub_tab_key ] = array_merge( array( 'parent' => $current_tab_key ), $this->get_tab_info_by_options( $_sub_tab[ $current_sub_tab_key ] ) );
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+
265
+ /**
266
+ * Add yith-plugin-fw-panel in body classes in Panel pages
267
+ *
268
+ * @param string $admin_body_classes Body classes.
269
+ *
270
+ * @return string
271
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
272
+ * @since 3.0.0
273
+ */
274
+ public static function add_body_class( $admin_body_classes ) {
275
+ global $pagenow;
276
+ if ( ( 'admin.php' === $pagenow && strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false ) ) {
277
+ $admin_body_classes = ! substr_count( $admin_body_classes, ' yith-plugin-fw-panel ' ) ? $admin_body_classes . ' yith-plugin-fw-panel ' : $admin_body_classes;
278
+ }
279
+
280
+ return $admin_body_classes;
281
+ }
282
+
283
+ /**
284
+ * Add Menu page link
285
+ *
286
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
287
+ */
288
+ public function add_menu_page() {
289
+ global $admin_page_hooks;
290
+
291
+ if ( ! isset( $admin_page_hooks['yith_plugin_panel'] ) ) {
292
+ $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
293
+ $capability = apply_filters( 'yit_plugin_panel_menu_page_capability', 'manage_options' );
294
+ $show = apply_filters( 'yit_plugin_panel_menu_page_show', true );
295
+
296
+ // YITH text must NOT be translated.
297
+ if ( ! ! $show ) {
298
+ add_menu_page( 'yith_plugin_panel', 'YITH', $capability, 'yith_plugin_panel', null, yith_plugin_fw_get_default_logo(), $position );
299
+ // Prevent issues for backward compatibility.
300
+ $admin_page_hooks['yith_plugin_panel'] = 'yith-plugins'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
301
+ }
302
+ }
303
+ }
304
+
305
+ /**
306
+ * Remove duplicate submenu
307
+ * Submenu page hack: Remove the duplicate YIT Plugin link on subpages
308
+ *
309
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
310
+ */
311
+ public function remove_duplicate_submenu_page() {
312
+ remove_submenu_page( 'yith_plugin_panel', 'yith_plugin_panel' );
313
+ }
314
+
315
+ /**
316
+ * Enqueue script and styles in admin side
317
+ * Add style and scripts to administrator
318
+ *
319
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
320
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
321
+ */
322
+ public function admin_enqueue_scripts() {
323
+ global $pagenow;
324
+
325
+ if ( 'admin.php' === $pagenow && strpos( get_current_screen()->id, $this->settings['page'] ) !== false || apply_filters( 'yit_plugin_panel_asset_loading', false ) ) {
326
+ wp_enqueue_media();
327
+
328
+ wp_enqueue_style( 'yith-plugin-fw-fields' );
329
+ wp_enqueue_style( 'jquery-ui-style' );
330
+ wp_enqueue_style( 'raleway-font' );
331
+
332
+ wp_enqueue_script( 'jquery-ui' );
333
+ wp_enqueue_script( 'jquery-ui-core' );
334
+ wp_enqueue_script( 'jquery-ui-dialog' );
335
+ wp_enqueue_script( 'yith_how_to' );
336
+ wp_enqueue_script( 'yith-plugin-fw-fields' );
337
+ }
338
+
339
+ if ( ( 'admin.php' === $pagenow && yith_plugin_fw_is_panel() ) || apply_filters( 'yit_plugin_panel_asset_loading', false ) ) {
340
+ wp_enqueue_media();
341
+ wp_enqueue_style( 'yit-plugin-style' );
342
+ wp_enqueue_script( 'yit-plugin-panel' );
343
+ }
344
+
345
+ if ( 'admin.php' === $pagenow && strpos( get_current_screen()->id, 'yith_upgrade_premium_version' ) !== false ) {
346
+ wp_enqueue_style( 'yit-upgrade-to-pro' );
347
+ wp_enqueue_script( 'colorbox' );
348
+ }
349
+ }
350
+
351
+ /**
352
+ * Register Settings
353
+ * Generate wp-admin settings pages by registering your settings and using a few callbacks to control the output
354
+ *
355
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
356
+ */
357
+ public function register_settings() {
358
+ register_setting( 'yit_' . $this->settings['parent'] . '_options', 'yit_' . $this->settings['parent'] . '_options', array( $this, 'options_validate' ) );
359
+ }
360
+
361
+ /**
362
+ * Add Setting SubPage
363
+ * add Setting SubPage to WordPress administrator
364
+ *
365
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
366
+ */
367
+ public function add_setting_page() {
368
+ $this->settings['icon_url'] = isset( $this->settings['icon_url'] ) ? $this->settings['icon_url'] : '';
369
+ $this->settings['position'] = isset( $this->settings['position'] ) ? $this->settings['position'] : null;
370
+ $parent = $this->settings['parent_slug'] . $this->settings['parent_page'];
371
+
372
+ if ( ! empty( $parent ) ) {
373
+ add_submenu_page( $parent, $this->settings['page_title'], $this->settings['menu_title'], $this->settings['capability'], $this->settings['page'], array( $this, 'yit_panel' ) );
374
+ } else {
375
+ add_menu_page( $this->settings['page_title'], $this->settings['menu_title'], $this->settings['capability'], $this->settings['page'], array( $this, 'yit_panel' ), $this->settings['icon_url'], $this->settings['position'] );
376
+ }
377
+ // Duplicate Items Hack.
378
+ $this->remove_duplicate_submenu_page();
379
+ do_action( 'yit_after_add_settings_page' );
380
+
381
+ }
382
+
383
+ /**
384
+ * Options Validate
385
+ * a callback function called by Register Settings function
386
+ *
387
+ * @param array $field The field to validate.
388
+ *
389
+ * @return array validated fields
390
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
391
+ */
392
+ public function options_validate( $field ) {
393
+ $option_key = ! empty( $field['option_key'] ) ? $field['option_key'] : 'general';
394
+ $yit_options = $this->get_main_array_options();
395
+ $validated_fields = $this->get_options();
396
+
397
+ foreach ( $yit_options[ $option_key ] as $section => $data ) {
398
+ foreach ( $data as $option ) {
399
+ if ( isset( $option['sanitize_call'] ) && isset( $option['id'] ) ) {
400
+ if ( is_array( $option['sanitize_call'] ) ) {
401
+ foreach ( $option['sanitize_call'] as $callback ) {
402
+ if ( is_array( $field[ $option['id'] ] ) ) {
403
+ $validated_fields[ $option['id'] ] = array_map( $callback, $field[ $option['id'] ] );
404
+ } else {
405
+ $validated_fields[ $option['id'] ] = call_user_func( $callback, $field[ $option['id'] ] );
406
+ }
407
+ }
408
+ } else {
409
+ if ( is_array( $field[ $option['id'] ] ) ) {
410
+ $validated_fields[ $option['id'] ] = array_map( $option['sanitize_call'], $field[ $option['id'] ] );
411
+ } else {
412
+ $validated_fields[ $option['id'] ] = call_user_func( $option['sanitize_call'], $field[ $option['id'] ] );
413
+ }
414
+ }
415
+ } else {
416
+ if ( isset( $option['id'] ) ) {
417
+ $value = isset( $field[ $option['id'] ] ) ? $field[ $option['id'] ] : false;
418
+ if ( isset( $option['type'] ) && in_array( $option['type'], array( 'checkbox', 'onoff' ), true ) ) {
419
+ $value = yith_plugin_fw_is_true( $value ) ? 'yes' : 'no';
420
+ }
421
+
422
+ if ( ! empty( $option['yith-sanitize-callback'] ) && is_callable( $option['yith-sanitize-callback'] ) ) {
423
+ $value = call_user_func( $option['yith-sanitize-callback'], $value );
424
+ }
425
+
426
+ $validated_fields[ $option['id'] ] = $value;
427
+ }
428
+ }
429
+ }
430
+ }
431
+
432
+ return $validated_fields;
433
+ }
434
+
435
+ /**
436
+ * Add Premium Version upgrade menu item
437
+ *
438
+ * @since 2.9.13
439
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
440
+ */
441
+ public function add_premium_version_upgrade_to_menu() {
442
+ // Add the How To menu item only if the customer haven't a premium version enabled.
443
+ if ( function_exists( 'YIT_Plugin_Licence' ) && ! ! YIT_Plugin_Licence()->get_products() ) {
444
+ return;
445
+ }
446
+
447
+ global $submenu;
448
+ if ( apply_filters( 'yit_show_upgrade_to_premium_version', isset( $submenu['yith_plugin_panel'] ) ) ) {
449
+ $how_to_menu = array(
450
+ sprintf( '%s%s%s', '<span id="yith-how-to-premium">', __( 'How to install premium version', 'yith-plugin-fw' ), '</span>' ),
451
+ 'install_plugins',
452
+ '//support.yithemes.com/hc/en-us/articles/217840988',
453
+ __( 'How to install premium version', 'yith-plugin-fw' ),
454
+ );
455
+ $submenu['yith_plugin_panel']['how_to'] = $how_to_menu; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
456
+ }
457
+ }
458
+
459
+ /**
460
+ * Print the tabs navigation
461
+ *
462
+ * @param array $args Nav Arguments.
463
+ *
464
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
465
+ * @since 3.4.0
466
+ */
467
+ public function print_tabs_nav( $args = array() ) {
468
+ $defaults = array(
469
+ 'current_tab' => $this->get_current_tab(),
470
+ 'premium_class' => isset( $this->settings['class'] ) ? 'yith-premium' : 'premium',
471
+ 'page' => $this->settings['page'],
472
+ 'parent_page' => $this->settings['parent_page'],
473
+ 'wrapper_class' => 'nav-tab-wrapper',
474
+ );
475
+ $args = wp_parse_args( $args, $defaults );
476
+
477
+ list ( $current_tab, $premium_class, $page, $parent_page, $wrapper_class ) = yith_plugin_fw_extract( $args, 'current_tab', 'premium_class', 'page', 'parent_page', 'wrapper_class' );
478
+
479
+ $tabs = '<ul class="yith-plugin-fw-tabs">';
480
+
481
+ foreach ( $this->settings['admin-tabs'] as $tab => $tab_value ) {
482
+ $active_class = $current_tab === $tab ? ' nav-tab-active' : '';
483
+ if ( 'premium' === $tab ) {
484
+ $active_class .= ' ' . $premium_class;
485
+ }
486
+ $active_class = apply_filters( 'yith_plugin_fw_panel_active_tab_class', $active_class, $current_tab, $tab );
487
+
488
+ $first_sub_tab = $this->get_first_sub_tab_key( $tab );
489
+ $sub_tab = ! ! $first_sub_tab ? $first_sub_tab : '';
490
+ $sub_tabs = $this->get_sub_tabs( $tab );
491
+ $url = $this->get_nav_url( $page, $tab, $sub_tab, $parent_page );
492
+ $icon = ( $current_tab !== $tab && $sub_tabs ) ? '<i class="yith-icon yith-icon-arrow_down"></i>' : '';
493
+
494
+ $tabs .= '<li class="yith-plugin-fw-tab-element">';
495
+ $tabs .= '<a class="nav-tab' . esc_attr( $active_class ) . '" href="' . esc_url( $url ) . '">' . wp_kses_post( $tab_value ) . $icon . '</a>';
496
+
497
+ if ( $current_tab !== $tab && $sub_tabs ) {
498
+ $tabs .= '<div class="nav-subtab-wrap"><ul class="nav-subtab">';
499
+ foreach ( $sub_tabs as $_key => $_tab ) {
500
+ $url = $this->get_nav_url( $page, $tab, $_key );
501
+
502
+ $tabs .= '<li class="nav-subtab-item"><a href="' . esc_url( $url ) . '">' . wp_kses_post( $_tab['title'] ) . '</a></li>';
503
+ }
504
+ $tabs .= '</ul></div>';
505
+ }
506
+ $tabs .= '</li>';
507
+ }
508
+ $tabs .= '</ul>';
509
+ ?>
510
+ <h2 class="<?php echo esc_attr( $wrapper_class ); ?>">
511
+ <?php echo $tabs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
512
+ </h2>
513
+ <?php
514
+ $this->print_sub_tabs_nav( $args );
515
+ }
516
+
517
+ /**
518
+ * Retrieve the Nav URL.
519
+ *
520
+ * @param string $page The page.
521
+ * @param string $tab The tab.
522
+ * @param string $sub_tab The sub-tab.
523
+ * @param string $parent_page The parent page.
524
+ *
525
+ * @return string
526
+ */
527
+ public function get_nav_url( $page, $tab, $sub_tab = '', $parent_page = '' ) {
528
+ $tab_hierarchy = $this->get_tabs_hierarchy();
529
+ $key = ! ! $sub_tab ? $sub_tab : $tab;
530
+
531
+ if ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ]['type'], $tab_hierarchy[ $key ]['post_type'] ) && 'post_type' === $tab_hierarchy[ $key ]['type'] ) {
532
+ $url = admin_url( "edit.php?post_type={$tab_hierarchy[$key]['post_type']}" );
533
+ } elseif ( isset( $tab_hierarchy[ $key ], $tab_hierarchy[ $key ]['type'], $tab_hierarchy[ $key ]['taxonomy'] ) && 'taxonomy' === $tab_hierarchy[ $key ]['type'] ) {
534
+ $url = admin_url( "edit-tags.php?taxonomy={$tab_hierarchy[$key]['taxonomy']}" );
535
+ } else {
536
+ $url = ! ! $parent_page ? "?{$parent_page}&" : '?';
537
+
538
+ $url .= "page={$page}&tab={$tab}";
539
+ $url .= ! ! $sub_tab ? "&sub_tab={$sub_tab}" : '';
540
+
541
+ $url = admin_url( "admin.php{$url}" );
542
+ }
543
+
544
+ return apply_filters( 'yith_plugin_fw_panel_url', $url, $page, $tab, $sub_tab, $parent_page );
545
+ }
546
+
547
+ /**
548
+ * Print the Sub-tabs navigation if the current tab has sub-tabs
549
+ *
550
+ * @param array $args Sub-tab arguments.
551
+ *
552
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
553
+ * @since 3.4.0
554
+ */
555
+ public function print_sub_tabs_nav( $args = array() ) {
556
+ $defaults = array(
557
+ 'current_tab' => $this->get_current_tab(),
558
+ 'page' => $this->settings['page'],
559
+ 'current_sub_tab' => $this->get_current_sub_tab(),
560
+ );
561
+ $args = wp_parse_args( $args, $defaults );
562
+
563
+ /**
564
+ * The arguments.
565
+ *
566
+ * @var string $current_tab The current tab.
567
+ * @var string $page The page.
568
+ * @var string $current_sub_tab The current sub-tab.
569
+ */
570
+ extract( $args ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
571
+
572
+ $sub_tabs = $this->get_sub_tabs( $current_tab );
573
+
574
+ if ( $sub_tabs && $current_sub_tab ) {
575
+ include YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/sub-tabs-nav.php';
576
+ }
577
+ }
578
+
579
+ /**
580
+ * Show a tabbed panel to setting page
581
+ * a callback function called by add_setting_page => add_submenu_page
582
+ *
583
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
584
+ */
585
+ public function yit_panel() {
586
+ $yit_options = $this->get_main_array_options();
587
+ $wrap_class = isset( $this->settings['class'] ) ? $this->settings['class'] : '';
588
+
589
+ $option_key = $this->get_current_option_key();
590
+ $custom_tab_options = $this->get_custom_tab_options( $yit_options, $option_key );
591
+ ?>
592
+ <div class="wrap <?php echo esc_attr( $wrap_class ); ?>">
593
+ <div id="icon-themes" class="icon32"><br/></div>
594
+ <?php
595
+ do_action( 'yith_plugin_fw_before_yith_panel', $this->settings['page'] );
596
+
597
+ $this->print_tabs_nav();
598
+
599
+ if ( $custom_tab_options ) {
600
+ $this->print_custom_tab( $custom_tab_options );
601
+
602
+ return;
603
+ }
604
+
605
+ $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
606
+ ?>
607
+ <div id="wrap" class="yith-plugin-fw plugin-option yit-admin-panel-container">
608
+ <?php $this->message(); ?>
609
+ <div class="<?php echo esc_attr( $panel_content_class ); ?>">
610
+ <h2><?php echo wp_kses_post( $this->get_tab_title() ); ?></h2>
611
+ <?php if ( $this->is_show_form() ) : ?>
612
+ <form id="yith-plugin-fw-panel" method="post" action="options.php">
613
+ <?php do_settings_sections( 'yit' ); ?>
614
+ <p>&nbsp;</p>
615
+ <?php settings_fields( 'yit_' . $this->settings['parent'] . '_options' ); ?>
616
+ <input type="hidden" name="<?php echo esc_attr( $this->get_name_field( 'option_key' ) ); ?>"
617
+ value="<?php echo esc_attr( $option_key ); ?>"/>
618
+ <input type="submit" class="button-primary"
619
+ value="<?php esc_attr_e( 'Save Changes', 'yith-plugin-fw' ); ?>"
620
+ style="float:left;margin-right:10px;"/>
621
+ </form>
622
+ <form method="post">
623
+ <?php
624
+ $reset_warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) . '\n' . __( 'Are you sure?', 'yith-plugin-fw' );
625
+ ?>
626
+ <input type="hidden" name="yit-action" value="reset"/>
627
+ <input type="submit" name="yit-reset" class="button-secondary"
628
+ value="<?php esc_attr_e( 'Reset to default', 'yith-plugin-fw' ); ?>"
629
+ onclick="return confirm('<?php echo esc_attr( $reset_warning ); ?>');"/>
630
+ </form>
631
+ <p>&nbsp;</p>
632
+ <?php endif ?>
633
+ </div>
634
+ </div>
635
+ </div>
636
+ <?php
637
+ }
638
+
639
+ /**
640
+ * Check if is a custom tab.
641
+ *
642
+ * @param array $options The tab options.
643
+ * @param string $option_key The option key.
644
+ *
645
+ * @return string|false The action to be fired of false if it's not a custom tab.
646
+ */
647
+ public function is_custom_tab( $options, $option_key ) {
648
+ $option = $this->get_custom_tab_options( $options, $option_key );
649
+
650
+ return ! ! $option && isset( $option['action'] ) ? $option['action'] : false;
651
+ }
652
+
653
+ /**
654
+ * Retrieve the custom tab options.
655
+ *
656
+ * @param array $options The tab options.
657
+ * @param string $option_key The option key.
658
+ *
659
+ * @return array|false The options of the custom tab; false if it's not a custom tab.
660
+ */
661
+ public function get_custom_tab_options( $options, $option_key ) {
662
+ $option = ! empty( $options[ $option_key ] ) ? current( $options[ $option_key ] ) : false;
663
+
664
+ if ( $option && isset( $option['type'], $option['action'] ) && 'custom_tab' === $option['type'] && ! empty( $option['action'] ) ) {
665
+ return $option;
666
+ } else {
667
+ return false;
668
+ }
669
+ }
670
+
671
+ /**
672
+ * Retrieve the tab type by its options.
673
+ *
674
+ * @param array $tab_options The tab options.
675
+ *
676
+ * @return string
677
+ */
678
+ public function get_tab_type_by_options( $tab_options ) {
679
+ $first = ! ! $tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
680
+ $type = isset( $first['type'] ) ? $first['type'] : 'options';
681
+ $special_types = array( 'post_type', 'taxonomy', 'custom_tab', 'multi_tab' );
682
+
683
+ return in_array( $type, $special_types, true ) ? $type : 'options';
684
+ }
685
+
686
+ /**
687
+ * Retrieve the tab info by its options.
688
+ *
689
+ * @param array $tab_options The tab options.
690
+ *
691
+ * @return string[]
692
+ */
693
+ public function get_tab_info_by_options( $tab_options ) {
694
+ $type = $this->get_tab_type_by_options( $tab_options );
695
+ $info = array( 'type' => $type );
696
+ $first = ! ! $tab_options && is_array( $tab_options ) ? current( $tab_options ) : array();
697
+ if ( 'post_type' === $type ) {
698
+ $info['post_type'] = isset( $first['post_type'] ) ? $first['post_type'] : '';
699
+ } elseif ( 'taxonomy' === $type ) {
700
+ $info['taxonomy'] = isset( $first['taxonomy'] ) ? $first['taxonomy'] : '';
701
+ }
702
+
703
+ return $info;
704
+ }
705
+
706
+ /**
707
+ * Fire the action to print the custom tab.
708
+ *
709
+ * @param array $options The options of the custom tab.
710
+ *
711
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
712
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
713
+ */
714
+ public function print_custom_tab( $options ) {
715
+ if ( is_string( $options ) ) {
716
+ // Backward compatibility.
717
+ $options = array( 'action' => $options );
718
+ }
719
+ $current_tab = $this->get_current_tab();
720
+ $current_sub_tab = $this->get_current_sub_tab();
721
+
722
+ include YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/custom-tab.php';
723
+ }
724
+
725
+ /**
726
+ * Add sections and fields to setting panel.
727
+ * Read all options and show sections and fields.
728
+ *
729
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
730
+ */
731
+ public function add_fields() {
732
+ $yit_options = $this->get_main_array_options();
733
+ $option_key = $this->get_current_option_key();
734
+
735
+ if ( ! $option_key ) {
736
+ return;
737
+ }
738
+ foreach ( $yit_options[ $option_key ] as $section => $data ) {
739
+ add_settings_section( "yit_settings_{$option_key}_{$section}", $this->get_section_title( $section ), $this->get_section_description( $section ), 'yit' );
740
+ foreach ( $data as $option ) {
741
+ if ( isset( $option['id'] ) && isset( $option['type'] ) && isset( $option['name'] ) ) {
742
+ add_settings_field(
743
+ 'yit_setting_' . $option['id'],
744
+ $option['name'],
745
+ array( $this, 'render_field' ),
746
+ 'yit',
747
+ "yit_settings_{$option_key}_{$section}",
748
+ array(
749
+ 'option' => $option,
750
+ 'label_for' => $this->get_id_field( $option['id'] ),
751
+ )
752
+ );
753
+ }
754
+ }
755
+ }
756
+ }
757
+
758
+ /**
759
+ * Add the tabs to admin bar menu.
760
+ * Set all tabs of settings page on wp admin bar.
761
+ *
762
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
763
+ */
764
+ public function add_admin_bar_menu() {
765
+ global $wp_admin_bar;
766
+
767
+ if ( ! current_user_can( 'manage_options' ) ) {
768
+ return;
769
+ }
770
+
771
+ if ( ! empty( $this->settings['admin_tabs'] ) ) {
772
+ foreach ( $this->settings['admin-tabs'] as $item => $title ) {
773
+ $wp_admin_bar->add_menu(
774
+ array(
775
+ 'parent' => $this->settings['parent'],
776
+ 'title' => $title,
777
+ 'id' => $this->settings['parent'] . '-' . $item,
778
+ 'href' => admin_url( 'themes.php' ) . '?page=' . $this->settings['parent_page'] . '&tab=' . $item,
779
+ )
780
+ );
781
+ }
782
+ }
783
+ }
784
+
785
+ /**
786
+ * Get current tab.
787
+ * Retrieve the id of tab shown, return general is the current tab is not defined.
788
+ *
789
+ * @return string|false
790
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
791
+ */
792
+ public function get_current_tab() {
793
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
794
+ $admin_tabs = array_keys( $this->settings['admin-tabs'] );
795
+
796
+ if ( ! isset( $_GET['page'] ) || $_GET['page'] !== $this->settings['page'] ) {
797
+ return false;
798
+ }
799
+ if ( isset( $_REQUEST['yit_tab_options'] ) ) {
800
+ return sanitize_key( wp_unslash( $_REQUEST['yit_tab_options'] ) );
801
+ } elseif ( isset( $_GET['tab'] ) ) {
802
+ return sanitize_key( wp_unslash( $_GET['tab'] ) );
803
+ } elseif ( isset( $admin_tabs[0] ) ) {
804
+ return $admin_tabs[0];
805
+ } else {
806
+ return 'general';
807
+ }
808
+ // phpcs:enable
809
+ }
810
+
811
+ /**
812
+ * Get the current sub-tab.
813
+ *
814
+ * @return string The key of the sub-tab if exists, empty string otherwise.
815
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
816
+ * @since 3.4.0
817
+ */
818
+ public function get_current_sub_tab() {
819
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
820
+ $sub_tabs = $this->get_sub_tabs();
821
+ $sub_tab = isset( $_REQUEST['sub_tab'] ) ? sanitize_key( wp_unslash( $_REQUEST['sub_tab'] ) ) : '';
822
+
823
+ if ( $sub_tabs ) {
824
+ if ( $sub_tab && ! isset( $sub_tabs[ $sub_tab ] ) || ! $sub_tab ) {
825
+ $sub_tab = current( array_keys( $sub_tabs ) );
826
+ }
827
+ } else {
828
+ $sub_tab = '';
829
+ }
830
+
831
+ return $sub_tab;
832
+ // phpcs:enable
833
+ }
834
+
835
+ /**
836
+ * Return the option key related to the current page.
837
+ * for sub-tabbed tabs, it will return the current sub-tab.
838
+ * fot normal tabs, it will return the current tab.
839
+ *
840
+ * @return string the current sub-tab, if exists; the current tab otherwise.
841
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
842
+ * @since 3.4.0
843
+ */
844
+ public function get_current_option_key() {
845
+ $current_tab = $this->get_current_tab();
846
+ $current_sub_tab = $this->get_current_sub_tab();
847
+
848
+ if ( ! $current_tab ) {
849
+ return false;
850
+ }
851
+
852
+ return $current_sub_tab ? $current_sub_tab : $current_tab;
853
+ }
854
+
855
+ /**
856
+ * Message
857
+ * define an array of message and show the content od message if
858
+ * is find in the query string
859
+ *
860
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
861
+ */
862
+ public function message() {
863
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
864
+ $message = array(
865
+ 'element_exists' => $this->get_message( '<strong>' . __( 'The element you have entered already exists. Please, enter another name.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
866
+ 'saved' => $this->get_message( '<strong>' . __( 'Settings saved', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
867
+ 'reset' => $this->get_message( '<strong>' . __( 'Settings reset', 'yith-plugin-fw' ) . '.</strong>', 'updated', false ),
868
+ 'delete' => $this->get_message( '<strong>' . __( 'Element deleted correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
869
+ 'updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
870
+ 'settings-updated' => $this->get_message( '<strong>' . __( 'Element updated correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
871
+ 'imported' => $this->get_message( '<strong>' . __( 'Database imported correctly.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
872
+ 'no-imported' => $this->get_message( '<strong>' . __( 'An error has occurred during import. Please try again.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
873
+ 'file-not-valid' => $this->get_message( '<strong>' . __( 'The added file is not valid.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
874
+ 'cant-import' => $this->get_message( '<strong>' . __( 'Sorry, import is disabled.', 'yith-plugin-fw' ) . '</strong>', 'error', false ),
875
+ 'ord' => $this->get_message( '<strong>' . __( 'Sorting successful.', 'yith-plugin-fw' ) . '</strong>', 'updated', false ),
876
+ );
877
+
878
+ foreach ( $message as $key => $value ) {
879
+ if ( isset( $_GET[ $key ] ) ) {
880
+ echo wp_kses_post( $message[ $key ] );
881
+ }
882
+ }
883
+ // phpcs:enable
884
+ }
885
+
886
+ /**
887
+ * Get Message
888
+ * return html code of message
889
+ *
890
+ * @param string $message The message.
891
+ * @param string $type The type of message (can be 'error' or 'updated').
892
+ * @param bool $echo Set to true if you want to print the message.
893
+ *
894
+ * @return string
895
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
896
+ */
897
+ public function get_message( $message, $type = 'error', $echo = true ) {
898
+ $message = '<div id="message" class="' . esc_attr( $type ) . ' fade"><p>' . wp_kses_post( $message ) . '</p></div>';
899
+ if ( $echo ) {
900
+ echo wp_kses_post( $message );
901
+ }
902
+
903
+ return $message;
904
+ }
905
+
906
+ /**
907
+ * Get Tab Path Files
908
+ * return an array with file names of tabs
909
+ *
910
+ * @return array
911
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
912
+ */
913
+ public function get_tabs_path_files() {
914
+ $option_files_path = $this->settings['options-path'] . '/';
915
+ $tabs = array();
916
+
917
+ foreach ( (array) glob( $option_files_path . '*.php' ) as $filename ) {
918
+ preg_match( '/(.*)-options\.(.*)/', basename( $filename ), $filename_parts );
919
+
920
+ if ( ! isset( $filename_parts[1] ) ) {
921
+ continue;
922
+ }
923
+
924
+ $tab = $filename_parts[1];
925
+ $tabs[ $tab ] = $filename;
926
+ }
927
+
928
+ return $tabs;
929
+ }
930
+
931
+ /**
932
+ * Get main array options
933
+ * return an array with all options defined on options-files
934
+ *
935
+ * @return array
936
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
937
+ */
938
+ public function get_main_array_options() {
939
+ $this->maybe_init_vars();
940
+
941
+ return $this->main_array_options;
942
+ }
943
+
944
+ /**
945
+ * Get tab hierarchy.
946
+ *
947
+ * @return array
948
+ */
949
+ public function get_tabs_hierarchy() {
950
+ $this->maybe_init_vars();
951
+
952
+ return $this->tabs_hierarchy;
953
+ }
954
+
955
+ /**
956
+ * Return the sub-tabs array of a specific tab
957
+ *
958
+ * @param array|bool $_tab the tab; if not set it'll be the current tab.
959
+ *
960
+ * @since 3.4.0
961
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
962
+ * @return array Sub-tabs array.
963
+ */
964
+ public function get_sub_tabs( $_tab = false ) {
965
+ if ( false === $_tab ) {
966
+ $_tab = $this->get_current_tab();
967
+ }
968
+
969
+ if ( is_string( $_tab ) ) {
970
+ $main_array_options = $this->get_main_array_options();
971
+ $current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
972
+ if ( $current_tab_options ) {
973
+ $_tab = array( $_tab => $current_tab_options );
974
+ }
975
+ }
976
+
977
+ $_tab_options = ! ! $_tab && is_array( $_tab ) ? current( $_tab ) : false;
978
+ $_first = ! ! $_tab_options && is_array( $_tab_options ) ? current( $_tab_options ) : false;
979
+ if ( $_first && is_array( $_first ) && isset( $_first['type'] ) && 'multi_tab' === $_first['type'] && ! empty( $_first['sub-tabs'] ) ) {
980
+ return $_first['sub-tabs'];
981
+ }
982
+
983
+ return array();
984
+ }
985
+
986
+ /**
987
+ * Retrieve the first sub-tab key.
988
+ *
989
+ * @param string|false $_tab The tab; if not set it'll be the current tab.
990
+ *
991
+ * @return false|mixed
992
+ */
993
+ public function get_first_sub_tab_key( $_tab = false ) {
994
+ $key = false;
995
+ if ( is_string( $_tab ) ) {
996
+ $main_array_options = $this->get_main_array_options();
997
+ $current_tab_options = isset( $main_array_options[ $_tab ] ) ? $main_array_options[ $_tab ] : array();
998
+ if ( $current_tab_options ) {
999
+ $_tab = array( $_tab => $current_tab_options );
1000
+ }
1001
+ }
1002
+ $sub_tabs = $this->get_sub_tabs( $_tab );
1003
+ if ( $sub_tabs ) {
1004
+ $key = current( array_keys( $sub_tabs ) );
1005
+ }
1006
+
1007
+ return $key;
1008
+ }
1009
+
1010
+
1011
+ /**
1012
+ * Set an array with all default options
1013
+ * put default options in an array
1014
+ *
1015
+ * @return array
1016
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1017
+ */
1018
+ public function get_default_options() {
1019
+ $yit_options = $this->get_main_array_options();
1020
+ $default_options = array();
1021
+
1022
+ foreach ( $yit_options as $tab => $sections ) {
1023
+ foreach ( $sections as $section ) {
1024
+ foreach ( $section as $id => $value ) {
1025
+ if ( isset( $value['std'] ) && isset( $value['id'] ) ) {
1026
+ $default_options[ $value['id'] ] = $value['std'];
1027
+ }
1028
+ }
1029
+ }
1030
+ }
1031
+
1032
+ unset( $yit_options );
1033
+
1034
+ return $default_options;
1035
+ }
1036
+
1037
+
1038
+ /**
1039
+ * Get the title of the tab
1040
+ * return the title of tab
1041
+ *
1042
+ * @return string
1043
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1044
+ */
1045
+ public function get_tab_title() {
1046
+ $yit_options = $this->get_main_array_options();
1047
+ $option_key = $this->get_current_option_key();
1048
+
1049
+ foreach ( $yit_options[ $option_key ] as $sections => $data ) {
1050
+ foreach ( $data as $option ) {
1051
+ if ( isset( $option['type'] ) && 'title' === $option['type'] ) {
1052
+ return $option['name'];
1053
+ }
1054
+ }
1055
+ }
1056
+
1057
+ return '';
1058
+ }
1059
+
1060
+ /**
1061
+ * Get the title of the section
1062
+ * return the title of section
1063
+ *
1064
+ * @param string $section The section.
1065
+ *
1066
+ * @return string
1067
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1068
+ */
1069
+ public function get_section_title( $section ) {
1070
+ $yit_options = $this->get_main_array_options();
1071
+ $option_key = $this->get_current_option_key();
1072
+
1073
+ foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
1074
+ if ( isset( $option['type'] ) && 'section' === $option['type'] ) {
1075
+ return $option['name'];
1076
+ }
1077
+ }
1078
+
1079
+ return '';
1080
+ }
1081
+
1082
+ /**
1083
+ * Get the description of the section
1084
+ * return the description of section if is set
1085
+ *
1086
+ * @param string $section The section.
1087
+ *
1088
+ * @return string
1089
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1090
+ */
1091
+ public function get_section_description( $section ) {
1092
+ $yit_options = $this->get_main_array_options();
1093
+ $option_key = $this->get_current_option_key();
1094
+
1095
+ foreach ( $yit_options[ $option_key ][ $section ] as $option ) {
1096
+ if ( isset( $option['type'] ) && 'section' === $option['type'] && isset( $option['desc'] ) ) {
1097
+ return '<p>' . $option['desc'] . '</p>';
1098
+ }
1099
+ }
1100
+
1101
+ return '';
1102
+ }
1103
+
1104
+
1105
+ /**
1106
+ * Show form when necessary
1107
+ * return true if 'showform' is not defined
1108
+ *
1109
+ * @return bool
1110
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1111
+ */
1112
+ public function is_show_form() {
1113
+ $yit_options = $this->get_main_array_options();
1114
+ $option_key = $this->get_current_option_key();
1115
+
1116
+ foreach ( $yit_options[ $option_key ] as $sections => $data ) {
1117
+ foreach ( $data as $option ) {
1118
+ if ( ! isset( $option['type'] ) || 'title' !== $option['type'] ) {
1119
+ continue;
1120
+ }
1121
+ if ( isset( $option['showform'] ) ) {
1122
+ return $option['showform'];
1123
+ } else {
1124
+ return true;
1125
+ }
1126
+ }
1127
+ }
1128
+ }
1129
+
1130
+ /**
1131
+ * Get name field
1132
+ * return a string with the name of the input field
1133
+ *
1134
+ * @param string $name The name.
1135
+ *
1136
+ * @return string
1137
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1138
+ */
1139
+ public function get_name_field( $name = '' ) {
1140
+ return 'yit_' . $this->settings['parent'] . '_options[' . $name . ']';
1141
+ }
1142
+
1143
+ /**
1144
+ * Get id field
1145
+ * return a string with the id of the input field
1146
+ *
1147
+ * @param string $id The ID.
1148
+ *
1149
+ * @return string
1150
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1151
+ */
1152
+ public function get_id_field( $id ) {
1153
+ return 'yit_' . $this->settings['parent'] . '_options_' . $id;
1154
+ }
1155
+
1156
+
1157
+ /**
1158
+ * Render the field showed in the setting page
1159
+ * include the file of the option type, if file do not exists
1160
+ * return a text area
1161
+ *
1162
+ * @param array $param The parameters.
1163
+ *
1164
+ * @return void
1165
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1166
+ */
1167
+ public function render_field( $param ) {
1168
+ if ( ! empty( $param ) && isset( $param ['option'] ) ) {
1169
+ $option = $param['option'];
1170
+ $db_options = $this->get_options();
1171
+
1172
+ $custom_attributes = array();
1173
+
1174
+ if ( ! empty( $option['custom_attributes'] ) && is_array( $option['custom_attributes'] ) ) {
1175
+ foreach ( $option['custom_attributes'] as $attribute => $attribute_value ) {
1176
+ $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
1177
+ }
1178
+ }
1179
+
1180
+ $custom_attributes = implode( ' ', $custom_attributes );
1181
+ $std = isset( $option['std'] ) ? $option['std'] : '';
1182
+ $db_value = ( isset( $db_options[ $option['id'] ] ) ) ? $db_options[ $option['id'] ] : $std;
1183
+
1184
+ if ( isset( $option['deps'] ) ) {
1185
+ $deps = $option['deps'];
1186
+ }
1187
+
1188
+ if ( 'on-off' === $option['type'] ) {
1189
+ $option['type'] = 'onoff';
1190
+ }
1191
+
1192
+ $field_template_path = yith_plugin_fw_get_field_template_path( $option );
1193
+ if ( $field_template_path ) {
1194
+ $field_container_path = apply_filters( 'yith_plugin_fw_panel_field_container_template_path', YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/panel-field-container.php', $option );
1195
+ file_exists( $field_container_path ) && include $field_container_path;
1196
+ } else {
1197
+ do_action( "yit_panel_{$option['type']}", $option, $db_value, $custom_attributes );
1198
+ }
1199
+ }
1200
+ }
1201
+
1202
+ /**
1203
+ * Get options from db
1204
+ * return the options from db, if the options aren't defined in the db,
1205
+ * get the default options ad add the options in the db
1206
+ *
1207
+ * @return array
1208
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
1209
+ */
1210
+ public function get_options() {
1211
+ $options = get_option( 'yit_' . $this->settings['parent'] . '_options' );
1212
+ if ( false === $options || ( isset( $_REQUEST['yit-action'] ) && 'reset' === sanitize_key( wp_unslash( $_REQUEST['yit-action'] ) ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
1213
+ $options = $this->get_default_options();
1214
+ }
1215
+
1216
+ return $options;
1217
+ }
1218
+
1219
+ /**
1220
+ * Show a box panel with specific content in two columns as a new woocommerce type
1221
+ *
1222
+ * @param array $args The arguments.
1223
+ *
1224
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
1225
+ */
1226
+ public static function add_infobox( $args = array() ) {
1227
+ if ( ! empty( $args ) ) {
1228
+ extract( $args ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract
1229
+ require YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/boxinfo.php';
1230
+ }
1231
+ }
1232
+
1233
+ /**
1234
+ * Show a box panel with specific content in two columns as a new woocommerce type
1235
+ *
1236
+ * @param array $args Arguments.
1237
+ *
1238
+ * @return void
1239
+ * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
1240
+ */
1241
+ public static function add_videobox( $args = array() ) {
1242
+
1243
+ }
1244
+
1245
+ /**
1246
+ * Fire the action to print the custom tab
1247
+ *
1248
+ * @return void
1249
+ * @deprecated 3.0.12 Do nothing! Method left to prevent Fatal Error if called directly
1250
+ */
1251
+ public function print_video_box() {
1252
+
1253
+ }
1254
+
1255
+ /**
1256
+ * Sort plugins by name in YITH Plugins menu.
1257
+ *
1258
+ * @since 3.0.0
1259
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1260
+ */
1261
+ public static function sort_plugins() {
1262
+ global $submenu;
1263
+ if ( ! empty( $submenu['yith_plugin_panel'] ) ) {
1264
+ $sorted_plugins = $submenu['yith_plugin_panel'];
1265
+
1266
+ usort(
1267
+ $sorted_plugins,
1268
+ function ( $a, $b ) {
1269
+ return strcmp( current( $a ), current( $b ) );
1270
+ }
1271
+ );
1272
+
1273
+ $submenu['yith_plugin_panel'] = $sorted_plugins; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
1274
+ }
1275
+ }
1276
+
1277
+ /**
1278
+ * Add menu class in YITH Plugins menu.
1279
+ *
1280
+ * @param array $menu The menu.
1281
+ *
1282
+ * @return array
1283
+ * @since 3.0.0
1284
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1285
+ */
1286
+ public static function add_menu_class_in_yith_plugin( $menu ) {
1287
+ global $submenu;
1288
+
1289
+ if ( ! empty( $submenu['yith_plugin_panel'] ) ) {
1290
+ $item_count = count( $submenu['yith_plugin_panel'] );
1291
+ $columns = absint( $item_count / 20 ) + 1;
1292
+ $columns = max( 1, min( $columns, 3 ) );
1293
+ $columns = apply_filters( 'yith_plugin_fw_yith_plugins_menu_columns', $columns, $item_count );
1294
+
1295
+ if ( $columns > 1 ) {
1296
+ $class = "yith-plugin-fw-menu-$columns-columns";
1297
+ foreach ( $menu as $order => $top ) {
1298
+ if ( 'yith_plugin_panel' === $top[2] ) {
1299
+ $c = $menu[ $order ][4];
1300
+ $menu[ $order ][4] = add_cssclass( $class, $c );
1301
+ break;
1302
+ }
1303
+ }
1304
+ }
1305
+ }
1306
+
1307
+ return $menu;
1308
+ }
1309
+
1310
+ /**
1311
+ * Check if inside the admin tab there's the premium tab to
1312
+ * check if the plugin is a free or not
1313
+ *
1314
+ * @author Emanuela Castorina
1315
+ */
1316
+ public function is_free() {
1317
+ return ( ! empty( $this->settings['admin-tabs'] ) && isset( $this->settings['admin-tabs']['premium'] ) );
1318
+ }
1319
+
1320
+ /**
1321
+ * Add plugin banner.
1322
+ *
1323
+ * @param string $page The page.
1324
+ */
1325
+ public function add_plugin_banner( $page ) {
1326
+ if ( $page !== $this->settings['page'] || ! isset( $this->settings['class'] ) ) {
1327
+ return;
1328
+ }
1329
+
1330
+ ?>
1331
+ <?php if ( $this->is_free() && isset( $this->settings['plugin_slug'] ) ) : ?>
1332
+ <?php
1333
+ $rate_link = apply_filters( 'yith_plugin_fw_rate_url', 'https://wordpress.org/support/plugin/' . $this->settings['plugin_slug'] . '/reviews/?rate=5#new-post' );
1334
+ ?>
1335
+ <h1 class="notice-container"></h1>
1336
+ <div class="yith-plugin-fw-banner">
1337
+ <h1><?php echo esc_html( $this->settings['page_title'] ); ?></h1>
1338
+ </div>
1339
+ <div class="yith-plugin-fw-rate">
1340
+ <?php
1341
+ printf(
1342
+ '<strong>%s</strong> %s <a href="%s" target="_blank"><u>%s</u> <span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a> %s',
1343
+ esc_html__( 'We need your support', 'yith-plugin-fw' ),
1344
+ esc_html__( 'to keep updating and improving the plugin. Please,', 'yith-plugin-fw' ),
1345
+ esc_url( $rate_link ),
1346
+ esc_html__( 'help us by leaving a five-star rating', 'yith-plugin-fw' ),
1347
+ esc_html__( ':) Thanks!', 'yith-plugin-fw' )
1348
+ );
1349
+ ?>
1350
+ </div>
1351
+ <?php else : ?>
1352
+ <h1 class="notice-container"></h1>
1353
+ <div class="yith-plugin-fw-banner">
1354
+ <h1><?php echo esc_html( $this->settings['page_title'] ); ?></h1>
1355
+ </div>
1356
+ <?php endif ?>
1357
+ <?php
1358
+ }
1359
+
1360
+ /**
1361
+ * Add additional element after print the field.
1362
+ *
1363
+ * @param array $field The field.
1364
+ *
1365
+ * @author Emanuela Castorina
1366
+ * @since 3.2
1367
+ */
1368
+ public function add_yith_ui( $field ) {
1369
+ global $pagenow;
1370
+
1371
+ $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
1372
+
1373
+ if ( empty( $this->settings['class'] ) || ! isset( $field['type'] ) ) {
1374
+ return;
1375
+ }
1376
+ if ( 'admin.php' === $pagenow && $screen && strpos( $screen->id, $this->settings['page'] ) !== false ) {
1377
+ switch ( $field['type'] ) {
1378
+ case 'datepicker':
1379
+ echo '<span class="yith-icon yith-icon-calendar"></span>';
1380
+ break;
1381
+ default:
1382
+ break;
1383
+ }
1384
+ }
1385
+ }
1386
+
1387
+ /**
1388
+ * Get post type tabs.
1389
+ *
1390
+ * @param string $post_type The post type.
1391
+ *
1392
+ * @return array
1393
+ */
1394
+ public function get_post_type_tabs( $post_type ) {
1395
+ $tabs = array();
1396
+
1397
+ foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
1398
+ if ( isset( $info['type'], $info['post_type'] ) && 'post_type' === $info['type'] && $post_type === $info['post_type'] ) {
1399
+ if ( ! empty( $info['parent'] ) ) {
1400
+ $tabs = array(
1401
+ 'tab' => $info['parent'],
1402
+ 'sub_tab' => $key,
1403
+ );
1404
+ } else {
1405
+ $tabs = array( 'tab' => $key );
1406
+ }
1407
+ break;
1408
+ }
1409
+ }
1410
+
1411
+ $panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
1412
+
1413
+ return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_post_type_tabs", $tabs, $post_type );
1414
+ }
1415
+
1416
+ /**
1417
+ * Get the taxonomy tabs.
1418
+ *
1419
+ * @param string $taxonomy The taxonomy.
1420
+ *
1421
+ * @return array
1422
+ */
1423
+ public function get_taxonomy_tabs( $taxonomy ) {
1424
+ $tabs = array();
1425
+
1426
+ foreach ( $this->get_tabs_hierarchy() as $key => $info ) {
1427
+ if ( isset( $info['type'], $info['taxonomy'] ) && 'taxonomy' === $info['type'] && $taxonomy === $info['taxonomy'] ) {
1428
+ if ( ! empty( $info['parent'] ) ) {
1429
+ $tabs = array(
1430
+ 'tab' => $info['parent'],
1431
+ 'sub_tab' => $key,
1432
+ );
1433
+ } else {
1434
+ $tabs = array( 'tab' => $key );
1435
+ }
1436
+ break;
1437
+ }
1438
+ }
1439
+
1440
+ $panel_page = isset( $this->settings['page'] ) ? $this->settings['page'] : 'general';
1441
+
1442
+ return apply_filters( "yith_plugin_fw_panel_{$panel_page}_get_taxonomy_tabs", $tabs, $taxonomy );
1443
+ }
1444
+
1445
+
1446
+ /**
1447
+ * If the panel page is a WP Page, this will redirect you to the correct page
1448
+ * useful when a Post Type (Taxonomy) is the first tab of your panel, so when you open your panel it'll open the Post Type (Taxonomy) list
1449
+ *
1450
+ * @since 3.4.0
1451
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1452
+ */
1453
+ public function maybe_redirect_to_proper_wp_page() {
1454
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
1455
+ global $pagenow;
1456
+ if (
1457
+ 'admin.php' === $pagenow && isset( $_GET['page'] ) && $this->settings['page'] === $_GET['page']
1458
+ &&
1459
+ ! $this->is_custom_taxonomy_page() && ! $this->is_custom_post_type_page()
1460
+ &&
1461
+ ! isset( $_REQUEST['yith-plugin-fw-panel-skip-redirect'] )
1462
+ ) {
1463
+ $url = $this->get_nav_url( $this->settings['page'], $this->get_current_tab(), $this->get_current_sub_tab() );
1464
+ if ( strpos( $url, 'edit.php' ) !== false || strpos( $url, 'edit-tags.php' ) !== false ) {
1465
+ wp_safe_redirect( add_query_arg( array( 'yith-plugin-fw-panel-skip-redirect' => 1 ), $url ) );
1466
+ exit;
1467
+ }
1468
+ }
1469
+ // phpcs:enable
1470
+ }
1471
+
1472
+ /**
1473
+ * Print the Panel tabs and sub-tabs navigation in WP pages
1474
+ * Important: this opens a wrapper <div> that will be closed through YIT_Plugin_Panel::print_panel_tabs_in_post_edit_page_end()
1475
+ *
1476
+ * @since 3.4.0
1477
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1478
+ */
1479
+ public function print_panel_tabs_in_wp_pages() {
1480
+ if ( self::$panel_tabs_in_wp_pages ) {
1481
+ wp_enqueue_style( 'yit-plugin-style' );
1482
+ wp_enqueue_script( 'yit-plugin-panel' );
1483
+
1484
+ $wrap_class = isset( $this->settings['class'] ) ? $this->settings['class'] : '';
1485
+ ?>
1486
+ <div class="yith-plugin-fw-wp-page-wrapper">
1487
+ <?php
1488
+ echo '<div class="' . esc_attr( $wrap_class ) . '">';
1489
+ $this->add_plugin_banner( $this->settings['page'] );
1490
+ $this->print_tabs_nav( self::$panel_tabs_in_wp_pages );
1491
+ echo '</div>';
1492
+ }
1493
+ }
1494
+
1495
+ /**
1496
+ * Close the wrapper opened in YIT_Plugin_Panel::print_panel_tabs_in_wp_pages()
1497
+ *
1498
+ * @since 3.4.0
1499
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
1500
+ */
1501
+ public function print_panel_tabs_in_wp_pages_end() {
1502
+ if ( self::$panel_tabs_in_wp_pages ) {
1503
+ echo '</div><!-- /yith-plugin-fw-wp-page-wrapper -->';
1504
+ }
1505
+ }
1506
+
1507
+ /**
1508
+ * Set the parent page to handle menu for WP Pages.
1509
+ *
1510
+ * @param string $parent_file The parent file.
1511
+ *
1512
+ * @return string
1513
+ */
1514
+ public function set_parent_file_to_handle_menu_for_wp_pages( $parent_file ) {
1515
+ if ( self::$panel_tabs_in_wp_pages ) {
1516
+ return 'yith_plugin_panel';
1517
+ }
1518
+
1519
+ return $parent_file;
1520
+ }
1521
+
1522
+ /**
1523
+ * Set the submenu page to handle menu for WP Pages.
1524
+ *
1525
+ * @param string $submenu_file The submenu file.
1526
+ * @param string $parent_file The parent file.
1527
+ *
1528
+ * @return mixed
1529
+ */
1530
+ public function set_submenu_file_to_handle_menu_for_wp_pages( $submenu_file, $parent_file ) {
1531
+ if ( self::$panel_tabs_in_wp_pages ) {
1532
+ return $this->settings['page'];
1533
+ }
1534
+
1535
+ return $submenu_file;
1536
+ }
1537
+
1538
+ /**
1539
+ * Save the toggle element options.
1540
+ *
1541
+ * @return bool
1542
+ */
1543
+ public function save_toggle_element_options() {
1544
+ return true;
1545
+ }
1546
+ }
1547
+ }
plugin-fw/includes/class-yit-plugin-subpanel.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Plugin Sub-panel Class.
4
+ *
5
+ * @class YIT_Plugin_SubPanel
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Plugin_SubPanel' ) ) {
12
+ /**
13
+ * YIT_Plugin_SubPanel class.
14
+ *
15
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
16
+ */
17
+ class YIT_Plugin_SubPanel extends YIT_Plugin_Panel {
18
+
19
+ /**
20
+ * Version of the class.
21
+ *
22
+ * @var string
23
+ */
24
+ public $version = '1.0.0';
25
+
26
+ /**
27
+ * List of settings parameters.
28
+ *
29
+ * @var array
30
+ */
31
+ public $settings = array();
32
+
33
+ /**
34
+ * YIT_Plugin_SubPanel constructor.
35
+ *
36
+ * @param array $args The panel arguments.
37
+ */
38
+ public function __construct( $args = array() ) {
39
+ if ( ! empty( $args ) ) {
40
+ $this->settings = $args;
41
+ $this->settings['parent'] = $this->settings['page'];
42
+ $this->tabs_path_files = $this->get_tabs_path_files();
43
+
44
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
45
+ add_action( 'admin_menu', array( &$this, 'add_setting_page' ) );
46
+ add_action( 'admin_bar_menu', array( &$this, 'add_admin_bar_menu' ), 100 );
47
+ add_action( 'admin_init', array( &$this, 'add_fields' ) );
48
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Register Settings
54
+ * Generate wp-admin settings pages by registering your settings and using a few callbacks to control the output
55
+ *
56
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
57
+ */
58
+ public function register_settings() {
59
+ register_setting( 'yit_' . $this->settings['page'] . '_options', 'yit_' . $this->settings['page'] . '_options', array( &$this, 'options_validate' ) );
60
+ }
61
+
62
+
63
+ /**
64
+ * Add Setting SubPage
65
+ * add Setting SubPage to WordPress administrator
66
+ *
67
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
68
+ */
69
+ public function add_setting_page() {
70
+ global $admin_page_hooks;
71
+ $logo = yith_plugin_fw_get_default_logo();
72
+
73
+ $admin_logo = function_exists( 'yit_get_option' ) ? yit_get_option( 'admin-logo-menu' ) : '';
74
+
75
+ if ( ! empty( $admin_logo ) ) {
76
+ $logo = $admin_logo;
77
+ }
78
+
79
+ if ( ! isset( $admin_page_hooks['yith_plugin_panel'] ) ) {
80
+ $position = apply_filters( 'yit_plugins_menu_item_position', '62.32' );
81
+ add_menu_page( 'yith_plugin_panel', 'YITH', 'nosuchcapability', 'yith_plugin_panel', null, $logo, $position );
82
+ // Prevent issues for backward compatibility.
83
+ $admin_page_hooks['yith_plugin_panel'] = 'yith-plugins'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
84
+ }
85
+
86
+ add_submenu_page( 'yith_plugin_panel', $this->settings['label'], $this->settings['label'], 'manage_options', $this->settings['page'], array( $this, 'yit_panel' ) );
87
+ remove_submenu_page( 'yith_plugin_panel', 'yith_plugin_panel' );
88
+ }
89
+
90
+ /**
91
+ * Show a tabbed panel to setting page
92
+ * a callback function called by add_setting_page => add_submenu_page
93
+ *
94
+ * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
95
+ */
96
+ public function yit_panel() {
97
+ $tabs = '';
98
+ $current_tab = $this->get_current_tab();
99
+ $yit_options = $this->get_main_array_options();
100
+
101
+ foreach ( $this->settings['admin-tabs'] as $tab => $tab_value ) {
102
+ $active_class = $current_tab === $tab ? ' nav-tab-active' : '';
103
+ $url = '?page=' . $this->settings['page'] . '&tab=' . $tab;
104
+
105
+ $tabs .= '<a class="nav-tab' . esc_attr( $active_class ) . '" href="' . esc_url( $url ) . '">' . wp_kses_post( $tab_value ) . '</a>';
106
+ }
107
+ ?>
108
+ <div id="icon-themes" class="icon32"><br/></div>
109
+ <h2 class="nav-tab-wrapper">
110
+ <?php echo $tabs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
111
+ </h2>
112
+ <?php
113
+ $custom_tab_options = $this->get_custom_tab_options( $yit_options, $current_tab );
114
+ if ( $custom_tab_options ) {
115
+ $this->print_custom_tab( $custom_tab_options );
116
+
117
+ return;
118
+ }
119
+
120
+ $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' );
121
+ ?>
122
+ <div id="wrap" class="yith-plugin-fw plugin-option yit-admin-panel-container">
123
+ <?php $this->message(); ?>
124
+ <div class="<?php echo esc_attr( $panel_content_class ); ?>">
125
+ <h2><?php echo wp_kses_post( $this->get_tab_title() ); ?></h2>
126
+ <?php if ( $this->is_show_form() ) : ?>
127
+ <form id="yith-plugin-fw-panel" method="post" action="options.php">
128
+ <?php do_settings_sections( 'yit' ); ?>
129
+ <p>&nbsp;</p>
130
+ <?php settings_fields( 'yit_' . $this->settings['parent'] . '_options' ); ?>
131
+ <input type="hidden" name="<?php echo esc_attr( $this->get_name_field( 'current_tab' ) ); ?>" value="<?php echo esc_attr( $current_tab ); ?>"/>
132
+ <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'yith-plugin-fw' ); ?>" style="float:left;margin-right:10px;"/>
133
+ </form>
134
+ <form method="post">
135
+ <?php
136
+ $reset_warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) . '\n' . __( 'Are you sure?', 'yith-plugin-fw' );
137
+ ?>
138
+ <input type="hidden" name="yit-action" value="reset"/>
139
+ <input type="submit" name="yit-reset" class="button-secondary" value="<?php esc_attr_e( 'Reset to default', 'yith-plugin-fw' ); ?>"
140
+ onclick="return confirm('<?php echo esc_attr( $reset_warning ); ?>');"/>
141
+ </form>
142
+ <p>&nbsp;</p>
143
+ <?php endif ?>
144
+ </div>
145
+ </div>
146
+ <?php
147
+ }
148
+ }
149
+ }
plugin-fw/includes/class-yit-pointers.php ADDED
@@ -0,0 +1,380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Pointers Class.
4
+ *
5
+ * @class YIT_Pointers
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Pointers' ) ) {
12
+ /**
13
+ * YIT_Pointers class.
14
+ * Initializes the pointers.
15
+ */
16
+ class YIT_Pointers {
17
+
18
+ /**
19
+ * The single instance of the class.
20
+ *
21
+ * @var YIT_Pointers
22
+ */
23
+ private static $instance;
24
+
25
+ /**
26
+ * The screen IDs.
27
+ *
28
+ * @var array
29
+ */
30
+ public $screen_ids = array();
31
+
32
+ /**
33
+ * The pointers.
34
+ *
35
+ * @var array
36
+ */
37
+ public $pointers = array();
38
+
39
+ /**
40
+ * Special Screen Ids that require a particular action
41
+ *
42
+ * @var array|mixed|void
43
+ */
44
+ public $special_screen = array();
45
+
46
+ /**
47
+ * Default pointers.
48
+ *
49
+ * @var array|mixed
50
+ */
51
+ protected $default_pointer = array();
52
+
53
+ /**
54
+ * The default position
55
+ *
56
+ * @var string[]
57
+ */
58
+ protected $default_position = array(
59
+ 'edge' => 'left',
60
+ 'align' => 'center',
61
+ );
62
+
63
+ /**
64
+ * Singleton implementation.
65
+ *
66
+ * @return YIT_Pointers
67
+ */
68
+ public static function instance() {
69
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
70
+ }
71
+
72
+ /**
73
+ * Construct
74
+ *
75
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
76
+ * @since 1.0
77
+ */
78
+ private function __construct() {
79
+
80
+ $title = __( 'Plugins Activated', 'yith-plugin-fw' );
81
+ $message = __( 'From now on, you can find all plugin options in YITH Plugins menu. Plugin customization settings will be available as a new entry in YITH Plugins menu.', 'yith-plugin-fw' );
82
+ $discover_message = sprintf(
83
+ // translators: 1. YITH site link; 2. WordPress site link.
84
+ __( 'Discover all our plugins available on: %1$s and %2$s', 'yith-plugin-fw' ),
85
+ '<a href="https://yithemes.com/product-category/plugins/" target="_blank">yithemes.com</a>',
86
+ '<a href="https://profiles.wordpress.org/yithemes/" target="_blank">Wordpress.org</a>'
87
+ );
88
+
89
+ $this->default_pointer['plugins'] = array(
90
+ 'screen_id' => 'plugins',
91
+ 'options' => array(
92
+ 'content' => "<h3>{$title}</h3><p>{$message}</p><p>{$discover_message}</p>",
93
+ ),
94
+ );
95
+
96
+ $title = __( 'Plugins Upgraded', 'yith-plugin-fw' );
97
+ $message = __( 'From now on, you can find the option panel of YITH plugins in YITH Plugins menu. Every time one of our plugins is added, a new entry will be added to this menu. For example, after the update, plugin options (such as for YITH WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from previous location to YITH Plugins tab.', 'yith-plugin-fw' );
98
+ $discover_message = sprintf(
99
+ // translators: 1. YITH site link; 2. WordPress site link.
100
+ __( 'Discover all our plugins available on: %1$s and %2$s', 'yith-plugin-fw' ),
101
+ '<a href="https://yithemes.com/product-category/plugins/" target="_blank">yithemes.com</a>',
102
+ '<a href="https://profiles.wordpress.org/yithemes/" target="_blank">Wordpress.org</a>'
103
+ );
104
+
105
+ $this->default_pointer['update'] = array(
106
+ 'screen_id' => 'update',
107
+ 'options' => array(
108
+ 'content' => "<h3>{$title}</h3><p>{$message}</p><p>{$discover_message}</p>",
109
+ ),
110
+ );
111
+
112
+ $this->default_pointer = $this->parse_args( $this->default_pointer );
113
+
114
+ // DEPRECATED 'yit-pointer-special-screen' filter since 3.5 | use yith_plugin_fw_pointers_special_screens instead.
115
+ $this->special_screen = apply_filters( 'yit-pointer-special-screen', array( 'plugins', 'update' ) ); //phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
116
+ $this->special_screen = apply_filters( 'yith_plugin_fw_pointers_special_screens', array( 'plugins', 'update' ) );
117
+
118
+ add_action( 'admin_enqueue_scripts', array( $this, 'pointer_load' ) );
119
+ add_action( 'admin_init', array( $this, 'add_pointers' ), 100 );
120
+ }
121
+
122
+ /**
123
+ * Parse args for the default pointer.
124
+ *
125
+ * @param array $args The arguments to be parse.
126
+ *
127
+ * @return array
128
+ */
129
+ public function parse_args( $args ) {
130
+ $default = array(
131
+ 'pointer_id' => 'yith_default_pointer',
132
+ 'target' => '#toplevel_page_yit_plugin_panel',
133
+ 'init' => null,
134
+ );
135
+
136
+ foreach ( $args as $id => $pointer ) {
137
+ $args[ $id ] = wp_parse_args( $pointer, $default );
138
+ $args[ $id ]['options']['position'] = $this->default_position;
139
+ }
140
+
141
+ return $args;
142
+ }
143
+
144
+ /**
145
+ * Add pointers
146
+ */
147
+ public function add_pointers() {
148
+ if ( ! empty( $this->screen_ids ) ) {
149
+ foreach ( $this->screen_ids as $screen_id ) {
150
+ add_filter( "yit_pointers-{$screen_id}", array( $this, 'pointers' ) );
151
+ }
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Register pointers.
157
+ *
158
+ * @param array $pointers The pointers.
159
+ */
160
+ public function register( $pointers ) {
161
+ foreach ( $pointers as $id => $pointer ) {
162
+ $pointer_id = isset( $pointer['pointer_id'] ) ? $pointer['pointer_id'] : false;
163
+ $target = isset( $pointer['target'] ) ? $pointer['target'] : false;
164
+ $content = isset( $pointer['content'] ) ? $pointer['content'] : false;
165
+ $position = isset( $pointer['position'] ) ? $pointer['position'] : false;
166
+ $screen_id = isset( $pointer['screen_id'] ) ? $pointer['screen_id'] : false;
167
+ $init = isset( $pointer['init'] ) ? $pointer['init'] : false;
168
+
169
+ if ( ! $pointer_id || ! $target || ! $content || ! $position || ! $screen_id ) {
170
+ continue;
171
+ }
172
+
173
+ if ( ! in_array( $screen_id, $this->screen_ids, true ) ) {
174
+ $this->screen_ids[] = $screen_id;
175
+ }
176
+
177
+ $this->pointers[ $screen_id ][ $pointer_id ] = array(
178
+ 'target' => $target,
179
+ 'options' => array(
180
+ 'content' => $content,
181
+ 'position' => $position,
182
+ ),
183
+ 'init' => $init,
184
+ );
185
+ }
186
+ }
187
+
188
+ /**
189
+ * Retrieve the registered pointers array where the keys will be the plugin init(s).
190
+ *
191
+ * @param string $screen_id The screen ID.
192
+ *
193
+ * @return array
194
+ */
195
+ public function get_plugins_init( $screen_id ) {
196
+
197
+ $registered = array();
198
+
199
+ foreach ( $this->pointers[ $screen_id ] as $pointer_id => $pointer ) {
200
+ $registered[ $pointer['init'] ] = $pointer_id;
201
+ }
202
+
203
+ return $registered;
204
+ }
205
+
206
+ /**
207
+ * Load the pointer.
208
+ *
209
+ * @param bool $deprecated Deprecated param.
210
+ */
211
+ public function pointer_load( $deprecated = false ) {
212
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
213
+ // phpcs:disable WordPress.Security.NonceVerification.Missing
214
+
215
+ // Retrieve the pointers for the current screen.
216
+ $screen = get_current_screen();
217
+ $pointers = apply_filters( "yit_pointers-{$screen->id}", array() ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
218
+
219
+ if ( ! $pointers || ! is_array( $pointers ) ) {
220
+ return;
221
+ }
222
+
223
+ // Get dismissed pointers.
224
+ $dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
225
+ $valid_pointers = array();
226
+
227
+ // Show pointers only on plugin activate action.
228
+ if ( in_array( $screen->id, $this->special_screen, true ) ) {
229
+ $show = false;
230
+ $registered = $this->get_plugins_init( $screen->id );
231
+ $recently_activate = get_option( 'yit_recently_activated', array() );
232
+
233
+ // For "plugins" screen.
234
+ $is_single_activate = isset( $_GET['activate'] ) && 'true' === $_GET['activate'];
235
+ $is_multi_activate = isset( $_GET['activate-multi'] ) && 'true' === $_GET['activate-multi'];
236
+
237
+ /**
238
+ * For "update" screen
239
+ * Single plugin update use GET method
240
+ * Multi update plugins with bulk action send two post args called "action" and "action2"
241
+ * action refer to first bulk action button (at the top of plugins table)
242
+ * action2 refer to last bulk action button (at the bottom of plugins table)
243
+ */
244
+ $is_single_upgrade = isset( $_GET['action'] ) && 'upgrade-plugin' === $_GET['action'];
245
+ $is_multi_upgrade = ( isset( $_POST['action'] ) && 'update-selected' === $_POST['action'] ) || ( isset( $_POST['action2'] ) && 'update-selected' === $_POST['action2'] );
246
+
247
+ if ( $is_single_activate || $is_single_upgrade ) {
248
+ foreach ( $registered as $init => $p_id ) {
249
+ if ( in_array( $init, $recently_activate, true ) ) {
250
+ $point_id = $p_id;
251
+ $pointer = $pointers[ $point_id ];
252
+
253
+ if ( ! ( in_array( $point_id, $dismissed, true ) || empty( $pointer ) || empty( $point_id ) || empty( $pointer['target'] ) || empty( $pointer['options'] ) ) ) {
254
+ $pointer['pointer_id'] = $point_id;
255
+ $valid_pointers['pointers'][] = $pointer;
256
+ $show = true;
257
+ }
258
+ break;
259
+ }
260
+ }
261
+ } elseif ( $is_multi_activate || $is_multi_upgrade ) {
262
+ $point_id = array();
263
+ $screen_id = $screen->id;
264
+
265
+ if ( $is_multi_upgrade && isset( $_POST['checked'] ) && ( count( $_POST['checked'] ) > 0 ) ) {
266
+ $recently_activate = sanitize_file_name( wp_unslash( $_POST['checked'] ) );
267
+ $screen_id = 'update';
268
+ $pointers = apply_filters( "yit_pointers-{$screen_id}", array() ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
269
+ }
270
+
271
+ foreach ( $registered as $init => $p_id ) {
272
+ if ( in_array( $init, $recently_activate, true ) ) {
273
+ $point_id[] = $p_id;
274
+ }
275
+ }
276
+
277
+ /**
278
+ * Bulk Action: Activate Plugins
279
+ * count( $point_id ) is the number of YITH plugins that have registered specific pointers
280
+ * case 0 -> No pointers -> Exit
281
+ * case 1 -> Only one pointers to show -> Use the specific plugin pointer
282
+ * default -> Two or more plugins need to show a pointer -> use a generic pointers
283
+ */
284
+ switch ( count( $point_id ) ) {
285
+ case 0:
286
+ $show = false;
287
+ break;
288
+
289
+ case 1:
290
+ $point_id = array_pop( $point_id );
291
+ $pointer = $pointers[ $point_id ];
292
+ if ( ! ( in_array( $point_id, $dismissed, true ) || empty( $pointer ) || empty( $point_id ) || empty( $pointer['target'] ) || empty( $pointer['options'] ) ) ) {
293
+ $pointer['pointer_id'] = $point_id;
294
+ $valid_pointers['pointers'][] = $pointer;
295
+ $show = true;
296
+ }
297
+ break;
298
+
299
+ default:
300
+ $valid_pointers['pointers'][] = $this->default_pointer[ $screen_id ];
301
+ $show = true;
302
+ break;
303
+ }
304
+ }
305
+
306
+ update_option( 'yit_recently_activated', array() );
307
+
308
+ if ( ! $show ) {
309
+ return;
310
+ }
311
+ } else {
312
+ // Check pointers and remove dismissed ones.
313
+ foreach ( $pointers as $pointer_id => $pointer ) {
314
+
315
+ if ( in_array( $pointer_id, $dismissed, true ) || empty( $pointer ) || empty( $pointer_id ) || empty( $pointer['target'] ) || empty( $pointer['options'] ) ) {
316
+ continue;
317
+ }
318
+
319
+ $pointer['pointer_id'] = $pointer_id;
320
+
321
+ $valid_pointers['pointers'][] = $pointer;
322
+ }
323
+ }
324
+
325
+ if ( empty( $valid_pointers ) ) {
326
+ return;
327
+ }
328
+
329
+ $script_file = function_exists( 'yit_load_js_file' ) ? yit_load_js_file( 'yit-wp-pointer.js' ) : 'yit-wp-pointer.min.js';
330
+
331
+ // Enqueue pointer scripts and styles.
332
+ wp_enqueue_style( 'wp-pointer' );
333
+ wp_enqueue_script( 'wp-pointer' );
334
+
335
+ wp_enqueue_script( 'yit-wp-pointer', YIT_CORE_PLUGIN_URL . '/assets/js/' . $script_file, array( 'wp-pointer' ), yith_plugin_fw_get_version(), true );
336
+ wp_localize_script( 'yit-wp-pointer', 'custom_pointer', $valid_pointers );
337
+
338
+ // phpcs:enable
339
+ }
340
+
341
+ /**
342
+ * Filter pointers.
343
+ *
344
+ * @param array $pointers The pointers.
345
+ *
346
+ * @return array
347
+ */
348
+ public function pointers( $pointers ) {
349
+ $screen_id = str_replace( 'yit_pointers-', '', current_filter() );
350
+ $pointers_to_add = $this->get_pointers( $screen_id );
351
+
352
+ return ! empty( $pointers_to_add ) ? array_merge( $pointers, $pointers_to_add ) : $pointers;
353
+ }
354
+
355
+ /**
356
+ * Retrieve pointers for the specified screen ID.
357
+ *
358
+ * @param string $screen_id The Screen ID.
359
+ *
360
+ * @return array|mixed
361
+ */
362
+ public function get_pointers( $screen_id ) {
363
+ return isset( $this->pointers[ $screen_id ] ) ? $this->pointers[ $screen_id ] : array();
364
+ }
365
+ }
366
+ }
367
+
368
+ if ( ! function_exists( 'YIT_Pointers' ) ) {
369
+
370
+ /**
371
+ * Single instance of YIT_Pointers
372
+ *
373
+ * @return YIT_Pointers
374
+ */
375
+ function YIT_Pointers() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
376
+ return YIT_Pointers::instance();
377
+ }
378
+ }
379
+
380
+ YIT_Pointers();
plugin-fw/includes/class-yit-theme-licence.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Theme License Class.
4
+ *
5
+ * @class YIT_Theme_Licence
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YIT_Theme_Licence' ) ) {
12
+ /**
13
+ * YIT_Theme_Licence class.
14
+ *
15
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
16
+ */
17
+ class YIT_Theme_Licence {
18
+ /**
19
+ * The single instance of the class.
20
+ *
21
+ * @var YIT_Theme_Licence
22
+ */
23
+ private static $instance;
24
+
25
+ /**
26
+ * Singleton implementation.
27
+ *
28
+ * @return YIT_Theme_Licence
29
+ */
30
+ public static function instance() {
31
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
32
+ }
33
+
34
+ /**
35
+ * YIT_Theme_Licence constructor.
36
+ */
37
+ private function __construct() {
38
+ // Silence is golden.
39
+ }
40
+
41
+ /**
42
+ * Premium products registration.
43
+ *
44
+ * @param string $init The product init identifier.
45
+ * @param string $secret_key The secret key.
46
+ * @param string $product_id The product ID.
47
+ *
48
+ * @return void
49
+ * @since 1.0
50
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
51
+ */
52
+ public function register( $init, $secret_key, $product_id ) {
53
+ if ( ! function_exists( 'YITH_Theme_Licence' ) ) {
54
+ // Try to load YITH_Theme_Licence class.
55
+ yith_plugin_fw_load_update_and_licence_files();
56
+ }
57
+
58
+ if ( function_exists( 'YITH_Theme_Licence' ) && is_callable( array( YITH_Theme_Licence(), 'register' ) ) ) {
59
+ YITH_Theme_Licence()->register( $init, $secret_key, $product_id );
60
+ }
61
+ }
62
+ }
63
+ }
64
+
65
+ if ( ! function_exists( 'YIT_Theme_Licence' ) ) {
66
+ /**
67
+ * Single instance of YIT_Theme_Licence
68
+ *
69
+ * @return YIT_Theme_Licence
70
+ */
71
+ function YIT_Theme_Licence() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
72
+ return YIT_Theme_Licence::instance();
73
+ }
74
+ }
plugin-fw/includes/class-yit-upgrade.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Upgrade Class
4
+ * handle notifications and plugin updates.
5
+ *
6
+ * @class YIT_Upgrade
7
+ * @package YITH\PluginFramework\Classes
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
11
+
12
+ if ( ! class_exists( 'YIT_Upgrade' ) ) {
13
+ /**
14
+ * YIT_Upgrade class.
15
+ */
16
+ class YIT_Upgrade {
17
+ /**
18
+ * The single instance of the class.
19
+ *
20
+ * @var YIT_Upgrade
21
+ */
22
+ private static $instance;
23
+
24
+ /**
25
+ * Singleton implementation.
26
+ *
27
+ * @return YIT_Upgrade
28
+ */
29
+ public static function instance() {
30
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
31
+ }
32
+
33
+ /**
34
+ * YIT_Upgrade constructor.
35
+ */
36
+ private function __construct() {
37
+ // Silence is golden.
38
+ }
39
+
40
+ /**
41
+ * Premium products registration.
42
+ *
43
+ * @param string $plugin_slug The plugin slug.
44
+ * @param string $plugin_init The plugin init file.
45
+ */
46
+ public function register( $plugin_slug, $plugin_init ) {
47
+ if ( ! function_exists( 'YITH_Plugin_Upgrade' ) ) {
48
+ // Try to load YITH_Plugin_Upgrade class.
49
+ yith_plugin_fw_load_update_and_licence_files();
50
+ }
51
+
52
+ if ( function_exists( 'YITH_Plugin_Upgrade' ) && is_callable( array( YITH_Plugin_Upgrade(), 'register' ) ) ) {
53
+ YITH_Plugin_Upgrade()->register( $plugin_slug, $plugin_init );
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ if ( ! function_exists( 'YIT_Upgrade' ) ) {
60
+ /**
61
+ * Single instance of YIT_Upgrade
62
+ *
63
+ * @return YIT_Upgrade
64
+ */
65
+ function YIT_Upgrade() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
66
+ return YIT_Upgrade::instance();
67
+ }
68
+ }
69
+
70
+ YIT_Upgrade();
plugin-fw/includes/class-yit-video.php ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Video Class
4
+ * manage videos from youtube, vimeo and other services.
5
+ *
6
+ * @class YIT_Video
7
+ * @package YITH\PluginFramework\Classes
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
11
+
12
+ if ( ! class_exists( 'YIT_Video' ) ) {
13
+ /**
14
+ * YIT_Video class.
15
+ *
16
+ * @deprecated 3.5
17
+ */
18
+ class YIT_Video {
19
+
20
+ /**
21
+ * Generate the HTML for a youtube video
22
+ *
23
+ * @param array $args Array of arguments to configure the video to generate.
24
+ *
25
+ * @return string
26
+ */
27
+ public static function youtube( $args = array() ) {
28
+ $defaults = array(
29
+ 'id' => '',
30
+ 'url' => '',
31
+ 'width' => 425,
32
+ 'height' => 356,
33
+ 'echo' => false,
34
+ );
35
+ $args = wp_parse_args( $args, $defaults );
36
+
37
+ $id = $args['id'];
38
+ $url = $args['url'];
39
+ $width = $args['width'];
40
+ $height = $args['height'];
41
+ $echo = $args['echo'];
42
+ $html = '';
43
+
44
+ // Retrieve the video ID if we have only the URL.
45
+ if ( ! $id && ! ! $url ) {
46
+ $id = self::video_id_by_url( $url );
47
+ }
48
+
49
+ if ( $id ) {
50
+ $id = preg_replace( '/[&|&amp;]feature=([\w\-]*)/', '', $id );
51
+ $id = preg_replace( '/(youtube|vimeo):/', '', $id );
52
+ $url = "https://www.youtube.com/embed/{$id}?wmode=transparent";
53
+
54
+ $html = '<div class="post_video youtube">' .
55
+ '<iframe wmode="transparent" width="' . esc_attr( $width ) . '" height="' . esc_attr( $height ) . '" src="' . esc_url( $url ) . '" frameborder="0" allowfullscreen></iframe>' .
56
+ '</div>';
57
+ $html = apply_filters( 'yit_video_youtube', $html );
58
+ }
59
+
60
+ if ( $echo ) {
61
+ echo wp_kses_post( $html );
62
+ }
63
+
64
+ return $html;
65
+ }
66
+
67
+ /**
68
+ * Generate the HTML for a vimeo video
69
+ *
70
+ * @param array $args Array of arguments to configure the video to generate.
71
+ *
72
+ * @return string
73
+ */
74
+ public static function vimeo( $args = array() ) {
75
+ $defaults = array(
76
+ 'id' => '',
77
+ 'url' => '',
78
+ 'width' => 425,
79
+ 'height' => 356,
80
+ 'echo' => false,
81
+ );
82
+ $args = wp_parse_args( $args, $defaults );
83
+
84
+ $id = $args['id'];
85
+ $url = $args['url'];
86
+ $width = $args['width'];
87
+ $height = $args['height'];
88
+ $echo = $args['echo'];
89
+ $html = '';
90
+
91
+ // Retrieve the video ID if we have only the URL.
92
+ if ( ! $id && ! ! $url ) {
93
+ $id = self::video_id_by_url( $url );
94
+ }
95
+
96
+ if ( $id ) {
97
+ $id = preg_replace( '/[&|&amp;]feature=([\w\-]*)/', '', $id );
98
+ $id = preg_replace( '/(youtube|vimeo):/', '', $id );
99
+ $protocol = is_ssl() ? 'https' : 'http';
100
+ $url = "{$protocol}://player.vimeo.com/video/{$id}?title=0&amp;byline=0&amp;portrait=0";
101
+
102
+ $html = '<div class="post_video youtube">' .
103
+ '<iframe wmode="transparent" width="' . esc_attr( $width ) . '" height="' . esc_attr( $height ) . '" src="' . esc_url( $url ) . '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>' .
104
+ '</div>';
105
+ $html = apply_filters( 'yit_video_vimeo', $html );
106
+ }
107
+
108
+ if ( $echo ) {
109
+ echo wp_kses_post( $html );
110
+ }
111
+
112
+ return $html;
113
+ }
114
+
115
+ /**
116
+ * Retrieve video ID from URL
117
+ *
118
+ * @param string $url URL of the video.
119
+ *
120
+ * @return bool|string
121
+ */
122
+ public static function video_id_by_url( $url ) {
123
+ $parsed = wp_parse_url( esc_url( $url ) );
124
+ $host = isset( $parsed['host'] ) ? $parsed['host'] : false;
125
+
126
+ switch ( $host ) {
127
+ case 'youtube.com':
128
+ case 'www.youtube.com':
129
+ case 'youtu.be':
130
+ case 'www.youtu.be':
131
+ $id = self::youtube_id_by_url( $url );
132
+ $video_id = "youtube:$id";
133
+ break;
134
+
135
+ case 'www.vimeo.com':
136
+ case 'vimeo.com':
137
+ preg_match( '/http(s)?:\/\/(\w+.)?vimeo\.com\/(.*\/)?([0-9]+)/', $url, $matches );
138
+
139
+ $id = trim( $matches[4], '/' );
140
+ $video_id = "vimeo:$id";
141
+ break;
142
+
143
+ default:
144
+ $video_id = false;
145
+
146
+ }
147
+
148
+ return $video_id;
149
+ }
150
+
151
+ /**
152
+ * Retrieve video ID from URL
153
+ *
154
+ * @param string $url URL of the video.
155
+ *
156
+ * @return bool|string
157
+ */
158
+ protected static function youtube_id_by_url( $url ) {
159
+ if ( preg_match( '/http(s)?:\/\/youtu.be/', $url, $matches ) ) {
160
+ $url = wp_parse_url( $url, PHP_URL_PATH );
161
+ $url = str_replace( '/', '', $url );
162
+
163
+ return $url;
164
+
165
+ } elseif ( preg_match( '/watch/', $url, $matches ) ) {
166
+ $arr = wp_parse_url( $url );
167
+ $url = str_replace( 'v=', '', $arr['query'] );
168
+
169
+ return $url;
170
+
171
+ } elseif ( preg_match( '/http(s)?:\/\/(\w+.)?youtube.com\/v/', $url, $matches ) ) {
172
+ $arr = wp_parse_url( $url );
173
+ $url = str_replace( '/v/', '', $arr['path'] );
174
+
175
+ return $url;
176
+
177
+ } elseif ( preg_match( '/http(s)?:\/\/(\w+.)?youtube.com\/embed/', $url, $matches ) ) {
178
+ $arr = wp_parse_url( $url );
179
+ $url = str_replace( '/embed/', '', $arr['path'] );
180
+
181
+ return $url;
182
+
183
+ } elseif ( preg_match( "#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=[0-9]/)[^&\n]+|(?<=v=)[^&\n]+#", $url, $matches ) ) {
184
+ return $matches[0];
185
+
186
+ } else {
187
+ return false;
188
+ }
189
+ }
190
+
191
+ }
192
+ }
plugin-fw/includes/class-yith-dashboard.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Dashboard Class
4
+ * handle WordPress Admin Dashboard
5
+ *
6
+ * @class YITH_Dashboard
7
+ * @package YITH\PluginFramework\Classes
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
11
+
12
+ if ( ! class_exists( 'YITH_Dashboard' ) ) {
13
+ /**
14
+ * YITH_Dashboard class.
15
+ */
16
+ class YITH_Dashboard {
17
+ /**
18
+ * Products Feed URL
19
+ *
20
+ * @var string
21
+ */
22
+ private static $products_feed = 'https://yithemes.com/latest-updates/feeds/';
23
+
24
+ /**
25
+ * Blog Feed URL
26
+ *
27
+ * @var string
28
+ */
29
+ private static $blog_feed = 'https://yithemes.com/feed/';
30
+
31
+ /**
32
+ * Dashboard widget setup.
33
+ */
34
+ public static function dashboard_widget_setup() {
35
+ wp_add_dashboard_widget( 'yith_dashboard_products_news', __( 'YITH Latest Updates', 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_products_news' );
36
+ wp_add_dashboard_widget( 'yith_dashboard_blog_news', __( 'Latest news from YITH Blog', 'yith-plugin-fw' ), 'YITH_Dashboard::dashboard_blog_news' );
37
+ }
38
+
39
+
40
+ /**
41
+ * Product news Widget
42
+ */
43
+ public static function dashboard_products_news() {
44
+ $items = 10;
45
+ $rss = static::$products_feed;
46
+ if ( is_string( $rss ) ) {
47
+ $rss = fetch_feed( $rss );
48
+ } elseif ( is_array( $rss ) && isset( $rss['url'] ) ) {
49
+ $rss = fetch_feed( $rss['url'] );
50
+ } elseif ( ! is_object( $rss ) ) {
51
+ return;
52
+ }
53
+
54
+ if ( is_wp_error( $rss ) ) {
55
+ if ( is_admin() || current_user_can( 'manage_options' ) ) {
56
+ echo '<p><strong>' . esc_html__( 'RSS Error:', 'yith-plugin-fw' ) . '</strong> ' . wp_kses_post( $rss->get_error_message() ) . '</p>';
57
+ }
58
+
59
+ return;
60
+ }
61
+
62
+ if ( ! $rss->get_item_quantity() ) {
63
+ echo '<ul><li>' . esc_html__( 'An error has occurred, which probably means the feed is down. Try again later.', 'yith-plugin-fw' ) . '</li></ul>';
64
+ $rss->__destruct();
65
+ unset( $rss );
66
+
67
+ return;
68
+ }
69
+
70
+ /**
71
+ * The feed items.
72
+ *
73
+ * @var SimplePie_Item[] $last_updates
74
+ */
75
+ $last_updates = $rss->get_items( 0, $items );
76
+ $html_classes = 'rsswidget yith-update-feeds';
77
+ $output = '';
78
+
79
+ if ( count( $last_updates ) > 0 ) {
80
+ $output = '<ul class="yith-update-feeds">';
81
+ }
82
+
83
+ foreach ( $last_updates as $last_update ) {
84
+ $output .= '<li class="yith-update-feed">';
85
+
86
+ $date = $last_update->get_date( 'U' );
87
+ $date_i18n = ! empty( $date ) ? date_i18n( get_option( 'date_format' ), $date ) : '';
88
+ $html_date = ! empty( $date_i18n ) ? ' <span class="rss-date">' . date_i18n( get_option( 'date_format' ), $date ) . '</span>' : '';
89
+
90
+ $output .= sprintf( '<a target="_blank" href="%s" class="%s">%s</a> %s', $last_update->get_permalink(), $html_classes, $last_update->get_title(), $html_date );
91
+
92
+ $changelog = $last_update->get_description();
93
+
94
+ if ( ! empty( $changelog ) ) {
95
+ $output .= ' - ';
96
+ $output .= sprintf( '<a class="yith-last-changelog" href="#" data-changelogid="%s" data-plugininfo="%s">%s</a>', $last_update->get_id( true ), $last_update->get_title(), _x( 'View Changelog', 'Plugin FW', 'yith-plugin-fw' ) );
97
+ $output .= sprintf( '<div style="display: none;" id="%s"><div style="display: table;"><img class="yith-feeds-logo" src="%s" /><h3 class="yith-feeds-plugin-name"><span style="font-weight: normal;">%s</span> %s</h3></div><p>%s</p></div>', $last_update->get_id( true ), yith_plugin_fw_get_default_logo(), _x( 'Latest update released on', 'Plugin FW', 'yith-plugin-fw' ), $date_i18n, $changelog );
98
+ }
99
+
100
+ $output .= '</li>';
101
+ }
102
+
103
+ if ( ! empty( $output ) ) {
104
+ $output .= '</ul>';
105
+ }
106
+
107
+ echo wp_kses_post( $output );
108
+ $rss->__destruct();
109
+ unset( $rss );
110
+ }
111
+
112
+ /**
113
+ * Blog news Widget
114
+ */
115
+ public static function dashboard_blog_news() {
116
+ $args = array(
117
+ 'show_author' => 0,
118
+ 'show_date' => 1,
119
+ 'show_summary' => 1,
120
+ 'items' => 3,
121
+ );
122
+ $feed = static::$blog_feed;
123
+ wp_widget_rss_output( $feed, $args );
124
+ }
125
+
126
+ /**
127
+ * Enqueue Styles and Scripts for View Last Changelog widget
128
+ */
129
+ public static function enqueue_scripts() {
130
+ if ( function_exists( 'get_current_screen' ) && get_current_screen() && 'dashboard' === get_current_screen()->id ) {
131
+ $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
132
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
133
+ wp_enqueue_script( 'yith-dashboard', $script_path . '/assets/js/yith-dashboard' . $suffix . '.js', array( 'jquery-ui-dialog' ), yith_plugin_fw_get_version(), true );
134
+ wp_enqueue_style( 'wp-jquery-ui-dialog' );
135
+ $l10n = array(
136
+ 'buttons' => array(
137
+ 'close' => _x( 'Close', 'Button label', 'yith-plugin-fw' ),
138
+ ),
139
+ );
140
+ wp_localize_script( 'yith-dashboard', 'yith_dashboard', $l10n );
141
+ }
142
+ }
143
+ }
144
+
145
+ if ( apply_filters( 'yith_plugin_fw_show_dashboard_widgets', true ) ) {
146
+ add_action( 'wp_dashboard_setup', 'YITH_Dashboard::dashboard_widget_setup' );
147
+ add_action( 'admin_enqueue_scripts', 'YITH_Dashboard::enqueue_scripts', 20 );
148
+ }
149
+ }
plugin-fw/includes/class-yith-debug.php ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Debug Class.
4
+ *
5
+ * @class YITH_Debug
6
+ * @package YITH\PluginFramework\Classes
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! class_exists( 'YITH_Debug' ) ) {
12
+ /**
13
+ * YITH_Debug class.
14
+ *
15
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
16
+ */
17
+ class YITH_Debug {
18
+
19
+ /**
20
+ * The single instance of the class.
21
+ *
22
+ * @var YITH_Debug
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Singleton implementation.
28
+ *
29
+ * @return YITH_Debug
30
+ */
31
+ public static function instance() {
32
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
33
+ }
34
+
35
+ /**
36
+ * Deprecated singleton implementation.
37
+ * Kept for backward compatibility.
38
+ *
39
+ * @return YITH_Debug
40
+ * @deprecated 3.5 | use YITH_Debug::get_instance() instead.
41
+ */
42
+ public static function get_instance() {
43
+ return self::instance();
44
+ }
45
+
46
+ /**
47
+ * YITH_Debug constructor.
48
+ */
49
+ private function __construct() {
50
+ add_action( 'init', array( $this, 'init' ) );
51
+ }
52
+
53
+ /**
54
+ * Init
55
+ */
56
+ public function init() {
57
+ if ( ! is_admin() || defined( 'DOING_AJAX' ) ) {
58
+ return;
59
+ }
60
+
61
+ $is_debug = apply_filters( 'yith_plugin_fw_is_debug', isset( $_GET['yith-debug'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
62
+
63
+ if ( $is_debug ) {
64
+ add_action( 'admin_bar_menu', array( $this, 'add_debug_in_admin_bar' ), 99 );
65
+ }
66
+ }
67
+
68
+ /**
69
+ * Add debug node in admin bar.
70
+ *
71
+ * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance.
72
+ */
73
+ public function add_debug_in_admin_bar( $wp_admin_bar ) {
74
+ $args = array(
75
+ 'id' => 'yith-debug-admin-bar',
76
+ 'title' => 'YITH Debug',
77
+ 'href' => '',
78
+ 'meta' => array(
79
+ 'class' => 'yith-debug-admin-bar',
80
+ ),
81
+ );
82
+ $wp_admin_bar->add_node( $args );
83
+
84
+ $subnodes = array();
85
+
86
+ foreach ( $this->get_debug_information() as $key => $information ) {
87
+ $label = $information['label'];
88
+ $value = $information['value'];
89
+ $url = ! empty( $information['url'] ) ? $information['url'] : '';
90
+
91
+ if ( ! ! $value ) {
92
+ $title = "<strong>$label:</strong> $value";
93
+ } else {
94
+ $title = "<strong>$label</strong>";
95
+ }
96
+
97
+ $subnodes[] = array(
98
+ 'id' => 'yith-debug-admin-bar-' . $key,
99
+ 'parent' => 'yith-debug-admin-bar',
100
+ 'title' => $title,
101
+ 'href' => $url,
102
+ 'meta' => array(
103
+ 'class' => 'yith-debug-admin-bar-' . $key,
104
+ ),
105
+ );
106
+
107
+ if ( isset( $information['subsub'] ) ) {
108
+ foreach ( $information['subsub'] as $sub_key => $sub_value ) {
109
+ $title = isset( $sub_value['title'] ) ? $sub_value['title'] : '';
110
+ $html = isset( $sub_value['html'] ) ? $sub_value['html'] : '';
111
+ $subnodes[] = array(
112
+ 'id' => 'yith-debug-admin-bar-' . $key . '-' . $sub_key,
113
+ 'parent' => 'yith-debug-admin-bar-' . $key,
114
+ 'title' => $title,
115
+ 'href' => '',
116
+ 'meta' => array(
117
+ 'class' => 'yith-debug-admin-bar-' . $key . '-' . $sub_key,
118
+ 'html' => $html,
119
+ ),
120
+ );
121
+ }
122
+ }
123
+ }
124
+
125
+ foreach ( $subnodes as $subnode ) {
126
+ $wp_admin_bar->add_node( $subnode );
127
+ }
128
+ }
129
+
130
+
131
+ /**
132
+ * Return an array of debug information.
133
+ *
134
+ * @return array
135
+ */
136
+ public function get_debug_information() {
137
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
138
+ // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_dump
139
+
140
+ $debug = array(
141
+ 'plugin-fw-info' => array(
142
+ 'label' => 'Framework',
143
+ 'value' => $this->get_plugin_framework_info(),
144
+ ),
145
+ 'yith-premium-plugins' => array(
146
+ 'label' => 'YITH Premium Plugins',
147
+ 'value' => '',
148
+ 'subsub' => $this->get_premium_plugins_info(),
149
+ ),
150
+ 'wc-version' => array(
151
+ 'label' => 'WooCommerce',
152
+ 'value' => $this->get_woocommerce_version_info(),
153
+ ),
154
+ 'theme' => array(
155
+ 'label' => 'Theme',
156
+ 'value' => $this->get_theme_info(),
157
+ ),
158
+ 'screen-id' => array(
159
+ 'label' => 'Screen ID',
160
+ 'value' => $this->get_current_screen_info(),
161
+ ),
162
+ 'post-meta' => array(
163
+ 'label' => 'Post Meta',
164
+ 'value' => '',
165
+ 'url' => add_query_arg( array( 'yith-debug-post-meta' => 'all' ) ),
166
+ ),
167
+ 'option' => array(
168
+ 'label' => 'Option',
169
+ 'value' => '',
170
+ 'url' => add_query_arg( array( 'yith-debug-option' => '' ) ),
171
+ ),
172
+ );
173
+
174
+ // Post Meta debug.
175
+ global $post;
176
+ if ( ! empty( $_GET['yith-debug-post-meta'] ) && $post ) {
177
+ $meta_key = sanitize_key( wp_unslash( $_GET['yith-debug-post-meta'] ) );
178
+ $meta_value = 'all' !== $meta_key ? get_post_meta( $post->ID, $meta_key, true ) : get_post_meta( $post->ID );
179
+
180
+ ob_start();
181
+ echo '<pre>';
182
+ var_dump( $meta_value );
183
+ echo '</pre>';
184
+ $meta_value_html = ob_get_clean();
185
+
186
+ $debug['post-meta']['value'] = $meta_key;
187
+ $debug['post-meta']['subsub'] = array( array( 'html' => $meta_value_html ) );
188
+ }
189
+
190
+ // Option debug.
191
+ if ( ! empty( $_GET['yith-debug-option'] ) ) {
192
+ $option_key = sanitize_key( wp_unslash( $_GET['yith-debug-option'] ) );
193
+ $option_value = get_option( $option_key );
194
+
195
+ ob_start();
196
+ echo '<pre>';
197
+ var_dump( $option_value );
198
+ echo '</pre>';
199
+ $option_value_html = ob_get_clean();
200
+
201
+ $debug['option']['value'] = $option_key;
202
+ $debug['option']['subsub'] = array( array( 'html' => $option_value_html ) );
203
+ }
204
+
205
+ // phpcs:enable
206
+
207
+ return $debug;
208
+ }
209
+
210
+ /** -----------------------------------------------------------
211
+ * GETTER INFO
212
+ * -----------------------------------------------------------
213
+ */
214
+
215
+ /**
216
+ * Return the current screen ID.
217
+ *
218
+ * @return string
219
+ */
220
+ public function get_current_screen_info() {
221
+ $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
222
+
223
+ return ! ! $screen ? $screen->id : 'null';
224
+ }
225
+
226
+ /**
227
+ * Return the current theme name and version.
228
+ *
229
+ * @return string
230
+ */
231
+ public function get_theme_info() {
232
+ $theme = function_exists( 'wp_get_theme' ) ? wp_get_theme() : false;
233
+
234
+ return ! ! $theme ? $theme->get( 'Name' ) . ' (' . $theme->get( 'Version' ) . ')' : 'null';
235
+ }
236
+
237
+ /**
238
+ * Return the WooCommerce version if active.
239
+ *
240
+ * @return string
241
+ */
242
+ public function get_woocommerce_version_info() {
243
+ return function_exists( 'WC' ) ? WC()->version : 'not active';
244
+ }
245
+
246
+ /**
247
+ * Return plugin framework information (version and loaded_by).
248
+ *
249
+ * @return string
250
+ */
251
+ public function get_plugin_framework_info() {
252
+ $plugin_fw_version = yith_plugin_fw_get_version();
253
+ $plugin_fw_loaded_by = basename( dirname( YIT_CORE_PLUGIN_PATH ) );
254
+
255
+ return "$plugin_fw_version (by $plugin_fw_loaded_by)";
256
+ }
257
+
258
+ /**
259
+ * Return premium plugins list with versions.
260
+ *
261
+ * @return array
262
+ */
263
+ public function get_premium_plugins_info() {
264
+ $plugins = YIT_Plugin_Licence()->get_products();
265
+ $plugins_info = array();
266
+
267
+ if ( ! ! $plugins ) {
268
+ foreach ( $plugins as $plugin ) {
269
+ $plugins_info[ $plugin['product_id'] ] = array( 'title' => $plugin['Name'] . ' (' . $plugin['Version'] . ')' );
270
+ }
271
+
272
+ sort( $plugins_info );
273
+ }
274
+
275
+ return $plugins_info;
276
+ }
277
+ }
278
+ }
279
+ if ( ! function_exists( 'yith_debug' ) ) {
280
+ /**
281
+ * Single instance of YITH_Debug
282
+ *
283
+ * @return YITH_Debug
284
+ */
285
+ function yith_debug() {
286
+ return YITH_Debug::instance();
287
+ }
288
+
289
+ yith_debug();
290
+ }
plugin-fw/includes/class-yith-gutenberg.php ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Gutenberg Class
4
+ * handle Gutenberg blocks and shortcodes.
5
+ *
6
+ * @class YITH_Gutenberg
7
+ * @package YITH\PluginFramework\Classes
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
11
+
12
+ if ( ! class_exists( 'YITH_Gutenberg' ) ) {
13
+ /**
14
+ * YITH_Gutenberg class.
15
+ *
16
+ * @author Andrea Grillo <andrea.grillo@yithemes.com>
17
+ */
18
+ class YITH_Gutenberg {
19
+ /**
20
+ * The single instance of the class.
21
+ *
22
+ * @var YITH_Gutenberg
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Registered blocks
28
+ *
29
+ * @var array
30
+ */
31
+ private $registered_blocks = array();
32
+
33
+ /**
34
+ * Blocks to register
35
+ *
36
+ * @var array
37
+ */
38
+ private $to_register_blocks = array();
39
+
40
+ /**
41
+ * Blocks args
42
+ *
43
+ * @var array
44
+ */
45
+ private $blocks_args = array();
46
+
47
+ /**
48
+ * Block category slug
49
+ *
50
+ * @var string
51
+ */
52
+ private $category_slug = 'yith-blocks';
53
+
54
+ /**
55
+ * Singleton implementation.
56
+ *
57
+ * @return YITH_Gutenberg
58
+ */
59
+ public static function instance() {
60
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
61
+ }
62
+
63
+ /**
64
+ * YITH_Gutenberg constructor.
65
+ */
66
+ private function __construct() {
67
+ add_action( 'init', array( $this, 'register_blocks' ), 30 );
68
+ add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) );
69
+ add_action( 'wp_ajax_yith_plugin_fw_gutenberg_do_shortcode', array( $this, 'do_shortcode' ) );
70
+ add_action( 'wc_ajax_yith_plugin_fw_gutenberg_do_shortcode', array( $this, 'do_shortcode' ) );
71
+ }
72
+
73
+ /**
74
+ * Enqueue scripts for gutenberg
75
+ */
76
+ public function enqueue_block_editor_assets() {
77
+ $ajax_url = function_exists( 'WC' ) ? add_query_arg( 'wc-ajax', 'yith_plugin_fw_gutenberg_do_shortcode', trailingslashit( site_url() ) ) : admin_url( 'admin-ajax.php' );
78
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
79
+ $deps = apply_filters(
80
+ 'yith_plugin_fw_gutenberg_script_deps',
81
+ array(
82
+ 'wp-blocks',
83
+ 'wp-element',
84
+ 'yith-js-md5',
85
+ )
86
+ );
87
+ wp_register_script( 'yith-js-md5', YIT_CORE_PLUGIN_URL . '/assets/js/javascript-md5/md5.min.js', array(), '2.10.0', true );
88
+ wp_enqueue_script( 'yith-gutenberg', YIT_CORE_PLUGIN_URL . '/assets/js/yith-gutenberg' . $suffix . '.js', $deps, yith_plugin_fw_get_version(), true );
89
+ wp_localize_script( 'yith-gutenberg', 'yith_gutenberg', $this->blocks_args );
90
+ wp_localize_script( 'yith-gutenberg', 'yith_gutenberg_ajax', array( 'ajaxurl' => $ajax_url ) );
91
+ }
92
+
93
+ /**
94
+ * Add blocks to gutenberg editor.
95
+ */
96
+ public function register_blocks() {
97
+ $block_args = array();
98
+ foreach ( $this->to_register_blocks as $block => $args ) {
99
+ if ( isset( $args['style'] ) ) {
100
+ $block_args['style'] = $args['style'];
101
+ }
102
+
103
+ if ( isset( $args['script'] ) ) {
104
+ $block_args['script'] = $args['script'];
105
+ }
106
+
107
+ if ( register_block_type( "yith/{$block}", $block_args ) ) {
108
+ $this->registered_blocks[] = $block;
109
+ }
110
+ }
111
+
112
+ if ( ! empty( $this->registered_blocks ) ) {
113
+ add_filter( 'block_categories', array( $this, 'block_category' ), 10, 2 );
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Add block category
119
+ *
120
+ * @param array $categories The block categories.
121
+ * @param WP_Post $post The current post.
122
+ *
123
+ * @return array The block categories.
124
+ */
125
+ public function block_category( $categories, $post ) {
126
+ return array_merge(
127
+ $categories,
128
+ array(
129
+ array(
130
+ 'slug' => 'yith-blocks',
131
+ 'title' => _x( 'YITH', '[gutenberg]: Category Name', 'yith-plugin-fw' ),
132
+ ),
133
+ )
134
+ );
135
+ }
136
+
137
+ /**
138
+ * Add new blocks to Gutenberg
139
+ *
140
+ * @param string|array $blocks The blocks to be added.
141
+ *
142
+ * @return bool True if the blocks was successfully added, false otherwise.
143
+ */
144
+ public function add_blocks( $blocks ) {
145
+ $added = false;
146
+ if ( ! empty( $blocks ) ) {
147
+ $added = true;
148
+ if ( is_array( $blocks ) ) {
149
+ $this->to_register_blocks = array_merge( $this->to_register_blocks, $blocks );
150
+ } else {
151
+ $this->to_register_blocks[] = $blocks;
152
+ }
153
+ }
154
+
155
+ return $added;
156
+ }
157
+
158
+ /**
159
+ * Return an array with the registered blocks
160
+ *
161
+ * @return array
162
+ */
163
+ public function get_registered_blocks() {
164
+ return $this->registered_blocks;
165
+ }
166
+
167
+ /**
168
+ * Return an array with the blocks to register
169
+ *
170
+ * @return array
171
+ */
172
+ public function get_to_register_blocks() {
173
+ return $this->to_register_blocks;
174
+ }
175
+
176
+ /**
177
+ * Return an array with the block(s) arguments
178
+ *
179
+ * @param string $block_key The block key.
180
+ *
181
+ * @return array|false
182
+ */
183
+ public function get_block_args( $block_key = 'all' ) {
184
+ if ( 'all' === $block_key ) {
185
+ return $this->blocks_args;
186
+ } elseif ( isset( $this->blocks_args[ $block_key ] ) ) {
187
+ return $this->blocks_args[ $block_key ];
188
+ }
189
+
190
+ return false;
191
+ }
192
+
193
+ /**
194
+ * Retrieve the default category slug
195
+ *
196
+ * @return string
197
+ */
198
+ public function get_default_blocks_category_slug() {
199
+ return $this->category_slug;
200
+ }
201
+
202
+ /**
203
+ * Set the block arguments
204
+ *
205
+ * @param array $args The block arguments.
206
+ */
207
+ public function set_block_args( $args ) {
208
+ foreach ( $args as $block => $block_args ) {
209
+
210
+ // Add Default Keywords.
211
+ $default_keywords = array( 'yith' );
212
+ if ( ! empty( $block_args['shortcode_name'] ) ) {
213
+ $default_keywords[] = $block_args['shortcode_name'];
214
+ }
215
+
216
+ $args[ $block ]['keywords'] = ! empty( $args[ $block ]['keywords'] ) ? array_merge( $args[ $block ]['keywords'], $default_keywords ) : $default_keywords;
217
+
218
+ if ( count( $args[ $block ]['keywords'] ) > 3 ) {
219
+ $args[ $block ]['keywords'] = array_slice( $args[ $block ]['keywords'], 0, 3 );
220
+ }
221
+
222
+ if ( empty( $block_args['category'] ) ) {
223
+ // Add the YITH block category.
224
+ $args[ $block ]['category'] = $this->get_default_blocks_category_slug();
225
+ }
226
+
227
+ if ( isset( $block_args['attributes'] ) ) {
228
+ foreach ( $block_args['attributes'] as $attr_name => $attributes ) {
229
+ // Set the do_shortcode args.
230
+ if ( ! empty( $attributes['do_shortcode'] ) ) {
231
+ $args[ $block ]['attributes'][ $attr_name ] = true;
232
+ }
233
+
234
+ if ( ! empty( $attributes['options'] ) && is_array( $attributes['options'] ) ) {
235
+ $options = array();
236
+ foreach ( $attributes['options'] as $v => $l ) {
237
+ // Prepare options array for react component.
238
+ $options[] = array(
239
+ 'label' => $l,
240
+ 'value' => $v,
241
+ );
242
+ }
243
+ $args[ $block ]['attributes'][ $attr_name ]['options'] = $options;
244
+ }
245
+
246
+ if ( empty( $attributes['remove_quotes'] ) ) {
247
+ $args[ $block ]['attributes'][ $attr_name ]['remove_quotes'] = false;
248
+ }
249
+
250
+ // Special Requirements for Block Type.
251
+ if ( ! empty( $attributes['type'] ) ) {
252
+ $args[ $block ]['attributes'][ $attr_name ]['blocktype'] = $attributes['type'];
253
+ $args[ $block ]['attributes'][ $attr_name ]['type'] = 'string';
254
+
255
+ switch ( $attributes['type'] ) {
256
+ case 'select':
257
+ // Add default value for multiple.
258
+ if ( ! isset( $attributes['multiple'] ) ) {
259
+ $args[ $block ]['attributes'][ $attr_name ]['multiple'] = false;
260
+ }
261
+
262
+ if ( ! empty( $attributes['multiple'] ) ) {
263
+ $args[ $block ]['attributes'][ $attr_name ]['type'] = 'array';
264
+ }
265
+ break;
266
+
267
+ case 'color':
268
+ case 'colorpicker':
269
+ if ( ! isset( $attributes['disableAlpha'] ) ) {
270
+ // Disable alpha gradient for color picker.
271
+ $args[ $block ]['attributes'][ $attr_name ]['disableAlpha'] = true;
272
+ }
273
+ break;
274
+
275
+ case 'number':
276
+ $args[ $block ]['attributes'][ $attr_name ]['type'] = 'integer';
277
+ break;
278
+
279
+ case 'toggle':
280
+ case 'checkbox':
281
+ $args[ $block ]['attributes'][ $attr_name ]['type'] = 'boolean';
282
+ break;
283
+ }
284
+ }
285
+ }
286
+ }
287
+ }
288
+
289
+ $this->blocks_args = array_merge( $this->blocks_args, $args );
290
+ }
291
+
292
+ /**
293
+ * Get a do_shortcode in ajax call to show block preview
294
+ **/
295
+ public function do_shortcode() {
296
+ // phpcs:disable WordPress.Security.NonceVerification.Missing
297
+ $current_action = current_action();
298
+ $shortcode = ! empty( $_POST['shortcode'] ) ? wp_unslash( $_POST['shortcode'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
299
+
300
+ if ( ! apply_filters( 'yith_plugin_fw_gutenberg_skip_shortcode_sanitize', false ) ) {
301
+ $shortcode = sanitize_text_field( stripslashes( $shortcode ) );
302
+ }
303
+
304
+ do_action( 'yith_plugin_fw_gutenberg_before_do_shortcode', $shortcode, $current_action );
305
+ echo do_shortcode( apply_filters( 'yith_plugin_fw_gutenberg_shortcode', $shortcode, $current_action ) );
306
+ do_action( 'yith_plugin_fw_gutenberg_after_do_shortcode', $shortcode, $current_action );
307
+
308
+ if ( is_ajax() ) {
309
+ die();
310
+ }
311
+
312
+ // phpcs:enable
313
+ }
314
+ }
315
+ }
316
+
317
+ if ( ! function_exists( 'YITH_Gutenberg' ) ) {
318
+ /**
319
+ * Single instance of YITH_Gutenberg
320
+ *
321
+ * @return YITH_Gutenberg
322
+ */
323
+ function YITH_Gutenberg() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
324
+ return YITH_Gutenberg::instance();
325
+ }
326
+ }
327
+
328
+ YITH_Gutenberg();
plugin-fw/includes/class-yith-system-status.php ADDED
@@ -0,0 +1,721 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH System Status Class
4
+ * handle System Status panel
5
+ *
6
+ * @class YITH_System_Status
7
+ * @package YITH\PluginFramework\Classes
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
11
+
12
+ if ( ! class_exists( 'YITH_System_Status' ) ) {
13
+ /**
14
+ * YITH_System_Status class.
15
+ *
16
+ * @author Alberto Ruggiero
17
+ */
18
+ class YITH_System_Status {
19
+ /**
20
+ * The page slug
21
+ *
22
+ * @var string
23
+ */
24
+ protected $page = 'yith_system_info';
25
+
26
+ /**
27
+ * Plugins requirements list
28
+ *
29
+ * @var array
30
+ */
31
+ protected $plugins_requirements = array();
32
+
33
+ /**
34
+ * Requirements labels
35
+ *
36
+ * @var array
37
+ */
38
+ public $requirement_labels = array();
39
+
40
+ /**
41
+ * Recommended memory amount 134217728 = 128M
42
+ *
43
+ * @var integer
44
+ */
45
+ private $recommended_memory = 134217728;
46
+
47
+ /**
48
+ * Single instance of the class
49
+ *
50
+ * @since 1.0.0
51
+ * @var YITH_System_Status
52
+ */
53
+ protected static $instance = null;
54
+
55
+ /**
56
+ * Main plugin Instance
57
+ *
58
+ * @return YITH_System_Status
59
+ * @since 1.0.0
60
+ * @author Alberto Ruggiero
61
+ */
62
+ public static function instance() {
63
+ if ( is_null( self::$instance ) ) {
64
+ self::$instance = new self();
65
+ }
66
+
67
+ return self::$instance;
68
+ }
69
+
70
+ /**
71
+ * Constructor
72
+ *
73
+ * @return void
74
+ * @since 1.0.0
75
+ * @author Alberto Ruggiero
76
+ */
77
+ public function __construct() {
78
+
79
+ if ( ! is_admin() ) {
80
+ return;
81
+ }
82
+
83
+ /**
84
+ * Add to prevent trigger admin_init called directly
85
+ * wp-admin/admin-post.php?page=yith_system_info
86
+ */
87
+ if ( ! is_user_logged_in() ) {
88
+ return;
89
+ }
90
+
91
+ add_action( 'admin_menu', array( $this, 'add_submenu_page' ), 99 );
92
+ add_action( 'admin_init', array( $this, 'check_system_status' ) );
93
+ add_action( 'admin_notices', array( $this, 'activate_system_notice' ), 15 );
94
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 20 );
95
+ add_action( 'init', array( $this, 'set_requirements_labels' ) );
96
+ add_action( 'wp_ajax_yith_create_log_file', array( $this, 'create_log_file' ) );
97
+
98
+ }
99
+
100
+ /**
101
+ * Set requirements labels
102
+ *
103
+ * @return void
104
+ * @since 1.0.0
105
+ * @author Alberto Ruggiero
106
+ */
107
+ public function set_requirements_labels() {
108
+
109
+ $this->requirement_labels = array(
110
+ 'min_wp_version' => esc_html__( 'WordPress Version', 'yith-plugin-fw' ),
111
+ 'min_wc_version' => esc_html__( 'WooCommerce Version', 'yith-plugin-fw' ),
112
+ 'wp_memory_limit' => esc_html__( 'Available Memory', 'yith-plugin-fw' ),
113
+ 'min_php_version' => esc_html__( 'PHP Version', 'yith-plugin-fw' ),
114
+ 'min_tls_version' => esc_html__( 'TLS Version', 'yith-plugin-fw' ),
115
+ 'wp_cron_enabled' => esc_html__( 'WordPress Cron', 'yith-plugin-fw' ),
116
+ 'simplexml_enabled' => esc_html__( 'SimpleXML', 'yith-plugin-fw' ),
117
+ 'mbstring_enabled' => esc_html__( 'MultiByte String', 'yith-plugin-fw' ),
118
+ 'imagick_version' => esc_html__( 'ImageMagick Version', 'yith-plugin-fw' ),
119
+ 'gd_enabled' => esc_html__( 'GD Library', 'yith-plugin-fw' ),
120
+ 'iconv_enabled' => esc_html__( 'Iconv Module', 'yith-plugin-fw' ),
121
+ 'opcache_enabled' => esc_html__( 'OPCache Save Comments', 'yith-plugin-fw' ),
122
+ 'url_fopen_enabled' => esc_html__( 'URL FOpen', 'yith-plugin-fw' ),
123
+ );
124
+
125
+ }
126
+
127
+ /**
128
+ * Add "System Information" submenu page under YITH Plugins
129
+ *
130
+ * @return void
131
+ * @since 1.0.0
132
+ * @author Alberto Ruggiero
133
+ */
134
+ public function add_submenu_page() {
135
+
136
+ $system_info = get_option( 'yith_system_info', array() );
137
+ $error_notice = ( isset( $system_info['errors'] ) && true === $system_info['errors'] ? ' <span class="yith-system-info-menu update-plugins">!</span>' : '' );
138
+ $settings = array(
139
+ 'parent_page' => 'yith_plugin_panel',
140
+ 'page_title' => esc_html__( 'System Status', 'yith-plugin-fw' ),
141
+ 'menu_title' => esc_html__( 'System Status', 'yith-plugin-fw' ) . $error_notice,
142
+ 'capability' => 'manage_options',
143
+ 'page' => $this->page,
144
+ );
145
+
146
+ add_submenu_page(
147
+ $settings['parent_page'],
148
+ $settings['page_title'],
149
+ $settings['menu_title'],
150
+ $settings['capability'],
151
+ $settings['page'],
152
+ array( $this, 'show_information_panel' )
153
+ );
154
+ }
155
+
156
+ /**
157
+ * Add "System Information" page template under YITH Plugins
158
+ *
159
+ * @return void
160
+ * @since 1.0.0
161
+ * @author Alberto Ruggiero
162
+ */
163
+ public function show_information_panel() {
164
+
165
+ $path = defined( 'YIT_CORE_PLUGIN_PATH' ) ? YIT_CORE_PLUGIN_PATH : get_template_directory() . '/core/plugin-fw/';
166
+
167
+ require_once $path . '/templates/sysinfo/system-information-panel.php';
168
+
169
+ }
170
+
171
+ /**
172
+ * Perform system status check
173
+ *
174
+ * @return void
175
+ * @since 1.0.0
176
+ * @author Alberto Ruggiero
177
+ */
178
+ public function check_system_status() {
179
+
180
+ if ( '' === get_option( 'yith_system_info' ) || ( isset( $_GET['page'] ) && $_GET['page'] === $this->page ) ) { //phpcs:ignore
181
+
182
+ $this->add_requirements(
183
+ esc_html__( 'YITH Plugins', 'yith-plugin-fw' ),
184
+ array(
185
+ 'min_wp_version' => '5.3',
186
+ 'min_wc_version' => '4.2',
187
+ 'min_php_version' => '5.6.20',
188
+ )
189
+ );
190
+ $this->add_requirements(
191
+ esc_html__( 'WooCommerce', 'yith-plugin-fw' ),
192
+ array(
193
+ 'wp_memory_limit' => '64M',
194
+ )
195
+ );
196
+
197
+ $system_info = $this->get_system_info();
198
+ $check_results = array();
199
+ $errors = 0;
200
+
201
+ foreach ( $system_info as $key => $value ) {
202
+ $check_results[ $key ] = array( 'value' => $value );
203
+
204
+ if ( isset( $this->plugins_requirements[ $key ] ) ) {
205
+
206
+ foreach ( $this->plugins_requirements[ $key ] as $plugin_name => $required_value ) {
207
+
208
+ switch ( $key ) {
209
+ case 'wp_cron_enabled':
210
+ case 'mbstring_enabled':
211
+ case 'simplexml_enabled':
212
+ case 'gd_enabled':
213
+ case 'iconv_enabled':
214
+ case 'url_fopen_enabled':
215
+ case 'opcache_enabled':
216
+ if ( ! $value ) {
217
+ $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
218
+ $errors ++;
219
+ }
220
+ break;
221
+
222
+ case 'wp_memory_limit':
223
+ $required_memory = $this->memory_size_to_num( $required_value );
224
+
225
+ if ( $required_memory > $value ) {
226
+ $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
227
+ $errors ++;
228
+
229
+ } elseif ( $this->recommended_memory > $value && $value > $required_value ) {
230
+ $check_results[ $key ]['warnings'] = 'yes';
231
+ }
232
+ break;
233
+
234
+ default:
235
+ if ( 'imagick_version' === $key ) {
236
+ if ( ! version_compare( $value, $required_value, '>=' ) ) {
237
+ $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
238
+ $errors ++;
239
+ }
240
+ } else {
241
+ if ( 'n/a' !== $value ) {
242
+ if ( ! version_compare( $value, $required_value, '>=' ) ) {
243
+ $check_results[ $key ]['errors'][ $plugin_name ] = $required_value;
244
+ $errors ++;
245
+ }
246
+ } else {
247
+ if ( 'min_wc_version' !== $key ) {
248
+ $check_results[ $key ]['warnings'][ $plugin_name ] = $required_value;
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }
254
+ }
255
+ }
256
+
257
+ update_option(
258
+ 'yith_system_info',
259
+ array(
260
+ 'system_info' => $check_results,
261
+ 'errors' => $errors > 0,
262
+ )
263
+ );
264
+
265
+ }
266
+
267
+ }
268
+
269
+ /**
270
+ * Handle plugin requirements
271
+ *
272
+ * @param string $plugin_name The name of the plugin.
273
+ * @param array $requirements Array of plugin requirements.
274
+ *
275
+ * @return void
276
+ * @since 1.0.0
277
+ * @author Alberto Ruggiero
278
+ */
279
+ public function add_requirements( $plugin_name, $requirements ) {
280
+
281
+ $allowed_requirements = array_keys( $this->requirement_labels );
282
+
283
+ foreach ( $requirements as $requirement => $value ) {
284
+
285
+ if ( in_array( $requirement, $allowed_requirements, true ) ) {
286
+ $this->plugins_requirements[ $requirement ][ $plugin_name ] = $value;
287
+ }
288
+ }
289
+
290
+ }
291
+
292
+ /**
293
+ * Manages notice dismissing
294
+ *
295
+ * @return void
296
+ * @since 1.0.0
297
+ * @author Alberto Ruggiero
298
+ */
299
+ public function enqueue_scripts() {
300
+ $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
301
+ wp_register_script( 'yith-system-info', yit_load_js_file( $script_path . '/assets/js/yith-system-info.js' ), array( 'jquery' ), '1.0.0', true );
302
+
303
+ if ( isset( $_GET['page'] ) && 'yith_system_info' === $_GET['page'] ) { //phpcs:ignore
304
+ wp_enqueue_style( 'yit-plugin-style' );
305
+ wp_enqueue_style( 'yith-plugin-fw-fields' );
306
+ wp_enqueue_script( 'yith-system-info' );
307
+
308
+ $params = array(
309
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
310
+ );
311
+
312
+ wp_localize_script( 'yith-system-info', 'yith_sysinfo', $params );
313
+
314
+ }
315
+
316
+ }
317
+
318
+ /**
319
+ * Show system notice
320
+ *
321
+ * @return void
322
+ * @since 1.0.0
323
+ * @author Alberto Ruggiero
324
+ */
325
+ public function activate_system_notice() {
326
+
327
+ $system_info = get_option( 'yith_system_info', '' );
328
+
329
+ if ( ( isset( $_GET['page'] ) && $_GET['page'] === $this->page ) || ( ! empty( $_COOKIE['hide_yith_system_alert'] ) && 'yes' === $_COOKIE['hide_yith_system_alert'] ) || ( '' === $system_info ) || ( '' !== $system_info && false === $system_info['errors'] ) ) { //phpcs:ignore
330
+ return;
331
+ }
332
+
333
+ $show_notice = true;
334
+
335
+ if ( true === $show_notice ) {
336
+ wp_enqueue_script( 'yith-system-info' );
337
+ ?>
338
+ <div id="yith-system-alert" class="notice notice-error is-dismissible" style="position: relative;">
339
+ <p>
340
+ <span class="yith-logo"><img src="<?php echo esc_attr( yith_plugin_fw_get_default_logo() ); ?>"/></span>
341
+ <b>
342
+ <?php esc_html_e( 'Warning!', 'yith-plugin-fw' ); ?>
343
+ </b><br/>
344
+ <?php
345
+ /* translators: %1$s open link tag, %2$s open link tag*/
346
+ echo sprintf( esc_html__( 'The system check has detected some compatibility issues on your installation.%1$sClick here%2$s to know more', 'yith-plugin-fw' ), '<a href="' . esc_url( add_query_arg( array( 'page' => $this->page ), admin_url( 'admin.php' ) ) ) . '">', '</a>' );
347
+ ?>
348
+ </p>
349
+ <span class="notice-dismiss"></span>
350
+
351
+ </div>
352
+ <?php
353
+ }
354
+ }
355
+
356
+ /**
357
+ * Get system information
358
+ *
359
+ * @return array
360
+ * @since 1.0.0
361
+ * @author Alberto Ruggiero
362
+ */
363
+ public function get_system_info() {
364
+ $tls = $this->get_tls_version();
365
+ $imagick_version = 'n/a';
366
+
367
+ // Get PHP version.
368
+ preg_match( '#^\d+(\.\d+)*#', PHP_VERSION, $match );
369
+ $php_version = $match[0];
370
+
371
+ // WP memory limit.
372
+ $wp_memory_limit = $this->memory_size_to_num( WP_MEMORY_LIMIT );
373
+ if ( function_exists( 'memory_get_usage' ) ) {
374
+ $wp_memory_limit = max( $wp_memory_limit, $this->memory_size_to_num( @ini_get( 'memory_limit' ) ) ); //phpcs:ignore
375
+ }
376
+
377
+ if ( class_exists( 'Imagick' ) && is_callable( array( 'Imagick', 'getVersion' ) ) ) {
378
+ preg_match( '/([0-9]+\.[0-9]+\.[0-9]+)/', Imagick::getVersion()['versionString'], $imatch );
379
+ $imagick_version = $imatch[0];
380
+ }
381
+
382
+ return apply_filters(
383
+ 'yith_system_additional_check',
384
+ array(
385
+ 'min_wp_version' => get_bloginfo( 'version' ),
386
+ 'min_wc_version' => function_exists( 'WC' ) ? WC()->version : 'n/a',
387
+ 'wp_memory_limit' => $wp_memory_limit,
388
+ 'min_php_version' => $php_version,
389
+ 'min_tls_version' => $tls,
390
+ 'imagick_version' => $imagick_version,
391
+ 'wp_cron_enabled' => ( ! ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) || apply_filters( 'yith_system_status_server_cron', false ) ),
392
+ 'mbstring_enabled' => extension_loaded( 'mbstring' ),
393
+ 'simplexml_enabled' => extension_loaded( 'simplexml' ),
394
+ 'gd_enabled' => extension_loaded( 'gd' ) && function_exists( 'gd_info' ),
395
+ 'iconv_enabled' => extension_loaded( 'iconv' ),
396
+ 'opcache_enabled' => ini_get( 'opcache.save_comments' ),
397
+ 'url_fopen_enabled' => ini_get( 'allow_url_fopen' ),
398
+ )
399
+ );
400
+
401
+ }
402
+
403
+ /**
404
+ * Get log file
405
+ *
406
+ * @return void
407
+ * @since 1.0.0
408
+ * @author Alberto Ruggiero
409
+ */
410
+ public function create_log_file() {
411
+ try {
412
+
413
+ global $wp_filesystem;
414
+
415
+ if ( empty( $wp_filesystem ) ) {
416
+ require_once ABSPATH . '/wp-admin/includes/file.php';
417
+ WP_Filesystem();
418
+ }
419
+
420
+ $download_file = false;
421
+ $file_content = '';
422
+ $requested_file = $_POST['file']; //phpcs:ignore
423
+
424
+ switch ( $requested_file ) {
425
+ case 'error_log':
426
+ $file_content = $wp_filesystem->get_contents( ABSPATH . 'error_log' );
427
+ break;
428
+ case 'debug.log':
429
+ $file_content = $wp_filesystem->get_contents( WP_CONTENT_DIR . '/debug.log' );
430
+ break;
431
+ }
432
+
433
+ if ( '' !== $file_content ) {
434
+ $file = wp_upload_dir()['basedir'] . '/' . $requested_file . '.txt';
435
+ $download_file = wp_upload_dir()['baseurl'] . '/' . $requested_file . '.txt';
436
+ $wp_filesystem->put_contents( $file, $file_content );
437
+ }
438
+
439
+ wp_send_json( array( 'file' => $download_file ) );
440
+ } catch ( Exception $e ) {
441
+ wp_send_json( array( 'file' => false ) );
442
+ }
443
+ }
444
+
445
+ /**
446
+ * Convert size into number
447
+ *
448
+ * @param string $memory_size Memory size to convert.
449
+ *
450
+ * @return integer
451
+ * @since 1.0.0
452
+ * @author Alberto Ruggiero
453
+ */
454
+ public function memory_size_to_num( $memory_size ) {
455
+ $unit = strtoupper( substr( $memory_size, - 1 ) );
456
+ $size = substr( $memory_size, 0, - 1 );
457
+
458
+ $multiplier = array(
459
+ 'P' => 5,
460
+ 'T' => 4,
461
+ 'G' => 3,
462
+ 'M' => 2,
463
+ 'K' => 1,
464
+ );
465
+
466
+ if ( isset( $multiplier[ $unit ] ) ) {
467
+ for ( $i = 1; $i <= $multiplier[ $unit ]; $i ++ ) {
468
+ $size *= 1024;
469
+ }
470
+ }
471
+
472
+ return $size;
473
+ }
474
+
475
+ /**
476
+ * Format requirement value
477
+ *
478
+ * @param string $key Requirement Key.
479
+ * @param mixed $value Requirement value.
480
+ *
481
+ * @return void
482
+ * @since 1.0.0
483
+ * @author Alberto Ruggiero
484
+ */
485
+ public function format_requirement_value( $key, $value ) {
486
+
487
+ if ( strpos( $key, '_enabled' ) !== false ) {
488
+ echo esc_attr( $value ) ? esc_html__( 'Enabled', 'yith-plugin-fw' ) : esc_html__( 'Disabled', 'yith-plugin-fw' );
489
+ } elseif ( 'wp_memory_limit' === $key ) {
490
+ echo esc_html( size_format( $value ) );
491
+ } else {
492
+ if ( 'n/a' === $value ) {
493
+ echo esc_html__( 'N/A', 'yith-plugin-fw' );
494
+ } else {
495
+ echo esc_attr( $value );
496
+ }
497
+ }
498
+
499
+ }
500
+
501
+ /**
502
+ * Print error messages
503
+ *
504
+ * @param string $key Requirement key.
505
+ * @param array $item Requirement item.
506
+ * @param string $label Requirement label.
507
+ *
508
+ * @return void
509
+ * @since 1.0.0
510
+ * @author Alberto Ruggiero
511
+ */
512
+ public function print_error_messages( $key, $item, $label ) {
513
+ ?>
514
+ <ul>
515
+ <?php foreach ( $item['errors'] as $plugin => $requirement ) : ?>
516
+ <li>
517
+ <?php
518
+ if ( strpos( $key, '_enabled' ) !== false ) {
519
+ /* translators: %1$s plugin name, %2$s requirement name */
520
+ echo sprintf( esc_html__( '%1$s needs %2$s enabled', 'yith-plugin-fw' ), '<b>' . esc_attr( $plugin ) . '</b>', '<b>' . esc_attr( $label ) . '</b>' );
521
+ } elseif ( 'wp_memory_limit' === $key ) {
522
+ /* translators: %1$s plugin name, %2$s required memory amount */
523
+ echo sprintf( esc_html__( '%1$s needs at least %2$s of available memory', 'yith-plugin-fw' ), '<b>' . esc_attr( $plugin ) . '</b>', '<span class="error">' . esc_html( size_format( $this->memory_size_to_num( $requirement ) ) ) . '</span>' );
524
+ } else {
525
+ /* translators: %1$s plugin name, %2$s version number */
526
+ echo sprintf( esc_html__( '%1$s needs at least %2$s version', 'yith-plugin-fw' ), '<b>' . esc_attr( $plugin ) . '</b>', '<span class="error">' . esc_attr( $requirement ) . '</span>' );
527
+ }
528
+ ?>
529
+ </li>
530
+ <?php endforeach; ?>
531
+ </ul>
532
+ <?php
533
+ }
534
+
535
+ /**
536
+ * Print solution suggestions
537
+ *
538
+ * @param string $key Requirement key.
539
+ * @param array $item Requirement item.
540
+ * @param string $label Requirement label.
541
+ *
542
+ * @return void
543
+ * @since 1.0.0
544
+ * @author Alberto Ruggiero
545
+ */
546
+ public function print_solution_suggestion( $key, $item, $label ) {
547
+ switch ( $key ) {
548
+ case 'min_wp_version':
549
+ case 'min_wc_version':
550
+ esc_html_e( 'Update it to the latest version in order to benefit of all new features and security updates.', 'yith-plugin-fw' );
551
+ break;
552
+ case 'min_php_version':
553
+ case 'min_tls_version':
554
+ esc_html_e( 'Contact your hosting company in order to update it.', 'yith-plugin-fw' );
555
+ break;
556
+ case 'imagick_version':
557
+ if ( 'n/a' === $item['value'] ) {
558
+ esc_html_e( 'Contact your hosting company in order to install it.', 'yith-plugin-fw' );
559
+ } else {
560
+ esc_html_e( 'Contact your hosting company in order to update it.', 'yith-plugin-fw' );
561
+ }
562
+ break;
563
+ case 'wp_cron_enabled':
564
+ /* translators: %1$s code, %2$s file name */
565
+ echo sprintf( esc_html__( 'Remove %1$s from %2$s file', 'yith-plugin-fw' ), '<code>define( \'DISABLE_WP_CRON\', true );</code>', '<b>wp-config.php</b>' );
566
+ break;
567
+ case 'mbstring_enabled':
568
+ case 'simplexml_enabled':
569
+ case 'gd_enabled':
570
+ case 'iconv_enabled':
571
+ case 'opcache_enabled':
572
+ case 'url_fopen_enabled':
573
+ esc_html_e( 'Contact your hosting company in order to enable it.', 'yith-plugin-fw' );
574
+ break;
575
+ case 'wp_memory_limit':
576
+ /* translators: %1$s opening link tag, %2$s closing link tag */
577
+ echo sprintf( esc_html__( 'Read more %1$shere%2$s or contact your hosting company in order to increase it.', 'yith-plugin-fw' ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">', '</a>' );
578
+ break;
579
+ default:
580
+ echo esc_attr( apply_filters( 'yith_system_generic_message', '', $key, $item, $label ) );
581
+ }
582
+ }
583
+
584
+ /**
585
+ * Print warning messages
586
+ *
587
+ * @param string $key Requirement Key.
588
+ *
589
+ * @return void
590
+ * @since 1.0.0
591
+ * @author Alberto Ruggiero
592
+ */
593
+ public function print_warning_messages( $key ) {
594
+ switch ( $key ) {
595
+ case 'wp_memory_limit':
596
+ /* translators: %s recommended memory amount */
597
+ echo sprintf( esc_html__( 'For optimal functioning of our plugins, we suggest setting at least %s of available memory', 'yith-plugin-fw' ), '<span class="warning">' . esc_html( size_format( $this->recommended_memory ) ) . '</span>' );
598
+ echo '<br/>';
599
+ /* translators: %1$s opening link tag, %2$s closing link tag */
600
+ echo sprintf( esc_html__( 'Read more %1$shere%2$s or contact your hosting company in order to increase it.', 'yith-plugin-fw' ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">', '</a>' );
601
+ break;
602
+ case 'min_tls_version':
603
+ if ( ! function_exists( 'curl_init' ) ) {
604
+ /* translators: %1$s TLS label, %2$s cURL label */
605
+ echo sprintf( esc_html__( 'The system check cannot determine which %1$s version is installed because %2$s module is disabled. Ask your hosting company to enable it.', 'yith-plugin-fw' ), '<b>TLS</b>', '<b>cURL</b>' );
606
+ } else {
607
+ /* translators: %1$s TLS label */
608
+ echo sprintf( esc_html__( 'The system check cannot determine which %1$s version is installed due to a connection issue between your site and our server.', 'yith-plugin-fw' ), '<b>TLS</b>' );
609
+ }
610
+ break;
611
+ }
612
+ }
613
+
614
+ /**
615
+ * Retrieve the TLS Version
616
+ *
617
+ * @return string
618
+ * @since 3.5
619
+ */
620
+ public function get_tls_version() {
621
+ $tls = get_transient( 'yith-plugin-fw-system-status-tls-version' );
622
+
623
+ if ( ! $tls && apply_filters( 'yith_system_status_check_ssl', true ) ) {
624
+ $services = array(
625
+ array(
626
+ 'url' => 'https://www.howsmyssl.com/a/check',
627
+ 'string_to_remove' => 'TLS ',
628
+ 'prop' => 'tls_version',
629
+ ),
630
+ array(
631
+ 'url' => 'https://ttl-version.yithemes.workers.dev/',
632
+ 'string_to_remove' => 'TLSv',
633
+ 'prop' => 'tlsVersion',
634
+ ),
635
+ );
636
+ $params = array(
637
+ 'sslverify' => false,
638
+ 'timeout' => 60,
639
+ 'headers' => array( 'Content-Type' => 'application/json' ),
640
+ );
641
+
642
+ foreach ( $services as $service ) {
643
+ $url = $service['url'];
644
+ $string_to_remove = $service['string_to_remove'];
645
+ $prop = $service['prop'];
646
+
647
+ $response = wp_remote_get( $url, $params );
648
+
649
+ if ( ! is_wp_error( $response ) && 200 === absint( $response['response']['code'] ) && 'OK' === $response['response']['message'] ) {
650
+ $body = json_decode( $response['body'] );
651
+ $version = $body && is_object( $body ) && property_exists( $body, $prop ) ? $body->{$prop} : false;
652
+ if ( $version ) {
653
+ $tls = str_replace( $string_to_remove, '', $version );
654
+ break;
655
+ }
656
+ }
657
+ }
658
+ $tls = ! ! $tls ? $tls : 'n/a';
659
+
660
+ set_transient( 'yith-plugin-fw-system-status-tls-version', $tls, 300 );
661
+ }
662
+
663
+ return ! ! $tls ? $tls : 'n/a';
664
+ }
665
+
666
+ /**
667
+ * Retrieve the output IP Address.
668
+ *
669
+ * @return string
670
+ * @since 3.5
671
+ */
672
+ public function get_output_ip() {
673
+ $ip = get_transient( 'yith-plugin-fw-system-status-output-ip' );
674
+
675
+ if ( ! $ip && apply_filters( 'yith_system_status_check_ip', true ) ) {
676
+ $url = 'https://ifconfig.co/ip';
677
+ $params = array(
678
+ 'sslverify' => false,
679
+ 'timeout' => 60,
680
+ );
681
+
682
+ $response = wp_remote_get( $url, $params );
683
+
684
+ if ( ! is_wp_error( $response ) && 200 === absint( $response['response']['code'] ) && 'OK' === $response['response']['message'] ) {
685
+ $body = $response['body'];
686
+
687
+ // Check for IPv4.
688
+ preg_match( '/((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])/', $body, $matches );
689
+ // Check for IPv6.
690
+ if ( empty( $matches ) ) {
691
+ preg_match( '/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/', $body, $matches );
692
+ }
693
+
694
+ $ip = ! empty( $matches ) ? $matches[0] : 'n/a';
695
+ }
696
+
697
+ $ip = ! ! $ip ? $ip : 'n/a';
698
+
699
+ set_transient( 'yith-plugin-fw-system-status-output-ip', $ip, 300 );
700
+ }
701
+
702
+ return ! ! $ip ? $ip : 'n/a';
703
+ }
704
+
705
+ }
706
+ }
707
+
708
+ if ( ! function_exists( 'YITH_System_Status' ) ) {
709
+ /**
710
+ * Single instance of YITH_System_Status
711
+ *
712
+ * @return YITH_System_Status
713
+ * @since 1.0
714
+ * @author Alberto Ruggiero
715
+ */
716
+ function YITH_System_Status() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
717
+ return YITH_System_Status::instance();
718
+ }
719
+ }
720
+
721
+ YITH_System_Status();
plugin-fw/includes/privacy/class-yith-privacy-plugin-abstract.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Privacy Abstract Class
4
+ * abstract class to handle privacy in plugins
5
+ *
6
+ * @class YITH_Privacy_Plugin_Abstract
7
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
8
+ * @package YITH\PluginFramework\Classes
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
12
+
13
+ if ( ! class_exists( 'YITH_Privacy_Plugin_Abstract' ) ) {
14
+ /**
15
+ * Class YITH_Privacy_Plugin_Abstract
16
+ */
17
+ class YITH_Privacy_Plugin_Abstract {
18
+ /**
19
+ * The plugin name.
20
+ *
21
+ * @var string
22
+ */
23
+ private $plugin_name;
24
+
25
+ /**
26
+ * YITH_Privacy_Plugin_Abstract constructor.
27
+ *
28
+ * @param string $plugin_name The plugin name.
29
+ */
30
+ public function __construct( $plugin_name ) {
31
+ $this->plugin_name = $plugin_name;
32
+ $this->init();
33
+ }
34
+
35
+ /**
36
+ * Let's initialize the privacy.
37
+ */
38
+ protected function init() {
39
+ add_filter( 'yith_plugin_fw_privacy_guide_content', array( $this, 'add_message_in_section' ), 10, 2 );
40
+ }
41
+
42
+ /**
43
+ * Add message in a specific section.
44
+ *
45
+ * @param string $html The HTML of the section.
46
+ * @param string $section The section.
47
+ *
48
+ * @return string
49
+ */
50
+ public function add_message_in_section( $html, $section ) {
51
+ $message = $this->get_privacy_message( $section );
52
+ if ( $message ) {
53
+ $html .= "<p class='privacy-policy-tutorial'><strong>{$this->plugin_name}</strong></p>";
54
+ $html .= $message;
55
+ }
56
+
57
+ return $html;
58
+ }
59
+
60
+ /**
61
+ * Retrieve the privacy message.
62
+ * Override me to customize the messages for each section.
63
+ *
64
+ * @param string $section The section.
65
+ *
66
+ * @return string
67
+ */
68
+ public function get_privacy_message( $section ) {
69
+ return '';
70
+ }
71
+ }
72
+ }
plugin-fw/includes/privacy/class-yith-privacy.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Privacy Class
4
+ * handle privacy for GDPR
5
+ *
6
+ * @class YITH_Privacy
7
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
8
+ * @package YITH\PluginFramework\Classes
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
12
+
13
+ if ( ! class_exists( 'YITH_Privacy' ) ) {
14
+ /**
15
+ * Class YITH_Privacy
16
+ */
17
+ class YITH_Privacy {
18
+
19
+ /**
20
+ * The single instance of the class.
21
+ *
22
+ * @var YITH_Privacy
23
+ */
24
+ private static $instance;
25
+
26
+ /**
27
+ * Singleton implementation.
28
+ *
29
+ * @return YITH_Privacy
30
+ */
31
+ public static function instance() {
32
+ return ! is_null( self::$instance ) ? self::$instance : self::$instance = new self();
33
+ }
34
+
35
+ /**
36
+ * Deprecated singleton implementation.
37
+ * Kept for backward compatibility.
38
+ *
39
+ * @return YITH_Privacy
40
+ * @deprecated 3.5 | use YITH_Privacy::get_instance() instead.
41
+ */
42
+ public static function get_instance() {
43
+ return self::instance();
44
+ }
45
+
46
+ /**
47
+ * YITH_Privacy constructor.
48
+ */
49
+ private function __construct() {
50
+ add_action( 'admin_init', array( $this, 'add_privacy_message' ) );
51
+ }
52
+
53
+ /**
54
+ * Adds the privacy message on YITH privacy page.
55
+ */
56
+ public function add_privacy_message() {
57
+ if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
58
+ $content = $this->get_privacy_message();
59
+
60
+ if ( $content ) {
61
+ $title = apply_filters( 'yith_plugin_fw_privacy_policy_guide_title', _x( 'YITH Plugins', 'Privacy Policy Guide Title', 'yith-plugin-fw' ) );
62
+ wp_add_privacy_policy_content( $title, $content );
63
+ }
64
+ }
65
+ }
66
+
67
+ /**
68
+ * Get the privacy message.
69
+ *
70
+ * @return string
71
+ */
72
+ public function get_privacy_message() {
73
+ $privacy_content_path = YIT_CORE_PLUGIN_TEMPLATE_PATH . '/privacy/html-policy-content.php';
74
+ ob_start();
75
+ $sections = $this->get_sections();
76
+ if ( file_exists( $privacy_content_path ) ) {
77
+ include $privacy_content_path;
78
+ }
79
+
80
+ return apply_filters( 'yith_plugin_fw_privacy_policy_content', ob_get_clean() );
81
+ }
82
+
83
+ /**
84
+ * Get the sections.
85
+ *
86
+ * @return array
87
+ */
88
+ public function get_sections() {
89
+ return apply_filters(
90
+ 'yith_plugin_fw_privacy_policy_content_sections',
91
+ array(
92
+ 'general' => array(
93
+ 'tutorial' => _x( 'This sample language includes the basics around what personal data your store may be collecting, storing and sharing, as well as who may have access to that data. Depending on what settings are enabled and which additional plugins are used, the specific information shared by your store will vary. We recommend consulting with a lawyer when deciding what information to disclose on your privacy policy.', 'Privacy Policy Content', 'yith-plugin-fw' ),
94
+ 'description' => '',
95
+ ),
96
+ 'collect_and_store' => array(
97
+ 'title' => _x( 'What we collect and store', 'Privacy Policy Content', 'yith-plugin-fw' ),
98
+ ),
99
+ 'has_access' => array(
100
+ 'title' => _x( 'Who on our team has access', 'Privacy Policy Content', 'yith-plugin-fw' ),
101
+ ),
102
+ 'share' => array(
103
+ 'title' => _x( 'What we share with others', 'Privacy Policy Content', 'yith-plugin-fw' ),
104
+ ),
105
+ 'payments' => array(
106
+ 'title' => _x( 'Payments', 'Privacy Policy Content', 'yith-plugin-fw' ),
107
+ ),
108
+ )
109
+ );
110
+ }
111
+ }
112
+ }
113
+
114
+ YITH_Privacy::instance();
plugin-fw/{lib → includes}/promo/black.jpg RENAMED
File without changes
plugin-fw/{lib → includes}/promo/cyber.jpg RENAMED
File without changes
plugin-fw/{lib → includes}/promo/halloween.jpg RENAMED
File without changes
plugin-fw/includes/promo/yith-promo.php ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * YITH Promo functions
4
+ * handle the YITH promotions
5
+ *
6
+ * @package YITH\PluginFramework
7
+ */
8
+
9
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
+
11
+ if ( ! function_exists( 'simplexml_load_string' ) ) {
12
+ return false;
13
+ }
14
+
15
+ add_action( 'admin_notices', 'yith_plugin_fw_regenerate_transient' );
16
+ add_action( 'admin_notices', 'yith_plugin_fw_promo_notices', 15 );
17
+ add_action( 'admin_enqueue_scripts', 'yith_plugin_fw_notice_dismiss', 20 );
18
+
19
+ if ( ! function_exists( 'yith_plugin_fw_promo_notices' ) ) {
20
+ /**
21
+ * Add promo notices.
22
+ */
23
+ function yith_plugin_fw_promo_notices() {
24
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
25
+ global $pagenow;
26
+ $not_administrator = function_exists( 'current_user_can' ) && ! current_user_can( 'administrator' );
27
+ $is_dashboard = 'index.php' === $pagenow;
28
+ $is_plugin_page = 'plugins.php' === $pagenow || 'plugin-install.php' === $pagenow && 'plugin-editor.php' === $pagenow;
29
+ $wc_post_types = array( 'shop_order', 'shop_coupon' );
30
+ $is_wc_post_types = isset( $_GET['post_type'] ) && in_array( $_GET['post_type'], $wc_post_types, true );
31
+ $wc_pages = array( 'wc-reports', 'wc-settings', 'wc-status', 'wc-addons' );
32
+ $page = isset( $_GET['page'] ) ? sanitize_key( wp_unslash( $_GET['page'] ) ) : false;
33
+ $is_wc_pages = $page && in_array( $page, $wc_pages, true );
34
+ $is_yith_page = $page && false !== strstr( $page, 'yith' );
35
+
36
+ if ( $not_administrator ) {
37
+ return;
38
+ }
39
+
40
+ if ( ! $is_plugin_page && ! $is_wc_pages && ! $is_wc_post_types && ! $is_yith_page ) {
41
+ return;
42
+ }
43
+
44
+ $base_url = apply_filters( 'yith_plugin_fw_promo_base_url', YIT_CORE_PLUGIN_URL . '/includes/promo/' );
45
+ $xml = apply_filters( 'yith_plugin_fw_promo_xml_url', YIT_CORE_PLUGIN_PATH . '/includes/promo/yith-promo.xml' );
46
+ $transient = 'yith_promo_message';
47
+ $remote_data = get_site_transient( $transient );
48
+ $regenerate_promo_transient = isset( $_GET['yith_regenerate_promo_transient'] ) && 'yes' === $_GET['yith_regenerate_promo_transient'];
49
+ $promo_data = false;
50
+ $create_transient = false;
51
+
52
+ if ( false === $remote_data || apply_filters( 'yith_plugin_fw_force_regenerate_promo_transient', false ) || $regenerate_promo_transient ) {
53
+ $remote_data = file_get_contents( $xml ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
54
+ $create_transient = true;
55
+ }
56
+
57
+ if ( ! is_wp_error( $remote_data ) && ! empty( $remote_data ) ) {
58
+ $promo_data = @simplexml_load_string( $remote_data ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
59
+
60
+ $is_membership_user = false;
61
+ $license = function_exists( 'YITH_Plugin_Licence' ) ? YITH_Plugin_Licence()->get_licence() : array();
62
+ $xml_expiry_date = '';
63
+
64
+ if ( is_array( $license ) && apply_filters( 'yith_plugin_fw_check_for_membership_user', true ) ) {
65
+ // Check if the user have the YITH Club.
66
+ foreach ( $license as $plugin => $data ) {
67
+ if ( ! empty( $data['is_membership'] ) ) {
68
+ $is_membership_user = true;
69
+ $xml_expiry_date = $data['licence_expires'];
70
+ $remote_data = array();
71
+ $promo_data = array();
72
+ $create_transient = true;
73
+ break;
74
+ }
75
+ }
76
+ }
77
+
78
+ if ( empty( $is_membership_user ) && ! empty( $promo_data->expiry_date ) ) {
79
+ $xml_expiry_date = $promo_data->expiry_date;
80
+ }
81
+
82
+ if ( true === $create_transient ) {
83
+ set_site_transient( $transient, $remote_data, yith_plugin_fw_get_promo_transient_expiry_date( $xml_expiry_date ) );
84
+ }
85
+
86
+ if ( $promo_data && ! empty( $promo_data->promo ) ) {
87
+ $now = apply_filters( 'yith_plugin_fw_promo_now_date', strtotime( current_time( 'mysql' ) ) );
88
+
89
+ foreach ( $promo_data->promo as $promo ) {
90
+ $show_promo = true;
91
+ // Check for Special Promo.
92
+ if ( ! empty( $promo->show_promo_in ) ) {
93
+ $show_promo_in = explode( ',', $promo->show_promo_in );
94
+ $show_promo_in = array_map( 'trim', $show_promo_in );
95
+ if ( ! empty( $show_promo_in ) ) {
96
+ $show_promo = false;
97
+ foreach ( $show_promo_in as $plugin ) {
98
+ $plugin_slug = constant( $plugin );
99
+ $plugin_is_activated = ! empty( $license[ $plugin_slug ]['activated'] );
100
+ if ( defined( $plugin ) && ! apply_filters( 'yith_plugin_fw_promo_plugin_is_activated', $plugin_is_activated ) ) {
101
+ $show_promo = true;
102
+ break;
103
+ }
104
+ }
105
+ }
106
+ }
107
+
108
+ $start_date = isset( $promo->start_date ) ? $promo->start_date : '';
109
+ $end_date = isset( $promo->end_date ) ? $promo->end_date : '';
110
+
111
+ if ( $show_promo && ! empty( $start_date ) && ! empty( $end_date ) ) {
112
+ $start_date = strtotime( $start_date );
113
+ $end_date = strtotime( $end_date );
114
+
115
+ if ( $end_date >= $start_date && $now >= $start_date && $now <= $end_date ) {
116
+ // Is this a valid promo.
117
+ $title = isset( $promo->title ) ? $promo->title : '';
118
+ $description = isset( $promo->description ) ? $promo->description : '';
119
+ $url = isset( $promo->link->url ) ? $promo->link->url : '';
120
+ $url_label = isset( $promo->link->label ) ? $promo->link->label : '';
121
+ $image_bg_color = isset( $promo->style->image_bg_color ) ? $promo->style->image_bg_color : '';
122
+ $border_color = isset( $promo->style->border_color ) ? $promo->style->border_color : '';
123
+ $background_color = isset( $promo->style->background_color ) ? $promo->style->background_color : '';
124
+ $promo_id = isset( $promo->promo_id ) ? $promo->promo_id : '';
125
+ $banner = isset( $promo->banner ) ? $promo->banner : '';
126
+ $style = '';
127
+ $link = '';
128
+ $show_notice = false;
129
+
130
+ if ( ! empty( $border_color ) ) {
131
+ $style .= "border-left-color: {$border_color};";
132
+ }
133
+
134
+ if ( ! empty( $background_color ) ) {
135
+ $style .= "background-color: {$background_color};";
136
+ }
137
+
138
+ if ( ! empty( $image_bg_color ) ) {
139
+ $image_bg_color = "background-color: {$image_bg_color};";
140
+ }
141
+
142
+ if ( ! empty( $title ) ) {
143
+ $promo_id .= $title;
144
+
145
+ $title = sprintf( '%s: ', $title );
146
+ $show_notice = true;
147
+ }
148
+
149
+ if ( ! empty( $description ) ) {
150
+ $promo_id .= $description;
151
+
152
+ $description = sprintf( '%s', $description );
153
+ $show_notice = true;
154
+ }
155
+
156
+ if ( ! empty( $url ) && ! empty( $url_label ) ) {
157
+ $promo_id .= $url . $url_label;
158
+
159
+ $link = sprintf( '<a href="%s" target="_blank">%s</a>', $url, $url_label );
160
+ $show_notice = true;
161
+ }
162
+
163
+ if ( ! empty( $banner ) ) {
164
+ $banner = sprintf( '<img src="%s" class="yith-promo-banner-image">', $base_url . $banner );
165
+
166
+ if ( ! empty( $url ) ) {
167
+ $banner = sprintf( '<a class="yith-promo-banner-image-link" href="%s" target="_blank" style="%s">%s</a>', $url, $image_bg_color, $banner );
168
+ }
169
+ }
170
+
171
+ $unique_promo_id = 'yith-notice-' . md5( $promo_id );
172
+
173
+ if ( ! empty( $_COOKIE[ 'hide_' . $unique_promo_id ] ) && 'yes' === $_COOKIE[ 'hide_' . $unique_promo_id ] ) {
174
+ $show_notice = false;
175
+ }
176
+
177
+ if ( $show_notice ) : ?>
178
+ <?php wp_enqueue_script( 'yith-promo' ); ?>
179
+ <div id="<?php echo esc_attr( $unique_promo_id ); ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible" style="<?php echo esc_attr( $style ); ?>" data-expiry= <?php echo esc_attr( $promo->end_date ); ?>>
180
+ <p>
181
+ <?php
182
+ if ( ! ! $banner ) {
183
+ echo wp_kses_post( $banner );
184
+ }
185
+
186
+ echo wp_kses_post( sprintf( '%s %s %s', $title, $description, $link ) );
187
+ ?>
188
+ </p>
189
+ </div>
190
+ <?php endif; ?>
191
+ <?php
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+
198
+ // phpcs:enable
199
+ }
200
+ }
201
+
202
+ if ( ! function_exists( 'yith_plugin_fw_notice_dismiss' ) ) {
203
+ /**
204
+ * Dismiss the notice scripts.
205
+ */
206
+ function yith_plugin_fw_notice_dismiss() {
207
+ $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
208
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
209
+ wp_register_script( 'yith-promo', $script_path . '/assets/js/yith-promo' . $suffix . '.js', array( 'jquery' ), '1.0.0', true );
210
+ }
211
+ }
212
+
213
+ if ( ! function_exists( 'yith_plugin_fw_get_promo_transient_expiry_date' ) ) {
214
+ /**
215
+ * Retrieve the expiry date in integer.
216
+ *
217
+ * @param string $expiry_date The expiry date.
218
+ *
219
+ * @return false|int
220
+ */
221
+ function yith_plugin_fw_get_promo_transient_expiry_date( $expiry_date ) {
222
+ $xml_expiry_date = ! empty( $expiry_date ) ? $expiry_date : '+24 hours';
223
+ $current = strtotime( current_time( 'Y-m-d H:i:s' ) );
224
+ $expiry_date = strtotime( $xml_expiry_date, $current );
225
+
226
+ if ( $expiry_date <= $current ) {
227
+ $expiry_date = strtotime( '+24 hours', $current );
228
+ }
229
+
230
+ return $expiry_date;
231
+ }
232
+ }
233
+
234
+ if ( ! function_exists( 'yith_plugin_fw_regenerate_transient' ) ) {
235
+ /**
236
+ * Regenerate transients for promo.
237
+ */
238
+ function yith_plugin_fw_regenerate_transient() {
239
+ if ( false === get_option( 'yith_plugin_fw_promo_2019_bis', false ) ) {
240
+ delete_option( 'yith_plugin_fw_promo_2019' );
241
+ delete_site_transient( 'yith_promo_message' );
242
+ update_option( 'yith_plugin_fw_promo_2019_bis', true );
243
+ }
244
+ }
245
+ }
plugin-fw/{lib → includes}/promo/yith-promo.xml RENAMED
File without changes
plugin-fw/init.php CHANGED
@@ -1,107 +1,95 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.4.37
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
- * @author Your Inspiration Themes
10
- * @version 3.4.37
 
11
  */
12
- /**
13
- * This file belongs to the YIT Plugin Framework.
14
- *
15
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
16
- * that is bundled with this package in the file LICENSE.txt.
17
- * It is also available through the world-wide-web at this URL:
18
- * http://www.gnu.org/licenses/gpl-3.0.txt
19
- */
20
-
21
- if ( ! defined ( 'ABSPATH' ) ) {
22
- exit;
23
- } // Exit if accessed directly
24
-
25
-
26
-
27
- if ( ! function_exists ( 'yit_maybe_plugin_fw_loader' ) ) {
28
- /**
29
- * yit_maybe_plugin_fw_loader
30
- *
31
- * @since 1.0.0
32
- */
33
- function yit_maybe_plugin_fw_loader ( $plugin_path ) {
34
- global $plugin_fw_data, $plugin_upgrade_fw_data;
35
-
36
- $default_headers = array (
37
- 'Name' => 'Framework Name',
38
- 'Version' => 'Version',
39
- 'Author' => 'Author',
40
- 'TextDomain' => 'Text Domain',
41
- 'DomainPath' => 'Domain Path',
42
- );
43
-
44
- $plugin_path = trailingslashit( $plugin_path );
45
- $framework_data = get_file_data( $plugin_path . 'plugin-fw/init.php', $default_headers );
46
- $plugin_fw_main_file = $plugin_path . 'plugin-fw/yit-plugin.php';
47
-
48
- if ( ! empty( $plugin_fw_data ) ) {
49
- foreach ( $plugin_fw_data as $version => $path ) {
50
- if ( version_compare ( $version, $framework_data[ 'Version' ], '<' ) ) {
51
- $plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file );
52
- }
53
- }
54
- } else {
55
- $plugin_fw_data = array ( $framework_data[ 'Version' ] => $plugin_fw_main_file );
56
- }
57
 
58
- //Check for license & upgrade classes
59
- $upgrade_fw_init_file = $plugin_path . 'plugin-upgrade/init.php';
60
- $framework_data = file_exists( $upgrade_fw_init_file ) ? get_file_data( $upgrade_fw_init_file, $default_headers ) : $framework_data;
61
- $plugin_license_path = $plugin_upgrade_path = $plugin_path . 'plugin-upgrade';
62
 
63
- if( ! file_exists( $plugin_upgrade_path ) ){
64
- //Check the path for OLD plugin FW
65
- if( file_exists( $plugin_path . 'plugin-fw/licence' ) ){
66
- $plugin_license_path = $plugin_path . 'plugin-fw/licence';
67
- $plugin_upgrade_path = $plugin_path . 'plugin-fw/';
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
- else {
71
- $plugin_upgrade_path = $plugin_license_path = false;
72
- }
73
- }
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
- if( file_exists( $plugin_upgrade_path ) ){
76
- if( ! empty( $plugin_upgrade_fw_data ) ){
77
- foreach( $plugin_upgrade_fw_data as $version => $files ){
78
- if( version_compare ( $version, $framework_data[ 'Version' ], '<' ) ){
79
- $plugin_upgrade_fw_data = array ( $framework_data[ 'Version' ] => yit_get_upgrade_files( $plugin_license_path, $plugin_upgrade_path ) );
80
  }
81
  }
82
- }
83
-
84
- else {
85
- $plugin_upgrade_fw_data = array ( $framework_data[ 'Version' ] => yit_get_upgrade_files( $plugin_license_path, $plugin_upgrade_path ) );
86
- }
87
- }
88
- }
89
  }
90
 
91
- if( ! function_exists( 'yit_get_upgrade_files' ) ){
92
  /**
93
- * Retreive the core files to include to manage license and upgrade if exists
94
  *
95
- * @param $plugin_update_path file path
 
96
  *
97
  * @return array to files to include
98
  */
99
- function yit_get_upgrade_files( $plugin_license_path, $plugin_upgrade_path = '' ){
100
  $to_include = array();
101
 
102
- if( false ==! $plugin_license_path ){
103
  $plugin_upgrade_path = empty( $plugin_upgrade_path ) ? $plugin_license_path : $plugin_upgrade_path;
104
- $license_files = array(
105
  '%yith-license-path%/lib/yit-licence.php',
106
  '%yith-license-path%/lib/yit-plugin-licence.php',
107
  '%yith-license-path%/lib/yit-theme-licence.php',
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.5.1
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
+ * @author YITH
10
+ * @version 3.5.1
11
+ * @package YITH\PluginFramework
12
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
 
 
 
15
 
16
+ if ( ! function_exists( 'yit_maybe_plugin_fw_loader' ) ) {
17
+ /**
18
+ * Load the framework if it's not yet loaded.
19
+ *
20
+ * @param string $plugin_path The plugin path.
21
+ */
22
+ function yit_maybe_plugin_fw_loader( $plugin_path ) {
23
+ global $plugin_fw_data, $plugin_upgrade_fw_data;
24
+
25
+ $default_headers = array(
26
+ 'Name' => 'Framework Name',
27
+ 'Version' => 'Version',
28
+ 'Author' => 'Author',
29
+ 'TextDomain' => 'Text Domain',
30
+ 'DomainPath' => 'Domain Path',
31
+ );
32
+
33
+ $plugin_path = trailingslashit( $plugin_path );
34
+ $framework_data = get_file_data( $plugin_path . 'plugin-fw/init.php', $default_headers );
35
+ $plugin_fw_main_file = $plugin_path . 'plugin-fw/yit-plugin.php';
36
+
37
+ if ( ! empty( $plugin_fw_data ) ) {
38
+ foreach ( $plugin_fw_data as $version => $path ) {
39
+ if ( version_compare( $version, $framework_data['Version'], '<' ) ) {
40
+ $plugin_fw_data = array( $framework_data['Version'] => $plugin_fw_main_file );
41
+ }
42
+ }
43
+ } else {
44
+ $plugin_fw_data = array( $framework_data['Version'] => $plugin_fw_main_file );
45
+ }
46
 
47
+ // Check for license & upgrade classes.
48
+ $upgrade_fw_init_file = $plugin_path . 'plugin-upgrade/init.php';
49
+ $framework_data = file_exists( $upgrade_fw_init_file ) ? get_file_data( $upgrade_fw_init_file, $default_headers ) : $framework_data;
50
+ $plugin_license_path = $plugin_path . 'plugin-upgrade';
51
+ $plugin_upgrade_path = $plugin_path . 'plugin-upgrade';
52
+
53
+ if ( ! file_exists( $plugin_upgrade_path ) ) {
54
+ // Check path for OLD plugin framework version.
55
+ if ( file_exists( $plugin_path . 'plugin-fw/licence' ) ) {
56
+ $plugin_license_path = $plugin_path . 'plugin-fw/licence';
57
+ $plugin_upgrade_path = $plugin_path . 'plugin-fw/';
58
+ } else {
59
+ $plugin_upgrade_path = false;
60
+ $plugin_license_path = false;
61
+ }
62
+ }
63
 
64
+ if ( file_exists( $plugin_upgrade_path ) ) {
65
+ if ( ! empty( $plugin_upgrade_fw_data ) ) {
66
+ foreach ( $plugin_upgrade_fw_data as $version => $files ) {
67
+ if ( version_compare( $version, $framework_data['Version'], '<' ) ) {
68
+ $plugin_upgrade_fw_data = array( $framework_data['Version'] => yit_get_upgrade_files( $plugin_license_path, $plugin_upgrade_path ) );
69
  }
70
  }
71
+ } else {
72
+ $plugin_upgrade_fw_data = array( $framework_data['Version'] => yit_get_upgrade_files( $plugin_license_path, $plugin_upgrade_path ) );
73
+ }
74
+ }
75
+ }
 
 
76
  }
77
 
78
+ if ( ! function_exists( 'yit_get_upgrade_files' ) ) {
79
  /**
80
+ * Retrieve the core files to include to manage license and upgrade if exists.
81
  *
82
+ * @param string $plugin_license_path The license path.
83
+ * @param string $plugin_upgrade_path The upgrade path.
84
  *
85
  * @return array to files to include
86
  */
87
+ function yit_get_upgrade_files( $plugin_license_path, $plugin_upgrade_path = '' ) {
88
  $to_include = array();
89
 
90
+ if ( ! ! $plugin_license_path ) {
91
  $plugin_upgrade_path = empty( $plugin_upgrade_path ) ? $plugin_license_path : $plugin_upgrade_path;
92
+ $license_files = array(
93
  '%yith-license-path%/lib/yit-licence.php',
94
  '%yith-license-path%/lib/yit-plugin-licence.php',
95
  '%yith-license-path%/lib/yit-theme-licence.php',
plugin-fw/languages/yith-plugin-fw-el.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-el.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-11-23 14:47:23+00:00\n"
8
  "PO-Revision-Date: 2020-09-25 09:16:07+0000\n"
9
  "Language: el_GR\n"
10
  "MIME-Version: 1.0\n"
@@ -13,131 +13,171 @@ msgstr ""
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
- #: lib/yit-assets.php:103
17
  msgid "Clear"
18
  msgstr "Καθαρισμός"
19
 
20
- #: lib/yit-assets.php:104
21
  msgid "Clear color"
22
  msgstr "Καθαρισμός χρώματος"
23
 
24
- #: lib/yit-assets.php:105
25
  msgid "Default"
26
  msgstr "Προεπιλεγμένο"
27
 
28
- #: lib/yit-assets.php:106
29
  msgid "Select default color"
30
  msgstr "Επιλογή προεπιλεγμένου χρώματος"
31
 
32
- #: lib/yit-assets.php:107
33
  msgid "Select Color"
34
  msgstr "Επιλογή Χρώματος"
35
 
36
- #: lib/yit-assets.php:108
37
  msgid "Color value"
38
  msgstr "Αξία χρώματος"
39
 
40
- #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
41
- #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
 
 
 
 
 
 
42
  msgid "Add %s"
43
  msgstr "Προσθήκη %s"
44
 
45
- #: lib/yit-cpt-unlimited.php:463 lib/yit-cpt-unlimited.php:577
 
 
 
46
  msgid "Add New %s"
47
  msgstr "Προσθήκη Νέου %s"
48
 
49
- #: lib/yit-cpt-unlimited.php:464 lib/yit-cpt-unlimited.php:578
50
- #: lib/yit-cpt-unlimited.php:1269 lib/yit-cpt-unlimited.php:1306
 
 
 
 
 
 
51
  msgid "Edit %s"
52
  msgstr "Επεξεργασία %s"
53
 
54
- #: lib/yit-cpt-unlimited.php:465 lib/yit-cpt-unlimited.php:579
 
 
 
55
  msgid "New %s"
56
  msgstr "Νέο %s"
57
 
58
- #: lib/yit-cpt-unlimited.php:466 lib/yit-cpt-unlimited.php:580
 
 
 
59
  msgid "All %s"
60
  msgstr "Όλα %s"
61
 
62
- #: lib/yit-cpt-unlimited.php:467 lib/yit-cpt-unlimited.php:581
63
- #: lib/yit-cpt-unlimited.php:1253 lib/yit-cpt-unlimited.php:1307
 
 
 
 
 
 
64
  msgid "View %s"
65
  msgstr "Προβολή %s"
66
 
67
- #: lib/yit-cpt-unlimited.php:468 lib/yit-cpt-unlimited.php:582
 
 
 
68
  msgid "Search %s"
69
  msgstr "Αναζήτηση %s"
70
 
71
- #: lib/yit-cpt-unlimited.php:469 lib/yit-cpt-unlimited.php:583
 
 
 
72
  msgid "No %s found"
73
  msgstr "Δεν βρέθηκε %s"
74
 
75
- #: lib/yit-cpt-unlimited.php:470 lib/yit-cpt-unlimited.php:584
 
 
 
76
  msgid "No %s found in Trash"
77
  msgstr "Δεν βρέθηκε %s στον Κάδο Ανακύκλωσης"
78
 
79
- #: lib/yit-cpt-unlimited.php:629 templates/fields/ajax-terms.php:56
80
  msgid "Search Categories"
81
  msgstr "Αναζήτηση Κατηγοριών"
82
 
83
- #: lib/yit-cpt-unlimited.php:630
84
  msgid "All Categories"
85
  msgstr "Όλες οι Κατηγορίες"
86
 
87
- #: lib/yit-cpt-unlimited.php:631
88
  msgid "Parent Category"
89
  msgstr "Γονική Κατηγορία"
90
 
91
- #: lib/yit-cpt-unlimited.php:632
92
  msgid "Parent Category:"
93
  msgstr "Γονική Κατηγορία:"
94
 
95
- #: lib/yit-cpt-unlimited.php:633
96
  msgid "Edit Category"
97
  msgstr "Επεξεργασία Kατηγορίας"
98
 
99
- #: lib/yit-cpt-unlimited.php:634
100
  msgid "Update Category"
101
  msgstr "Ενημέρωση Κατηγορίας"
102
 
103
- #: lib/yit-cpt-unlimited.php:635
104
  msgid "Add New Category"
105
  msgstr "Προσθήκη Νέας Κατηγορίας"
106
 
107
- #: lib/yit-cpt-unlimited.php:636
108
  msgid "New Category Name"
109
  msgstr "Όνομα Νέας Κατηγορίας"
110
 
111
- #: lib/yit-cpt-unlimited.php:637
112
  msgid "Category"
113
  msgstr "Κατηγορία"
114
 
115
- #: lib/yit-cpt-unlimited.php:726
116
  msgid "Categories"
117
  msgstr "Κατηγορίες"
118
 
119
- #: lib/yit-cpt-unlimited.php:1044
 
120
  msgid "%s Settings"
121
  msgstr "Ρυθμίσεις %s"
122
 
123
- #: lib/yit-cpt-unlimited.php:1050 lib/yit-cpt-unlimited.php:1198
124
- #: lib/yit-cpt-unlimited.php:1204 lib/yit-plugin-panel.php:81
 
 
125
  msgid "Settings"
126
  msgstr "Ρυθμίσεις"
127
 
128
- #: lib/yit-cpt-unlimited.php:1053
129
  msgid "Type"
130
  msgstr "Τύπος"
131
 
132
- #: lib/yit-cpt-unlimited.php:1054
 
133
  msgid "Layout for this %s"
134
  msgstr "Διάταξη για %s"
135
 
136
- #: lib/yit-cpt-unlimited.php:1060
137
  msgid "Rewrite"
138
  msgstr "Επανεγγραφή"
139
 
140
- #: lib/yit-cpt-unlimited.php:1061
141
  msgid ""
142
  "Univocal identification name in the URL for each product (slug from post if "
143
  "empty)"
@@ -145,27 +185,27 @@ msgstr ""
145
  "Μονοσήμαντο όνομα ταυτοποίησης URL για κάθε προϊόν (slug από άρθρο αν είναι "
146
  "κενό)"
147
 
148
- #: lib/yit-cpt-unlimited.php:1066
149
  msgid "Label in Singular"
150
  msgstr "Επιγραφή σε Ενικό"
151
 
152
- #: lib/yit-cpt-unlimited.php:1067
153
  msgid "Set a label in singular (title of portfolio if empty)"
154
  msgstr "Ορίστε μια επιγραφή στον ενικό (τίτλος πορτφόλιο αν είναι κενό)"
155
 
156
- #: lib/yit-cpt-unlimited.php:1072
157
  msgid "Label in Plural"
158
  msgstr "Επιγραφή σε Πληθυντικό"
159
 
160
- #: lib/yit-cpt-unlimited.php:1073
161
  msgid "Set a label in plural (title of portfolio if empty)"
162
  msgstr "Ορίστε μια επιγραφή στον πληθυντικό (τίτλος πορτφόλιο αν είναι κενό)"
163
 
164
- #: lib/yit-cpt-unlimited.php:1078
165
  msgid "Taxonomy"
166
  msgstr "Ταξινομία"
167
 
168
- #: lib/yit-cpt-unlimited.php:1079
169
  msgid ""
170
  "If you want to use categories in the portfolio, set a name for taxonomy. "
171
  "Name should be a slug (must not contain capital letters nor spaces) and must "
@@ -176,178 +216,182 @@ msgstr ""
176
  "κεφαλαία γράμματα ή κενά) και δεν πρέπει να είναι μεγαλύτερο από 32 "
177
  "χαρακτήρες (περιορισμός δομής βάσης δεδομένων)."
178
 
179
- #: lib/yit-cpt-unlimited.php:1084
180
  msgid "Taxonomy Rewrite"
181
  msgstr "Επανεγγραφή Ταξινομίας"
182
 
183
- #: lib/yit-cpt-unlimited.php:1085
184
  msgid "Set univocal name for each category page URL."
185
  msgstr "Ορίστε μονοσήμαντο όνομα για κάθε URL σελίδας κατηγορίας."
186
 
187
- #: lib/yit-cpt-unlimited.php:1090
188
  msgid "Single layout"
189
  msgstr "Μονή διάταξη"
190
 
191
- #: lib/yit-cpt-unlimited.php:1091
192
  msgid "Layout for single page of this portfolio"
193
  msgstr "Διάταξη μονής σελίδας του πορτφόλιο"
194
 
195
- #: lib/yit-cpt-unlimited.php:1132
196
  msgid "layout settings"
197
  msgstr "ρυθμίσεις διάταξης"
198
 
199
- #: lib/yit-cpt-unlimited.php:1224 lib/yit-cpt-unlimited.php:1237
 
200
  msgid "Quick links"
201
  msgstr "Γρήγορα λινκ"
202
 
203
- #: lib/yit-cpt-unlimited.php:1477
 
204
  msgid "Show frontend of the %s"
205
  msgstr "Προβολή εμφάνισης του %s"
206
 
207
- #: lib/yit-cpt-unlimited.php:1484 templates/fields/customtabs.php:46
208
- #: templates/fields/customtabs.php:89
209
  msgid "Name"
210
  msgstr "Όνομα"
211
 
212
- #: lib/yit-cpt-unlimited.php:1635
 
213
  msgid "Add %s from images"
214
  msgstr "Προσθήκη %s από εικόνες"
215
 
216
- #: lib/yit-cpt-unlimited.php:1638
217
  msgid "Upload multiple files"
218
  msgstr "Ανέβασμα πολλαπλών αρχείων"
219
 
220
- #: lib/yit-plugin-panel-wc.php:427
221
  msgid "The changes you have made will be lost if you leave this page."
222
  msgstr ""
223
  "Οι αλλαγές που έχετε δημιουργήσει θα χαθούν αν αφήσετε αυτήν την σελίδα."
224
 
225
- #: lib/yit-plugin-panel.php:80
226
  msgid "Plugin Settings"
227
  msgstr "Ρυθμίσεις Προσθέτου"
228
 
229
- #: lib/yit-plugin-panel.php:466 lib/yit-plugin-panel.php:469
 
230
  msgid "How to install premium version"
231
  msgstr "Πώς να εγκαταστήσετε την προηγμένη έκδοση"
232
 
233
- #: lib/yit-plugin-panel.php:633 lib/yit-plugin-subpanel.php:151
234
- #: templates/panel/woocommerce/woocommerce-form.php:15
 
235
  msgid "Save Changes"
236
  msgstr "Αποθήκευση Αλλαγών"
237
 
238
- #: lib/yit-plugin-panel.php:637 lib/yit-plugin-subpanel.php:154
239
- #: templates/panel/woocommerce/woocommerce-form.php:19
 
240
  msgid ""
241
  "If you continue with this action, you will reset all options in this page."
242
  msgstr ""
243
  "Αν συνεχίσετε με αυτή την ενέργεια θα επαναφέρετε όλες τις επιλογές στη "
244
  "σελίδα."
245
 
246
- #: lib/yit-plugin-panel.php:640 lib/yit-plugin-subpanel.php:156
247
- msgid "Reset to default"
248
- msgstr "Επαναφορά σε προεπιλεγμένο"
249
-
250
- #: lib/yit-plugin-panel.php:641 lib/yit-plugin-subpanel.php:157
251
- #: templates/panel/woocommerce/woocommerce-form.php:23
252
  msgid "Are you sure?"
253
  msgstr "Είστε σίγουρος;"
254
 
255
- #: lib/yit-plugin-panel.php:842
 
 
 
 
 
256
  msgid ""
257
  "The element you have entered already exists. Please, enter another name."
258
  msgstr "Το στοιχείο που εισάγατε υπάρχει ήδη. Παρακαλώ, εισάγετε άλλο όνομα."
259
 
260
- #: lib/yit-plugin-panel.php:843
261
  msgid "Settings saved"
262
  msgstr "Ρυθμίσεις αποθηκεύτηκαν"
263
 
264
- #: lib/yit-plugin-panel.php:844
265
  msgid "Settings reset"
266
  msgstr "Επαναφορά ρυθμίσεων"
267
 
268
- #: lib/yit-plugin-panel.php:845
269
  msgid "Element deleted correctly."
270
  msgstr "Το στοιχείο διαγράφηκε επιτυχώς."
271
 
272
- #: lib/yit-plugin-panel.php:846 lib/yit-plugin-panel.php:847
 
273
  msgid "Element updated correctly."
274
  msgstr "Το στοιχείο αναβαθμίστηκε επιτυχώς."
275
 
276
- #: lib/yit-plugin-panel.php:848
277
  msgid "Database imported correctly."
278
  msgstr "Επιτυχής εισαγωγή βάσης δεδομένων."
279
 
280
- #: lib/yit-plugin-panel.php:849
281
  msgid "An error has occurred during import. Please try again."
282
  msgstr "Παρουσιάστηκε σφάλμα κατά την εισαγωγή. Παρακαλώ προσπαθήστε ξανά."
283
 
284
- #: lib/yit-plugin-panel.php:850
285
  msgid "The added file is not valid."
286
  msgstr "Το προστιθέμενο αρχείο δεν είναι έγκυρο."
287
 
288
- #: lib/yit-plugin-panel.php:851
289
  msgid "Sorry, import is disabled."
290
  msgstr "Συγνώμη, η εισαγωγή είναι απενεργοποιημένη."
291
 
292
- #: lib/yit-plugin-panel.php:852
293
  msgid "Sorting successful."
294
  msgstr "Διαλογή επιτυχής."
295
 
296
- #: lib/yit-plugin-panel.php:1315
297
  msgid "We need your support"
298
  msgstr "Χρειαζόμαστε την υποστήριξή σας"
299
 
300
- #: lib/yit-plugin-panel.php:1316
301
  msgid "to keep updating and improving the plugin. Please,"
302
  msgstr ""
303
  "για να διατηρήσετε την ενημέρωση και τη βελτίωση του πρόσθετου. Παρακαλώ,"
304
 
305
- #: lib/yit-plugin-panel.php:1318
306
  msgid "help us by leaving a five-star rating"
307
  msgstr "βοηθήστε μας αφήνοντας μια βαθμολογία πέντε αστέρων"
308
 
309
- #: lib/yit-plugin-panel.php:1319
310
  msgid ":) Thanks!"
311
  msgstr ":) Ευχαριστώ!"
312
 
313
- #: lib/yit-pointers.php:70
314
  msgid "Plugins Activated"
315
  msgstr "Ενεργοποιημένα Πρόσθετα"
316
 
317
- #: lib/yit-pointers.php:71
 
318
  msgid ""
319
- "From now on, you can find all plugin options in YITH Plugins menu.\n"
320
- " Plugin customization settings will be "
321
- "available as a new entry in YITH Plugins menu."
322
  msgstr ""
323
  "Πλέον μπορείτε να βρείτε όλες τις επιλογές του προσθέτου μέσω του μενού YITH "
324
  "Plugins.\n"
325
  " Οι ρυθμίσεις προσαρμογής του προσθέτου "
326
  "θα είναι διαθέσιμες ως νέα εγγραφή στο μενού YITH Plugins."
327
 
328
- #: lib/yit-pointers.php:73 lib/yit-pointers.php:89
329
- msgid "Discover all our plugins available on:"
 
 
330
  msgstr "Ανακαλύψτε όλα τα διαθέσιμά μας πρόσθετα στο:"
331
 
332
- #: lib/yit-pointers.php:74 lib/yit-pointers.php:90
333
- msgid "and"
334
- msgstr "και"
335
-
336
- #: lib/yit-pointers.php:84
337
  msgid "Plugins Upgraded"
338
  msgstr "Αναβαθμισμένα Πρόσθετα"
339
 
340
- #: lib/yit-pointers.php:85
 
341
  msgid ""
342
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
343
- "menu.\n"
344
- " Every time one of our plugins is added, "
345
- "a new entry will be added to this menu.\n"
346
- " For example, after the update, plugin "
347
- "options (such as for YITH WooCommerce Wishlist, YITH WooCommerce Ajax "
348
- "Search, etc.)\n"
349
- " will be moved from previous location to "
350
- "YITH Plugins tab."
351
  msgstr ""
352
  "Πλέον μπορείτε να βρείτε όλες τις επιλογές του προσθέτου μέσω του μενού YITH "
353
  "Plugins.\n"
@@ -359,19 +403,19 @@ msgstr ""
359
  " θα μεταφέρονται από την προηγούμενη "
360
  "τοποθεσία στην καρτέλα YITH Plugins."
361
 
362
- #: lib/yith-dashboard.php:40
363
  msgid "YITH Latest Updates"
364
  msgstr "Τελευταίες Αναβαθμίσεις YITH"
365
 
366
- #: lib/yith-dashboard.php:41
367
  msgid "Latest news from YITH Blog"
368
  msgstr "Τελευταία νέα από YITH Blog"
369
 
370
- #: lib/yith-dashboard.php:65
371
  msgid "RSS Error:"
372
  msgstr "Σφάλμα RSS:"
373
 
374
- #: lib/yith-dashboard.php:71
375
  msgid ""
376
  "An error has occurred, which probably means the feed is down. Try again "
377
  "later."
@@ -379,77 +423,78 @@ msgstr ""
379
  "Παρουσιάστηκε σφάλμα, που πιθανότατα σημαίνει ότι έπεσε το τροφοδοτικό. "
380
  "Προσπαθήστε ξανά αργότερα."
381
 
382
- #: lib/yith-system-status.php:122
383
  msgid "WordPress Version"
384
  msgstr "Έκδοση WordPress"
385
 
386
- #: lib/yith-system-status.php:123
387
  msgid "WooCommerce Version"
388
  msgstr "Έκδοση WooCommerce"
389
 
390
- #: lib/yith-system-status.php:124
391
  msgid "Available Memory"
392
  msgstr "Διαθέσιμη Μνήμη"
393
 
394
- #: lib/yith-system-status.php:125
395
  msgid "PHP Version"
396
  msgstr "Έκδοση PHP"
397
 
398
- #: lib/yith-system-status.php:126
399
  msgid "TLS Version"
400
  msgstr "Έκδοση TLS"
401
 
402
- #: lib/yith-system-status.php:127
403
  msgid "WordPress Cron"
404
  msgstr "WordPress Cron"
405
 
406
- #: lib/yith-system-status.php:128
407
  msgid "SimpleXML"
408
  msgstr "SimpleXML"
409
 
410
- #: lib/yith-system-status.php:129
411
  msgid "MultiByte String"
412
  msgstr "MultiByte String"
413
 
414
- #: lib/yith-system-status.php:130
415
  msgid "ImageMagick Version"
416
  msgstr "Έκδοση ImageMagick"
417
 
418
- #: lib/yith-system-status.php:131
419
  msgid "GD Library"
420
  msgstr "Βιβλιοθήκη GD"
421
 
422
- #: lib/yith-system-status.php:132
423
  msgid "Iconv Module"
424
  msgstr "Άρθρωμα Iconv"
425
 
426
- #: lib/yith-system-status.php:133
427
  msgid "OPCache Save Comments"
428
  msgstr "OPCache Save Comments"
429
 
430
- #: lib/yith-system-status.php:134
431
  msgid "URL FOpen"
432
  msgstr "URL FOpen"
433
 
434
- #: lib/yith-system-status.php:152 lib/yith-system-status.php:153
435
- #: templates/sysinfo/system-information-panel.php:14
 
436
  msgid "System Status"
437
  msgstr "Κατάσταση Συστήματος"
438
 
439
- #: lib/yith-system-status.php:195
440
  msgid "YITH Plugins"
441
  msgstr "Πρόσθετα YITH"
442
 
443
- #: lib/yith-system-status.php:203
444
  msgid "WooCommerce"
445
  msgstr "WooCommerce"
446
 
447
- #: lib/yith-system-status.php:355
448
  msgid "Warning!"
449
  msgstr "Προσοχή!"
450
 
451
  #. translators: %1$s open link tag, %2$s open link tag
452
- #: lib/yith-system-status.php:359
453
  msgid ""
454
  "The system check has detected some compatibility issues on your installation."
455
  "%1$sClick here%2$s to know more"
@@ -457,34 +502,34 @@ msgstr ""
457
  "Ο έλεγχος συστήματος έχει εντοπίσει κάποια προβλήματα συμβατότητας στην "
458
  "εγκατάστασή σας.%1$sΚάντε κλικ εδώ%2$s για να μάθετε περισσότερα"
459
 
460
- #: lib/yith-system-status.php:544
461
  msgid "Enabled"
462
  msgstr "Ενεργοποιημένο"
463
 
464
- #: lib/yith-system-status.php:544
465
  msgid "Disabled"
466
  msgstr "Απενεργοποιημένο"
467
 
468
- #: lib/yith-system-status.php:549
469
  msgid "N/A"
470
  msgstr "N/A"
471
 
472
  #. translators: %1$s plugin name, %2$s requirement name
473
- #: lib/yith-system-status.php:577
474
  msgid "%1$s needs %2$s enabled"
475
  msgstr "%1$s χρειάζεται %2$s ενεργοποιημένο"
476
 
477
  #. translators: %1$s plugin name, %2$s required memory amount
478
- #: lib/yith-system-status.php:580
479
  msgid "%1$s needs at least %2$s of available memory"
480
  msgstr "%1$s χρειάζεται τουλάχιστον %2$s διαθέσιμης μνήμης"
481
 
482
  #. translators: %1$s plugin name, %2$s version number
483
- #: lib/yith-system-status.php:583
484
  msgid "%1$s needs at least %2$s version"
485
  msgstr "%1$s χρειάζεται τουλάχιστον %2$s έκδοση"
486
 
487
- #: lib/yith-system-status.php:608
488
  msgid ""
489
  "Update it to the latest version in order to benefit of all new features and "
490
  "security updates."
@@ -492,25 +537,27 @@ msgstr ""
492
  "Κάντε αναβάθμιση της τελευταίας έκδοσης για να επωφεληθείτε από τα νέα "
493
  "χαρακτηριστικά και τις αναβαθμίσεις προστασίας."
494
 
495
- #: lib/yith-system-status.php:612 lib/yith-system-status.php:618
 
496
  msgid "Contact your hosting company in order to update it."
497
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να αναβαθμίσετε."
498
 
499
- #: lib/yith-system-status.php:616
500
  msgid "Contact your hosting company in order to install it."
501
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να το ενεργοποιήσετε."
502
 
503
  #. translators: %1$s code, %2$s file name
504
- #: lib/yith-system-status.php:623
505
  msgid "Remove %1$s from %2$s file"
506
  msgstr "Αφαίρεση %1$s από αρχείο %2$s"
507
 
508
- #: lib/yith-system-status.php:631
509
  msgid "Contact your hosting company in order to enable it."
510
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να ενεργοποιήσετε."
511
 
512
  #. translators: %1$s opening link tag, %2$s closing link tag
513
- #: lib/yith-system-status.php:635 lib/yith-system-status.php:659
 
514
  msgid ""
515
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
516
  "it."
@@ -519,7 +566,7 @@ msgstr ""
519
  "για να το βελτιώσετε."
520
 
521
  #. translators: %s recommended memory amount
522
- #: lib/yith-system-status.php:656
523
  msgid ""
524
  "For optimal functioning of our plugins, we suggest setting at least %s of "
525
  "available memory"
@@ -528,7 +575,7 @@ msgstr ""
528
  "τουλάχιστον %s διαθέσιμης μνήμης"
529
 
530
  #. translators: %1$s TLS label, %2$s cURL label
531
- #: lib/yith-system-status.php:664
532
  msgid ""
533
  "The system check cannot determine which %1$s version is installed because "
534
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -538,7 +585,7 @@ msgstr ""
538
  "να το ενεργοποιήσει."
539
 
540
  #. translators: %1$s TLS label
541
- #: lib/yith-system-status.php:667
542
  msgid ""
543
  "The system check cannot determine which %1$s version is installed due to a "
544
  "connection issue between your site and our server."
@@ -547,68 +594,73 @@ msgstr ""
547
  "εγκατασταθεί λόγω προβλήματος σύνδεσης ανάμεσα στον ιστότοπο σας και τον "
548
  "διακομιστή μας."
549
 
550
- #: templates/fields/ajax-customers.php:57
551
  msgid "Search Customers"
552
  msgstr "Αναζήτηση Πελατών"
553
 
554
- #: templates/fields/ajax-customers.php:83
555
- #: templates/fields/ajax-customers.php:93
 
556
  msgid "%1$s (#%2$s &ndash; %3$s)"
557
  msgstr "%1$s (#%2$s &ndash; %3$s)"
558
 
559
- #: templates/fields/ajax-posts.php:57
560
  msgid "Search Posts"
561
  msgstr "Αναζήτηση Άρθρου"
562
 
563
- #: templates/fields/ajax-products.php:16
564
  msgid "Search Product"
565
  msgstr "Αναζήτηση Προϊόντος"
566
 
567
- #: templates/fields/customtabs.php:28
568
  msgid "Close all"
569
  msgstr "Απενεργοποίηση όλων"
570
 
571
- #: templates/fields/customtabs.php:28
572
  msgid "Expand all"
573
  msgstr "Ανάπτυξη όλων"
574
 
575
- #: templates/fields/customtabs.php:37 templates/fields/customtabs.php:81
576
  msgid "Remove"
577
  msgstr "Αφαίρεση"
578
 
579
- #: templates/fields/customtabs.php:52 templates/fields/customtabs.php:94
580
  msgid "Value"
581
  msgstr "Τιμή"
582
 
583
- #: templates/fields/customtabs.php:53 templates/fields/customtabs.php:95
584
  msgid "Content of the tab. (HTML is supported)"
585
  msgstr "Περιεχόμενο καρτέλας. (Υποστηρίζεται HTML)"
586
 
587
- #: templates/fields/customtabs.php:65
588
  msgid "Add custom product tab"
589
  msgstr "Προσθέστε καρτέλα προσαρμοσμένου προϊόντος"
590
 
591
- #: templates/fields/customtabs.php:106
592
  msgid "Do you want to remove the custom tab?"
593
  msgstr "Θέλετε να αφαιρέσετε την προσαρμοσμένη καρτέλα;"
594
 
595
- #: templates/fields/date-format.php:50
596
  msgid "Custom:"
597
  msgstr "Προσαρμογή:"
598
 
599
- #: templates/fields/icons.php:58
 
 
 
 
600
  msgid "Set Default"
601
  msgstr "Ορίστε Προεπιλεγμένο"
602
 
603
- #: templates/fields/image-gallery.php:34 templates/fields/image-gallery.php:39
604
  msgid "Delete image"
605
  msgstr "Διαγραφή εικόνας"
606
 
607
- #: templates/fields/image-gallery.php:39
608
  msgid "Add Images to Gallery"
609
  msgstr "Προσθέστε Εικόνες στη Συλλογή"
610
 
611
- #: templates/fields/image-gallery.php:39
612
  msgid "Add to gallery"
613
  msgstr "Προσθέστε στη συλλογή"
614
 
@@ -616,27 +668,27 @@ msgstr "Προσθέστε στη συλλογή"
616
  msgid "Add images"
617
  msgstr "Προσθέστε εικόνες"
618
 
619
- #: templates/fields/image-gallery.php:39
620
  msgid "Delete"
621
  msgstr "Διαγραφή"
622
 
623
- #: templates/fields/select-buttons.php:21
624
  msgid "Add All"
625
  msgstr "Προσθήκη Όλων"
626
 
627
- #: templates/fields/select-buttons.php:34
628
  msgid "Remove All"
629
  msgstr "Αφαίρεση Όλων"
630
 
631
- #: templates/fields/sidebars.php:22
632
  msgid "Left sidebar"
633
  msgstr "Αριστερή πλευρική στήλη"
634
 
635
- #: templates/fields/sidebars.php:25
636
  msgid "Right sidebar"
637
  msgstr "Δεξιά πλευρική στήλη"
638
 
639
- #: templates/fields/sidebars.php:28 templates/fields/sidebars.php:31
640
  msgid "No sidebar"
641
  msgstr "Χωρίς πλευρική στήλη"
642
 
@@ -644,118 +696,106 @@ msgstr "Χωρίς πλευρική στήλη"
644
  msgid "Left Sidebar"
645
  msgstr "Αριστερή Πλευρική Στήλη"
646
 
647
- #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:54
648
  msgid "Choose a sidebar"
649
  msgstr "Επιλέξτε πλευρική στήλη"
650
 
651
- #: templates/fields/sidebars.php:52
652
  msgid "Right Sidebar"
653
  msgstr "Δεξιά Πλευρική Στήλη"
654
 
655
- #: templates/fields/upload.php:27 templates/metaboxes/types/icon-list.php:70
656
- #: templates/panel/woocommerce/woocommerce-upload.php:40
657
  msgid "Upload"
658
  msgstr "Ανέβασμα"
659
 
660
- #: templates/fields/upload.php:29
661
  msgid "Reset"
662
  msgstr "Επαναφορά"
663
 
664
- #: templates/metaboxes/types/icon-list.php:76
665
- msgid "Image preview"
666
- msgstr "Προεπισκόπηση εικόνας"
667
-
668
- #: templates/metaboxes/types/icon-list.php:90
669
- msgid "(Default: %s <img src=\"%s\"/>)"
670
- msgstr "(Προεπιλεγμένο: %s <img src=\"%s\"/>)"
671
-
672
- #: templates/metaboxes/types/icon-list.php:92
673
- msgid "(Default: <i %s></i> )"
674
- msgstr "(Προεπιλεγμένο: <i %s></i> )"
675
-
676
- #: templates/panel/woocommerce/woocommerce-form.php:22
677
  msgid "Reset Defaults"
678
  msgstr "Επαναφορά Προεπιλεγμένων"
679
 
680
- #: templates/sysinfo/system-information-panel.php:15
681
  msgid "PHPInfo"
682
  msgstr ""
683
 
684
- #: templates/sysinfo/system-information-panel.php:16
685
- #: templates/sysinfo/tabs/error-log.php:28
686
  #, fuzzy
687
  msgid "Log Files"
688
  msgstr "Εμφάνιση αρχείων καταγραφής"
689
 
690
- #: templates/sysinfo/system-information-panel.php:25
691
  msgid "YITH System Information"
692
  msgstr "Σύστημα Πληροφοριών YITH"
693
 
694
- #: templates/sysinfo/tabs/error-log.php:16
695
  msgid "WP debug.log file"
696
  msgstr "Αρχείο WP debug.log"
697
 
698
- #: templates/sysinfo/tabs/error-log.php:21
699
  msgid "PHP error_log file"
700
  msgstr "Αρχείο PHP error_log"
701
 
702
- #: templates/sysinfo/tabs/error-log.php:64
703
  msgid "Download"
704
  msgstr ""
705
 
706
- #: templates/sysinfo/tabs/error-log.php:78
707
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
708
  msgstr ""
709
 
710
- #. translators: %s file name
711
- #: templates/sysinfo/tabs/error-log.php:106
712
  msgid ""
713
  "No Log file available. Enable the WordPress debug by adding this in the %s "
714
  "file of your installation"
715
  msgstr ""
716
 
717
- #: templates/sysinfo/tabs/error-log.php:115
718
  msgid "Copied!"
719
  msgstr ""
720
 
721
- #: templates/sysinfo/tabs/error-log.php:115
722
  msgid "Copy Code"
723
  msgstr ""
724
 
725
- #: templates/sysinfo/tabs/main.php:43
726
  msgid "Site Info"
727
  msgstr ""
728
 
729
- #: templates/sysinfo/tabs/main.php:48
730
  msgid "Site URL"
731
  msgstr "URL Ιστοσελίδας"
732
 
733
- #: templates/sysinfo/tabs/main.php:57
734
  msgid "Output IP Address"
735
  msgstr "Διεύθυνση IP Παραγωγής"
736
 
737
- #: templates/sysinfo/tabs/main.php:65
738
  msgid "Defined WP_CACHE"
739
  msgstr "Καθορισμένο WP_CACHE"
740
 
741
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
742
  msgid "Yes"
743
  msgstr "Ναι"
744
 
745
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
746
  msgid "No"
747
  msgstr "Όχι"
748
 
749
- #: templates/sysinfo/tabs/main.php:73
750
  msgid "External object cache"
751
  msgstr ""
752
 
753
- #: templates/sysinfo/tabs/main.php:82
754
  #, fuzzy
755
  msgid "Plugins Requirements"
756
  msgstr "Ρυθμίσεις Προσθέτου"
757
 
758
- #: yit-plugin.php:194
759
  msgid "License"
760
  msgstr "Άδεια χρήσης προϊόντος"
761
 
@@ -763,12 +803,43 @@ msgstr "Άδεια χρήσης προϊόντος"
763
  msgid "YITH"
764
  msgstr "YITH"
765
 
766
- #: lib/privacy/yit-privacy.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
767
  msgctxt "Privacy Policy Guide Title"
768
  msgid "YITH Plugins"
769
  msgstr "Πρόσθετα YITH"
770
 
771
- #: lib/privacy/yit-privacy.php:59
772
  msgctxt "Privacy Policy Content"
773
  msgid ""
774
  "This sample language includes the basics around what personal data your "
@@ -787,112 +858,82 @@ msgstr ""
787
  "με έναν δικηγόρο, όταν αποφασίζετε ποιες πληροφορίες να αποκαλύπτετε στην "
788
  "πολιτική απορρήτου σας."
789
 
790
- #: lib/privacy/yit-privacy.php:63
791
  msgctxt "Privacy Policy Content"
792
  msgid "What we collect and store"
793
  msgstr "Τι συλλέγουμε και αποθηκεύουμε"
794
 
795
- #: lib/privacy/yit-privacy.php:66
796
  msgctxt "Privacy Policy Content"
797
  msgid "Who on our team has access"
798
  msgstr "Ποιος στην ομάδα μας έχει πρόσβαση"
799
 
800
- #: lib/privacy/yit-privacy.php:69
801
  msgctxt "Privacy Policy Content"
802
  msgid "What we share with others"
803
  msgstr "Τι μοιραζόμαστε με τους άλλους"
804
 
805
- #: lib/privacy/yit-privacy.php:72
806
  msgctxt "Privacy Policy Content"
807
  msgid "Payments"
808
  msgstr "Πληρωμές"
809
 
810
- #: lib/yit-cpt-unlimited.php:627
811
- msgctxt "taxonomy general name"
812
- msgid "%s Categories"
813
- msgstr "Κατηγορίες %s"
814
-
815
- #: lib/yit-cpt-unlimited.php:628
816
- msgctxt "taxonomy singular name"
817
- msgid "Category"
818
- msgstr "Κατηγορία"
819
-
820
- #: lib/yith-dashboard.php:99
821
- msgctxt "Plugin FW"
822
- msgid "View Changelog"
823
- msgstr "Προβολή Αρχείου Καταγραφής"
824
-
825
- #: lib/yith-dashboard.php:100
826
- msgctxt "Plugin FW"
827
- msgid "Latest update released on"
828
- msgstr "Τελευταία αναβάθμιση κυκλοφόρησε στις"
829
-
830
- #: lib/yith-dashboard.php:143
831
- msgctxt "Button label"
832
- msgid "Close"
833
- msgstr "Απενεργοποίηση"
834
-
835
- #: lib/yith-gutenberg.php:134
836
- msgctxt "[gutenberg]: Category Name"
837
- msgid "YITH"
838
- msgstr "YITH"
839
-
840
- #: templates/fields/dimensions.php:16
841
  msgctxt "Position in the \"Dimensions\" field"
842
  msgid "Top"
843
  msgstr "Κορυφή"
844
 
845
- #: templates/fields/dimensions.php:17
846
  msgctxt "Position in the \"Dimensions\" field"
847
  msgid "Right"
848
  msgstr "Δεξιά"
849
 
850
- #: templates/fields/dimensions.php:18
851
  msgctxt "Position in the \"Dimensions\" field"
852
  msgid "Bottom"
853
  msgstr "Κάτω"
854
 
855
- #: templates/fields/dimensions.php:19
856
  msgctxt "Position in the \"Dimensions\" field"
857
  msgid "Left"
858
  msgstr "Αριστερά"
859
 
860
- #: templates/fields/dimensions.php:99
861
  msgctxt "Tooltip in the \"Dimensions\" field"
862
  msgid "Link values together"
863
  msgstr "Συνδέστε αξίες"
864
 
865
- #: templates/fields/onoff.php:24
866
  msgctxt "YES/NO button: use MAX 3 characters!"
867
  msgid "YES"
868
  msgstr "ΝΑΙ"
869
 
870
- #: templates/fields/onoff.php:25
871
  msgctxt "YES/NO button: use MAX 3 characters!"
872
  msgid "NO"
873
  msgstr "ΟΧΙ"
874
 
875
- #: yit-plugin.php:83
876
  msgctxt "Plugin Row Meta"
877
  msgid "Live Demo"
878
  msgstr "Live Demo"
879
 
880
- #: yit-plugin.php:88
881
  msgctxt "Plugin Row Meta"
882
  msgid "Documentation"
883
  msgstr "Εγχειρίδιο χρήσης"
884
 
885
- #: yit-plugin.php:93
886
  msgctxt "Plugin Row Meta"
887
  msgid "Support"
888
  msgstr "Υποστήριξη"
889
 
890
- #: yit-plugin.php:98
891
  msgctxt "Plugin Row Meta"
892
  msgid "Premium version"
893
  msgstr "Premium έκδοση"
894
 
895
- #: yit-plugin.php:190
896
  msgctxt "Action links"
897
  msgid "Settings"
898
  msgstr "Ρυθμίσεις"
@@ -905,3 +946,15 @@ msgstr "Ρυθμίσεις"
905
 
906
  #~ msgid "Back to System panel"
907
  #~ msgstr "Πίσω στο πάνελ Συστήματος"
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-12-28 12:30:11+00:00\n"
8
  "PO-Revision-Date: 2020-09-25 09:16:07+0000\n"
9
  "Language: el_GR\n"
10
  "MIME-Version: 1.0\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
+ #: includes/class-yit-assets.php:117
17
  msgid "Clear"
18
  msgstr "Καθαρισμός"
19
 
20
+ #: includes/class-yit-assets.php:118
21
  msgid "Clear color"
22
  msgstr "Καθαρισμός χρώματος"
23
 
24
+ #: includes/class-yit-assets.php:119
25
  msgid "Default"
26
  msgstr "Προεπιλεγμένο"
27
 
28
+ #: includes/class-yit-assets.php:120
29
  msgid "Select default color"
30
  msgstr "Επιλογή προεπιλεγμένου χρώματος"
31
 
32
+ #: includes/class-yit-assets.php:121
33
  msgid "Select Color"
34
  msgstr "Επιλογή Χρώματος"
35
 
36
+ #: includes/class-yit-assets.php:122
37
  msgid "Color value"
38
  msgstr "Αξία χρώματος"
39
 
40
+ #. translators: %s is the singular name of the post type.
41
+ #. translators: $s is the singular name of the post type.
42
+ #. translators: %s is the singular name of the post type.
43
+ #. translators: %s is the plural name of the post type.
44
+ #: includes/class-yit-cpt-unlimited.php:486
45
+ #: includes/class-yit-cpt-unlimited.php:619
46
+ #: includes/class-yit-cpt-unlimited.php:768
47
+ #: includes/class-yit-cpt-unlimited.php:1755
48
  msgid "Add %s"
49
  msgstr "Προσθήκη %s"
50
 
51
+ #. translators: %s is the singular name of the post type.
52
+ #. translators: $s is the singular name of the post type.
53
+ #: includes/class-yit-cpt-unlimited.php:488
54
+ #: includes/class-yit-cpt-unlimited.php:621
55
  msgid "Add New %s"
56
  msgstr "Προσθήκη Νέου %s"
57
 
58
+ #. translators: %s is the singular name of the post type.
59
+ #. translators: $s is the singular name of the post type.
60
+ #. translators: %s is the post title.
61
+ #. translators: %s is the singular name of the post type.
62
+ #: includes/class-yit-cpt-unlimited.php:490
63
+ #: includes/class-yit-cpt-unlimited.php:623
64
+ #: includes/class-yit-cpt-unlimited.php:1350
65
+ #: includes/class-yit-cpt-unlimited.php:1401
66
  msgid "Edit %s"
67
  msgstr "Επεξεργασία %s"
68
 
69
+ #. translators: %s is the singular name of the post type.
70
+ #. translators: $s is the singular name of the post type.
71
+ #: includes/class-yit-cpt-unlimited.php:492
72
+ #: includes/class-yit-cpt-unlimited.php:625
73
  msgid "New %s"
74
  msgstr "Νέο %s"
75
 
76
+ #. translators: %s is the plural name of the post type.
77
+ #. translators: $s is the plural name of the post type.
78
+ #: includes/class-yit-cpt-unlimited.php:494
79
+ #: includes/class-yit-cpt-unlimited.php:627
80
  msgid "All %s"
81
  msgstr "Όλα %s"
82
 
83
+ #. translators: %s is the singular name of the post type.
84
+ #. translators: $s is the singular name of the post type.
85
+ #. translators: %s is the plural label of the post type.
86
+ #. translators: %s is the plural name of the post type.
87
+ #: includes/class-yit-cpt-unlimited.php:496
88
+ #: includes/class-yit-cpt-unlimited.php:629
89
+ #: includes/class-yit-cpt-unlimited.php:1323
90
+ #: includes/class-yit-cpt-unlimited.php:1406
91
  msgid "View %s"
92
  msgstr "Προβολή %s"
93
 
94
+ #. translators: %s is the plural name of the post type.
95
+ #. translators: $s is the plural name of the post type.
96
+ #: includes/class-yit-cpt-unlimited.php:498
97
+ #: includes/class-yit-cpt-unlimited.php:631
98
  msgid "Search %s"
99
  msgstr "Αναζήτηση %s"
100
 
101
+ #. translators: %s is the plural name of the post type.
102
+ #. translators: $s is the plural name of the post type.
103
+ #: includes/class-yit-cpt-unlimited.php:500
104
+ #: includes/class-yit-cpt-unlimited.php:633
105
  msgid "No %s found"
106
  msgstr "Δεν βρέθηκε %s"
107
 
108
+ #. translators: %s is the plural name of the post type.
109
+ #. translators: $s is the plural name of the post type.
110
+ #: includes/class-yit-cpt-unlimited.php:502
111
+ #: includes/class-yit-cpt-unlimited.php:635
112
  msgid "No %s found in Trash"
113
  msgstr "Δεν βρέθηκε %s στον Κάδο Ανακύκλωσης"
114
 
115
+ #: includes/class-yit-cpt-unlimited.php:678 templates/fields/ajax-terms.php:41
116
  msgid "Search Categories"
117
  msgstr "Αναζήτηση Κατηγοριών"
118
 
119
+ #: includes/class-yit-cpt-unlimited.php:679
120
  msgid "All Categories"
121
  msgstr "Όλες οι Κατηγορίες"
122
 
123
+ #: includes/class-yit-cpt-unlimited.php:680
124
  msgid "Parent Category"
125
  msgstr "Γονική Κατηγορία"
126
 
127
+ #: includes/class-yit-cpt-unlimited.php:681
128
  msgid "Parent Category:"
129
  msgstr "Γονική Κατηγορία:"
130
 
131
+ #: includes/class-yit-cpt-unlimited.php:682
132
  msgid "Edit Category"
133
  msgstr "Επεξεργασία Kατηγορίας"
134
 
135
+ #: includes/class-yit-cpt-unlimited.php:683
136
  msgid "Update Category"
137
  msgstr "Ενημέρωση Κατηγορίας"
138
 
139
+ #: includes/class-yit-cpt-unlimited.php:684
140
  msgid "Add New Category"
141
  msgstr "Προσθήκη Νέας Κατηγορίας"
142
 
143
+ #: includes/class-yit-cpt-unlimited.php:685
144
  msgid "New Category Name"
145
  msgstr "Όνομα Νέας Κατηγορίας"
146
 
147
+ #: includes/class-yit-cpt-unlimited.php:686
148
  msgid "Category"
149
  msgstr "Κατηγορία"
150
 
151
+ #: includes/class-yit-cpt-unlimited.php:778
152
  msgid "Categories"
153
  msgstr "Κατηγορίες"
154
 
155
+ #. translators: %s is the singular name of the post type.
156
+ #: includes/class-yit-cpt-unlimited.php:1098
157
  msgid "%s Settings"
158
  msgstr "Ρυθμίσεις %s"
159
 
160
+ #: includes/class-yit-cpt-unlimited.php:1106
161
+ #: includes/class-yit-cpt-unlimited.php:1260
162
+ #: includes/class-yit-cpt-unlimited.php:1266
163
+ #: includes/class-yit-plugin-panel.php:84
164
  msgid "Settings"
165
  msgstr "Ρυθμίσεις"
166
 
167
+ #: includes/class-yit-cpt-unlimited.php:1111
168
  msgid "Type"
169
  msgstr "Τύπος"
170
 
171
+ #. translators: %s is the singular name of the post type.
172
+ #: includes/class-yit-cpt-unlimited.php:1114
173
  msgid "Layout for this %s"
174
  msgstr "Διάταξη για %s"
175
 
176
+ #: includes/class-yit-cpt-unlimited.php:1122
177
  msgid "Rewrite"
178
  msgstr "Επανεγγραφή"
179
 
180
+ #: includes/class-yit-cpt-unlimited.php:1123
181
  msgid ""
182
  "Univocal identification name in the URL for each product (slug from post if "
183
  "empty)"
185
  "Μονοσήμαντο όνομα ταυτοποίησης URL για κάθε προϊόν (slug από άρθρο αν είναι "
186
  "κενό)"
187
 
188
+ #: includes/class-yit-cpt-unlimited.php:1128
189
  msgid "Label in Singular"
190
  msgstr "Επιγραφή σε Ενικό"
191
 
192
+ #: includes/class-yit-cpt-unlimited.php:1129
193
  msgid "Set a label in singular (title of portfolio if empty)"
194
  msgstr "Ορίστε μια επιγραφή στον ενικό (τίτλος πορτφόλιο αν είναι κενό)"
195
 
196
+ #: includes/class-yit-cpt-unlimited.php:1134
197
  msgid "Label in Plural"
198
  msgstr "Επιγραφή σε Πληθυντικό"
199
 
200
+ #: includes/class-yit-cpt-unlimited.php:1135
201
  msgid "Set a label in plural (title of portfolio if empty)"
202
  msgstr "Ορίστε μια επιγραφή στον πληθυντικό (τίτλος πορτφόλιο αν είναι κενό)"
203
 
204
+ #: includes/class-yit-cpt-unlimited.php:1140
205
  msgid "Taxonomy"
206
  msgstr "Ταξινομία"
207
 
208
+ #: includes/class-yit-cpt-unlimited.php:1141
209
  msgid ""
210
  "If you want to use categories in the portfolio, set a name for taxonomy. "
211
  "Name should be a slug (must not contain capital letters nor spaces) and must "
216
  "κεφαλαία γράμματα ή κενά) και δεν πρέπει να είναι μεγαλύτερο από 32 "
217
  "χαρακτήρες (περιορισμός δομής βάσης δεδομένων)."
218
 
219
+ #: includes/class-yit-cpt-unlimited.php:1146
220
  msgid "Taxonomy Rewrite"
221
  msgstr "Επανεγγραφή Ταξινομίας"
222
 
223
+ #: includes/class-yit-cpt-unlimited.php:1147
224
  msgid "Set univocal name for each category page URL."
225
  msgstr "Ορίστε μονοσήμαντο όνομα για κάθε URL σελίδας κατηγορίας."
226
 
227
+ #: includes/class-yit-cpt-unlimited.php:1152
228
  msgid "Single layout"
229
  msgstr "Μονή διάταξη"
230
 
231
+ #: includes/class-yit-cpt-unlimited.php:1153
232
  msgid "Layout for single page of this portfolio"
233
  msgstr "Διάταξη μονής σελίδας του πορτφόλιο"
234
 
235
+ #: includes/class-yit-cpt-unlimited.php:1196
236
  msgid "layout settings"
237
  msgstr "ρυθμίσεις διάταξης"
238
 
239
+ #: includes/class-yit-cpt-unlimited.php:1286
240
+ #: includes/class-yit-cpt-unlimited.php:1297
241
  msgid "Quick links"
242
  msgstr "Γρήγορα λινκ"
243
 
244
+ #. translators: %s is the name of the post type.
245
+ #: includes/class-yit-cpt-unlimited.php:1593
246
  msgid "Show frontend of the %s"
247
  msgstr "Προβολή εμφάνισης του %s"
248
 
249
+ #: includes/class-yit-cpt-unlimited.php:1602 templates/fields/customtabs.php:34
250
+ #: templates/fields/customtabs.php:76
251
  msgid "Name"
252
  msgstr "Όνομα"
253
 
254
+ #. translators: %s is the plural name of the post type.
255
+ #: includes/class-yit-cpt-unlimited.php:1749
256
  msgid "Add %s from images"
257
  msgstr "Προσθήκη %s από εικόνες"
258
 
259
+ #: includes/class-yit-cpt-unlimited.php:1769
260
  msgid "Upload multiple files"
261
  msgstr "Ανέβασμα πολλαπλών αρχείων"
262
 
263
+ #: includes/class-yit-plugin-panel-woocommerce.php:419
264
  msgid "The changes you have made will be lost if you leave this page."
265
  msgstr ""
266
  "Οι αλλαγές που έχετε δημιουργήσει θα χαθούν αν αφήσετε αυτήν την σελίδα."
267
 
268
+ #: includes/class-yit-plugin-panel.php:83
269
  msgid "Plugin Settings"
270
  msgstr "Ρυθμίσεις Προσθέτου"
271
 
272
+ #: includes/class-yit-plugin-panel.php:450
273
+ #: includes/class-yit-plugin-panel.php:453
274
  msgid "How to install premium version"
275
  msgstr "Πώς να εγκαταστήσετε την προηγμένη έκδοση"
276
 
277
+ #: includes/class-yit-plugin-panel.php:619
278
+ #: includes/class-yit-plugin-subpanel.php:132
279
+ #: templates/panel/woocommerce/woocommerce-form.php:28
280
  msgid "Save Changes"
281
  msgstr "Αποθήκευση Αλλαγών"
282
 
283
+ #: includes/class-yit-plugin-panel.php:624
284
+ #: includes/class-yit-plugin-subpanel.php:136
285
+ #: templates/panel/woocommerce/woocommerce-form.php:14
286
  msgid ""
287
  "If you continue with this action, you will reset all options in this page."
288
  msgstr ""
289
  "Αν συνεχίσετε με αυτή την ενέργεια θα επαναφέρετε όλες τις επιλογές στη "
290
  "σελίδα."
291
 
292
+ #: includes/class-yit-plugin-panel.php:624
293
+ #: includes/class-yit-plugin-subpanel.php:136
294
+ #: templates/panel/woocommerce/woocommerce-form.php:14
 
 
 
295
  msgid "Are you sure?"
296
  msgstr "Είστε σίγουρος;"
297
 
298
+ #: includes/class-yit-plugin-panel.php:628
299
+ #: includes/class-yit-plugin-subpanel.php:139
300
+ msgid "Reset to default"
301
+ msgstr "Επαναφορά σε προεπιλεγμένο"
302
+
303
+ #: includes/class-yit-plugin-panel.php:865
304
  msgid ""
305
  "The element you have entered already exists. Please, enter another name."
306
  msgstr "Το στοιχείο που εισάγατε υπάρχει ήδη. Παρακαλώ, εισάγετε άλλο όνομα."
307
 
308
+ #: includes/class-yit-plugin-panel.php:866
309
  msgid "Settings saved"
310
  msgstr "Ρυθμίσεις αποθηκεύτηκαν"
311
 
312
+ #: includes/class-yit-plugin-panel.php:867
313
  msgid "Settings reset"
314
  msgstr "Επαναφορά ρυθμίσεων"
315
 
316
+ #: includes/class-yit-plugin-panel.php:868
317
  msgid "Element deleted correctly."
318
  msgstr "Το στοιχείο διαγράφηκε επιτυχώς."
319
 
320
+ #: includes/class-yit-plugin-panel.php:869
321
+ #: includes/class-yit-plugin-panel.php:870
322
  msgid "Element updated correctly."
323
  msgstr "Το στοιχείο αναβαθμίστηκε επιτυχώς."
324
 
325
+ #: includes/class-yit-plugin-panel.php:871
326
  msgid "Database imported correctly."
327
  msgstr "Επιτυχής εισαγωγή βάσης δεδομένων."
328
 
329
+ #: includes/class-yit-plugin-panel.php:872
330
  msgid "An error has occurred during import. Please try again."
331
  msgstr "Παρουσιάστηκε σφάλμα κατά την εισαγωγή. Παρακαλώ προσπαθήστε ξανά."
332
 
333
+ #: includes/class-yit-plugin-panel.php:873
334
  msgid "The added file is not valid."
335
  msgstr "Το προστιθέμενο αρχείο δεν είναι έγκυρο."
336
 
337
+ #: includes/class-yit-plugin-panel.php:874
338
  msgid "Sorry, import is disabled."
339
  msgstr "Συγνώμη, η εισαγωγή είναι απενεργοποιημένη."
340
 
341
+ #: includes/class-yit-plugin-panel.php:875
342
  msgid "Sorting successful."
343
  msgstr "Διαλογή επιτυχής."
344
 
345
+ #: includes/class-yit-plugin-panel.php:1343
346
  msgid "We need your support"
347
  msgstr "Χρειαζόμαστε την υποστήριξή σας"
348
 
349
+ #: includes/class-yit-plugin-panel.php:1344
350
  msgid "to keep updating and improving the plugin. Please,"
351
  msgstr ""
352
  "για να διατηρήσετε την ενημέρωση και τη βελτίωση του πρόσθετου. Παρακαλώ,"
353
 
354
+ #: includes/class-yit-plugin-panel.php:1346
355
  msgid "help us by leaving a five-star rating"
356
  msgstr "βοηθήστε μας αφήνοντας μια βαθμολογία πέντε αστέρων"
357
 
358
+ #: includes/class-yit-plugin-panel.php:1347
359
  msgid ":) Thanks!"
360
  msgstr ":) Ευχαριστώ!"
361
 
362
+ #: includes/class-yit-pointers.php:80
363
  msgid "Plugins Activated"
364
  msgstr "Ενεργοποιημένα Πρόσθετα"
365
 
366
+ #: includes/class-yit-pointers.php:81
367
+ #, fuzzy
368
  msgid ""
369
+ "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
370
+ "customization settings will be available as a new entry in YITH Plugins menu."
 
371
  msgstr ""
372
  "Πλέον μπορείτε να βρείτε όλες τις επιλογές του προσθέτου μέσω του μενού YITH "
373
  "Plugins.\n"
374
  " Οι ρυθμίσεις προσαρμογής του προσθέτου "
375
  "θα είναι διαθέσιμες ως νέα εγγραφή στο μενού YITH Plugins."
376
 
377
+ #. translators: 1. YITH site link; 2. WordPress site link.
378
+ #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
379
+ #, fuzzy
380
+ msgid "Discover all our plugins available on: %1$s and %2$s"
381
  msgstr "Ανακαλύψτε όλα τα διαθέσιμά μας πρόσθετα στο:"
382
 
383
+ #: includes/class-yit-pointers.php:96
 
 
 
 
384
  msgid "Plugins Upgraded"
385
  msgstr "Αναβαθμισμένα Πρόσθετα"
386
 
387
+ #: includes/class-yit-pointers.php:97
388
+ #, fuzzy
389
  msgid ""
390
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
391
+ "menu. Every time one of our plugins is added, a new entry will be added to "
392
+ "this menu. For example, after the update, plugin options (such as for YITH "
393
+ "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
394
+ "previous location to YITH Plugins tab."
 
 
 
 
395
  msgstr ""
396
  "Πλέον μπορείτε να βρείτε όλες τις επιλογές του προσθέτου μέσω του μενού YITH "
397
  "Plugins.\n"
403
  " θα μεταφέρονται από την προηγούμενη "
404
  "τοποθεσία στην καρτέλα YITH Plugins."
405
 
406
+ #: includes/class-yith-dashboard.php:35
407
  msgid "YITH Latest Updates"
408
  msgstr "Τελευταίες Αναβαθμίσεις YITH"
409
 
410
+ #: includes/class-yith-dashboard.php:36
411
  msgid "Latest news from YITH Blog"
412
  msgstr "Τελευταία νέα από YITH Blog"
413
 
414
+ #: includes/class-yith-dashboard.php:56
415
  msgid "RSS Error:"
416
  msgstr "Σφάλμα RSS:"
417
 
418
+ #: includes/class-yith-dashboard.php:63
419
  msgid ""
420
  "An error has occurred, which probably means the feed is down. Try again "
421
  "later."
423
  "Παρουσιάστηκε σφάλμα, που πιθανότατα σημαίνει ότι έπεσε το τροφοδοτικό. "
424
  "Προσπαθήστε ξανά αργότερα."
425
 
426
+ #: includes/class-yith-system-status.php:110
427
  msgid "WordPress Version"
428
  msgstr "Έκδοση WordPress"
429
 
430
+ #: includes/class-yith-system-status.php:111
431
  msgid "WooCommerce Version"
432
  msgstr "Έκδοση WooCommerce"
433
 
434
+ #: includes/class-yith-system-status.php:112
435
  msgid "Available Memory"
436
  msgstr "Διαθέσιμη Μνήμη"
437
 
438
+ #: includes/class-yith-system-status.php:113
439
  msgid "PHP Version"
440
  msgstr "Έκδοση PHP"
441
 
442
+ #: includes/class-yith-system-status.php:114
443
  msgid "TLS Version"
444
  msgstr "Έκδοση TLS"
445
 
446
+ #: includes/class-yith-system-status.php:115
447
  msgid "WordPress Cron"
448
  msgstr "WordPress Cron"
449
 
450
+ #: includes/class-yith-system-status.php:116
451
  msgid "SimpleXML"
452
  msgstr "SimpleXML"
453
 
454
+ #: includes/class-yith-system-status.php:117
455
  msgid "MultiByte String"
456
  msgstr "MultiByte String"
457
 
458
+ #: includes/class-yith-system-status.php:118
459
  msgid "ImageMagick Version"
460
  msgstr "Έκδοση ImageMagick"
461
 
462
+ #: includes/class-yith-system-status.php:119
463
  msgid "GD Library"
464
  msgstr "Βιβλιοθήκη GD"
465
 
466
+ #: includes/class-yith-system-status.php:120
467
  msgid "Iconv Module"
468
  msgstr "Άρθρωμα Iconv"
469
 
470
+ #: includes/class-yith-system-status.php:121
471
  msgid "OPCache Save Comments"
472
  msgstr "OPCache Save Comments"
473
 
474
+ #: includes/class-yith-system-status.php:122
475
  msgid "URL FOpen"
476
  msgstr "URL FOpen"
477
 
478
+ #: includes/class-yith-system-status.php:140
479
+ #: includes/class-yith-system-status.php:141
480
+ #: templates/sysinfo/system-information-panel.php:11
481
  msgid "System Status"
482
  msgstr "Κατάσταση Συστήματος"
483
 
484
+ #: includes/class-yith-system-status.php:183
485
  msgid "YITH Plugins"
486
  msgstr "Πρόσθετα YITH"
487
 
488
+ #: includes/class-yith-system-status.php:191
489
  msgid "WooCommerce"
490
  msgstr "WooCommerce"
491
 
492
+ #: includes/class-yith-system-status.php:342
493
  msgid "Warning!"
494
  msgstr "Προσοχή!"
495
 
496
  #. translators: %1$s open link tag, %2$s open link tag
497
+ #: includes/class-yith-system-status.php:346
498
  msgid ""
499
  "The system check has detected some compatibility issues on your installation."
500
  "%1$sClick here%2$s to know more"
502
  "Ο έλεγχος συστήματος έχει εντοπίσει κάποια προβλήματα συμβατότητας στην "
503
  "εγκατάστασή σας.%1$sΚάντε κλικ εδώ%2$s για να μάθετε περισσότερα"
504
 
505
+ #: includes/class-yith-system-status.php:488
506
  msgid "Enabled"
507
  msgstr "Ενεργοποιημένο"
508
 
509
+ #: includes/class-yith-system-status.php:488
510
  msgid "Disabled"
511
  msgstr "Απενεργοποιημένο"
512
 
513
+ #: includes/class-yith-system-status.php:493
514
  msgid "N/A"
515
  msgstr "N/A"
516
 
517
  #. translators: %1$s plugin name, %2$s requirement name
518
+ #: includes/class-yith-system-status.php:520
519
  msgid "%1$s needs %2$s enabled"
520
  msgstr "%1$s χρειάζεται %2$s ενεργοποιημένο"
521
 
522
  #. translators: %1$s plugin name, %2$s required memory amount
523
+ #: includes/class-yith-system-status.php:523
524
  msgid "%1$s needs at least %2$s of available memory"
525
  msgstr "%1$s χρειάζεται τουλάχιστον %2$s διαθέσιμης μνήμης"
526
 
527
  #. translators: %1$s plugin name, %2$s version number
528
+ #: includes/class-yith-system-status.php:526
529
  msgid "%1$s needs at least %2$s version"
530
  msgstr "%1$s χρειάζεται τουλάχιστον %2$s έκδοση"
531
 
532
+ #: includes/class-yith-system-status.php:550
533
  msgid ""
534
  "Update it to the latest version in order to benefit of all new features and "
535
  "security updates."
537
  "Κάντε αναβάθμιση της τελευταίας έκδοσης για να επωφεληθείτε από τα νέα "
538
  "χαρακτηριστικά και τις αναβαθμίσεις προστασίας."
539
 
540
+ #: includes/class-yith-system-status.php:554
541
+ #: includes/class-yith-system-status.php:560
542
  msgid "Contact your hosting company in order to update it."
543
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να αναβαθμίσετε."
544
 
545
+ #: includes/class-yith-system-status.php:558
546
  msgid "Contact your hosting company in order to install it."
547
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να το ενεργοποιήσετε."
548
 
549
  #. translators: %1$s code, %2$s file name
550
+ #: includes/class-yith-system-status.php:565
551
  msgid "Remove %1$s from %2$s file"
552
  msgstr "Αφαίρεση %1$s από αρχείο %2$s"
553
 
554
+ #: includes/class-yith-system-status.php:573
555
  msgid "Contact your hosting company in order to enable it."
556
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να ενεργοποιήσετε."
557
 
558
  #. translators: %1$s opening link tag, %2$s closing link tag
559
+ #: includes/class-yith-system-status.php:577
560
+ #: includes/class-yith-system-status.php:600
561
  msgid ""
562
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
563
  "it."
566
  "για να το βελτιώσετε."
567
 
568
  #. translators: %s recommended memory amount
569
+ #: includes/class-yith-system-status.php:597
570
  msgid ""
571
  "For optimal functioning of our plugins, we suggest setting at least %s of "
572
  "available memory"
575
  "τουλάχιστον %s διαθέσιμης μνήμης"
576
 
577
  #. translators: %1$s TLS label, %2$s cURL label
578
+ #: includes/class-yith-system-status.php:605
579
  msgid ""
580
  "The system check cannot determine which %1$s version is installed because "
581
  "%2$s module is disabled. Ask your hosting company to enable it."
585
  "να το ενεργοποιήσει."
586
 
587
  #. translators: %1$s TLS label
588
+ #: includes/class-yith-system-status.php:608
589
  msgid ""
590
  "The system check cannot determine which %1$s version is installed due to a "
591
  "connection issue between your site and our server."
594
  "εγκατασταθεί λόγω προβλήματος σύνδεσης ανάμεσα στον ιστότοπο σας και τον "
595
  "διακομιστή μας."
596
 
597
+ #: templates/fields/ajax-customers.php:41
598
  msgid "Search Customers"
599
  msgstr "Αναζήτηση Πελατών"
600
 
601
+ #. translators: 1. user display name; 2. user ID; 3. user email.
602
+ #: templates/fields/ajax-customers.php:68
603
+ #: templates/fields/ajax-customers.php:79
604
  msgid "%1$s (#%2$s &ndash; %3$s)"
605
  msgstr "%1$s (#%2$s &ndash; %3$s)"
606
 
607
+ #: templates/fields/ajax-posts.php:41
608
  msgid "Search Posts"
609
  msgstr "Αναζήτηση Άρθρου"
610
 
611
+ #: templates/fields/ajax-products.php:14
612
  msgid "Search Product"
613
  msgstr "Αναζήτηση Προϊόντος"
614
 
615
+ #: templates/fields/customtabs.php:17
616
  msgid "Close all"
617
  msgstr "Απενεργοποίηση όλων"
618
 
619
+ #: templates/fields/customtabs.php:17
620
  msgid "Expand all"
621
  msgstr "Ανάπτυξη όλων"
622
 
623
+ #: templates/fields/customtabs.php:25 templates/fields/customtabs.php:68
624
  msgid "Remove"
625
  msgstr "Αφαίρεση"
626
 
627
+ #: templates/fields/customtabs.php:40 templates/fields/customtabs.php:81
628
  msgid "Value"
629
  msgstr "Τιμή"
630
 
631
+ #: templates/fields/customtabs.php:41 templates/fields/customtabs.php:82
632
  msgid "Content of the tab. (HTML is supported)"
633
  msgstr "Περιεχόμενο καρτέλας. (Υποστηρίζεται HTML)"
634
 
635
+ #: templates/fields/customtabs.php:52
636
  msgid "Add custom product tab"
637
  msgstr "Προσθέστε καρτέλα προσαρμοσμένου προϊόντος"
638
 
639
+ #: templates/fields/customtabs.php:93
640
  msgid "Do you want to remove the custom tab?"
641
  msgstr "Θέλετε να αφαιρέσετε την προσαρμοσμένη καρτέλα;"
642
 
643
+ #: templates/fields/date-format.php:65
644
  msgid "Custom:"
645
  msgstr "Προσαρμογή:"
646
 
647
+ #: templates/fields/date-format.php:70
648
+ msgid "Preview:"
649
+ msgstr ""
650
+
651
+ #: templates/fields/icons.php:63
652
  msgid "Set Default"
653
  msgstr "Ορίστε Προεπιλεγμένο"
654
 
655
+ #: templates/fields/image-gallery.php:29 templates/fields/image-gallery.php:40
656
  msgid "Delete image"
657
  msgstr "Διαγραφή εικόνας"
658
 
659
+ #: templates/fields/image-gallery.php:37
660
  msgid "Add Images to Gallery"
661
  msgstr "Προσθέστε Εικόνες στη Συλλογή"
662
 
663
+ #: templates/fields/image-gallery.php:38
664
  msgid "Add to gallery"
665
  msgstr "Προσθέστε στη συλλογή"
666
 
668
  msgid "Add images"
669
  msgstr "Προσθέστε εικόνες"
670
 
671
+ #: templates/fields/image-gallery.php:41
672
  msgid "Delete"
673
  msgstr "Διαγραφή"
674
 
675
+ #: templates/fields/select-buttons.php:19
676
  msgid "Add All"
677
  msgstr "Προσθήκη Όλων"
678
 
679
+ #: templates/fields/select-buttons.php:32
680
  msgid "Remove All"
681
  msgstr "Αφαίρεση Όλων"
682
 
683
+ #: templates/fields/sidebars.php:20
684
  msgid "Left sidebar"
685
  msgstr "Αριστερή πλευρική στήλη"
686
 
687
+ #: templates/fields/sidebars.php:23
688
  msgid "Right sidebar"
689
  msgstr "Δεξιά πλευρική στήλη"
690
 
691
+ #: templates/fields/sidebars.php:26 templates/fields/sidebars.php:29
692
  msgid "No sidebar"
693
  msgstr "Χωρίς πλευρική στήλη"
694
 
696
  msgid "Left Sidebar"
697
  msgstr "Αριστερή Πλευρική Στήλη"
698
 
699
+ #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:56
700
  msgid "Choose a sidebar"
701
  msgstr "Επιλέξτε πλευρική στήλη"
702
 
703
+ #: templates/fields/sidebars.php:54
704
  msgid "Right Sidebar"
705
  msgstr "Δεξιά Πλευρική Στήλη"
706
 
707
+ #: templates/fields/upload.php:34
708
+ #: templates/panel/woocommerce/woocommerce-upload.php:37
709
  msgid "Upload"
710
  msgstr "Ανέβασμα"
711
 
712
+ #: templates/fields/upload.php:39
713
  msgid "Reset"
714
  msgstr "Επαναφορά"
715
 
716
+ #: templates/panel/woocommerce/woocommerce-form.php:34
 
 
 
 
 
 
 
 
 
 
 
 
717
  msgid "Reset Defaults"
718
  msgstr "Επαναφορά Προεπιλεγμένων"
719
 
720
+ #: templates/sysinfo/system-information-panel.php:12
721
  msgid "PHPInfo"
722
  msgstr ""
723
 
724
+ #: templates/sysinfo/system-information-panel.php:13
725
+ #: templates/sysinfo/tabs/error-log.php:25
726
  #, fuzzy
727
  msgid "Log Files"
728
  msgstr "Εμφάνιση αρχείων καταγραφής"
729
 
730
+ #: templates/sysinfo/system-information-panel.php:22
731
  msgid "YITH System Information"
732
  msgstr "Σύστημα Πληροφοριών YITH"
733
 
734
+ #: templates/sysinfo/tabs/error-log.php:13
735
  msgid "WP debug.log file"
736
  msgstr "Αρχείο WP debug.log"
737
 
738
+ #: templates/sysinfo/tabs/error-log.php:18
739
  msgid "PHP error_log file"
740
  msgstr "Αρχείο PHP error_log"
741
 
742
+ #: templates/sysinfo/tabs/error-log.php:60
743
  msgid "Download"
744
  msgstr ""
745
 
746
+ #: templates/sysinfo/tabs/error-log.php:72
747
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
748
  msgstr ""
749
 
750
+ #. translators: %s file name.
751
+ #: templates/sysinfo/tabs/error-log.php:96
752
  msgid ""
753
  "No Log file available. Enable the WordPress debug by adding this in the %s "
754
  "file of your installation"
755
  msgstr ""
756
 
757
+ #: templates/sysinfo/tabs/error-log.php:105
758
  msgid "Copied!"
759
  msgstr ""
760
 
761
+ #: templates/sysinfo/tabs/error-log.php:105
762
  msgid "Copy Code"
763
  msgstr ""
764
 
765
+ #: templates/sysinfo/tabs/main.php:15
766
  msgid "Site Info"
767
  msgstr ""
768
 
769
+ #: templates/sysinfo/tabs/main.php:20
770
  msgid "Site URL"
771
  msgstr "URL Ιστοσελίδας"
772
 
773
+ #: templates/sysinfo/tabs/main.php:29
774
  msgid "Output IP Address"
775
  msgstr "Διεύθυνση IP Παραγωγής"
776
 
777
+ #: templates/sysinfo/tabs/main.php:37
778
  msgid "Defined WP_CACHE"
779
  msgstr "Καθορισμένο WP_CACHE"
780
 
781
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
782
  msgid "Yes"
783
  msgstr "Ναι"
784
 
785
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
786
  msgid "No"
787
  msgstr "Όχι"
788
 
789
+ #: templates/sysinfo/tabs/main.php:45
790
  msgid "External object cache"
791
  msgstr ""
792
 
793
+ #: templates/sysinfo/tabs/main.php:54
794
  #, fuzzy
795
  msgid "Plugins Requirements"
796
  msgstr "Ρυθμίσεις Προσθέτου"
797
 
798
+ #: yit-plugin.php:187
799
  msgid "License"
800
  msgstr "Άδεια χρήσης προϊόντος"
801
 
803
  msgid "YITH"
804
  msgstr "YITH"
805
 
806
+ #. translators: %s is the singular name of the post type.
807
+ #: includes/class-yit-cpt-unlimited.php:676
808
+ msgctxt "taxonomy general name"
809
+ msgid "%s Categories"
810
+ msgstr "Κατηγορίες %s"
811
+
812
+ #: includes/class-yit-cpt-unlimited.php:677
813
+ msgctxt "taxonomy singular name"
814
+ msgid "Category"
815
+ msgstr "Κατηγορία"
816
+
817
+ #: includes/class-yith-dashboard.php:96
818
+ msgctxt "Plugin FW"
819
+ msgid "View Changelog"
820
+ msgstr "Προβολή Αρχείου Καταγραφής"
821
+
822
+ #: includes/class-yith-dashboard.php:97
823
+ msgctxt "Plugin FW"
824
+ msgid "Latest update released on"
825
+ msgstr "Τελευταία αναβάθμιση κυκλοφόρησε στις"
826
+
827
+ #: includes/class-yith-dashboard.php:137
828
+ msgctxt "Button label"
829
+ msgid "Close"
830
+ msgstr "Απενεργοποίηση"
831
+
832
+ #: includes/class-yith-gutenberg.php:131
833
+ msgctxt "[gutenberg]: Category Name"
834
+ msgid "YITH"
835
+ msgstr "YITH"
836
+
837
+ #: includes/privacy/class-yith-privacy.php:61
838
  msgctxt "Privacy Policy Guide Title"
839
  msgid "YITH Plugins"
840
  msgstr "Πρόσθετα YITH"
841
 
842
+ #: includes/privacy/class-yith-privacy.php:93
843
  msgctxt "Privacy Policy Content"
844
  msgid ""
845
  "This sample language includes the basics around what personal data your "
858
  "με έναν δικηγόρο, όταν αποφασίζετε ποιες πληροφορίες να αποκαλύπτετε στην "
859
  "πολιτική απορρήτου σας."
860
 
861
+ #: includes/privacy/class-yith-privacy.php:97
862
  msgctxt "Privacy Policy Content"
863
  msgid "What we collect and store"
864
  msgstr "Τι συλλέγουμε και αποθηκεύουμε"
865
 
866
+ #: includes/privacy/class-yith-privacy.php:100
867
  msgctxt "Privacy Policy Content"
868
  msgid "Who on our team has access"
869
  msgstr "Ποιος στην ομάδα μας έχει πρόσβαση"
870
 
871
+ #: includes/privacy/class-yith-privacy.php:103
872
  msgctxt "Privacy Policy Content"
873
  msgid "What we share with others"
874
  msgstr "Τι μοιραζόμαστε με τους άλλους"
875
 
876
+ #: includes/privacy/class-yith-privacy.php:106
877
  msgctxt "Privacy Policy Content"
878
  msgid "Payments"
879
  msgstr "Πληρωμές"
880
 
881
+ #: templates/fields/dimensions.php:13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
882
  msgctxt "Position in the \"Dimensions\" field"
883
  msgid "Top"
884
  msgstr "Κορυφή"
885
 
886
+ #: templates/fields/dimensions.php:14
887
  msgctxt "Position in the \"Dimensions\" field"
888
  msgid "Right"
889
  msgstr "Δεξιά"
890
 
891
+ #: templates/fields/dimensions.php:15
892
  msgctxt "Position in the \"Dimensions\" field"
893
  msgid "Bottom"
894
  msgstr "Κάτω"
895
 
896
+ #: templates/fields/dimensions.php:16
897
  msgctxt "Position in the \"Dimensions\" field"
898
  msgid "Left"
899
  msgstr "Αριστερά"
900
 
901
+ #: templates/fields/dimensions.php:88
902
  msgctxt "Tooltip in the \"Dimensions\" field"
903
  msgid "Link values together"
904
  msgstr "Συνδέστε αξίες"
905
 
906
+ #: templates/fields/onoff.php:28
907
  msgctxt "YES/NO button: use MAX 3 characters!"
908
  msgid "YES"
909
  msgstr "ΝΑΙ"
910
 
911
+ #: templates/fields/onoff.php:29
912
  msgctxt "YES/NO button: use MAX 3 characters!"
913
  msgid "NO"
914
  msgstr "ΟΧΙ"
915
 
916
+ #: yit-plugin.php:75
917
  msgctxt "Plugin Row Meta"
918
  msgid "Live Demo"
919
  msgstr "Live Demo"
920
 
921
+ #: yit-plugin.php:79
922
  msgctxt "Plugin Row Meta"
923
  msgid "Documentation"
924
  msgstr "Εγχειρίδιο χρήσης"
925
 
926
+ #: yit-plugin.php:83
927
  msgctxt "Plugin Row Meta"
928
  msgid "Support"
929
  msgstr "Υποστήριξη"
930
 
931
+ #: yit-plugin.php:87
932
  msgctxt "Plugin Row Meta"
933
  msgid "Premium version"
934
  msgstr "Premium έκδοση"
935
 
936
+ #: yit-plugin.php:183
937
  msgctxt "Action links"
938
  msgid "Settings"
939
  msgstr "Ρυθμίσεις"
946
 
947
  #~ msgid "Back to System panel"
948
  #~ msgstr "Πίσω στο πάνελ Συστήματος"
949
+
950
+ #~ msgid "(Default: <i %s></i> )"
951
+ #~ msgstr "(Προεπιλεγμένο: <i %s></i> )"
952
+
953
+ #~ msgid "(Default: %s <img src=\"%s\"/>)"
954
+ #~ msgstr "(Προεπιλεγμένο: %s <img src=\"%s\"/>)"
955
+
956
+ #~ msgid "Image preview"
957
+ #~ msgstr "Προεπισκόπηση εικόνας"
958
+
959
+ #~ msgid "and"
960
+ #~ msgstr "και"
plugin-fw/languages/yith-plugin-fw-es_ES.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-es_ES.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-11-23 14:47:23+00:00\n"
8
  "PO-Revision-Date: 2020-09-25 17:04:18+0000\n"
9
  "Language: es\n"
10
  "MIME-Version: 1.0\n"
@@ -13,131 +13,171 @@ msgstr ""
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
- #: lib/yit-assets.php:103
17
  msgid "Clear"
18
  msgstr "Borrar"
19
 
20
- #: lib/yit-assets.php:104
21
  msgid "Clear color"
22
  msgstr "Borrar color"
23
 
24
- #: lib/yit-assets.php:105
25
  msgid "Default"
26
  msgstr "Predeterminado"
27
 
28
- #: lib/yit-assets.php:106
29
  msgid "Select default color"
30
  msgstr "Seleccionar color predeterminado"
31
 
32
- #: lib/yit-assets.php:107
33
  msgid "Select Color"
34
  msgstr "Seleccionar color"
35
 
36
- #: lib/yit-assets.php:108
37
  msgid "Color value"
38
  msgstr "Valor del color"
39
 
40
- #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
41
- #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
 
 
 
 
 
 
42
  msgid "Add %s"
43
  msgstr "Añadir %s"
44
 
45
- #: lib/yit-cpt-unlimited.php:463 lib/yit-cpt-unlimited.php:577
 
 
 
46
  msgid "Add New %s"
47
  msgstr "Añadir nueva %s"
48
 
49
- #: lib/yit-cpt-unlimited.php:464 lib/yit-cpt-unlimited.php:578
50
- #: lib/yit-cpt-unlimited.php:1269 lib/yit-cpt-unlimited.php:1306
 
 
 
 
 
 
51
  msgid "Edit %s"
52
  msgstr "Editar %s"
53
 
54
- #: lib/yit-cpt-unlimited.php:465 lib/yit-cpt-unlimited.php:579
 
 
 
55
  msgid "New %s"
56
  msgstr "Nuevo %s"
57
 
58
- #: lib/yit-cpt-unlimited.php:466 lib/yit-cpt-unlimited.php:580
 
 
 
59
  msgid "All %s"
60
  msgstr "Todas %s"
61
 
62
- #: lib/yit-cpt-unlimited.php:467 lib/yit-cpt-unlimited.php:581
63
- #: lib/yit-cpt-unlimited.php:1253 lib/yit-cpt-unlimited.php:1307
 
 
 
 
 
 
64
  msgid "View %s"
65
  msgstr "Ver %s"
66
 
67
- #: lib/yit-cpt-unlimited.php:468 lib/yit-cpt-unlimited.php:582
 
 
 
68
  msgid "Search %s"
69
  msgstr "Buscar %s"
70
 
71
- #: lib/yit-cpt-unlimited.php:469 lib/yit-cpt-unlimited.php:583
 
 
 
72
  msgid "No %s found"
73
  msgstr "No se han encontrado %s"
74
 
75
- #: lib/yit-cpt-unlimited.php:470 lib/yit-cpt-unlimited.php:584
 
 
 
76
  msgid "No %s found in Trash"
77
  msgstr "No se han encontrado %s en la Papelera"
78
 
79
- #: lib/yit-cpt-unlimited.php:629 templates/fields/ajax-terms.php:56
80
  msgid "Search Categories"
81
  msgstr "Buscar categorías"
82
 
83
- #: lib/yit-cpt-unlimited.php:630
84
  msgid "All Categories"
85
  msgstr "Todas las categorías"
86
 
87
- #: lib/yit-cpt-unlimited.php:631
88
  msgid "Parent Category"
89
  msgstr "Categoría superior"
90
 
91
- #: lib/yit-cpt-unlimited.php:632
92
  msgid "Parent Category:"
93
  msgstr "Categoría superior:"
94
 
95
- #: lib/yit-cpt-unlimited.php:633
96
  msgid "Edit Category"
97
  msgstr "Editar categoría"
98
 
99
- #: lib/yit-cpt-unlimited.php:634
100
  msgid "Update Category"
101
  msgstr "Actualizar categoría"
102
 
103
- #: lib/yit-cpt-unlimited.php:635
104
  msgid "Add New Category"
105
  msgstr "Añadir nueva categoría"
106
 
107
- #: lib/yit-cpt-unlimited.php:636
108
  msgid "New Category Name"
109
  msgstr "Nuevo nombre de categoría"
110
 
111
- #: lib/yit-cpt-unlimited.php:637
112
  msgid "Category"
113
  msgstr "Categoría"
114
 
115
- #: lib/yit-cpt-unlimited.php:726
116
  msgid "Categories"
117
  msgstr "Categorías"
118
 
119
- #: lib/yit-cpt-unlimited.php:1044
 
120
  msgid "%s Settings"
121
  msgstr "Ajustes de %s"
122
 
123
- #: lib/yit-cpt-unlimited.php:1050 lib/yit-cpt-unlimited.php:1198
124
- #: lib/yit-cpt-unlimited.php:1204 lib/yit-plugin-panel.php:81
 
 
125
  msgid "Settings"
126
  msgstr "Ajustes"
127
 
128
- #: lib/yit-cpt-unlimited.php:1053
129
  msgid "Type"
130
  msgstr "Tipo"
131
 
132
- #: lib/yit-cpt-unlimited.php:1054
 
133
  msgid "Layout for this %s"
134
  msgstr "Diseño para este %s"
135
 
136
- #: lib/yit-cpt-unlimited.php:1060
137
  msgid "Rewrite"
138
  msgstr "Rescribir"
139
 
140
- #: lib/yit-cpt-unlimited.php:1061
141
  msgid ""
142
  "Univocal identification name in the URL for each product (slug from post if "
143
  "empty)"
@@ -145,27 +185,27 @@ msgstr ""
145
  "Nombre de identificación unívoco en la URL para cada producto (slug de la "
146
  "entrada si está vacío)"
147
 
148
- #: lib/yit-cpt-unlimited.php:1066
149
  msgid "Label in Singular"
150
  msgstr "Etiqueta en Singular"
151
 
152
- #: lib/yit-cpt-unlimited.php:1067
153
  msgid "Set a label in singular (title of portfolio if empty)"
154
  msgstr "Establece una etiqueta en singular (título del porfolio si está vacío)"
155
 
156
- #: lib/yit-cpt-unlimited.php:1072
157
  msgid "Label in Plural"
158
  msgstr "Etiqueta en Plural"
159
 
160
- #: lib/yit-cpt-unlimited.php:1073
161
  msgid "Set a label in plural (title of portfolio if empty)"
162
  msgstr "Establece una etiqueta en plural (título del porfolio si está vacío)"
163
 
164
- #: lib/yit-cpt-unlimited.php:1078
165
  msgid "Taxonomy"
166
  msgstr "Taxonomía"
167
 
168
- #: lib/yit-cpt-unlimited.php:1079
169
  msgid ""
170
  "If you want to use categories in the portfolio, set a name for taxonomy. "
171
  "Name should be a slug (must not contain capital letters nor spaces) and must "
@@ -176,178 +216,182 @@ msgstr ""
176
  "espacios) y no debe tener más de 32 caracteres de longitud (restricción de "
177
  "estructura de la base de datos)."
178
 
179
- #: lib/yit-cpt-unlimited.php:1084
180
  msgid "Taxonomy Rewrite"
181
  msgstr "Rescribir taxonomía"
182
 
183
- #: lib/yit-cpt-unlimited.php:1085
184
  msgid "Set univocal name for each category page URL."
185
  msgstr "Establece un nombre unívoco para cada URL de página de categoría"
186
 
187
- #: lib/yit-cpt-unlimited.php:1090
188
  msgid "Single layout"
189
  msgstr "Diseño individual"
190
 
191
- #: lib/yit-cpt-unlimited.php:1091
192
  msgid "Layout for single page of this portfolio"
193
  msgstr "Diseño para página individual de este porfolio"
194
 
195
- #: lib/yit-cpt-unlimited.php:1132
196
  msgid "layout settings"
197
  msgstr "ajustes de diseño"
198
 
199
- #: lib/yit-cpt-unlimited.php:1224 lib/yit-cpt-unlimited.php:1237
 
200
  msgid "Quick links"
201
  msgstr "Enlaces rápidos"
202
 
203
- #: lib/yit-cpt-unlimited.php:1477
 
204
  msgid "Show frontend of the %s"
205
  msgstr "Mostrar frontend de %s"
206
 
207
- #: lib/yit-cpt-unlimited.php:1484 templates/fields/customtabs.php:46
208
- #: templates/fields/customtabs.php:89
209
  msgid "Name"
210
  msgstr "Nombre"
211
 
212
- #: lib/yit-cpt-unlimited.php:1635
 
213
  msgid "Add %s from images"
214
  msgstr "Añadir %s desde imágenes"
215
 
216
- #: lib/yit-cpt-unlimited.php:1638
217
  msgid "Upload multiple files"
218
  msgstr "Subir múltiples archivos"
219
 
220
- #: lib/yit-plugin-panel-wc.php:427
221
  msgid "The changes you have made will be lost if you leave this page."
222
  msgstr "Los cambios que has hecho se perderán si abandonas esta página."
223
 
224
- #: lib/yit-plugin-panel.php:80
225
  msgid "Plugin Settings"
226
  msgstr "Ajustes del plugin"
227
 
228
- #: lib/yit-plugin-panel.php:466 lib/yit-plugin-panel.php:469
 
229
  msgid "How to install premium version"
230
  msgstr "Cómo instalara la versión premium"
231
 
232
- #: lib/yit-plugin-panel.php:633 lib/yit-plugin-subpanel.php:151
233
- #: templates/panel/woocommerce/woocommerce-form.php:15
 
234
  msgid "Save Changes"
235
  msgstr "Guardar cambios"
236
 
237
- #: lib/yit-plugin-panel.php:637 lib/yit-plugin-subpanel.php:154
238
- #: templates/panel/woocommerce/woocommerce-form.php:19
 
239
  msgid ""
240
  "If you continue with this action, you will reset all options in this page."
241
  msgstr ""
242
  "Si continúas con esta acción, restablecerás todas las opciones en esta "
243
  "página."
244
 
245
- #: lib/yit-plugin-panel.php:640 lib/yit-plugin-subpanel.php:156
246
- msgid "Reset to default"
247
- msgstr "Restablecer valores predeterminados"
248
-
249
- #: lib/yit-plugin-panel.php:641 lib/yit-plugin-subpanel.php:157
250
- #: templates/panel/woocommerce/woocommerce-form.php:23
251
  msgid "Are you sure?"
252
  msgstr "¿Estás seguro?"
253
 
254
- #: lib/yit-plugin-panel.php:842
 
 
 
 
 
255
  msgid ""
256
  "The element you have entered already exists. Please, enter another name."
257
  msgstr ""
258
  "El elemento que has introducido ya existe. Por favor, introduce otro nombre."
259
 
260
- #: lib/yit-plugin-panel.php:843
261
  msgid "Settings saved"
262
  msgstr "Ajustes guardados"
263
 
264
- #: lib/yit-plugin-panel.php:844
265
  msgid "Settings reset"
266
  msgstr "Restablecer ajustes"
267
 
268
- #: lib/yit-plugin-panel.php:845
269
  msgid "Element deleted correctly."
270
  msgstr "Elemento eliminado correctamente."
271
 
272
- #: lib/yit-plugin-panel.php:846 lib/yit-plugin-panel.php:847
 
273
  msgid "Element updated correctly."
274
  msgstr "Elemento actualizado correctamente."
275
 
276
- #: lib/yit-plugin-panel.php:848
277
  msgid "Database imported correctly."
278
  msgstr "Base de datos importada correctamente."
279
 
280
- #: lib/yit-plugin-panel.php:849
281
  msgid "An error has occurred during import. Please try again."
282
  msgstr ""
283
  "Ha ocurrido un error durante la importación. Por favor, inténtalo de nuevo."
284
 
285
- #: lib/yit-plugin-panel.php:850
286
  msgid "The added file is not valid."
287
  msgstr "El archivo añadido no es válido."
288
 
289
- #: lib/yit-plugin-panel.php:851
290
  msgid "Sorry, import is disabled."
291
  msgstr "Lo siento, la importación está desactivada."
292
 
293
- #: lib/yit-plugin-panel.php:852
294
  msgid "Sorting successful."
295
  msgstr "Clasificación realizada con éxito"
296
 
297
- #: lib/yit-plugin-panel.php:1315
298
  msgid "We need your support"
299
  msgstr "Necesitamos tu ayuda"
300
 
301
- #: lib/yit-plugin-panel.php:1316
302
  msgid "to keep updating and improving the plugin. Please,"
303
  msgstr "para que podamos seguir actualizando y mejorando el plugin. Por favor,"
304
 
305
- #: lib/yit-plugin-panel.php:1318
306
  msgid "help us by leaving a five-star rating"
307
  msgstr "ayúdanos dejando una valoración de cinco estrellas"
308
 
309
- #: lib/yit-plugin-panel.php:1319
310
  msgid ":) Thanks!"
311
  msgstr ":) ¡Gracias!"
312
 
313
- #: lib/yit-pointers.php:70
314
  msgid "Plugins Activated"
315
  msgstr "Plugins activados"
316
 
317
- #: lib/yit-pointers.php:71
 
318
  msgid ""
319
- "From now on, you can find all plugin options in YITH Plugins menu.\n"
320
- " Plugin customization settings will be "
321
- "available as a new entry in YITH Plugins menu."
322
  msgstr ""
323
  "Desde ahora, puedes encontrar todas las opciones del plugin en el menú YITH "
324
  "Plugins.\n"
325
  "La personalización de los ajustes del plugin estará disponible como una "
326
  "nueva entrada en el menú YITH Plugins."
327
 
328
- #: lib/yit-pointers.php:73 lib/yit-pointers.php:89
329
- msgid "Discover all our plugins available on:"
 
 
330
  msgstr "Descubre todos nuestros plugins disponibles en:"
331
 
332
- #: lib/yit-pointers.php:74 lib/yit-pointers.php:90
333
- msgid "and"
334
- msgstr "y"
335
-
336
- #: lib/yit-pointers.php:84
337
  msgid "Plugins Upgraded"
338
  msgstr "Plugins mejorados"
339
 
340
- #: lib/yit-pointers.php:85
 
341
  msgid ""
342
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
343
- "menu.\n"
344
- " Every time one of our plugins is added, "
345
- "a new entry will be added to this menu.\n"
346
- " For example, after the update, plugin "
347
- "options (such as for YITH WooCommerce Wishlist, YITH WooCommerce Ajax "
348
- "Search, etc.)\n"
349
- " will be moved from previous location to "
350
- "YITH Plugins tab."
351
  msgstr ""
352
  "Desde ahora, podrás encontrar el panel de opciones de los plugins de YITH en "
353
  "el menú YITH Plugins.\n"
@@ -357,19 +401,19 @@ msgstr ""
357
  "que YITH WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) se "
358
  "moverán de su ubicación previa a la pestaña de YITH Plugins."
359
 
360
- #: lib/yith-dashboard.php:40
361
  msgid "YITH Latest Updates"
362
  msgstr "Últimas actualizaciones de YITH"
363
 
364
- #: lib/yith-dashboard.php:41
365
  msgid "Latest news from YITH Blog"
366
  msgstr "Últimas novedades del Blog de YITH"
367
 
368
- #: lib/yith-dashboard.php:65
369
  msgid "RSS Error:"
370
  msgstr "Error RSS:"
371
 
372
- #: lib/yith-dashboard.php:71
373
  msgid ""
374
  "An error has occurred, which probably means the feed is down. Try again "
375
  "later."
@@ -377,77 +421,78 @@ msgstr ""
377
  "Ha ocurrido un error, lo que puede que signifique que el feed ha caído. "
378
  "Inténtalo de nuevo más tarde."
379
 
380
- #: lib/yith-system-status.php:122
381
  msgid "WordPress Version"
382
  msgstr "Versión de WordPress"
383
 
384
- #: lib/yith-system-status.php:123
385
  msgid "WooCommerce Version"
386
  msgstr "Versión de WooCommerce"
387
 
388
- #: lib/yith-system-status.php:124
389
  msgid "Available Memory"
390
  msgstr "Memoria disponible"
391
 
392
- #: lib/yith-system-status.php:125
393
  msgid "PHP Version"
394
  msgstr "Versión PHP"
395
 
396
- #: lib/yith-system-status.php:126
397
  msgid "TLS Version"
398
  msgstr "Versión TLS"
399
 
400
- #: lib/yith-system-status.php:127
401
  msgid "WordPress Cron"
402
  msgstr "Cron de WordPress"
403
 
404
- #: lib/yith-system-status.php:128
405
  msgid "SimpleXML"
406
  msgstr "SimpleXML"
407
 
408
- #: lib/yith-system-status.php:129
409
  msgid "MultiByte String"
410
  msgstr "Cadena MultiByte"
411
 
412
- #: lib/yith-system-status.php:130
413
  msgid "ImageMagick Version"
414
  msgstr "Versión ImageMagick"
415
 
416
- #: lib/yith-system-status.php:131
417
  msgid "GD Library"
418
  msgstr "Biblioteca GD"
419
 
420
- #: lib/yith-system-status.php:132
421
  msgid "Iconv Module"
422
  msgstr "Módulo Iconv"
423
 
424
- #: lib/yith-system-status.php:133
425
  msgid "OPCache Save Comments"
426
  msgstr "Guardar comentarios OPCache"
427
 
428
- #: lib/yith-system-status.php:134
429
  msgid "URL FOpen"
430
  msgstr "URL FOpen"
431
 
432
- #: lib/yith-system-status.php:152 lib/yith-system-status.php:153
433
- #: templates/sysinfo/system-information-panel.php:14
 
434
  msgid "System Status"
435
  msgstr "Estado del sistema"
436
 
437
- #: lib/yith-system-status.php:195
438
  msgid "YITH Plugins"
439
  msgstr "YITH Plugins"
440
 
441
- #: lib/yith-system-status.php:203
442
  msgid "WooCommerce"
443
  msgstr "WooCommerce"
444
 
445
- #: lib/yith-system-status.php:355
446
  msgid "Warning!"
447
  msgstr "¡Atención!"
448
 
449
  #. translators: %1$s open link tag, %2$s open link tag
450
- #: lib/yith-system-status.php:359
451
  msgid ""
452
  "The system check has detected some compatibility issues on your installation."
453
  "%1$sClick here%2$s to know more"
@@ -455,34 +500,34 @@ msgstr ""
455
  "La comprobación del sistema ha detectado algunos problemas de compatibilidad "
456
  "en tu instalación.%1$sHaz clic quí%2$s para saber más"
457
 
458
- #: lib/yith-system-status.php:544
459
  msgid "Enabled"
460
  msgstr "Activado"
461
 
462
- #: lib/yith-system-status.php:544
463
  msgid "Disabled"
464
  msgstr "Desactivado"
465
 
466
- #: lib/yith-system-status.php:549
467
  msgid "N/A"
468
  msgstr "N/D"
469
 
470
  #. translators: %1$s plugin name, %2$s requirement name
471
- #: lib/yith-system-status.php:577
472
  msgid "%1$s needs %2$s enabled"
473
  msgstr "%1$s necesita %2$s activado"
474
 
475
  #. translators: %1$s plugin name, %2$s required memory amount
476
- #: lib/yith-system-status.php:580
477
  msgid "%1$s needs at least %2$s of available memory"
478
  msgstr "%1$s necesita al menos %2$s de memoria disponible"
479
 
480
  #. translators: %1$s plugin name, %2$s version number
481
- #: lib/yith-system-status.php:583
482
  msgid "%1$s needs at least %2$s version"
483
  msgstr "%1$s necesita al menos la versión %2$s"
484
 
485
- #: lib/yith-system-status.php:608
486
  msgid ""
487
  "Update it to the latest version in order to benefit of all new features and "
488
  "security updates."
@@ -490,25 +535,27 @@ msgstr ""
490
  "Actualízalo a la última versión para beneficiarte de todas las "
491
  "características y actualizaciones de seguridad."
492
 
493
- #: lib/yith-system-status.php:612 lib/yith-system-status.php:618
 
494
  msgid "Contact your hosting company in order to update it."
495
  msgstr "Ponte en contacto con tu empresa de hosting para actualizarlo."
496
 
497
- #: lib/yith-system-status.php:616
498
  msgid "Contact your hosting company in order to install it."
499
  msgstr "Ponte en contacto con tu empresa de hosting para instalarlo."
500
 
501
  #. translators: %1$s code, %2$s file name
502
- #: lib/yith-system-status.php:623
503
  msgid "Remove %1$s from %2$s file"
504
  msgstr "Eliminar %1$s desde el archivo %2$s "
505
 
506
- #: lib/yith-system-status.php:631
507
  msgid "Contact your hosting company in order to enable it."
508
  msgstr "Ponte en contacto con tu empresa de hosting para activarlo."
509
 
510
  #. translators: %1$s opening link tag, %2$s closing link tag
511
- #: lib/yith-system-status.php:635 lib/yith-system-status.php:659
 
512
  msgid ""
513
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
514
  "it."
@@ -517,7 +564,7 @@ msgstr ""
517
  "incrementarlo."
518
 
519
  #. translators: %s recommended memory amount
520
- #: lib/yith-system-status.php:656
521
  msgid ""
522
  "For optimal functioning of our plugins, we suggest setting at least %s of "
523
  "available memory"
@@ -526,7 +573,7 @@ msgstr ""
526
  "memoria disponible"
527
 
528
  #. translators: %1$s TLS label, %2$s cURL label
529
- #: lib/yith-system-status.php:664
530
  msgid ""
531
  "The system check cannot determine which %1$s version is installed because "
532
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -536,7 +583,7 @@ msgstr ""
536
  "hosting que lo active."
537
 
538
  #. translators: %1$s TLS label
539
- #: lib/yith-system-status.php:667
540
  msgid ""
541
  "The system check cannot determine which %1$s version is installed due to a "
542
  "connection issue between your site and our server."
@@ -544,68 +591,73 @@ msgstr ""
544
  "La comprobación del sistema no ha podido determinar qué versión de %1$s está "
545
  "instalada debido a un error entre tu sitio y nuestro servidor."
546
 
547
- #: templates/fields/ajax-customers.php:57
548
  msgid "Search Customers"
549
  msgstr "Buscar clientes"
550
 
551
- #: templates/fields/ajax-customers.php:83
552
- #: templates/fields/ajax-customers.php:93
 
553
  msgid "%1$s (#%2$s &ndash; %3$s)"
554
  msgstr "%1$s (#%2$s &ndash; %3$s)"
555
 
556
- #: templates/fields/ajax-posts.php:57
557
  msgid "Search Posts"
558
  msgstr "Buscar entradas"
559
 
560
- #: templates/fields/ajax-products.php:16
561
  msgid "Search Product"
562
  msgstr "Buscar producto"
563
 
564
- #: templates/fields/customtabs.php:28
565
  msgid "Close all"
566
  msgstr "Cerrar todo"
567
 
568
- #: templates/fields/customtabs.php:28
569
  msgid "Expand all"
570
  msgstr "Expandir todo"
571
 
572
- #: templates/fields/customtabs.php:37 templates/fields/customtabs.php:81
573
  msgid "Remove"
574
  msgstr "Eliminar"
575
 
576
- #: templates/fields/customtabs.php:52 templates/fields/customtabs.php:94
577
  msgid "Value"
578
  msgstr "Valor"
579
 
580
- #: templates/fields/customtabs.php:53 templates/fields/customtabs.php:95
581
  msgid "Content of the tab. (HTML is supported)"
582
  msgstr "Contenido de la pestaña. (Compatible con HTML)"
583
 
584
- #: templates/fields/customtabs.php:65
585
  msgid "Add custom product tab"
586
  msgstr "Añadir pestaña de producto personalizada"
587
 
588
- #: templates/fields/customtabs.php:106
589
  msgid "Do you want to remove the custom tab?"
590
  msgstr "¿Quieres eliminar la pestaña personalizada?"
591
 
592
- #: templates/fields/date-format.php:50
593
  msgid "Custom:"
594
  msgstr "Personalizado:"
595
 
596
- #: templates/fields/icons.php:58
 
 
 
 
597
  msgid "Set Default"
598
  msgstr "Establecer predeterminado"
599
 
600
- #: templates/fields/image-gallery.php:34 templates/fields/image-gallery.php:39
601
  msgid "Delete image"
602
  msgstr "Eliminar imagen"
603
 
604
- #: templates/fields/image-gallery.php:39
605
  msgid "Add Images to Gallery"
606
  msgstr "Añadir imágenes a la Galería"
607
 
608
- #: templates/fields/image-gallery.php:39
609
  msgid "Add to gallery"
610
  msgstr "Añadir a la galería"
611
 
@@ -613,27 +665,27 @@ msgstr "Añadir a la galería"
613
  msgid "Add images"
614
  msgstr "Añadir imágenes"
615
 
616
- #: templates/fields/image-gallery.php:39
617
  msgid "Delete"
618
  msgstr "Eliminar"
619
 
620
- #: templates/fields/select-buttons.php:21
621
  msgid "Add All"
622
  msgstr "Añadir todo"
623
 
624
- #: templates/fields/select-buttons.php:34
625
  msgid "Remove All"
626
  msgstr "Eliminar todo"
627
 
628
- #: templates/fields/sidebars.php:22
629
  msgid "Left sidebar"
630
  msgstr "Barra lateral izquierda"
631
 
632
- #: templates/fields/sidebars.php:25
633
  msgid "Right sidebar"
634
  msgstr "Barra lateral derecha"
635
 
636
- #: templates/fields/sidebars.php:28 templates/fields/sidebars.php:31
637
  msgid "No sidebar"
638
  msgstr "Sin barra lateral"
639
 
@@ -641,118 +693,106 @@ msgstr "Sin barra lateral"
641
  msgid "Left Sidebar"
642
  msgstr "Barra lateral izquierda"
643
 
644
- #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:54
645
  msgid "Choose a sidebar"
646
  msgstr "Elige una barra lateral"
647
 
648
- #: templates/fields/sidebars.php:52
649
  msgid "Right Sidebar"
650
  msgstr "Barra lateral derecha"
651
 
652
- #: templates/fields/upload.php:27 templates/metaboxes/types/icon-list.php:70
653
- #: templates/panel/woocommerce/woocommerce-upload.php:40
654
  msgid "Upload"
655
  msgstr "Subir"
656
 
657
- #: templates/fields/upload.php:29
658
  msgid "Reset"
659
  msgstr "Restablecer"
660
 
661
- #: templates/metaboxes/types/icon-list.php:76
662
- msgid "Image preview"
663
- msgstr "Vista previa de la imagen"
664
-
665
- #: templates/metaboxes/types/icon-list.php:90
666
- msgid "(Default: %s <img src=\"%s\"/>)"
667
- msgstr "(Predeterminado: %s <img src=\"%s\"/>)"
668
-
669
- #: templates/metaboxes/types/icon-list.php:92
670
- msgid "(Default: <i %s></i> )"
671
- msgstr "(Predeterminado: <i %s></i> )"
672
-
673
- #: templates/panel/woocommerce/woocommerce-form.php:22
674
  msgid "Reset Defaults"
675
  msgstr "Restablecer valores predeterminados"
676
 
677
- #: templates/sysinfo/system-information-panel.php:15
678
  msgid "PHPInfo"
679
  msgstr ""
680
 
681
- #: templates/sysinfo/system-information-panel.php:16
682
- #: templates/sysinfo/tabs/error-log.php:28
683
  #, fuzzy
684
  msgid "Log Files"
685
  msgstr "Mostrar archivos de registro"
686
 
687
- #: templates/sysinfo/system-information-panel.php:25
688
  msgid "YITH System Information"
689
  msgstr "Información de Sistema de YITH"
690
 
691
- #: templates/sysinfo/tabs/error-log.php:16
692
  msgid "WP debug.log file"
693
  msgstr "Archivo WP debug.log"
694
 
695
- #: templates/sysinfo/tabs/error-log.php:21
696
  msgid "PHP error_log file"
697
  msgstr "Archivo PHP error_log"
698
 
699
- #: templates/sysinfo/tabs/error-log.php:64
700
  msgid "Download"
701
  msgstr ""
702
 
703
- #: templates/sysinfo/tabs/error-log.php:78
704
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
705
  msgstr ""
706
 
707
- #. translators: %s file name
708
- #: templates/sysinfo/tabs/error-log.php:106
709
  msgid ""
710
  "No Log file available. Enable the WordPress debug by adding this in the %s "
711
  "file of your installation"
712
  msgstr ""
713
 
714
- #: templates/sysinfo/tabs/error-log.php:115
715
  msgid "Copied!"
716
  msgstr ""
717
 
718
- #: templates/sysinfo/tabs/error-log.php:115
719
  msgid "Copy Code"
720
  msgstr ""
721
 
722
- #: templates/sysinfo/tabs/main.php:43
723
  msgid "Site Info"
724
  msgstr ""
725
 
726
- #: templates/sysinfo/tabs/main.php:48
727
  msgid "Site URL"
728
  msgstr "URL del sitio"
729
 
730
- #: templates/sysinfo/tabs/main.php:57
731
  msgid "Output IP Address"
732
  msgstr "Dirección IP de salida"
733
 
734
- #: templates/sysinfo/tabs/main.php:65
735
  msgid "Defined WP_CACHE"
736
  msgstr "WP_CACHE definido"
737
 
738
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
739
  msgid "Yes"
740
  msgstr "Sí"
741
 
742
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
743
  msgid "No"
744
  msgstr "No"
745
 
746
- #: templates/sysinfo/tabs/main.php:73
747
  msgid "External object cache"
748
  msgstr ""
749
 
750
- #: templates/sysinfo/tabs/main.php:82
751
  #, fuzzy
752
  msgid "Plugins Requirements"
753
  msgstr "Ajustes del plugin"
754
 
755
- #: yit-plugin.php:194
756
  msgid "License"
757
  msgstr "Licencia"
758
 
@@ -760,12 +800,43 @@ msgstr "Licencia"
760
  msgid "YITH"
761
  msgstr "YITH"
762
 
763
- #: lib/privacy/yit-privacy.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
764
  msgctxt "Privacy Policy Guide Title"
765
  msgid "YITH Plugins"
766
  msgstr "Plugins de YITH"
767
 
768
- #: lib/privacy/yit-privacy.php:59
769
  msgctxt "Privacy Policy Content"
770
  msgid ""
771
  "This sample language includes the basics around what personal data your "
@@ -782,112 +853,82 @@ msgstr ""
782
  "específica compartida por tu sitio variará. Recomendamos consultar con un "
783
  "abogado cuando decidas qué información mostrar en tu política de privacidad."
784
 
785
- #: lib/privacy/yit-privacy.php:63
786
  msgctxt "Privacy Policy Content"
787
  msgid "What we collect and store"
788
  msgstr "Qué recopilamos y almacenamos"
789
 
790
- #: lib/privacy/yit-privacy.php:66
791
  msgctxt "Privacy Policy Content"
792
  msgid "Who on our team has access"
793
  msgstr "Quién en nuestro equipo tiene acceso"
794
 
795
- #: lib/privacy/yit-privacy.php:69
796
  msgctxt "Privacy Policy Content"
797
  msgid "What we share with others"
798
  msgstr "Qué compartimos con otros"
799
 
800
- #: lib/privacy/yit-privacy.php:72
801
  msgctxt "Privacy Policy Content"
802
  msgid "Payments"
803
  msgstr "Pagos"
804
 
805
- #: lib/yit-cpt-unlimited.php:627
806
- msgctxt "taxonomy general name"
807
- msgid "%s Categories"
808
- msgstr "Categorías %s"
809
-
810
- #: lib/yit-cpt-unlimited.php:628
811
- msgctxt "taxonomy singular name"
812
- msgid "Category"
813
- msgstr "Categoría"
814
-
815
- #: lib/yith-dashboard.php:99
816
- msgctxt "Plugin FW"
817
- msgid "View Changelog"
818
- msgstr "Ver Registro de cambios"
819
-
820
- #: lib/yith-dashboard.php:100
821
- msgctxt "Plugin FW"
822
- msgid "Latest update released on"
823
- msgstr "Última actualización publicada el"
824
-
825
- #: lib/yith-dashboard.php:143
826
- msgctxt "Button label"
827
- msgid "Close"
828
- msgstr "Cerrar"
829
-
830
- #: lib/yith-gutenberg.php:134
831
- msgctxt "[gutenberg]: Category Name"
832
- msgid "YITH"
833
- msgstr "YITH"
834
-
835
- #: templates/fields/dimensions.php:16
836
  msgctxt "Position in the \"Dimensions\" field"
837
  msgid "Top"
838
  msgstr "Parte superior"
839
 
840
- #: templates/fields/dimensions.php:17
841
  msgctxt "Position in the \"Dimensions\" field"
842
  msgid "Right"
843
  msgstr "Derecha"
844
 
845
- #: templates/fields/dimensions.php:18
846
  msgctxt "Position in the \"Dimensions\" field"
847
  msgid "Bottom"
848
  msgstr "Parte inferior"
849
 
850
- #: templates/fields/dimensions.php:19
851
  msgctxt "Position in the \"Dimensions\" field"
852
  msgid "Left"
853
  msgstr "Izquierda"
854
 
855
- #: templates/fields/dimensions.php:99
856
  msgctxt "Tooltip in the \"Dimensions\" field"
857
  msgid "Link values together"
858
  msgstr "Enlazar valores juntos"
859
 
860
- #: templates/fields/onoff.php:24
861
  msgctxt "YES/NO button: use MAX 3 characters!"
862
  msgid "YES"
863
  msgstr "SÍ"
864
 
865
- #: templates/fields/onoff.php:25
866
  msgctxt "YES/NO button: use MAX 3 characters!"
867
  msgid "NO"
868
  msgstr "NO"
869
 
870
- #: yit-plugin.php:83
871
  msgctxt "Plugin Row Meta"
872
  msgid "Live Demo"
873
  msgstr "Demostración en vivo"
874
 
875
- #: yit-plugin.php:88
876
  msgctxt "Plugin Row Meta"
877
  msgid "Documentation"
878
  msgstr "Documentación"
879
 
880
- #: yit-plugin.php:93
881
  msgctxt "Plugin Row Meta"
882
  msgid "Support"
883
  msgstr "Soporte"
884
 
885
- #: yit-plugin.php:98
886
  msgctxt "Plugin Row Meta"
887
  msgid "Premium version"
888
  msgstr "Versión premium"
889
 
890
- #: yit-plugin.php:190
891
  msgctxt "Action links"
892
  msgid "Settings"
893
  msgstr "Ajustes"
@@ -900,3 +941,15 @@ msgstr "Ajustes"
900
 
901
  #~ msgid "Back to System panel"
902
  #~ msgstr "Volver al panel del Sistema"
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-12-28 12:30:11+00:00\n"
8
  "PO-Revision-Date: 2020-09-25 17:04:18+0000\n"
9
  "Language: es\n"
10
  "MIME-Version: 1.0\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
+ #: includes/class-yit-assets.php:117
17
  msgid "Clear"
18
  msgstr "Borrar"
19
 
20
+ #: includes/class-yit-assets.php:118
21
  msgid "Clear color"
22
  msgstr "Borrar color"
23
 
24
+ #: includes/class-yit-assets.php:119
25
  msgid "Default"
26
  msgstr "Predeterminado"
27
 
28
+ #: includes/class-yit-assets.php:120
29
  msgid "Select default color"
30
  msgstr "Seleccionar color predeterminado"
31
 
32
+ #: includes/class-yit-assets.php:121
33
  msgid "Select Color"
34
  msgstr "Seleccionar color"
35
 
36
+ #: includes/class-yit-assets.php:122
37
  msgid "Color value"
38
  msgstr "Valor del color"
39
 
40
+ #. translators: %s is the singular name of the post type.
41
+ #. translators: $s is the singular name of the post type.
42
+ #. translators: %s is the singular name of the post type.
43
+ #. translators: %s is the plural name of the post type.
44
+ #: includes/class-yit-cpt-unlimited.php:486
45
+ #: includes/class-yit-cpt-unlimited.php:619
46
+ #: includes/class-yit-cpt-unlimited.php:768
47
+ #: includes/class-yit-cpt-unlimited.php:1755
48
  msgid "Add %s"
49
  msgstr "Añadir %s"
50
 
51
+ #. translators: %s is the singular name of the post type.
52
+ #. translators: $s is the singular name of the post type.
53
+ #: includes/class-yit-cpt-unlimited.php:488
54
+ #: includes/class-yit-cpt-unlimited.php:621
55
  msgid "Add New %s"
56
  msgstr "Añadir nueva %s"
57
 
58
+ #. translators: %s is the singular name of the post type.
59
+ #. translators: $s is the singular name of the post type.
60
+ #. translators: %s is the post title.
61
+ #. translators: %s is the singular name of the post type.
62
+ #: includes/class-yit-cpt-unlimited.php:490
63
+ #: includes/class-yit-cpt-unlimited.php:623
64
+ #: includes/class-yit-cpt-unlimited.php:1350
65
+ #: includes/class-yit-cpt-unlimited.php:1401
66
  msgid "Edit %s"
67
  msgstr "Editar %s"
68
 
69
+ #. translators: %s is the singular name of the post type.
70
+ #. translators: $s is the singular name of the post type.
71
+ #: includes/class-yit-cpt-unlimited.php:492
72
+ #: includes/class-yit-cpt-unlimited.php:625
73
  msgid "New %s"
74
  msgstr "Nuevo %s"
75
 
76
+ #. translators: %s is the plural name of the post type.
77
+ #. translators: $s is the plural name of the post type.
78
+ #: includes/class-yit-cpt-unlimited.php:494
79
+ #: includes/class-yit-cpt-unlimited.php:627
80
  msgid "All %s"
81
  msgstr "Todas %s"
82
 
83
+ #. translators: %s is the singular name of the post type.
84
+ #. translators: $s is the singular name of the post type.
85
+ #. translators: %s is the plural label of the post type.
86
+ #. translators: %s is the plural name of the post type.
87
+ #: includes/class-yit-cpt-unlimited.php:496
88
+ #: includes/class-yit-cpt-unlimited.php:629
89
+ #: includes/class-yit-cpt-unlimited.php:1323
90
+ #: includes/class-yit-cpt-unlimited.php:1406
91
  msgid "View %s"
92
  msgstr "Ver %s"
93
 
94
+ #. translators: %s is the plural name of the post type.
95
+ #. translators: $s is the plural name of the post type.
96
+ #: includes/class-yit-cpt-unlimited.php:498
97
+ #: includes/class-yit-cpt-unlimited.php:631
98
  msgid "Search %s"
99
  msgstr "Buscar %s"
100
 
101
+ #. translators: %s is the plural name of the post type.
102
+ #. translators: $s is the plural name of the post type.
103
+ #: includes/class-yit-cpt-unlimited.php:500
104
+ #: includes/class-yit-cpt-unlimited.php:633
105
  msgid "No %s found"
106
  msgstr "No se han encontrado %s"
107
 
108
+ #. translators: %s is the plural name of the post type.
109
+ #. translators: $s is the plural name of the post type.
110
+ #: includes/class-yit-cpt-unlimited.php:502
111
+ #: includes/class-yit-cpt-unlimited.php:635
112
  msgid "No %s found in Trash"
113
  msgstr "No se han encontrado %s en la Papelera"
114
 
115
+ #: includes/class-yit-cpt-unlimited.php:678 templates/fields/ajax-terms.php:41
116
  msgid "Search Categories"
117
  msgstr "Buscar categorías"
118
 
119
+ #: includes/class-yit-cpt-unlimited.php:679
120
  msgid "All Categories"
121
  msgstr "Todas las categorías"
122
 
123
+ #: includes/class-yit-cpt-unlimited.php:680
124
  msgid "Parent Category"
125
  msgstr "Categoría superior"
126
 
127
+ #: includes/class-yit-cpt-unlimited.php:681
128
  msgid "Parent Category:"
129
  msgstr "Categoría superior:"
130
 
131
+ #: includes/class-yit-cpt-unlimited.php:682
132
  msgid "Edit Category"
133
  msgstr "Editar categoría"
134
 
135
+ #: includes/class-yit-cpt-unlimited.php:683
136
  msgid "Update Category"
137
  msgstr "Actualizar categoría"
138
 
139
+ #: includes/class-yit-cpt-unlimited.php:684
140
  msgid "Add New Category"
141
  msgstr "Añadir nueva categoría"
142
 
143
+ #: includes/class-yit-cpt-unlimited.php:685
144
  msgid "New Category Name"
145
  msgstr "Nuevo nombre de categoría"
146
 
147
+ #: includes/class-yit-cpt-unlimited.php:686
148
  msgid "Category"
149
  msgstr "Categoría"
150
 
151
+ #: includes/class-yit-cpt-unlimited.php:778
152
  msgid "Categories"
153
  msgstr "Categorías"
154
 
155
+ #. translators: %s is the singular name of the post type.
156
+ #: includes/class-yit-cpt-unlimited.php:1098
157
  msgid "%s Settings"
158
  msgstr "Ajustes de %s"
159
 
160
+ #: includes/class-yit-cpt-unlimited.php:1106
161
+ #: includes/class-yit-cpt-unlimited.php:1260
162
+ #: includes/class-yit-cpt-unlimited.php:1266
163
+ #: includes/class-yit-plugin-panel.php:84
164
  msgid "Settings"
165
  msgstr "Ajustes"
166
 
167
+ #: includes/class-yit-cpt-unlimited.php:1111
168
  msgid "Type"
169
  msgstr "Tipo"
170
 
171
+ #. translators: %s is the singular name of the post type.
172
+ #: includes/class-yit-cpt-unlimited.php:1114
173
  msgid "Layout for this %s"
174
  msgstr "Diseño para este %s"
175
 
176
+ #: includes/class-yit-cpt-unlimited.php:1122
177
  msgid "Rewrite"
178
  msgstr "Rescribir"
179
 
180
+ #: includes/class-yit-cpt-unlimited.php:1123
181
  msgid ""
182
  "Univocal identification name in the URL for each product (slug from post if "
183
  "empty)"
185
  "Nombre de identificación unívoco en la URL para cada producto (slug de la "
186
  "entrada si está vacío)"
187
 
188
+ #: includes/class-yit-cpt-unlimited.php:1128
189
  msgid "Label in Singular"
190
  msgstr "Etiqueta en Singular"
191
 
192
+ #: includes/class-yit-cpt-unlimited.php:1129
193
  msgid "Set a label in singular (title of portfolio if empty)"
194
  msgstr "Establece una etiqueta en singular (título del porfolio si está vacío)"
195
 
196
+ #: includes/class-yit-cpt-unlimited.php:1134
197
  msgid "Label in Plural"
198
  msgstr "Etiqueta en Plural"
199
 
200
+ #: includes/class-yit-cpt-unlimited.php:1135
201
  msgid "Set a label in plural (title of portfolio if empty)"
202
  msgstr "Establece una etiqueta en plural (título del porfolio si está vacío)"
203
 
204
+ #: includes/class-yit-cpt-unlimited.php:1140
205
  msgid "Taxonomy"
206
  msgstr "Taxonomía"
207
 
208
+ #: includes/class-yit-cpt-unlimited.php:1141
209
  msgid ""
210
  "If you want to use categories in the portfolio, set a name for taxonomy. "
211
  "Name should be a slug (must not contain capital letters nor spaces) and must "
216
  "espacios) y no debe tener más de 32 caracteres de longitud (restricción de "
217
  "estructura de la base de datos)."
218
 
219
+ #: includes/class-yit-cpt-unlimited.php:1146
220
  msgid "Taxonomy Rewrite"
221
  msgstr "Rescribir taxonomía"
222
 
223
+ #: includes/class-yit-cpt-unlimited.php:1147
224
  msgid "Set univocal name for each category page URL."
225
  msgstr "Establece un nombre unívoco para cada URL de página de categoría"
226
 
227
+ #: includes/class-yit-cpt-unlimited.php:1152
228
  msgid "Single layout"
229
  msgstr "Diseño individual"
230
 
231
+ #: includes/class-yit-cpt-unlimited.php:1153
232
  msgid "Layout for single page of this portfolio"
233
  msgstr "Diseño para página individual de este porfolio"
234
 
235
+ #: includes/class-yit-cpt-unlimited.php:1196
236
  msgid "layout settings"
237
  msgstr "ajustes de diseño"
238
 
239
+ #: includes/class-yit-cpt-unlimited.php:1286
240
+ #: includes/class-yit-cpt-unlimited.php:1297
241
  msgid "Quick links"
242
  msgstr "Enlaces rápidos"
243
 
244
+ #. translators: %s is the name of the post type.
245
+ #: includes/class-yit-cpt-unlimited.php:1593
246
  msgid "Show frontend of the %s"
247
  msgstr "Mostrar frontend de %s"
248
 
249
+ #: includes/class-yit-cpt-unlimited.php:1602 templates/fields/customtabs.php:34
250
+ #: templates/fields/customtabs.php:76
251
  msgid "Name"
252
  msgstr "Nombre"
253
 
254
+ #. translators: %s is the plural name of the post type.
255
+ #: includes/class-yit-cpt-unlimited.php:1749
256
  msgid "Add %s from images"
257
  msgstr "Añadir %s desde imágenes"
258
 
259
+ #: includes/class-yit-cpt-unlimited.php:1769
260
  msgid "Upload multiple files"
261
  msgstr "Subir múltiples archivos"
262
 
263
+ #: includes/class-yit-plugin-panel-woocommerce.php:419
264
  msgid "The changes you have made will be lost if you leave this page."
265
  msgstr "Los cambios que has hecho se perderán si abandonas esta página."
266
 
267
+ #: includes/class-yit-plugin-panel.php:83
268
  msgid "Plugin Settings"
269
  msgstr "Ajustes del plugin"
270
 
271
+ #: includes/class-yit-plugin-panel.php:450
272
+ #: includes/class-yit-plugin-panel.php:453
273
  msgid "How to install premium version"
274
  msgstr "Cómo instalara la versión premium"
275
 
276
+ #: includes/class-yit-plugin-panel.php:619
277
+ #: includes/class-yit-plugin-subpanel.php:132
278
+ #: templates/panel/woocommerce/woocommerce-form.php:28
279
  msgid "Save Changes"
280
  msgstr "Guardar cambios"
281
 
282
+ #: includes/class-yit-plugin-panel.php:624
283
+ #: includes/class-yit-plugin-subpanel.php:136
284
+ #: templates/panel/woocommerce/woocommerce-form.php:14
285
  msgid ""
286
  "If you continue with this action, you will reset all options in this page."
287
  msgstr ""
288
  "Si continúas con esta acción, restablecerás todas las opciones en esta "
289
  "página."
290
 
291
+ #: includes/class-yit-plugin-panel.php:624
292
+ #: includes/class-yit-plugin-subpanel.php:136
293
+ #: templates/panel/woocommerce/woocommerce-form.php:14
 
 
 
294
  msgid "Are you sure?"
295
  msgstr "¿Estás seguro?"
296
 
297
+ #: includes/class-yit-plugin-panel.php:628
298
+ #: includes/class-yit-plugin-subpanel.php:139
299
+ msgid "Reset to default"
300
+ msgstr "Restablecer valores predeterminados"
301
+
302
+ #: includes/class-yit-plugin-panel.php:865
303
  msgid ""
304
  "The element you have entered already exists. Please, enter another name."
305
  msgstr ""
306
  "El elemento que has introducido ya existe. Por favor, introduce otro nombre."
307
 
308
+ #: includes/class-yit-plugin-panel.php:866
309
  msgid "Settings saved"
310
  msgstr "Ajustes guardados"
311
 
312
+ #: includes/class-yit-plugin-panel.php:867
313
  msgid "Settings reset"
314
  msgstr "Restablecer ajustes"
315
 
316
+ #: includes/class-yit-plugin-panel.php:868
317
  msgid "Element deleted correctly."
318
  msgstr "Elemento eliminado correctamente."
319
 
320
+ #: includes/class-yit-plugin-panel.php:869
321
+ #: includes/class-yit-plugin-panel.php:870
322
  msgid "Element updated correctly."
323
  msgstr "Elemento actualizado correctamente."
324
 
325
+ #: includes/class-yit-plugin-panel.php:871
326
  msgid "Database imported correctly."
327
  msgstr "Base de datos importada correctamente."
328
 
329
+ #: includes/class-yit-plugin-panel.php:872
330
  msgid "An error has occurred during import. Please try again."
331
  msgstr ""
332
  "Ha ocurrido un error durante la importación. Por favor, inténtalo de nuevo."
333
 
334
+ #: includes/class-yit-plugin-panel.php:873
335
  msgid "The added file is not valid."
336
  msgstr "El archivo añadido no es válido."
337
 
338
+ #: includes/class-yit-plugin-panel.php:874
339
  msgid "Sorry, import is disabled."
340
  msgstr "Lo siento, la importación está desactivada."
341
 
342
+ #: includes/class-yit-plugin-panel.php:875
343
  msgid "Sorting successful."
344
  msgstr "Clasificación realizada con éxito"
345
 
346
+ #: includes/class-yit-plugin-panel.php:1343
347
  msgid "We need your support"
348
  msgstr "Necesitamos tu ayuda"
349
 
350
+ #: includes/class-yit-plugin-panel.php:1344
351
  msgid "to keep updating and improving the plugin. Please,"
352
  msgstr "para que podamos seguir actualizando y mejorando el plugin. Por favor,"
353
 
354
+ #: includes/class-yit-plugin-panel.php:1346
355
  msgid "help us by leaving a five-star rating"
356
  msgstr "ayúdanos dejando una valoración de cinco estrellas"
357
 
358
+ #: includes/class-yit-plugin-panel.php:1347
359
  msgid ":) Thanks!"
360
  msgstr ":) ¡Gracias!"
361
 
362
+ #: includes/class-yit-pointers.php:80
363
  msgid "Plugins Activated"
364
  msgstr "Plugins activados"
365
 
366
+ #: includes/class-yit-pointers.php:81
367
+ #, fuzzy
368
  msgid ""
369
+ "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
370
+ "customization settings will be available as a new entry in YITH Plugins menu."
 
371
  msgstr ""
372
  "Desde ahora, puedes encontrar todas las opciones del plugin en el menú YITH "
373
  "Plugins.\n"
374
  "La personalización de los ajustes del plugin estará disponible como una "
375
  "nueva entrada en el menú YITH Plugins."
376
 
377
+ #. translators: 1. YITH site link; 2. WordPress site link.
378
+ #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
379
+ #, fuzzy
380
+ msgid "Discover all our plugins available on: %1$s and %2$s"
381
  msgstr "Descubre todos nuestros plugins disponibles en:"
382
 
383
+ #: includes/class-yit-pointers.php:96
 
 
 
 
384
  msgid "Plugins Upgraded"
385
  msgstr "Plugins mejorados"
386
 
387
+ #: includes/class-yit-pointers.php:97
388
+ #, fuzzy
389
  msgid ""
390
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
391
+ "menu. Every time one of our plugins is added, a new entry will be added to "
392
+ "this menu. For example, after the update, plugin options (such as for YITH "
393
+ "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
394
+ "previous location to YITH Plugins tab."
 
 
 
 
395
  msgstr ""
396
  "Desde ahora, podrás encontrar el panel de opciones de los plugins de YITH en "
397
  "el menú YITH Plugins.\n"
401
  "que YITH WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) se "
402
  "moverán de su ubicación previa a la pestaña de YITH Plugins."
403
 
404
+ #: includes/class-yith-dashboard.php:35
405
  msgid "YITH Latest Updates"
406
  msgstr "Últimas actualizaciones de YITH"
407
 
408
+ #: includes/class-yith-dashboard.php:36
409
  msgid "Latest news from YITH Blog"
410
  msgstr "Últimas novedades del Blog de YITH"
411
 
412
+ #: includes/class-yith-dashboard.php:56
413
  msgid "RSS Error:"
414
  msgstr "Error RSS:"
415
 
416
+ #: includes/class-yith-dashboard.php:63
417
  msgid ""
418
  "An error has occurred, which probably means the feed is down. Try again "
419
  "later."
421
  "Ha ocurrido un error, lo que puede que signifique que el feed ha caído. "
422
  "Inténtalo de nuevo más tarde."
423
 
424
+ #: includes/class-yith-system-status.php:110
425
  msgid "WordPress Version"
426
  msgstr "Versión de WordPress"
427
 
428
+ #: includes/class-yith-system-status.php:111
429
  msgid "WooCommerce Version"
430
  msgstr "Versión de WooCommerce"
431
 
432
+ #: includes/class-yith-system-status.php:112
433
  msgid "Available Memory"
434
  msgstr "Memoria disponible"
435
 
436
+ #: includes/class-yith-system-status.php:113
437
  msgid "PHP Version"
438
  msgstr "Versión PHP"
439
 
440
+ #: includes/class-yith-system-status.php:114
441
  msgid "TLS Version"
442
  msgstr "Versión TLS"
443
 
444
+ #: includes/class-yith-system-status.php:115
445
  msgid "WordPress Cron"
446
  msgstr "Cron de WordPress"
447
 
448
+ #: includes/class-yith-system-status.php:116
449
  msgid "SimpleXML"
450
  msgstr "SimpleXML"
451
 
452
+ #: includes/class-yith-system-status.php:117
453
  msgid "MultiByte String"
454
  msgstr "Cadena MultiByte"
455
 
456
+ #: includes/class-yith-system-status.php:118
457
  msgid "ImageMagick Version"
458
  msgstr "Versión ImageMagick"
459
 
460
+ #: includes/class-yith-system-status.php:119
461
  msgid "GD Library"
462
  msgstr "Biblioteca GD"
463
 
464
+ #: includes/class-yith-system-status.php:120
465
  msgid "Iconv Module"
466
  msgstr "Módulo Iconv"
467
 
468
+ #: includes/class-yith-system-status.php:121
469
  msgid "OPCache Save Comments"
470
  msgstr "Guardar comentarios OPCache"
471
 
472
+ #: includes/class-yith-system-status.php:122
473
  msgid "URL FOpen"
474
  msgstr "URL FOpen"
475
 
476
+ #: includes/class-yith-system-status.php:140
477
+ #: includes/class-yith-system-status.php:141
478
+ #: templates/sysinfo/system-information-panel.php:11
479
  msgid "System Status"
480
  msgstr "Estado del sistema"
481
 
482
+ #: includes/class-yith-system-status.php:183
483
  msgid "YITH Plugins"
484
  msgstr "YITH Plugins"
485
 
486
+ #: includes/class-yith-system-status.php:191
487
  msgid "WooCommerce"
488
  msgstr "WooCommerce"
489
 
490
+ #: includes/class-yith-system-status.php:342
491
  msgid "Warning!"
492
  msgstr "¡Atención!"
493
 
494
  #. translators: %1$s open link tag, %2$s open link tag
495
+ #: includes/class-yith-system-status.php:346
496
  msgid ""
497
  "The system check has detected some compatibility issues on your installation."
498
  "%1$sClick here%2$s to know more"
500
  "La comprobación del sistema ha detectado algunos problemas de compatibilidad "
501
  "en tu instalación.%1$sHaz clic quí%2$s para saber más"
502
 
503
+ #: includes/class-yith-system-status.php:488
504
  msgid "Enabled"
505
  msgstr "Activado"
506
 
507
+ #: includes/class-yith-system-status.php:488
508
  msgid "Disabled"
509
  msgstr "Desactivado"
510
 
511
+ #: includes/class-yith-system-status.php:493
512
  msgid "N/A"
513
  msgstr "N/D"
514
 
515
  #. translators: %1$s plugin name, %2$s requirement name
516
+ #: includes/class-yith-system-status.php:520
517
  msgid "%1$s needs %2$s enabled"
518
  msgstr "%1$s necesita %2$s activado"
519
 
520
  #. translators: %1$s plugin name, %2$s required memory amount
521
+ #: includes/class-yith-system-status.php:523
522
  msgid "%1$s needs at least %2$s of available memory"
523
  msgstr "%1$s necesita al menos %2$s de memoria disponible"
524
 
525
  #. translators: %1$s plugin name, %2$s version number
526
+ #: includes/class-yith-system-status.php:526
527
  msgid "%1$s needs at least %2$s version"
528
  msgstr "%1$s necesita al menos la versión %2$s"
529
 
530
+ #: includes/class-yith-system-status.php:550
531
  msgid ""
532
  "Update it to the latest version in order to benefit of all new features and "
533
  "security updates."
535
  "Actualízalo a la última versión para beneficiarte de todas las "
536
  "características y actualizaciones de seguridad."
537
 
538
+ #: includes/class-yith-system-status.php:554
539
+ #: includes/class-yith-system-status.php:560
540
  msgid "Contact your hosting company in order to update it."
541
  msgstr "Ponte en contacto con tu empresa de hosting para actualizarlo."
542
 
543
+ #: includes/class-yith-system-status.php:558
544
  msgid "Contact your hosting company in order to install it."
545
  msgstr "Ponte en contacto con tu empresa de hosting para instalarlo."
546
 
547
  #. translators: %1$s code, %2$s file name
548
+ #: includes/class-yith-system-status.php:565
549
  msgid "Remove %1$s from %2$s file"
550
  msgstr "Eliminar %1$s desde el archivo %2$s "
551
 
552
+ #: includes/class-yith-system-status.php:573
553
  msgid "Contact your hosting company in order to enable it."
554
  msgstr "Ponte en contacto con tu empresa de hosting para activarlo."
555
 
556
  #. translators: %1$s opening link tag, %2$s closing link tag
557
+ #: includes/class-yith-system-status.php:577
558
+ #: includes/class-yith-system-status.php:600
559
  msgid ""
560
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
561
  "it."
564
  "incrementarlo."
565
 
566
  #. translators: %s recommended memory amount
567
+ #: includes/class-yith-system-status.php:597
568
  msgid ""
569
  "For optimal functioning of our plugins, we suggest setting at least %s of "
570
  "available memory"
573
  "memoria disponible"
574
 
575
  #. translators: %1$s TLS label, %2$s cURL label
576
+ #: includes/class-yith-system-status.php:605
577
  msgid ""
578
  "The system check cannot determine which %1$s version is installed because "
579
  "%2$s module is disabled. Ask your hosting company to enable it."
583
  "hosting que lo active."
584
 
585
  #. translators: %1$s TLS label
586
+ #: includes/class-yith-system-status.php:608
587
  msgid ""
588
  "The system check cannot determine which %1$s version is installed due to a "
589
  "connection issue between your site and our server."
591
  "La comprobación del sistema no ha podido determinar qué versión de %1$s está "
592
  "instalada debido a un error entre tu sitio y nuestro servidor."
593
 
594
+ #: templates/fields/ajax-customers.php:41
595
  msgid "Search Customers"
596
  msgstr "Buscar clientes"
597
 
598
+ #. translators: 1. user display name; 2. user ID; 3. user email.
599
+ #: templates/fields/ajax-customers.php:68
600
+ #: templates/fields/ajax-customers.php:79
601
  msgid "%1$s (#%2$s &ndash; %3$s)"
602
  msgstr "%1$s (#%2$s &ndash; %3$s)"
603
 
604
+ #: templates/fields/ajax-posts.php:41
605
  msgid "Search Posts"
606
  msgstr "Buscar entradas"
607
 
608
+ #: templates/fields/ajax-products.php:14
609
  msgid "Search Product"
610
  msgstr "Buscar producto"
611
 
612
+ #: templates/fields/customtabs.php:17
613
  msgid "Close all"
614
  msgstr "Cerrar todo"
615
 
616
+ #: templates/fields/customtabs.php:17
617
  msgid "Expand all"
618
  msgstr "Expandir todo"
619
 
620
+ #: templates/fields/customtabs.php:25 templates/fields/customtabs.php:68
621
  msgid "Remove"
622
  msgstr "Eliminar"
623
 
624
+ #: templates/fields/customtabs.php:40 templates/fields/customtabs.php:81
625
  msgid "Value"
626
  msgstr "Valor"
627
 
628
+ #: templates/fields/customtabs.php:41 templates/fields/customtabs.php:82
629
  msgid "Content of the tab. (HTML is supported)"
630
  msgstr "Contenido de la pestaña. (Compatible con HTML)"
631
 
632
+ #: templates/fields/customtabs.php:52
633
  msgid "Add custom product tab"
634
  msgstr "Añadir pestaña de producto personalizada"
635
 
636
+ #: templates/fields/customtabs.php:93
637
  msgid "Do you want to remove the custom tab?"
638
  msgstr "¿Quieres eliminar la pestaña personalizada?"
639
 
640
+ #: templates/fields/date-format.php:65
641
  msgid "Custom:"
642
  msgstr "Personalizado:"
643
 
644
+ #: templates/fields/date-format.php:70
645
+ msgid "Preview:"
646
+ msgstr ""
647
+
648
+ #: templates/fields/icons.php:63
649
  msgid "Set Default"
650
  msgstr "Establecer predeterminado"
651
 
652
+ #: templates/fields/image-gallery.php:29 templates/fields/image-gallery.php:40
653
  msgid "Delete image"
654
  msgstr "Eliminar imagen"
655
 
656
+ #: templates/fields/image-gallery.php:37
657
  msgid "Add Images to Gallery"
658
  msgstr "Añadir imágenes a la Galería"
659
 
660
+ #: templates/fields/image-gallery.php:38
661
  msgid "Add to gallery"
662
  msgstr "Añadir a la galería"
663
 
665
  msgid "Add images"
666
  msgstr "Añadir imágenes"
667
 
668
+ #: templates/fields/image-gallery.php:41
669
  msgid "Delete"
670
  msgstr "Eliminar"
671
 
672
+ #: templates/fields/select-buttons.php:19
673
  msgid "Add All"
674
  msgstr "Añadir todo"
675
 
676
+ #: templates/fields/select-buttons.php:32
677
  msgid "Remove All"
678
  msgstr "Eliminar todo"
679
 
680
+ #: templates/fields/sidebars.php:20
681
  msgid "Left sidebar"
682
  msgstr "Barra lateral izquierda"
683
 
684
+ #: templates/fields/sidebars.php:23
685
  msgid "Right sidebar"
686
  msgstr "Barra lateral derecha"
687
 
688
+ #: templates/fields/sidebars.php:26 templates/fields/sidebars.php:29
689
  msgid "No sidebar"
690
  msgstr "Sin barra lateral"
691
 
693
  msgid "Left Sidebar"
694
  msgstr "Barra lateral izquierda"
695
 
696
+ #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:56
697
  msgid "Choose a sidebar"
698
  msgstr "Elige una barra lateral"
699
 
700
+ #: templates/fields/sidebars.php:54
701
  msgid "Right Sidebar"
702
  msgstr "Barra lateral derecha"
703
 
704
+ #: templates/fields/upload.php:34
705
+ #: templates/panel/woocommerce/woocommerce-upload.php:37
706
  msgid "Upload"
707
  msgstr "Subir"
708
 
709
+ #: templates/fields/upload.php:39
710
  msgid "Reset"
711
  msgstr "Restablecer"
712
 
713
+ #: templates/panel/woocommerce/woocommerce-form.php:34
 
 
 
 
 
 
 
 
 
 
 
 
714
  msgid "Reset Defaults"
715
  msgstr "Restablecer valores predeterminados"
716
 
717
+ #: templates/sysinfo/system-information-panel.php:12
718
  msgid "PHPInfo"
719
  msgstr ""
720
 
721
+ #: templates/sysinfo/system-information-panel.php:13
722
+ #: templates/sysinfo/tabs/error-log.php:25
723
  #, fuzzy
724
  msgid "Log Files"
725
  msgstr "Mostrar archivos de registro"
726
 
727
+ #: templates/sysinfo/system-information-panel.php:22
728
  msgid "YITH System Information"
729
  msgstr "Información de Sistema de YITH"
730
 
731
+ #: templates/sysinfo/tabs/error-log.php:13
732
  msgid "WP debug.log file"
733
  msgstr "Archivo WP debug.log"
734
 
735
+ #: templates/sysinfo/tabs/error-log.php:18
736
  msgid "PHP error_log file"
737
  msgstr "Archivo PHP error_log"
738
 
739
+ #: templates/sysinfo/tabs/error-log.php:60
740
  msgid "Download"
741
  msgstr ""
742
 
743
+ #: templates/sysinfo/tabs/error-log.php:72
744
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
745
  msgstr ""
746
 
747
+ #. translators: %s file name.
748
+ #: templates/sysinfo/tabs/error-log.php:96
749
  msgid ""
750
  "No Log file available. Enable the WordPress debug by adding this in the %s "
751
  "file of your installation"
752
  msgstr ""
753
 
754
+ #: templates/sysinfo/tabs/error-log.php:105
755
  msgid "Copied!"
756
  msgstr ""
757
 
758
+ #: templates/sysinfo/tabs/error-log.php:105
759
  msgid "Copy Code"
760
  msgstr ""
761
 
762
+ #: templates/sysinfo/tabs/main.php:15
763
  msgid "Site Info"
764
  msgstr ""
765
 
766
+ #: templates/sysinfo/tabs/main.php:20
767
  msgid "Site URL"
768
  msgstr "URL del sitio"
769
 
770
+ #: templates/sysinfo/tabs/main.php:29
771
  msgid "Output IP Address"
772
  msgstr "Dirección IP de salida"
773
 
774
+ #: templates/sysinfo/tabs/main.php:37
775
  msgid "Defined WP_CACHE"
776
  msgstr "WP_CACHE definido"
777
 
778
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
779
  msgid "Yes"
780
  msgstr "Sí"
781
 
782
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
783
  msgid "No"
784
  msgstr "No"
785
 
786
+ #: templates/sysinfo/tabs/main.php:45
787
  msgid "External object cache"
788
  msgstr ""
789
 
790
+ #: templates/sysinfo/tabs/main.php:54
791
  #, fuzzy
792
  msgid "Plugins Requirements"
793
  msgstr "Ajustes del plugin"
794
 
795
+ #: yit-plugin.php:187
796
  msgid "License"
797
  msgstr "Licencia"
798
 
800
  msgid "YITH"
801
  msgstr "YITH"
802
 
803
+ #. translators: %s is the singular name of the post type.
804
+ #: includes/class-yit-cpt-unlimited.php:676
805
+ msgctxt "taxonomy general name"
806
+ msgid "%s Categories"
807
+ msgstr "Categorías %s"
808
+
809
+ #: includes/class-yit-cpt-unlimited.php:677
810
+ msgctxt "taxonomy singular name"
811
+ msgid "Category"
812
+ msgstr "Categoría"
813
+
814
+ #: includes/class-yith-dashboard.php:96
815
+ msgctxt "Plugin FW"
816
+ msgid "View Changelog"
817
+ msgstr "Ver Registro de cambios"
818
+
819
+ #: includes/class-yith-dashboard.php:97
820
+ msgctxt "Plugin FW"
821
+ msgid "Latest update released on"
822
+ msgstr "Última actualización publicada el"
823
+
824
+ #: includes/class-yith-dashboard.php:137
825
+ msgctxt "Button label"
826
+ msgid "Close"
827
+ msgstr "Cerrar"
828
+
829
+ #: includes/class-yith-gutenberg.php:131
830
+ msgctxt "[gutenberg]: Category Name"
831
+ msgid "YITH"
832
+ msgstr "YITH"
833
+
834
+ #: includes/privacy/class-yith-privacy.php:61
835
  msgctxt "Privacy Policy Guide Title"
836
  msgid "YITH Plugins"
837
  msgstr "Plugins de YITH"
838
 
839
+ #: includes/privacy/class-yith-privacy.php:93
840
  msgctxt "Privacy Policy Content"
841
  msgid ""
842
  "This sample language includes the basics around what personal data your "
853
  "específica compartida por tu sitio variará. Recomendamos consultar con un "
854
  "abogado cuando decidas qué información mostrar en tu política de privacidad."
855
 
856
+ #: includes/privacy/class-yith-privacy.php:97
857
  msgctxt "Privacy Policy Content"
858
  msgid "What we collect and store"
859
  msgstr "Qué recopilamos y almacenamos"
860
 
861
+ #: includes/privacy/class-yith-privacy.php:100
862
  msgctxt "Privacy Policy Content"
863
  msgid "Who on our team has access"
864
  msgstr "Quién en nuestro equipo tiene acceso"
865
 
866
+ #: includes/privacy/class-yith-privacy.php:103
867
  msgctxt "Privacy Policy Content"
868
  msgid "What we share with others"
869
  msgstr "Qué compartimos con otros"
870
 
871
+ #: includes/privacy/class-yith-privacy.php:106
872
  msgctxt "Privacy Policy Content"
873
  msgid "Payments"
874
  msgstr "Pagos"
875
 
876
+ #: templates/fields/dimensions.php:13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
877
  msgctxt "Position in the \"Dimensions\" field"
878
  msgid "Top"
879
  msgstr "Parte superior"
880
 
881
+ #: templates/fields/dimensions.php:14
882
  msgctxt "Position in the \"Dimensions\" field"
883
  msgid "Right"
884
  msgstr "Derecha"
885
 
886
+ #: templates/fields/dimensions.php:15
887
  msgctxt "Position in the \"Dimensions\" field"
888
  msgid "Bottom"
889
  msgstr "Parte inferior"
890
 
891
+ #: templates/fields/dimensions.php:16
892
  msgctxt "Position in the \"Dimensions\" field"
893
  msgid "Left"
894
  msgstr "Izquierda"
895
 
896
+ #: templates/fields/dimensions.php:88
897
  msgctxt "Tooltip in the \"Dimensions\" field"
898
  msgid "Link values together"
899
  msgstr "Enlazar valores juntos"
900
 
901
+ #: templates/fields/onoff.php:28
902
  msgctxt "YES/NO button: use MAX 3 characters!"
903
  msgid "YES"
904
  msgstr "SÍ"
905
 
906
+ #: templates/fields/onoff.php:29
907
  msgctxt "YES/NO button: use MAX 3 characters!"
908
  msgid "NO"
909
  msgstr "NO"
910
 
911
+ #: yit-plugin.php:75
912
  msgctxt "Plugin Row Meta"
913
  msgid "Live Demo"
914
  msgstr "Demostración en vivo"
915
 
916
+ #: yit-plugin.php:79
917
  msgctxt "Plugin Row Meta"
918
  msgid "Documentation"
919
  msgstr "Documentación"
920
 
921
+ #: yit-plugin.php:83
922
  msgctxt "Plugin Row Meta"
923
  msgid "Support"
924
  msgstr "Soporte"
925
 
926
+ #: yit-plugin.php:87
927
  msgctxt "Plugin Row Meta"
928
  msgid "Premium version"
929
  msgstr "Versión premium"
930
 
931
+ #: yit-plugin.php:183
932
  msgctxt "Action links"
933
  msgid "Settings"
934
  msgstr "Ajustes"
941
 
942
  #~ msgid "Back to System panel"
943
  #~ msgstr "Volver al panel del Sistema"
944
+
945
+ #~ msgid "(Default: <i %s></i> )"
946
+ #~ msgstr "(Predeterminado: <i %s></i> )"
947
+
948
+ #~ msgid "(Default: %s <img src=\"%s\"/>)"
949
+ #~ msgstr "(Predeterminado: %s <img src=\"%s\"/>)"
950
+
951
+ #~ msgid "Image preview"
952
+ #~ msgstr "Vista previa de la imagen"
953
+
954
+ #~ msgid "and"
955
+ #~ msgstr "y"
plugin-fw/languages/yith-plugin-fw-it_IT.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-it_IT.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-11-23 14:47:23+00:00\n"
8
  "PO-Revision-Date: 2020-09-24 14:56:37+0000\n"
9
  "Language: it\n"
10
  "MIME-Version: 1.0\n"
@@ -13,131 +13,171 @@ msgstr ""
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
- #: lib/yit-assets.php:103
17
  msgid "Clear"
18
  msgstr "Rimuovi"
19
 
20
- #: lib/yit-assets.php:104
21
  msgid "Clear color"
22
  msgstr "Rimuovi colore"
23
 
24
- #: lib/yit-assets.php:105
25
  msgid "Default"
26
  msgstr "Predefinito"
27
 
28
- #: lib/yit-assets.php:106
29
  msgid "Select default color"
30
  msgstr "Seleziona il colore predefinito"
31
 
32
- #: lib/yit-assets.php:107
33
  msgid "Select Color"
34
  msgstr "Seleziona il colore"
35
 
36
- #: lib/yit-assets.php:108
37
  msgid "Color value"
38
  msgstr "Valore del colore"
39
 
40
- #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
41
- #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
 
 
 
 
 
 
42
  msgid "Add %s"
43
  msgstr "Aggiungi %s"
44
 
45
- #: lib/yit-cpt-unlimited.php:463 lib/yit-cpt-unlimited.php:577
 
 
 
46
  msgid "Add New %s"
47
  msgstr "Aggiungi nuovo %s"
48
 
49
- #: lib/yit-cpt-unlimited.php:464 lib/yit-cpt-unlimited.php:578
50
- #: lib/yit-cpt-unlimited.php:1269 lib/yit-cpt-unlimited.php:1306
 
 
 
 
 
 
51
  msgid "Edit %s"
52
  msgstr "Modifica %s"
53
 
54
- #: lib/yit-cpt-unlimited.php:465 lib/yit-cpt-unlimited.php:579
 
 
 
55
  msgid "New %s"
56
  msgstr "Nuovo %s"
57
 
58
- #: lib/yit-cpt-unlimited.php:466 lib/yit-cpt-unlimited.php:580
 
 
 
59
  msgid "All %s"
60
  msgstr "Tutti %s"
61
 
62
- #: lib/yit-cpt-unlimited.php:467 lib/yit-cpt-unlimited.php:581
63
- #: lib/yit-cpt-unlimited.php:1253 lib/yit-cpt-unlimited.php:1307
 
 
 
 
 
 
64
  msgid "View %s"
65
  msgstr "Visualizza %s"
66
 
67
- #: lib/yit-cpt-unlimited.php:468 lib/yit-cpt-unlimited.php:582
 
 
 
68
  msgid "Search %s"
69
  msgstr "Cerca %s"
70
 
71
- #: lib/yit-cpt-unlimited.php:469 lib/yit-cpt-unlimited.php:583
 
 
 
72
  msgid "No %s found"
73
  msgstr "Nessun %s trovato"
74
 
75
- #: lib/yit-cpt-unlimited.php:470 lib/yit-cpt-unlimited.php:584
 
 
 
76
  msgid "No %s found in Trash"
77
  msgstr "Nessun %s trovato nel cestino"
78
 
79
- #: lib/yit-cpt-unlimited.php:629 templates/fields/ajax-terms.php:56
80
  msgid "Search Categories"
81
  msgstr "Cerca categorie"
82
 
83
- #: lib/yit-cpt-unlimited.php:630
84
  msgid "All Categories"
85
  msgstr "Tutte le categorie"
86
 
87
- #: lib/yit-cpt-unlimited.php:631
88
  msgid "Parent Category"
89
  msgstr "Categoria genitore"
90
 
91
- #: lib/yit-cpt-unlimited.php:632
92
  msgid "Parent Category:"
93
  msgstr "Categoria genitore:"
94
 
95
- #: lib/yit-cpt-unlimited.php:633
96
  msgid "Edit Category"
97
  msgstr "Modifica categoria"
98
 
99
- #: lib/yit-cpt-unlimited.php:634
100
  msgid "Update Category"
101
  msgstr "Aggiorna categoria"
102
 
103
- #: lib/yit-cpt-unlimited.php:635
104
  msgid "Add New Category"
105
  msgstr "Aggiungi nuova categoria"
106
 
107
- #: lib/yit-cpt-unlimited.php:636
108
  msgid "New Category Name"
109
  msgstr "Nuovo nome categoria"
110
 
111
- #: lib/yit-cpt-unlimited.php:637
112
  msgid "Category"
113
  msgstr "Categoria"
114
 
115
- #: lib/yit-cpt-unlimited.php:726
116
  msgid "Categories"
117
  msgstr "Categorie"
118
 
119
- #: lib/yit-cpt-unlimited.php:1044
 
120
  msgid "%s Settings"
121
  msgstr "Impostazioni %s"
122
 
123
- #: lib/yit-cpt-unlimited.php:1050 lib/yit-cpt-unlimited.php:1198
124
- #: lib/yit-cpt-unlimited.php:1204 lib/yit-plugin-panel.php:81
 
 
125
  msgid "Settings"
126
  msgstr "Impostazioni"
127
 
128
- #: lib/yit-cpt-unlimited.php:1053
129
  msgid "Type"
130
  msgstr "Tipologia"
131
 
132
- #: lib/yit-cpt-unlimited.php:1054
 
133
  msgid "Layout for this %s"
134
  msgstr "Layout per questo %s"
135
 
136
- #: lib/yit-cpt-unlimited.php:1060
137
  msgid "Rewrite"
138
  msgstr "Riscrivi"
139
 
140
- #: lib/yit-cpt-unlimited.php:1061
141
  msgid ""
142
  "Univocal identification name in the URL for each product (slug from post if "
143
  "empty)"
@@ -145,27 +185,27 @@ msgstr ""
145
  "Nome identificativo univoco nell'URL per singolo prodotto (usa slug dal post "
146
  "se vuoto)"
147
 
148
- #: lib/yit-cpt-unlimited.php:1066
149
  msgid "Label in Singular"
150
  msgstr "Etichetta singolare"
151
 
152
- #: lib/yit-cpt-unlimited.php:1067
153
  msgid "Set a label in singular (title of portfolio if empty)"
154
  msgstr "Imposta un'etichetta singolare (titolo del portfolio se vuoto)"
155
 
156
- #: lib/yit-cpt-unlimited.php:1072
157
  msgid "Label in Plural"
158
  msgstr "Etichetta plurale"
159
 
160
- #: lib/yit-cpt-unlimited.php:1073
161
  msgid "Set a label in plural (title of portfolio if empty)"
162
  msgstr "Imposta un'etichetta plurale (titolo del portfolio se vuoto)"
163
 
164
- #: lib/yit-cpt-unlimited.php:1078
165
  msgid "Taxonomy"
166
  msgstr "Tassonomia"
167
 
168
- #: lib/yit-cpt-unlimited.php:1079
169
  msgid ""
170
  "If you want to use categories in the portfolio, set a name for taxonomy. "
171
  "Name should be a slug (must not contain capital letters nor spaces) and must "
@@ -176,176 +216,180 @@ msgstr ""
176
  "caratteri maiuscoli né spazi) e non più lungo di 32 caratteri (restrizione "
177
  "di database)."
178
 
179
- #: lib/yit-cpt-unlimited.php:1084
180
  msgid "Taxonomy Rewrite"
181
  msgstr "Riscrivi tassonomia"
182
 
183
- #: lib/yit-cpt-unlimited.php:1085
184
  msgid "Set univocal name for each category page URL."
185
  msgstr "Imposta un nome univoco per l'URL della pagina di ciascuna categoria."
186
 
187
- #: lib/yit-cpt-unlimited.php:1090
188
  msgid "Single layout"
189
  msgstr "Layout singolo"
190
 
191
- #: lib/yit-cpt-unlimited.php:1091
192
  msgid "Layout for single page of this portfolio"
193
  msgstr "Layout per pagina singola per questo portfolio"
194
 
195
- #: lib/yit-cpt-unlimited.php:1132
196
  msgid "layout settings"
197
  msgstr "impostazioni di layout"
198
 
199
- #: lib/yit-cpt-unlimited.php:1224 lib/yit-cpt-unlimited.php:1237
 
200
  msgid "Quick links"
201
  msgstr "Link rapidi"
202
 
203
- #: lib/yit-cpt-unlimited.php:1477
 
204
  msgid "Show frontend of the %s"
205
  msgstr "Mostra front end di %s"
206
 
207
- #: lib/yit-cpt-unlimited.php:1484 templates/fields/customtabs.php:46
208
- #: templates/fields/customtabs.php:89
209
  msgid "Name"
210
  msgstr "Nome"
211
 
212
- #: lib/yit-cpt-unlimited.php:1635
 
213
  msgid "Add %s from images"
214
  msgstr "Aggiungi %s dalla immagini"
215
 
216
- #: lib/yit-cpt-unlimited.php:1638
217
  msgid "Upload multiple files"
218
  msgstr "Carica file multipli"
219
 
220
- #: lib/yit-plugin-panel-wc.php:427
221
  msgid "The changes you have made will be lost if you leave this page."
222
  msgstr "Perderai tutti i cambiamenti effettuati se lasci questa pagina."
223
 
224
- #: lib/yit-plugin-panel.php:80
225
  msgid "Plugin Settings"
226
  msgstr "Impostazioni plugin"
227
 
228
- #: lib/yit-plugin-panel.php:466 lib/yit-plugin-panel.php:469
 
229
  msgid "How to install premium version"
230
  msgstr "Come installare la versione premium"
231
 
232
- #: lib/yit-plugin-panel.php:633 lib/yit-plugin-subpanel.php:151
233
- #: templates/panel/woocommerce/woocommerce-form.php:15
 
234
  msgid "Save Changes"
235
  msgstr "Salva modifiche"
236
 
237
- #: lib/yit-plugin-panel.php:637 lib/yit-plugin-subpanel.php:154
238
- #: templates/panel/woocommerce/woocommerce-form.php:19
 
239
  msgid ""
240
  "If you continue with this action, you will reset all options in this page."
241
  msgstr ""
242
  "Se prosegui con questa azione, tutte le opzioni di questa pagina saranno "
243
  "reimpostate."
244
 
245
- #: lib/yit-plugin-panel.php:640 lib/yit-plugin-subpanel.php:156
246
- msgid "Reset to default"
247
- msgstr "Ripristina configurazione predefinita"
248
-
249
- #: lib/yit-plugin-panel.php:641 lib/yit-plugin-subpanel.php:157
250
- #: templates/panel/woocommerce/woocommerce-form.php:23
251
  msgid "Are you sure?"
252
  msgstr "Sei sicuro?"
253
 
254
- #: lib/yit-plugin-panel.php:842
 
 
 
 
 
255
  msgid ""
256
  "The element you have entered already exists. Please, enter another name."
257
  msgstr "L'elemento inserito esiste già. Per favore, inserisci un altro nome."
258
 
259
- #: lib/yit-plugin-panel.php:843
260
  msgid "Settings saved"
261
  msgstr "Impostazioni salvate"
262
 
263
- #: lib/yit-plugin-panel.php:844
264
  msgid "Settings reset"
265
  msgstr "Impostazioni azzerate"
266
 
267
- #: lib/yit-plugin-panel.php:845
268
  msgid "Element deleted correctly."
269
  msgstr "Elemento rimosso correttamente."
270
 
271
- #: lib/yit-plugin-panel.php:846 lib/yit-plugin-panel.php:847
 
272
  msgid "Element updated correctly."
273
  msgstr "Elemento aggiornato correttamente."
274
 
275
- #: lib/yit-plugin-panel.php:848
276
  msgid "Database imported correctly."
277
  msgstr "Database importato correttamente."
278
 
279
- #: lib/yit-plugin-panel.php:849
280
  msgid "An error has occurred during import. Please try again."
281
  msgstr "Si è verificato un errore durante l'importazione. Prova di nuovo."
282
 
283
- #: lib/yit-plugin-panel.php:850
284
  msgid "The added file is not valid."
285
  msgstr "Il file aggiunto non è valido."
286
 
287
- #: lib/yit-plugin-panel.php:851
288
  msgid "Sorry, import is disabled."
289
  msgstr "Ci dispiace, l'importazione è disabilitata."
290
 
291
- #: lib/yit-plugin-panel.php:852
292
  msgid "Sorting successful."
293
  msgstr "Ordinamento effettuato con successo."
294
 
295
- #: lib/yit-plugin-panel.php:1315
296
  msgid "We need your support"
297
  msgstr "Abbiamo bisogno del tuo sostegno"
298
 
299
- #: lib/yit-plugin-panel.php:1316
300
  msgid "to keep updating and improving the plugin. Please,"
301
  msgstr "per poter continuare ad aggiornare e migliorare il plugin."
302
 
303
- #: lib/yit-plugin-panel.php:1318
304
  msgid "help us by leaving a five-star rating"
305
  msgstr "Puoi darci una mano lasciando una recensione a 5 stelle"
306
 
307
- #: lib/yit-plugin-panel.php:1319
308
  msgid ":) Thanks!"
309
  msgstr ":) Grazie!"
310
 
311
- #: lib/yit-pointers.php:70
312
  msgid "Plugins Activated"
313
  msgstr "Plugin attivati"
314
 
315
- #: lib/yit-pointers.php:71
 
316
  msgid ""
317
- "From now on, you can find all plugin options in YITH Plugins menu.\n"
318
- " Plugin customization settings will be "
319
- "available as a new entry in YITH Plugins menu."
320
  msgstr ""
321
  "Da ora in poi, puoi trovare tutte le opzioni dei tuoi plugin nel menu YITH "
322
  "Plugins.\n"
323
  "Troverai le impostazioni di personalizzazione sotto una nuova voce nel menu "
324
  "YITH Plugins."
325
 
326
- #: lib/yit-pointers.php:73 lib/yit-pointers.php:89
327
- msgid "Discover all our plugins available on:"
 
 
328
  msgstr "Scopri tutti i plugin disponibili su:"
329
 
330
- #: lib/yit-pointers.php:74 lib/yit-pointers.php:90
331
- msgid "and"
332
- msgstr "e"
333
-
334
- #: lib/yit-pointers.php:84
335
  msgid "Plugins Upgraded"
336
  msgstr "Plugin aggiornati"
337
 
338
- #: lib/yit-pointers.php:85
 
339
  msgid ""
340
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
341
- "menu.\n"
342
- " Every time one of our plugins is added, "
343
- "a new entry will be added to this menu.\n"
344
- " For example, after the update, plugin "
345
- "options (such as for YITH WooCommerce Wishlist, YITH WooCommerce Ajax "
346
- "Search, etc.)\n"
347
- " will be moved from previous location to "
348
- "YITH Plugins tab."
349
  msgstr ""
350
  "Da ora in poi, troverai tutte le opzioni dei tuoi plugin nel menu YITH "
351
  "Plugins.\n"
@@ -355,19 +399,19 @@ msgstr ""
355
  "quelle di YITH WooCommerce Wishlist, YITH WooCommerce Ajax Search etc.)\n"
356
  "saranno trasferite nella scheda YITH Plugins."
357
 
358
- #: lib/yith-dashboard.php:40
359
  msgid "YITH Latest Updates"
360
  msgstr "Ultimi aggiornamenti da YITH"
361
 
362
- #: lib/yith-dashboard.php:41
363
  msgid "Latest news from YITH Blog"
364
  msgstr "Ultime novità dal blog YITH"
365
 
366
- #: lib/yith-dashboard.php:65
367
  msgid "RSS Error:"
368
  msgstr "Errore RSS:"
369
 
370
- #: lib/yith-dashboard.php:71
371
  msgid ""
372
  "An error has occurred, which probably means the feed is down. Try again "
373
  "later."
@@ -375,77 +419,78 @@ msgstr ""
375
  "Si è verificato un errore probabilmente causato dal feed non disponibile. "
376
  "Riprova più tardi."
377
 
378
- #: lib/yith-system-status.php:122
379
  msgid "WordPress Version"
380
  msgstr "Versione di WordPress"
381
 
382
- #: lib/yith-system-status.php:123
383
  msgid "WooCommerce Version"
384
  msgstr "Versione di WooCommerce"
385
 
386
- #: lib/yith-system-status.php:124
387
  msgid "Available Memory"
388
  msgstr "Memoria disponibile"
389
 
390
- #: lib/yith-system-status.php:125
391
  msgid "PHP Version"
392
  msgstr "Versione PHP"
393
 
394
- #: lib/yith-system-status.php:126
395
  msgid "TLS Version"
396
  msgstr "Versione TLS"
397
 
398
- #: lib/yith-system-status.php:127
399
  msgid "WordPress Cron"
400
  msgstr "Cron WordPress"
401
 
402
- #: lib/yith-system-status.php:128
403
  msgid "SimpleXML"
404
  msgstr "SimpleXML"
405
 
406
- #: lib/yith-system-status.php:129
407
  msgid "MultiByte String"
408
  msgstr "MultiByte String"
409
 
410
- #: lib/yith-system-status.php:130
411
  msgid "ImageMagick Version"
412
  msgstr "Versione di ImageMagick"
413
 
414
- #: lib/yith-system-status.php:131
415
  msgid "GD Library"
416
  msgstr "GD Library"
417
 
418
- #: lib/yith-system-status.php:132
419
  msgid "Iconv Module"
420
  msgstr "Iconv Module"
421
 
422
- #: lib/yith-system-status.php:133
423
  msgid "OPCache Save Comments"
424
  msgstr "OPCache Save Comments"
425
 
426
- #: lib/yith-system-status.php:134
427
  msgid "URL FOpen"
428
  msgstr "URL FOpen"
429
 
430
- #: lib/yith-system-status.php:152 lib/yith-system-status.php:153
431
- #: templates/sysinfo/system-information-panel.php:14
 
432
  msgid "System Status"
433
  msgstr "Stato del sistema"
434
 
435
- #: lib/yith-system-status.php:195
436
  msgid "YITH Plugins"
437
  msgstr "Plugin YITH"
438
 
439
- #: lib/yith-system-status.php:203
440
  msgid "WooCommerce"
441
  msgstr "WooCommerce"
442
 
443
- #: lib/yith-system-status.php:355
444
  msgid "Warning!"
445
  msgstr "Attenzione!"
446
 
447
  #. translators: %1$s open link tag, %2$s open link tag
448
- #: lib/yith-system-status.php:359
449
  msgid ""
450
  "The system check has detected some compatibility issues on your installation."
451
  "%1$sClick here%2$s to know more"
@@ -453,34 +498,34 @@ msgstr ""
453
  "Il controllo di sistema ha individuato delle incompatibilità con la tua "
454
  "installazione. %1$sVedi qui%2$s per maggiori dettagli"
455
 
456
- #: lib/yith-system-status.php:544
457
  msgid "Enabled"
458
  msgstr "Abilitato"
459
 
460
- #: lib/yith-system-status.php:544
461
  msgid "Disabled"
462
  msgstr "Disabilitato"
463
 
464
- #: lib/yith-system-status.php:549
465
  msgid "N/A"
466
  msgstr "N.D."
467
 
468
  #. translators: %1$s plugin name, %2$s requirement name
469
- #: lib/yith-system-status.php:577
470
  msgid "%1$s needs %2$s enabled"
471
  msgstr "%1$s necessita dell'attivazione di %2$s"
472
 
473
  #. translators: %1$s plugin name, %2$s required memory amount
474
- #: lib/yith-system-status.php:580
475
  msgid "%1$s needs at least %2$s of available memory"
476
  msgstr "%1$s necessita di almeno %2$s di memoria disponibile"
477
 
478
  #. translators: %1$s plugin name, %2$s version number
479
- #: lib/yith-system-status.php:583
480
  msgid "%1$s needs at least %2$s version"
481
  msgstr "%1$s necessita almeno della versione %2$s"
482
 
483
- #: lib/yith-system-status.php:608
484
  msgid ""
485
  "Update it to the latest version in order to benefit of all new features and "
486
  "security updates."
@@ -488,25 +533,27 @@ msgstr ""
488
  "Aggiorna all'ultima versione per beneficiare di tutte le nuove funzionalità "
489
  "e degli aggiornamenti di sicurezza."
490
 
491
- #: lib/yith-system-status.php:612 lib/yith-system-status.php:618
 
492
  msgid "Contact your hosting company in order to update it."
493
  msgstr "Contatta il tuo servizio hosting per aggiornarlo."
494
 
495
- #: lib/yith-system-status.php:616
496
  msgid "Contact your hosting company in order to install it."
497
  msgstr "Per installarlo contatta il tuo servizio di hosting."
498
 
499
  #. translators: %1$s code, %2$s file name
500
- #: lib/yith-system-status.php:623
501
  msgid "Remove %1$s from %2$s file"
502
  msgstr "Rimuovi %1$s dal file %2$s"
503
 
504
- #: lib/yith-system-status.php:631
505
  msgid "Contact your hosting company in order to enable it."
506
  msgstr "Per attivarlo contatta il tuo servizio di hosting."
507
 
508
  #. translators: %1$s opening link tag, %2$s closing link tag
509
- #: lib/yith-system-status.php:635 lib/yith-system-status.php:659
 
510
  msgid ""
511
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
512
  "it."
@@ -515,7 +562,7 @@ msgstr ""
515
  "per un upgrade."
516
 
517
  #. translators: %s recommended memory amount
518
- #: lib/yith-system-status.php:656
519
  msgid ""
520
  "For optimal functioning of our plugins, we suggest setting at least %s of "
521
  "available memory"
@@ -524,7 +571,7 @@ msgstr ""
524
  "almeno %s della memoria disponibile"
525
 
526
  #. translators: %1$s TLS label, %2$s cURL label
527
- #: lib/yith-system-status.php:664
528
  msgid ""
529
  "The system check cannot determine which %1$s version is installed because "
530
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -534,7 +581,7 @@ msgstr ""
534
  "attivarlo."
535
 
536
  #. translators: %1$s TLS label
537
- #: lib/yith-system-status.php:667
538
  msgid ""
539
  "The system check cannot determine which %1$s version is installed due to a "
540
  "connection issue between your site and our server."
@@ -542,68 +589,73 @@ msgstr ""
542
  "Non ci è stato possibile determinare quale versione di %1$s è installata a "
543
  "causa di un problema di connessione fra il tuo sito e il nostro server."
544
 
545
- #: templates/fields/ajax-customers.php:57
546
  msgid "Search Customers"
547
  msgstr "Cerca fra i clienti"
548
 
549
- #: templates/fields/ajax-customers.php:83
550
- #: templates/fields/ajax-customers.php:93
 
551
  msgid "%1$s (#%2$s &ndash; %3$s)"
552
  msgstr "%1$s (#%2$s &ndash; %3$s)"
553
 
554
- #: templates/fields/ajax-posts.php:57
555
  msgid "Search Posts"
556
  msgstr "Cerca articoli"
557
 
558
- #: templates/fields/ajax-products.php:16
559
  msgid "Search Product"
560
  msgstr "Cerca un prodotto"
561
 
562
- #: templates/fields/customtabs.php:28
563
  msgid "Close all"
564
  msgstr "Chiudi tutti"
565
 
566
- #: templates/fields/customtabs.php:28
567
  msgid "Expand all"
568
  msgstr "Espandi tutti"
569
 
570
- #: templates/fields/customtabs.php:37 templates/fields/customtabs.php:81
571
  msgid "Remove"
572
  msgstr "Rimuovi"
573
 
574
- #: templates/fields/customtabs.php:52 templates/fields/customtabs.php:94
575
  msgid "Value"
576
  msgstr "Valore"
577
 
578
- #: templates/fields/customtabs.php:53 templates/fields/customtabs.php:95
579
  msgid "Content of the tab. (HTML is supported)"
580
  msgstr "Contenuto della scheda (codice HTML supportato)."
581
 
582
- #: templates/fields/customtabs.php:65
583
  msgid "Add custom product tab"
584
  msgstr "Aggiungi scheda prodotto personalizzata"
585
 
586
- #: templates/fields/customtabs.php:106
587
  msgid "Do you want to remove the custom tab?"
588
  msgstr "Vuoi rimuovere la scheda personalizzata?"
589
 
590
- #: templates/fields/date-format.php:50
591
  msgid "Custom:"
592
  msgstr "Personalizzato:"
593
 
594
- #: templates/fields/icons.php:58
 
 
 
 
595
  msgid "Set Default"
596
  msgstr "Ripristina impostazioni iniziali"
597
 
598
- #: templates/fields/image-gallery.php:34 templates/fields/image-gallery.php:39
599
  msgid "Delete image"
600
  msgstr "Rimuovi immagine"
601
 
602
- #: templates/fields/image-gallery.php:39
603
  msgid "Add Images to Gallery"
604
  msgstr "Aggiungi immagini alla galleria"
605
 
606
- #: templates/fields/image-gallery.php:39
607
  msgid "Add to gallery"
608
  msgstr "Aggiungi alla galleria"
609
 
@@ -611,27 +663,27 @@ msgstr "Aggiungi alla galleria"
611
  msgid "Add images"
612
  msgstr "Aggiungi immagini"
613
 
614
- #: templates/fields/image-gallery.php:39
615
  msgid "Delete"
616
  msgstr "Rimuovi"
617
 
618
- #: templates/fields/select-buttons.php:21
619
  msgid "Add All"
620
  msgstr "Aggiungi tutti"
621
 
622
- #: templates/fields/select-buttons.php:34
623
  msgid "Remove All"
624
  msgstr "Rimuovi tutti"
625
 
626
- #: templates/fields/sidebars.php:22
627
  msgid "Left sidebar"
628
  msgstr "Barra laterale sinistra"
629
 
630
- #: templates/fields/sidebars.php:25
631
  msgid "Right sidebar"
632
  msgstr "Barra laterale destra"
633
 
634
- #: templates/fields/sidebars.php:28 templates/fields/sidebars.php:31
635
  msgid "No sidebar"
636
  msgstr "Nessuna barra laterale"
637
 
@@ -639,118 +691,106 @@ msgstr "Nessuna barra laterale"
639
  msgid "Left Sidebar"
640
  msgstr "Barra laterale sinistra"
641
 
642
- #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:54
643
  msgid "Choose a sidebar"
644
  msgstr "Scegli una barra laterale"
645
 
646
- #: templates/fields/sidebars.php:52
647
  msgid "Right Sidebar"
648
  msgstr "Barra laterale destra"
649
 
650
- #: templates/fields/upload.php:27 templates/metaboxes/types/icon-list.php:70
651
- #: templates/panel/woocommerce/woocommerce-upload.php:40
652
  msgid "Upload"
653
  msgstr "Carica"
654
 
655
- #: templates/fields/upload.php:29
656
  msgid "Reset"
657
  msgstr "Ripristina"
658
 
659
- #: templates/metaboxes/types/icon-list.php:76
660
- msgid "Image preview"
661
- msgstr "Anteprima immagine"
662
-
663
- #: templates/metaboxes/types/icon-list.php:90
664
- msgid "(Default: %s <img src=\"%s\"/>)"
665
- msgstr "(Default: %s <img src=\"%s\"/>)"
666
-
667
- #: templates/metaboxes/types/icon-list.php:92
668
- msgid "(Default: <i %s></i> )"
669
- msgstr "(Default: <i %s></i> )"
670
-
671
- #: templates/panel/woocommerce/woocommerce-form.php:22
672
  msgid "Reset Defaults"
673
  msgstr "Ripristina impostazioni iniziali"
674
 
675
- #: templates/sysinfo/system-information-panel.php:15
676
  msgid "PHPInfo"
677
  msgstr ""
678
 
679
- #: templates/sysinfo/system-information-panel.php:16
680
- #: templates/sysinfo/tabs/error-log.php:28
681
  #, fuzzy
682
  msgid "Log Files"
683
  msgstr "Mostra i log"
684
 
685
- #: templates/sysinfo/system-information-panel.php:25
686
  msgid "YITH System Information"
687
  msgstr "YITH System Information"
688
 
689
- #: templates/sysinfo/tabs/error-log.php:16
690
  msgid "WP debug.log file"
691
  msgstr "WP debug.log file"
692
 
693
- #: templates/sysinfo/tabs/error-log.php:21
694
  msgid "PHP error_log file"
695
  msgstr "PHP error_log file"
696
 
697
- #: templates/sysinfo/tabs/error-log.php:64
698
  msgid "Download"
699
  msgstr ""
700
 
701
- #: templates/sysinfo/tabs/error-log.php:78
702
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
703
  msgstr ""
704
 
705
- #. translators: %s file name
706
- #: templates/sysinfo/tabs/error-log.php:106
707
  msgid ""
708
  "No Log file available. Enable the WordPress debug by adding this in the %s "
709
  "file of your installation"
710
  msgstr ""
711
 
712
- #: templates/sysinfo/tabs/error-log.php:115
713
  msgid "Copied!"
714
  msgstr ""
715
 
716
- #: templates/sysinfo/tabs/error-log.php:115
717
  msgid "Copy Code"
718
  msgstr ""
719
 
720
- #: templates/sysinfo/tabs/main.php:43
721
  msgid "Site Info"
722
  msgstr ""
723
 
724
- #: templates/sysinfo/tabs/main.php:48
725
  msgid "Site URL"
726
  msgstr "URL del sito"
727
 
728
- #: templates/sysinfo/tabs/main.php:57
729
  msgid "Output IP Address"
730
  msgstr "Indirizzo IP di output"
731
 
732
- #: templates/sysinfo/tabs/main.php:65
733
  msgid "Defined WP_CACHE"
734
  msgstr "Defined WP_CACHE"
735
 
736
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
737
  msgid "Yes"
738
  msgstr "Sì"
739
 
740
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
741
  msgid "No"
742
  msgstr "No"
743
 
744
- #: templates/sysinfo/tabs/main.php:73
745
  msgid "External object cache"
746
  msgstr ""
747
 
748
- #: templates/sysinfo/tabs/main.php:82
749
  #, fuzzy
750
  msgid "Plugins Requirements"
751
  msgstr "Impostazioni plugin"
752
 
753
- #: yit-plugin.php:194
754
  msgid "License"
755
  msgstr "Chiave di licenza"
756
 
@@ -758,12 +798,43 @@ msgstr "Chiave di licenza"
758
  msgid "YITH"
759
  msgstr "YITH"
760
 
761
- #: lib/privacy/yit-privacy.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
762
  msgctxt "Privacy Policy Guide Title"
763
  msgid "YITH Plugins"
764
  msgstr "YITH Plugins"
765
 
766
- #: lib/privacy/yit-privacy.php:59
767
  msgctxt "Privacy Policy Content"
768
  msgid ""
769
  "This sample language includes the basics around what personal data your "
@@ -781,112 +852,82 @@ msgstr ""
781
  "momento di decidere quali informazioni divulgare nell'informativa sulla "
782
  "privacy."
783
 
784
- #: lib/privacy/yit-privacy.php:63
785
  msgctxt "Privacy Policy Content"
786
  msgid "What we collect and store"
787
  msgstr "Cosa raccogliamo e salviamo"
788
 
789
- #: lib/privacy/yit-privacy.php:66
790
  msgctxt "Privacy Policy Content"
791
  msgid "Who on our team has access"
792
  msgstr "Persone del nostro gruppo di lavoro che hanno accesso"
793
 
794
- #: lib/privacy/yit-privacy.php:69
795
  msgctxt "Privacy Policy Content"
796
  msgid "What we share with others"
797
  msgstr "Cosa condividiamo con gli altri"
798
 
799
- #: lib/privacy/yit-privacy.php:72
800
  msgctxt "Privacy Policy Content"
801
  msgid "Payments"
802
  msgstr "Pagamenti"
803
 
804
- #: lib/yit-cpt-unlimited.php:627
805
- msgctxt "taxonomy general name"
806
- msgid "%s Categories"
807
- msgstr "%s Categorie"
808
-
809
- #: lib/yit-cpt-unlimited.php:628
810
- msgctxt "taxonomy singular name"
811
- msgid "Category"
812
- msgstr "Categoria"
813
-
814
- #: lib/yith-dashboard.php:99
815
- msgctxt "Plugin FW"
816
- msgid "View Changelog"
817
- msgstr "Visualizza il changelog"
818
-
819
- #: lib/yith-dashboard.php:100
820
- msgctxt "Plugin FW"
821
- msgid "Latest update released on"
822
- msgstr "Ultimo aggiornamento rilasciato il"
823
-
824
- #: lib/yith-dashboard.php:143
825
- msgctxt "Button label"
826
- msgid "Close"
827
- msgstr "Chiudi"
828
-
829
- #: lib/yith-gutenberg.php:134
830
- msgctxt "[gutenberg]: Category Name"
831
- msgid "YITH"
832
- msgstr "YITH"
833
-
834
- #: templates/fields/dimensions.php:16
835
  msgctxt "Position in the \"Dimensions\" field"
836
  msgid "Top"
837
  msgstr "In alto"
838
 
839
- #: templates/fields/dimensions.php:17
840
  msgctxt "Position in the \"Dimensions\" field"
841
  msgid "Right"
842
  msgstr "A destra"
843
 
844
- #: templates/fields/dimensions.php:18
845
  msgctxt "Position in the \"Dimensions\" field"
846
  msgid "Bottom"
847
  msgstr "In basso"
848
 
849
- #: templates/fields/dimensions.php:19
850
  msgctxt "Position in the \"Dimensions\" field"
851
  msgid "Left"
852
  msgstr "A sinistra"
853
 
854
- #: templates/fields/dimensions.php:99
855
  msgctxt "Tooltip in the \"Dimensions\" field"
856
  msgid "Link values together"
857
  msgstr "Collega i valori"
858
 
859
- #: templates/fields/onoff.php:24
860
  msgctxt "YES/NO button: use MAX 3 characters!"
861
  msgid "YES"
862
  msgstr "SÌ"
863
 
864
- #: templates/fields/onoff.php:25
865
  msgctxt "YES/NO button: use MAX 3 characters!"
866
  msgid "NO"
867
  msgstr "NO"
868
 
869
- #: yit-plugin.php:83
870
  msgctxt "Plugin Row Meta"
871
  msgid "Live Demo"
872
  msgstr "Live Demo"
873
 
874
- #: yit-plugin.php:88
875
  msgctxt "Plugin Row Meta"
876
  msgid "Documentation"
877
  msgstr "Documentazione"
878
 
879
- #: yit-plugin.php:93
880
  msgctxt "Plugin Row Meta"
881
  msgid "Support"
882
  msgstr "Assistenza"
883
 
884
- #: yit-plugin.php:98
885
  msgctxt "Plugin Row Meta"
886
  msgid "Premium version"
887
  msgstr "Versione premium"
888
 
889
- #: yit-plugin.php:190
890
  msgctxt "Action links"
891
  msgid "Settings"
892
  msgstr "Impostazioni"
@@ -899,3 +940,15 @@ msgstr "Impostazioni"
899
 
900
  #~ msgid "Back to System panel"
901
  #~ msgstr "Torna al pannello di Sistema"
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-12-28 12:30:11+00:00\n"
8
  "PO-Revision-Date: 2020-09-24 14:56:37+0000\n"
9
  "Language: it\n"
10
  "MIME-Version: 1.0\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
+ #: includes/class-yit-assets.php:117
17
  msgid "Clear"
18
  msgstr "Rimuovi"
19
 
20
+ #: includes/class-yit-assets.php:118
21
  msgid "Clear color"
22
  msgstr "Rimuovi colore"
23
 
24
+ #: includes/class-yit-assets.php:119
25
  msgid "Default"
26
  msgstr "Predefinito"
27
 
28
+ #: includes/class-yit-assets.php:120
29
  msgid "Select default color"
30
  msgstr "Seleziona il colore predefinito"
31
 
32
+ #: includes/class-yit-assets.php:121
33
  msgid "Select Color"
34
  msgstr "Seleziona il colore"
35
 
36
+ #: includes/class-yit-assets.php:122
37
  msgid "Color value"
38
  msgstr "Valore del colore"
39
 
40
+ #. translators: %s is the singular name of the post type.
41
+ #. translators: $s is the singular name of the post type.
42
+ #. translators: %s is the singular name of the post type.
43
+ #. translators: %s is the plural name of the post type.
44
+ #: includes/class-yit-cpt-unlimited.php:486
45
+ #: includes/class-yit-cpt-unlimited.php:619
46
+ #: includes/class-yit-cpt-unlimited.php:768
47
+ #: includes/class-yit-cpt-unlimited.php:1755
48
  msgid "Add %s"
49
  msgstr "Aggiungi %s"
50
 
51
+ #. translators: %s is the singular name of the post type.
52
+ #. translators: $s is the singular name of the post type.
53
+ #: includes/class-yit-cpt-unlimited.php:488
54
+ #: includes/class-yit-cpt-unlimited.php:621
55
  msgid "Add New %s"
56
  msgstr "Aggiungi nuovo %s"
57
 
58
+ #. translators: %s is the singular name of the post type.
59
+ #. translators: $s is the singular name of the post type.
60
+ #. translators: %s is the post title.
61
+ #. translators: %s is the singular name of the post type.
62
+ #: includes/class-yit-cpt-unlimited.php:490
63
+ #: includes/class-yit-cpt-unlimited.php:623
64
+ #: includes/class-yit-cpt-unlimited.php:1350
65
+ #: includes/class-yit-cpt-unlimited.php:1401
66
  msgid "Edit %s"
67
  msgstr "Modifica %s"
68
 
69
+ #. translators: %s is the singular name of the post type.
70
+ #. translators: $s is the singular name of the post type.
71
+ #: includes/class-yit-cpt-unlimited.php:492
72
+ #: includes/class-yit-cpt-unlimited.php:625
73
  msgid "New %s"
74
  msgstr "Nuovo %s"
75
 
76
+ #. translators: %s is the plural name of the post type.
77
+ #. translators: $s is the plural name of the post type.
78
+ #: includes/class-yit-cpt-unlimited.php:494
79
+ #: includes/class-yit-cpt-unlimited.php:627
80
  msgid "All %s"
81
  msgstr "Tutti %s"
82
 
83
+ #. translators: %s is the singular name of the post type.
84
+ #. translators: $s is the singular name of the post type.
85
+ #. translators: %s is the plural label of the post type.
86
+ #. translators: %s is the plural name of the post type.
87
+ #: includes/class-yit-cpt-unlimited.php:496
88
+ #: includes/class-yit-cpt-unlimited.php:629
89
+ #: includes/class-yit-cpt-unlimited.php:1323
90
+ #: includes/class-yit-cpt-unlimited.php:1406
91
  msgid "View %s"
92
  msgstr "Visualizza %s"
93
 
94
+ #. translators: %s is the plural name of the post type.
95
+ #. translators: $s is the plural name of the post type.
96
+ #: includes/class-yit-cpt-unlimited.php:498
97
+ #: includes/class-yit-cpt-unlimited.php:631
98
  msgid "Search %s"
99
  msgstr "Cerca %s"
100
 
101
+ #. translators: %s is the plural name of the post type.
102
+ #. translators: $s is the plural name of the post type.
103
+ #: includes/class-yit-cpt-unlimited.php:500
104
+ #: includes/class-yit-cpt-unlimited.php:633
105
  msgid "No %s found"
106
  msgstr "Nessun %s trovato"
107
 
108
+ #. translators: %s is the plural name of the post type.
109
+ #. translators: $s is the plural name of the post type.
110
+ #: includes/class-yit-cpt-unlimited.php:502
111
+ #: includes/class-yit-cpt-unlimited.php:635
112
  msgid "No %s found in Trash"
113
  msgstr "Nessun %s trovato nel cestino"
114
 
115
+ #: includes/class-yit-cpt-unlimited.php:678 templates/fields/ajax-terms.php:41
116
  msgid "Search Categories"
117
  msgstr "Cerca categorie"
118
 
119
+ #: includes/class-yit-cpt-unlimited.php:679
120
  msgid "All Categories"
121
  msgstr "Tutte le categorie"
122
 
123
+ #: includes/class-yit-cpt-unlimited.php:680
124
  msgid "Parent Category"
125
  msgstr "Categoria genitore"
126
 
127
+ #: includes/class-yit-cpt-unlimited.php:681
128
  msgid "Parent Category:"
129
  msgstr "Categoria genitore:"
130
 
131
+ #: includes/class-yit-cpt-unlimited.php:682
132
  msgid "Edit Category"
133
  msgstr "Modifica categoria"
134
 
135
+ #: includes/class-yit-cpt-unlimited.php:683
136
  msgid "Update Category"
137
  msgstr "Aggiorna categoria"
138
 
139
+ #: includes/class-yit-cpt-unlimited.php:684
140
  msgid "Add New Category"
141
  msgstr "Aggiungi nuova categoria"
142
 
143
+ #: includes/class-yit-cpt-unlimited.php:685
144
  msgid "New Category Name"
145
  msgstr "Nuovo nome categoria"
146
 
147
+ #: includes/class-yit-cpt-unlimited.php:686
148
  msgid "Category"
149
  msgstr "Categoria"
150
 
151
+ #: includes/class-yit-cpt-unlimited.php:778
152
  msgid "Categories"
153
  msgstr "Categorie"
154
 
155
+ #. translators: %s is the singular name of the post type.
156
+ #: includes/class-yit-cpt-unlimited.php:1098
157
  msgid "%s Settings"
158
  msgstr "Impostazioni %s"
159
 
160
+ #: includes/class-yit-cpt-unlimited.php:1106
161
+ #: includes/class-yit-cpt-unlimited.php:1260
162
+ #: includes/class-yit-cpt-unlimited.php:1266
163
+ #: includes/class-yit-plugin-panel.php:84
164
  msgid "Settings"
165
  msgstr "Impostazioni"
166
 
167
+ #: includes/class-yit-cpt-unlimited.php:1111
168
  msgid "Type"
169
  msgstr "Tipologia"
170
 
171
+ #. translators: %s is the singular name of the post type.
172
+ #: includes/class-yit-cpt-unlimited.php:1114
173
  msgid "Layout for this %s"
174
  msgstr "Layout per questo %s"
175
 
176
+ #: includes/class-yit-cpt-unlimited.php:1122
177
  msgid "Rewrite"
178
  msgstr "Riscrivi"
179
 
180
+ #: includes/class-yit-cpt-unlimited.php:1123
181
  msgid ""
182
  "Univocal identification name in the URL for each product (slug from post if "
183
  "empty)"
185
  "Nome identificativo univoco nell'URL per singolo prodotto (usa slug dal post "
186
  "se vuoto)"
187
 
188
+ #: includes/class-yit-cpt-unlimited.php:1128
189
  msgid "Label in Singular"
190
  msgstr "Etichetta singolare"
191
 
192
+ #: includes/class-yit-cpt-unlimited.php:1129
193
  msgid "Set a label in singular (title of portfolio if empty)"
194
  msgstr "Imposta un'etichetta singolare (titolo del portfolio se vuoto)"
195
 
196
+ #: includes/class-yit-cpt-unlimited.php:1134
197
  msgid "Label in Plural"
198
  msgstr "Etichetta plurale"
199
 
200
+ #: includes/class-yit-cpt-unlimited.php:1135
201
  msgid "Set a label in plural (title of portfolio if empty)"
202
  msgstr "Imposta un'etichetta plurale (titolo del portfolio se vuoto)"
203
 
204
+ #: includes/class-yit-cpt-unlimited.php:1140
205
  msgid "Taxonomy"
206
  msgstr "Tassonomia"
207
 
208
+ #: includes/class-yit-cpt-unlimited.php:1141
209
  msgid ""
210
  "If you want to use categories in the portfolio, set a name for taxonomy. "
211
  "Name should be a slug (must not contain capital letters nor spaces) and must "
216
  "caratteri maiuscoli né spazi) e non più lungo di 32 caratteri (restrizione "
217
  "di database)."
218
 
219
+ #: includes/class-yit-cpt-unlimited.php:1146
220
  msgid "Taxonomy Rewrite"
221
  msgstr "Riscrivi tassonomia"
222
 
223
+ #: includes/class-yit-cpt-unlimited.php:1147
224
  msgid "Set univocal name for each category page URL."
225
  msgstr "Imposta un nome univoco per l'URL della pagina di ciascuna categoria."
226
 
227
+ #: includes/class-yit-cpt-unlimited.php:1152
228
  msgid "Single layout"
229
  msgstr "Layout singolo"
230
 
231
+ #: includes/class-yit-cpt-unlimited.php:1153
232
  msgid "Layout for single page of this portfolio"
233
  msgstr "Layout per pagina singola per questo portfolio"
234
 
235
+ #: includes/class-yit-cpt-unlimited.php:1196
236
  msgid "layout settings"
237
  msgstr "impostazioni di layout"
238
 
239
+ #: includes/class-yit-cpt-unlimited.php:1286
240
+ #: includes/class-yit-cpt-unlimited.php:1297
241
  msgid "Quick links"
242
  msgstr "Link rapidi"
243
 
244
+ #. translators: %s is the name of the post type.
245
+ #: includes/class-yit-cpt-unlimited.php:1593
246
  msgid "Show frontend of the %s"
247
  msgstr "Mostra front end di %s"
248
 
249
+ #: includes/class-yit-cpt-unlimited.php:1602 templates/fields/customtabs.php:34
250
+ #: templates/fields/customtabs.php:76
251
  msgid "Name"
252
  msgstr "Nome"
253
 
254
+ #. translators: %s is the plural name of the post type.
255
+ #: includes/class-yit-cpt-unlimited.php:1749
256
  msgid "Add %s from images"
257
  msgstr "Aggiungi %s dalla immagini"
258
 
259
+ #: includes/class-yit-cpt-unlimited.php:1769
260
  msgid "Upload multiple files"
261
  msgstr "Carica file multipli"
262
 
263
+ #: includes/class-yit-plugin-panel-woocommerce.php:419
264
  msgid "The changes you have made will be lost if you leave this page."
265
  msgstr "Perderai tutti i cambiamenti effettuati se lasci questa pagina."
266
 
267
+ #: includes/class-yit-plugin-panel.php:83
268
  msgid "Plugin Settings"
269
  msgstr "Impostazioni plugin"
270
 
271
+ #: includes/class-yit-plugin-panel.php:450
272
+ #: includes/class-yit-plugin-panel.php:453
273
  msgid "How to install premium version"
274
  msgstr "Come installare la versione premium"
275
 
276
+ #: includes/class-yit-plugin-panel.php:619
277
+ #: includes/class-yit-plugin-subpanel.php:132
278
+ #: templates/panel/woocommerce/woocommerce-form.php:28
279
  msgid "Save Changes"
280
  msgstr "Salva modifiche"
281
 
282
+ #: includes/class-yit-plugin-panel.php:624
283
+ #: includes/class-yit-plugin-subpanel.php:136
284
+ #: templates/panel/woocommerce/woocommerce-form.php:14
285
  msgid ""
286
  "If you continue with this action, you will reset all options in this page."
287
  msgstr ""
288
  "Se prosegui con questa azione, tutte le opzioni di questa pagina saranno "
289
  "reimpostate."
290
 
291
+ #: includes/class-yit-plugin-panel.php:624
292
+ #: includes/class-yit-plugin-subpanel.php:136
293
+ #: templates/panel/woocommerce/woocommerce-form.php:14
 
 
 
294
  msgid "Are you sure?"
295
  msgstr "Sei sicuro?"
296
 
297
+ #: includes/class-yit-plugin-panel.php:628
298
+ #: includes/class-yit-plugin-subpanel.php:139
299
+ msgid "Reset to default"
300
+ msgstr "Ripristina configurazione predefinita"
301
+
302
+ #: includes/class-yit-plugin-panel.php:865
303
  msgid ""
304
  "The element you have entered already exists. Please, enter another name."
305
  msgstr "L'elemento inserito esiste già. Per favore, inserisci un altro nome."
306
 
307
+ #: includes/class-yit-plugin-panel.php:866
308
  msgid "Settings saved"
309
  msgstr "Impostazioni salvate"
310
 
311
+ #: includes/class-yit-plugin-panel.php:867
312
  msgid "Settings reset"
313
  msgstr "Impostazioni azzerate"
314
 
315
+ #: includes/class-yit-plugin-panel.php:868
316
  msgid "Element deleted correctly."
317
  msgstr "Elemento rimosso correttamente."
318
 
319
+ #: includes/class-yit-plugin-panel.php:869
320
+ #: includes/class-yit-plugin-panel.php:870
321
  msgid "Element updated correctly."
322
  msgstr "Elemento aggiornato correttamente."
323
 
324
+ #: includes/class-yit-plugin-panel.php:871
325
  msgid "Database imported correctly."
326
  msgstr "Database importato correttamente."
327
 
328
+ #: includes/class-yit-plugin-panel.php:872
329
  msgid "An error has occurred during import. Please try again."
330
  msgstr "Si è verificato un errore durante l'importazione. Prova di nuovo."
331
 
332
+ #: includes/class-yit-plugin-panel.php:873
333
  msgid "The added file is not valid."
334
  msgstr "Il file aggiunto non è valido."
335
 
336
+ #: includes/class-yit-plugin-panel.php:874
337
  msgid "Sorry, import is disabled."
338
  msgstr "Ci dispiace, l'importazione è disabilitata."
339
 
340
+ #: includes/class-yit-plugin-panel.php:875
341
  msgid "Sorting successful."
342
  msgstr "Ordinamento effettuato con successo."
343
 
344
+ #: includes/class-yit-plugin-panel.php:1343
345
  msgid "We need your support"
346
  msgstr "Abbiamo bisogno del tuo sostegno"
347
 
348
+ #: includes/class-yit-plugin-panel.php:1344
349
  msgid "to keep updating and improving the plugin. Please,"
350
  msgstr "per poter continuare ad aggiornare e migliorare il plugin."
351
 
352
+ #: includes/class-yit-plugin-panel.php:1346
353
  msgid "help us by leaving a five-star rating"
354
  msgstr "Puoi darci una mano lasciando una recensione a 5 stelle"
355
 
356
+ #: includes/class-yit-plugin-panel.php:1347
357
  msgid ":) Thanks!"
358
  msgstr ":) Grazie!"
359
 
360
+ #: includes/class-yit-pointers.php:80
361
  msgid "Plugins Activated"
362
  msgstr "Plugin attivati"
363
 
364
+ #: includes/class-yit-pointers.php:81
365
+ #, fuzzy
366
  msgid ""
367
+ "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
368
+ "customization settings will be available as a new entry in YITH Plugins menu."
 
369
  msgstr ""
370
  "Da ora in poi, puoi trovare tutte le opzioni dei tuoi plugin nel menu YITH "
371
  "Plugins.\n"
372
  "Troverai le impostazioni di personalizzazione sotto una nuova voce nel menu "
373
  "YITH Plugins."
374
 
375
+ #. translators: 1. YITH site link; 2. WordPress site link.
376
+ #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
377
+ #, fuzzy
378
+ msgid "Discover all our plugins available on: %1$s and %2$s"
379
  msgstr "Scopri tutti i plugin disponibili su:"
380
 
381
+ #: includes/class-yit-pointers.php:96
 
 
 
 
382
  msgid "Plugins Upgraded"
383
  msgstr "Plugin aggiornati"
384
 
385
+ #: includes/class-yit-pointers.php:97
386
+ #, fuzzy
387
  msgid ""
388
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
389
+ "menu. Every time one of our plugins is added, a new entry will be added to "
390
+ "this menu. For example, after the update, plugin options (such as for YITH "
391
+ "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
392
+ "previous location to YITH Plugins tab."
 
 
 
 
393
  msgstr ""
394
  "Da ora in poi, troverai tutte le opzioni dei tuoi plugin nel menu YITH "
395
  "Plugins.\n"
399
  "quelle di YITH WooCommerce Wishlist, YITH WooCommerce Ajax Search etc.)\n"
400
  "saranno trasferite nella scheda YITH Plugins."
401
 
402
+ #: includes/class-yith-dashboard.php:35
403
  msgid "YITH Latest Updates"
404
  msgstr "Ultimi aggiornamenti da YITH"
405
 
406
+ #: includes/class-yith-dashboard.php:36
407
  msgid "Latest news from YITH Blog"
408
  msgstr "Ultime novità dal blog YITH"
409
 
410
+ #: includes/class-yith-dashboard.php:56
411
  msgid "RSS Error:"
412
  msgstr "Errore RSS:"
413
 
414
+ #: includes/class-yith-dashboard.php:63
415
  msgid ""
416
  "An error has occurred, which probably means the feed is down. Try again "
417
  "later."
419
  "Si è verificato un errore probabilmente causato dal feed non disponibile. "
420
  "Riprova più tardi."
421
 
422
+ #: includes/class-yith-system-status.php:110
423
  msgid "WordPress Version"
424
  msgstr "Versione di WordPress"
425
 
426
+ #: includes/class-yith-system-status.php:111
427
  msgid "WooCommerce Version"
428
  msgstr "Versione di WooCommerce"
429
 
430
+ #: includes/class-yith-system-status.php:112
431
  msgid "Available Memory"
432
  msgstr "Memoria disponibile"
433
 
434
+ #: includes/class-yith-system-status.php:113
435
  msgid "PHP Version"
436
  msgstr "Versione PHP"
437
 
438
+ #: includes/class-yith-system-status.php:114
439
  msgid "TLS Version"
440
  msgstr "Versione TLS"
441
 
442
+ #: includes/class-yith-system-status.php:115
443
  msgid "WordPress Cron"
444
  msgstr "Cron WordPress"
445
 
446
+ #: includes/class-yith-system-status.php:116
447
  msgid "SimpleXML"
448
  msgstr "SimpleXML"
449
 
450
+ #: includes/class-yith-system-status.php:117
451
  msgid "MultiByte String"
452
  msgstr "MultiByte String"
453
 
454
+ #: includes/class-yith-system-status.php:118
455
  msgid "ImageMagick Version"
456
  msgstr "Versione di ImageMagick"
457
 
458
+ #: includes/class-yith-system-status.php:119
459
  msgid "GD Library"
460
  msgstr "GD Library"
461
 
462
+ #: includes/class-yith-system-status.php:120
463
  msgid "Iconv Module"
464
  msgstr "Iconv Module"
465
 
466
+ #: includes/class-yith-system-status.php:121
467
  msgid "OPCache Save Comments"
468
  msgstr "OPCache Save Comments"
469
 
470
+ #: includes/class-yith-system-status.php:122
471
  msgid "URL FOpen"
472
  msgstr "URL FOpen"
473
 
474
+ #: includes/class-yith-system-status.php:140
475
+ #: includes/class-yith-system-status.php:141
476
+ #: templates/sysinfo/system-information-panel.php:11
477
  msgid "System Status"
478
  msgstr "Stato del sistema"
479
 
480
+ #: includes/class-yith-system-status.php:183
481
  msgid "YITH Plugins"
482
  msgstr "Plugin YITH"
483
 
484
+ #: includes/class-yith-system-status.php:191
485
  msgid "WooCommerce"
486
  msgstr "WooCommerce"
487
 
488
+ #: includes/class-yith-system-status.php:342
489
  msgid "Warning!"
490
  msgstr "Attenzione!"
491
 
492
  #. translators: %1$s open link tag, %2$s open link tag
493
+ #: includes/class-yith-system-status.php:346
494
  msgid ""
495
  "The system check has detected some compatibility issues on your installation."
496
  "%1$sClick here%2$s to know more"
498
  "Il controllo di sistema ha individuato delle incompatibilità con la tua "
499
  "installazione. %1$sVedi qui%2$s per maggiori dettagli"
500
 
501
+ #: includes/class-yith-system-status.php:488
502
  msgid "Enabled"
503
  msgstr "Abilitato"
504
 
505
+ #: includes/class-yith-system-status.php:488
506
  msgid "Disabled"
507
  msgstr "Disabilitato"
508
 
509
+ #: includes/class-yith-system-status.php:493
510
  msgid "N/A"
511
  msgstr "N.D."
512
 
513
  #. translators: %1$s plugin name, %2$s requirement name
514
+ #: includes/class-yith-system-status.php:520
515
  msgid "%1$s needs %2$s enabled"
516
  msgstr "%1$s necessita dell'attivazione di %2$s"
517
 
518
  #. translators: %1$s plugin name, %2$s required memory amount
519
+ #: includes/class-yith-system-status.php:523
520
  msgid "%1$s needs at least %2$s of available memory"
521
  msgstr "%1$s necessita di almeno %2$s di memoria disponibile"
522
 
523
  #. translators: %1$s plugin name, %2$s version number
524
+ #: includes/class-yith-system-status.php:526
525
  msgid "%1$s needs at least %2$s version"
526
  msgstr "%1$s necessita almeno della versione %2$s"
527
 
528
+ #: includes/class-yith-system-status.php:550
529
  msgid ""
530
  "Update it to the latest version in order to benefit of all new features and "
531
  "security updates."
533
  "Aggiorna all'ultima versione per beneficiare di tutte le nuove funzionalità "
534
  "e degli aggiornamenti di sicurezza."
535
 
536
+ #: includes/class-yith-system-status.php:554
537
+ #: includes/class-yith-system-status.php:560
538
  msgid "Contact your hosting company in order to update it."
539
  msgstr "Contatta il tuo servizio hosting per aggiornarlo."
540
 
541
+ #: includes/class-yith-system-status.php:558
542
  msgid "Contact your hosting company in order to install it."
543
  msgstr "Per installarlo contatta il tuo servizio di hosting."
544
 
545
  #. translators: %1$s code, %2$s file name
546
+ #: includes/class-yith-system-status.php:565
547
  msgid "Remove %1$s from %2$s file"
548
  msgstr "Rimuovi %1$s dal file %2$s"
549
 
550
+ #: includes/class-yith-system-status.php:573
551
  msgid "Contact your hosting company in order to enable it."
552
  msgstr "Per attivarlo contatta il tuo servizio di hosting."
553
 
554
  #. translators: %1$s opening link tag, %2$s closing link tag
555
+ #: includes/class-yith-system-status.php:577
556
+ #: includes/class-yith-system-status.php:600
557
  msgid ""
558
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
559
  "it."
562
  "per un upgrade."
563
 
564
  #. translators: %s recommended memory amount
565
+ #: includes/class-yith-system-status.php:597
566
  msgid ""
567
  "For optimal functioning of our plugins, we suggest setting at least %s of "
568
  "available memory"
571
  "almeno %s della memoria disponibile"
572
 
573
  #. translators: %1$s TLS label, %2$s cURL label
574
+ #: includes/class-yith-system-status.php:605
575
  msgid ""
576
  "The system check cannot determine which %1$s version is installed because "
577
  "%2$s module is disabled. Ask your hosting company to enable it."
581
  "attivarlo."
582
 
583
  #. translators: %1$s TLS label
584
+ #: includes/class-yith-system-status.php:608
585
  msgid ""
586
  "The system check cannot determine which %1$s version is installed due to a "
587
  "connection issue between your site and our server."
589
  "Non ci è stato possibile determinare quale versione di %1$s è installata a "
590
  "causa di un problema di connessione fra il tuo sito e il nostro server."
591
 
592
+ #: templates/fields/ajax-customers.php:41
593
  msgid "Search Customers"
594
  msgstr "Cerca fra i clienti"
595
 
596
+ #. translators: 1. user display name; 2. user ID; 3. user email.
597
+ #: templates/fields/ajax-customers.php:68
598
+ #: templates/fields/ajax-customers.php:79
599
  msgid "%1$s (#%2$s &ndash; %3$s)"
600
  msgstr "%1$s (#%2$s &ndash; %3$s)"
601
 
602
+ #: templates/fields/ajax-posts.php:41
603
  msgid "Search Posts"
604
  msgstr "Cerca articoli"
605
 
606
+ #: templates/fields/ajax-products.php:14
607
  msgid "Search Product"
608
  msgstr "Cerca un prodotto"
609
 
610
+ #: templates/fields/customtabs.php:17
611
  msgid "Close all"
612
  msgstr "Chiudi tutti"
613
 
614
+ #: templates/fields/customtabs.php:17
615
  msgid "Expand all"
616
  msgstr "Espandi tutti"
617
 
618
+ #: templates/fields/customtabs.php:25 templates/fields/customtabs.php:68
619
  msgid "Remove"
620
  msgstr "Rimuovi"
621
 
622
+ #: templates/fields/customtabs.php:40 templates/fields/customtabs.php:81
623
  msgid "Value"
624
  msgstr "Valore"
625
 
626
+ #: templates/fields/customtabs.php:41 templates/fields/customtabs.php:82
627
  msgid "Content of the tab. (HTML is supported)"
628
  msgstr "Contenuto della scheda (codice HTML supportato)."
629
 
630
+ #: templates/fields/customtabs.php:52
631
  msgid "Add custom product tab"
632
  msgstr "Aggiungi scheda prodotto personalizzata"
633
 
634
+ #: templates/fields/customtabs.php:93
635
  msgid "Do you want to remove the custom tab?"
636
  msgstr "Vuoi rimuovere la scheda personalizzata?"
637
 
638
+ #: templates/fields/date-format.php:65
639
  msgid "Custom:"
640
  msgstr "Personalizzato:"
641
 
642
+ #: templates/fields/date-format.php:70
643
+ msgid "Preview:"
644
+ msgstr ""
645
+
646
+ #: templates/fields/icons.php:63
647
  msgid "Set Default"
648
  msgstr "Ripristina impostazioni iniziali"
649
 
650
+ #: templates/fields/image-gallery.php:29 templates/fields/image-gallery.php:40
651
  msgid "Delete image"
652
  msgstr "Rimuovi immagine"
653
 
654
+ #: templates/fields/image-gallery.php:37
655
  msgid "Add Images to Gallery"
656
  msgstr "Aggiungi immagini alla galleria"
657
 
658
+ #: templates/fields/image-gallery.php:38
659
  msgid "Add to gallery"
660
  msgstr "Aggiungi alla galleria"
661
 
663
  msgid "Add images"
664
  msgstr "Aggiungi immagini"
665
 
666
+ #: templates/fields/image-gallery.php:41
667
  msgid "Delete"
668
  msgstr "Rimuovi"
669
 
670
+ #: templates/fields/select-buttons.php:19
671
  msgid "Add All"
672
  msgstr "Aggiungi tutti"
673
 
674
+ #: templates/fields/select-buttons.php:32
675
  msgid "Remove All"
676
  msgstr "Rimuovi tutti"
677
 
678
+ #: templates/fields/sidebars.php:20
679
  msgid "Left sidebar"
680
  msgstr "Barra laterale sinistra"
681
 
682
+ #: templates/fields/sidebars.php:23
683
  msgid "Right sidebar"
684
  msgstr "Barra laterale destra"
685
 
686
+ #: templates/fields/sidebars.php:26 templates/fields/sidebars.php:29
687
  msgid "No sidebar"
688
  msgstr "Nessuna barra laterale"
689
 
691
  msgid "Left Sidebar"
692
  msgstr "Barra laterale sinistra"
693
 
694
+ #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:56
695
  msgid "Choose a sidebar"
696
  msgstr "Scegli una barra laterale"
697
 
698
+ #: templates/fields/sidebars.php:54
699
  msgid "Right Sidebar"
700
  msgstr "Barra laterale destra"
701
 
702
+ #: templates/fields/upload.php:34
703
+ #: templates/panel/woocommerce/woocommerce-upload.php:37
704
  msgid "Upload"
705
  msgstr "Carica"
706
 
707
+ #: templates/fields/upload.php:39
708
  msgid "Reset"
709
  msgstr "Ripristina"
710
 
711
+ #: templates/panel/woocommerce/woocommerce-form.php:34
 
 
 
 
 
 
 
 
 
 
 
 
712
  msgid "Reset Defaults"
713
  msgstr "Ripristina impostazioni iniziali"
714
 
715
+ #: templates/sysinfo/system-information-panel.php:12
716
  msgid "PHPInfo"
717
  msgstr ""
718
 
719
+ #: templates/sysinfo/system-information-panel.php:13
720
+ #: templates/sysinfo/tabs/error-log.php:25
721
  #, fuzzy
722
  msgid "Log Files"
723
  msgstr "Mostra i log"
724
 
725
+ #: templates/sysinfo/system-information-panel.php:22
726
  msgid "YITH System Information"
727
  msgstr "YITH System Information"
728
 
729
+ #: templates/sysinfo/tabs/error-log.php:13
730
  msgid "WP debug.log file"
731
  msgstr "WP debug.log file"
732
 
733
+ #: templates/sysinfo/tabs/error-log.php:18
734
  msgid "PHP error_log file"
735
  msgstr "PHP error_log file"
736
 
737
+ #: templates/sysinfo/tabs/error-log.php:60
738
  msgid "Download"
739
  msgstr ""
740
 
741
+ #: templates/sysinfo/tabs/error-log.php:72
742
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
743
  msgstr ""
744
 
745
+ #. translators: %s file name.
746
+ #: templates/sysinfo/tabs/error-log.php:96
747
  msgid ""
748
  "No Log file available. Enable the WordPress debug by adding this in the %s "
749
  "file of your installation"
750
  msgstr ""
751
 
752
+ #: templates/sysinfo/tabs/error-log.php:105
753
  msgid "Copied!"
754
  msgstr ""
755
 
756
+ #: templates/sysinfo/tabs/error-log.php:105
757
  msgid "Copy Code"
758
  msgstr ""
759
 
760
+ #: templates/sysinfo/tabs/main.php:15
761
  msgid "Site Info"
762
  msgstr ""
763
 
764
+ #: templates/sysinfo/tabs/main.php:20
765
  msgid "Site URL"
766
  msgstr "URL del sito"
767
 
768
+ #: templates/sysinfo/tabs/main.php:29
769
  msgid "Output IP Address"
770
  msgstr "Indirizzo IP di output"
771
 
772
+ #: templates/sysinfo/tabs/main.php:37
773
  msgid "Defined WP_CACHE"
774
  msgstr "Defined WP_CACHE"
775
 
776
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
777
  msgid "Yes"
778
  msgstr "Sì"
779
 
780
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
781
  msgid "No"
782
  msgstr "No"
783
 
784
+ #: templates/sysinfo/tabs/main.php:45
785
  msgid "External object cache"
786
  msgstr ""
787
 
788
+ #: templates/sysinfo/tabs/main.php:54
789
  #, fuzzy
790
  msgid "Plugins Requirements"
791
  msgstr "Impostazioni plugin"
792
 
793
+ #: yit-plugin.php:187
794
  msgid "License"
795
  msgstr "Chiave di licenza"
796
 
798
  msgid "YITH"
799
  msgstr "YITH"
800
 
801
+ #. translators: %s is the singular name of the post type.
802
+ #: includes/class-yit-cpt-unlimited.php:676
803
+ msgctxt "taxonomy general name"
804
+ msgid "%s Categories"
805
+ msgstr "%s Categorie"
806
+
807
+ #: includes/class-yit-cpt-unlimited.php:677
808
+ msgctxt "taxonomy singular name"
809
+ msgid "Category"
810
+ msgstr "Categoria"
811
+
812
+ #: includes/class-yith-dashboard.php:96
813
+ msgctxt "Plugin FW"
814
+ msgid "View Changelog"
815
+ msgstr "Visualizza il changelog"
816
+
817
+ #: includes/class-yith-dashboard.php:97
818
+ msgctxt "Plugin FW"
819
+ msgid "Latest update released on"
820
+ msgstr "Ultimo aggiornamento rilasciato il"
821
+
822
+ #: includes/class-yith-dashboard.php:137
823
+ msgctxt "Button label"
824
+ msgid "Close"
825
+ msgstr "Chiudi"
826
+
827
+ #: includes/class-yith-gutenberg.php:131
828
+ msgctxt "[gutenberg]: Category Name"
829
+ msgid "YITH"
830
+ msgstr "YITH"
831
+
832
+ #: includes/privacy/class-yith-privacy.php:61
833
  msgctxt "Privacy Policy Guide Title"
834
  msgid "YITH Plugins"
835
  msgstr "YITH Plugins"
836
 
837
+ #: includes/privacy/class-yith-privacy.php:93
838
  msgctxt "Privacy Policy Content"
839
  msgid ""
840
  "This sample language includes the basics around what personal data your "
852
  "momento di decidere quali informazioni divulgare nell'informativa sulla "
853
  "privacy."
854
 
855
+ #: includes/privacy/class-yith-privacy.php:97
856
  msgctxt "Privacy Policy Content"
857
  msgid "What we collect and store"
858
  msgstr "Cosa raccogliamo e salviamo"
859
 
860
+ #: includes/privacy/class-yith-privacy.php:100
861
  msgctxt "Privacy Policy Content"
862
  msgid "Who on our team has access"
863
  msgstr "Persone del nostro gruppo di lavoro che hanno accesso"
864
 
865
+ #: includes/privacy/class-yith-privacy.php:103
866
  msgctxt "Privacy Policy Content"
867
  msgid "What we share with others"
868
  msgstr "Cosa condividiamo con gli altri"
869
 
870
+ #: includes/privacy/class-yith-privacy.php:106
871
  msgctxt "Privacy Policy Content"
872
  msgid "Payments"
873
  msgstr "Pagamenti"
874
 
875
+ #: templates/fields/dimensions.php:13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
876
  msgctxt "Position in the \"Dimensions\" field"
877
  msgid "Top"
878
  msgstr "In alto"
879
 
880
+ #: templates/fields/dimensions.php:14
881
  msgctxt "Position in the \"Dimensions\" field"
882
  msgid "Right"
883
  msgstr "A destra"
884
 
885
+ #: templates/fields/dimensions.php:15
886
  msgctxt "Position in the \"Dimensions\" field"
887
  msgid "Bottom"
888
  msgstr "In basso"
889
 
890
+ #: templates/fields/dimensions.php:16
891
  msgctxt "Position in the \"Dimensions\" field"
892
  msgid "Left"
893
  msgstr "A sinistra"
894
 
895
+ #: templates/fields/dimensions.php:88
896
  msgctxt "Tooltip in the \"Dimensions\" field"
897
  msgid "Link values together"
898
  msgstr "Collega i valori"
899
 
900
+ #: templates/fields/onoff.php:28
901
  msgctxt "YES/NO button: use MAX 3 characters!"
902
  msgid "YES"
903
  msgstr "SÌ"
904
 
905
+ #: templates/fields/onoff.php:29
906
  msgctxt "YES/NO button: use MAX 3 characters!"
907
  msgid "NO"
908
  msgstr "NO"
909
 
910
+ #: yit-plugin.php:75
911
  msgctxt "Plugin Row Meta"
912
  msgid "Live Demo"
913
  msgstr "Live Demo"
914
 
915
+ #: yit-plugin.php:79
916
  msgctxt "Plugin Row Meta"
917
  msgid "Documentation"
918
  msgstr "Documentazione"
919
 
920
+ #: yit-plugin.php:83
921
  msgctxt "Plugin Row Meta"
922
  msgid "Support"
923
  msgstr "Assistenza"
924
 
925
+ #: yit-plugin.php:87
926
  msgctxt "Plugin Row Meta"
927
  msgid "Premium version"
928
  msgstr "Versione premium"
929
 
930
+ #: yit-plugin.php:183
931
  msgctxt "Action links"
932
  msgid "Settings"
933
  msgstr "Impostazioni"
940
 
941
  #~ msgid "Back to System panel"
942
  #~ msgstr "Torna al pannello di Sistema"
943
+
944
+ #~ msgid "(Default: <i %s></i> )"
945
+ #~ msgstr "(Default: <i %s></i> )"
946
+
947
+ #~ msgid "(Default: %s <img src=\"%s\"/>)"
948
+ #~ msgstr "(Default: %s <img src=\"%s\"/>)"
949
+
950
+ #~ msgid "Image preview"
951
+ #~ msgstr "Anteprima immagine"
952
+
953
+ #~ msgid "and"
954
+ #~ msgstr "e"
plugin-fw/languages/yith-plugin-fw-nl_NL.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-nl_NL.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-11-23 14:47:23+00:00\n"
8
  "PO-Revision-Date: 2020-09-24 14:36:33+0000\n"
9
  "Language: nl\n"
10
  "MIME-Version: 1.0\n"
@@ -13,131 +13,171 @@ msgstr ""
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
- #: lib/yit-assets.php:103
17
  msgid "Clear"
18
  msgstr "Wissen"
19
 
20
- #: lib/yit-assets.php:104
21
  msgid "Clear color"
22
  msgstr "Kleur wissen"
23
 
24
- #: lib/yit-assets.php:105
25
  msgid "Default"
26
  msgstr "Standaard"
27
 
28
- #: lib/yit-assets.php:106
29
  msgid "Select default color"
30
  msgstr "Standaardkleur selecteren"
31
 
32
- #: lib/yit-assets.php:107
33
  msgid "Select Color"
34
  msgstr "Kleur selecteren"
35
 
36
- #: lib/yit-assets.php:108
37
  msgid "Color value"
38
  msgstr "Kleurwaarde"
39
 
40
- #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
41
- #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
 
 
 
 
 
 
42
  msgid "Add %s"
43
  msgstr "%s toevoegen"
44
 
45
- #: lib/yit-cpt-unlimited.php:463 lib/yit-cpt-unlimited.php:577
 
 
 
46
  msgid "Add New %s"
47
  msgstr "Nieuwe %s toevoegen"
48
 
49
- #: lib/yit-cpt-unlimited.php:464 lib/yit-cpt-unlimited.php:578
50
- #: lib/yit-cpt-unlimited.php:1269 lib/yit-cpt-unlimited.php:1306
 
 
 
 
 
 
51
  msgid "Edit %s"
52
  msgstr "Bewerk %s"
53
 
54
- #: lib/yit-cpt-unlimited.php:465 lib/yit-cpt-unlimited.php:579
 
 
 
55
  msgid "New %s"
56
  msgstr "Nieuw %s"
57
 
58
- #: lib/yit-cpt-unlimited.php:466 lib/yit-cpt-unlimited.php:580
 
 
 
59
  msgid "All %s"
60
  msgstr "Alle %s"
61
 
62
- #: lib/yit-cpt-unlimited.php:467 lib/yit-cpt-unlimited.php:581
63
- #: lib/yit-cpt-unlimited.php:1253 lib/yit-cpt-unlimited.php:1307
 
 
 
 
 
 
64
  msgid "View %s"
65
  msgstr "Bekijk %s"
66
 
67
- #: lib/yit-cpt-unlimited.php:468 lib/yit-cpt-unlimited.php:582
 
 
 
68
  msgid "Search %s"
69
  msgstr "Zoeken %s"
70
 
71
- #: lib/yit-cpt-unlimited.php:469 lib/yit-cpt-unlimited.php:583
 
 
 
72
  msgid "No %s found"
73
  msgstr "Geen %s gevonden"
74
 
75
- #: lib/yit-cpt-unlimited.php:470 lib/yit-cpt-unlimited.php:584
 
 
 
76
  msgid "No %s found in Trash"
77
  msgstr "No %s gevonden in de prullenbak"
78
 
79
- #: lib/yit-cpt-unlimited.php:629 templates/fields/ajax-terms.php:56
80
  msgid "Search Categories"
81
  msgstr "Zoek categorieën"
82
 
83
- #: lib/yit-cpt-unlimited.php:630
84
  msgid "All Categories"
85
  msgstr "Alle categorieën"
86
 
87
- #: lib/yit-cpt-unlimited.php:631
88
  msgid "Parent Category"
89
  msgstr "Hoofdcategorie"
90
 
91
- #: lib/yit-cpt-unlimited.php:632
92
  msgid "Parent Category:"
93
  msgstr "Hoofdcategorie:"
94
 
95
- #: lib/yit-cpt-unlimited.php:633
96
  msgid "Edit Category"
97
  msgstr "Categorie aanpassen"
98
 
99
- #: lib/yit-cpt-unlimited.php:634
100
  msgid "Update Category"
101
  msgstr "Update categorie"
102
 
103
- #: lib/yit-cpt-unlimited.php:635
104
  msgid "Add New Category"
105
  msgstr "Categorie toevoegen"
106
 
107
- #: lib/yit-cpt-unlimited.php:636
108
  msgid "New Category Name"
109
  msgstr "Nieuwe categorie naam"
110
 
111
- #: lib/yit-cpt-unlimited.php:637
112
  msgid "Category"
113
  msgstr "Categorie"
114
 
115
- #: lib/yit-cpt-unlimited.php:726
116
  msgid "Categories"
117
  msgstr "Categorieën"
118
 
119
- #: lib/yit-cpt-unlimited.php:1044
 
120
  msgid "%s Settings"
121
  msgstr "%s instellingen"
122
 
123
- #: lib/yit-cpt-unlimited.php:1050 lib/yit-cpt-unlimited.php:1198
124
- #: lib/yit-cpt-unlimited.php:1204 lib/yit-plugin-panel.php:81
 
 
125
  msgid "Settings"
126
  msgstr "Instellingen"
127
 
128
- #: lib/yit-cpt-unlimited.php:1053
129
  msgid "Type"
130
  msgstr "Type"
131
 
132
- #: lib/yit-cpt-unlimited.php:1054
 
133
  msgid "Layout for this %s"
134
  msgstr "De lay-out hiervoor %s"
135
 
136
- #: lib/yit-cpt-unlimited.php:1060
137
  msgid "Rewrite"
138
  msgstr "Herschrijf"
139
 
140
- #: lib/yit-cpt-unlimited.php:1061
141
  msgid ""
142
  "Univocal identification name in the URL for each product (slug from post if "
143
  "empty)"
@@ -145,27 +185,27 @@ msgstr ""
145
  "Unieke identificatie naam in de URL voor ieder product (slug van post indien "
146
  "leeg)"
147
 
148
- #: lib/yit-cpt-unlimited.php:1066
149
  msgid "Label in Singular"
150
  msgstr "Label in enkelvoud"
151
 
152
- #: lib/yit-cpt-unlimited.php:1067
153
  msgid "Set a label in singular (title of portfolio if empty)"
154
  msgstr "Zet een label op enkelvoud (titel van portfolio indien leeg)"
155
 
156
- #: lib/yit-cpt-unlimited.php:1072
157
  msgid "Label in Plural"
158
  msgstr "Label in meervoud"
159
 
160
- #: lib/yit-cpt-unlimited.php:1073
161
  msgid "Set a label in plural (title of portfolio if empty)"
162
  msgstr "Zet een label op meervoud (titel van portfolio indien leeg)"
163
 
164
- #: lib/yit-cpt-unlimited.php:1078
165
  msgid "Taxonomy"
166
  msgstr "Taxonomie"
167
 
168
- #: lib/yit-cpt-unlimited.php:1079
169
  msgid ""
170
  "If you want to use categories in the portfolio, set a name for taxonomy. "
171
  "Name should be a slug (must not contain capital letters nor spaces) and must "
@@ -176,174 +216,178 @@ msgstr ""
176
  "bevatten) en mag niet meer zijn dan 32 tekens lang (database structuur "
177
  "beperking)."
178
 
179
- #: lib/yit-cpt-unlimited.php:1084
180
  msgid "Taxonomy Rewrite"
181
  msgstr "Herschrijf taxonomie"
182
 
183
- #: lib/yit-cpt-unlimited.php:1085
184
  msgid "Set univocal name for each category page URL."
185
  msgstr "Stel een unieke naam in voor elke categorie pagina URL."
186
 
187
- #: lib/yit-cpt-unlimited.php:1090
188
  msgid "Single layout"
189
  msgstr "Single lay-out"
190
 
191
- #: lib/yit-cpt-unlimited.php:1091
192
  msgid "Layout for single page of this portfolio"
193
  msgstr "Lay-out voor single pagina van dit portfolio"
194
 
195
- #: lib/yit-cpt-unlimited.php:1132
196
  msgid "layout settings"
197
  msgstr "lay-out instellingen"
198
 
199
- #: lib/yit-cpt-unlimited.php:1224 lib/yit-cpt-unlimited.php:1237
 
200
  msgid "Quick links"
201
  msgstr "Snelle links"
202
 
203
- #: lib/yit-cpt-unlimited.php:1477
 
204
  msgid "Show frontend of the %s"
205
  msgstr "Toon frontend van de %s"
206
 
207
- #: lib/yit-cpt-unlimited.php:1484 templates/fields/customtabs.php:46
208
- #: templates/fields/customtabs.php:89
209
  msgid "Name"
210
  msgstr "Name"
211
 
212
- #: lib/yit-cpt-unlimited.php:1635
 
213
  msgid "Add %s from images"
214
  msgstr "Voeg %s toe van afbeeldingen"
215
 
216
- #: lib/yit-cpt-unlimited.php:1638
217
  msgid "Upload multiple files"
218
  msgstr "Upload meerdere bestanden"
219
 
220
- #: lib/yit-plugin-panel-wc.php:427
221
  msgid "The changes you have made will be lost if you leave this page."
222
  msgstr "Als je deze pagina verlaat zullen alle wijzigingen verloren gaan."
223
 
224
- #: lib/yit-plugin-panel.php:80
225
  msgid "Plugin Settings"
226
  msgstr "Plugin instellingen"
227
 
228
- #: lib/yit-plugin-panel.php:466 lib/yit-plugin-panel.php:469
 
229
  msgid "How to install premium version"
230
  msgstr "Hoe installeer ik de premium versie"
231
 
232
- #: lib/yit-plugin-panel.php:633 lib/yit-plugin-subpanel.php:151
233
- #: templates/panel/woocommerce/woocommerce-form.php:15
 
234
  msgid "Save Changes"
235
  msgstr "Wijzigingen opslaan"
236
 
237
- #: lib/yit-plugin-panel.php:637 lib/yit-plugin-subpanel.php:154
238
- #: templates/panel/woocommerce/woocommerce-form.php:19
 
239
  msgid ""
240
  "If you continue with this action, you will reset all options in this page."
241
  msgstr ""
242
  "Als je doorgaat met deze actie, zal je alle opties op deze pagina resetten."
243
 
244
- #: lib/yit-plugin-panel.php:640 lib/yit-plugin-subpanel.php:156
245
- msgid "Reset to default"
246
- msgstr "Resetten naar standaard"
247
-
248
- #: lib/yit-plugin-panel.php:641 lib/yit-plugin-subpanel.php:157
249
- #: templates/panel/woocommerce/woocommerce-form.php:23
250
  msgid "Are you sure?"
251
  msgstr "Weet je het zeker?"
252
 
253
- #: lib/yit-plugin-panel.php:842
 
 
 
 
 
254
  msgid ""
255
  "The element you have entered already exists. Please, enter another name."
256
  msgstr "Het element dat je hebt ingevoerd bestaat al. Voer een andere naam in."
257
 
258
- #: lib/yit-plugin-panel.php:843
259
  msgid "Settings saved"
260
  msgstr "Instellingen opgeslagen"
261
 
262
- #: lib/yit-plugin-panel.php:844
263
  msgid "Settings reset"
264
  msgstr "Instellingen resetten"
265
 
266
- #: lib/yit-plugin-panel.php:845
267
  msgid "Element deleted correctly."
268
  msgstr "Element juist verwijderd."
269
 
270
- #: lib/yit-plugin-panel.php:846 lib/yit-plugin-panel.php:847
 
271
  msgid "Element updated correctly."
272
  msgstr "Element juist geüpdatet."
273
 
274
- #: lib/yit-plugin-panel.php:848
275
  msgid "Database imported correctly."
276
  msgstr "Database juist geïmporteerd."
277
 
278
- #: lib/yit-plugin-panel.php:849
279
  msgid "An error has occurred during import. Please try again."
280
  msgstr "Er is een fout opgetreden tijdens importeren. Probeer opnieuw."
281
 
282
- #: lib/yit-plugin-panel.php:850
283
  msgid "The added file is not valid."
284
  msgstr "Het toegevoegde bestand is niet geldig."
285
 
286
- #: lib/yit-plugin-panel.php:851
287
  msgid "Sorry, import is disabled."
288
  msgstr "Sorry, importeren is uitgeschakeld."
289
 
290
- #: lib/yit-plugin-panel.php:852
291
  msgid "Sorting successful."
292
  msgstr "Succesvol gesorteerd."
293
 
294
- #: lib/yit-plugin-panel.php:1315
295
  msgid "We need your support"
296
  msgstr "We hebben je hulp nodig"
297
 
298
- #: lib/yit-plugin-panel.php:1316
299
  msgid "to keep updating and improving the plugin. Please,"
300
  msgstr "om de plugin te blijven bijwerken en verbeteren. A.u.b.,"
301
 
302
- #: lib/yit-plugin-panel.php:1318
303
  msgid "help us by leaving a five-star rating"
304
  msgstr "help ons door een 5-sterren waardering achter te laten"
305
 
306
- #: lib/yit-plugin-panel.php:1319
307
  msgid ":) Thanks!"
308
  msgstr ":) Bedankt!"
309
 
310
- #: lib/yit-pointers.php:70
311
  msgid "Plugins Activated"
312
  msgstr "Plugins geactiveerd"
313
 
314
- #: lib/yit-pointers.php:71
 
315
  msgid ""
316
- "From now on, you can find all plugin options in YITH Plugins menu.\n"
317
- " Plugin customization settings will be "
318
- "available as a new entry in YITH Plugins menu."
319
  msgstr ""
320
  "Vanaf nu kunt u alle plugin opties vinden onder het YITH Plugins menu.\n"
321
  " Plugin aanpassing instellingen zullen "
322
  "beschikbaar zijn als een nieuwe toegang in YITH Plugins menu."
323
 
324
- #: lib/yit-pointers.php:73 lib/yit-pointers.php:89
325
- msgid "Discover all our plugins available on:"
 
 
326
  msgstr "Ontdek al onze beschikbare plugins op:"
327
 
328
- #: lib/yit-pointers.php:74 lib/yit-pointers.php:90
329
- msgid "and"
330
- msgstr "en"
331
-
332
- #: lib/yit-pointers.php:84
333
  msgid "Plugins Upgraded"
334
  msgstr "Plugins Upgraded"
335
 
336
- #: lib/yit-pointers.php:85
 
337
  msgid ""
338
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
339
- "menu.\n"
340
- " Every time one of our plugins is added, "
341
- "a new entry will be added to this menu.\n"
342
- " For example, after the update, plugin "
343
- "options (such as for YITH WooCommerce Wishlist, YITH WooCommerce Ajax "
344
- "Search, etc.)\n"
345
- " will be moved from previous location to "
346
- "YITH Plugins tab."
347
  msgstr ""
348
  "Vanaf nu kun je het optie paneel van YITH plugins vinden in het YITH plugins "
349
  "menu.\n"
@@ -354,19 +398,19 @@ msgstr ""
354
  " zullen worden verplaatst van de vorige "
355
  "locatie naar het YITH plugins tabblad."
356
 
357
- #: lib/yith-dashboard.php:40
358
  msgid "YITH Latest Updates"
359
  msgstr "YITH laatste updates"
360
 
361
- #: lib/yith-dashboard.php:41
362
  msgid "Latest news from YITH Blog"
363
  msgstr "Laatste nieuws van YITH Blog"
364
 
365
- #: lib/yith-dashboard.php:65
366
  msgid "RSS Error:"
367
  msgstr "RSS-fout:"
368
 
369
- #: lib/yith-dashboard.php:71
370
  msgid ""
371
  "An error has occurred, which probably means the feed is down. Try again "
372
  "later."
@@ -374,77 +418,78 @@ msgstr ""
374
  "Er is een fout opgetreden, wat waarschijnlijk betekent dat de feed niet "
375
  "werkt. Probeer het later opnieuw."
376
 
377
- #: lib/yith-system-status.php:122
378
  msgid "WordPress Version"
379
  msgstr "WordPress Versie"
380
 
381
- #: lib/yith-system-status.php:123
382
  msgid "WooCommerce Version"
383
  msgstr "WooCommerce Versie"
384
 
385
- #: lib/yith-system-status.php:124
386
  msgid "Available Memory"
387
  msgstr "Beschikbaar geheugen"
388
 
389
- #: lib/yith-system-status.php:125
390
  msgid "PHP Version"
391
  msgstr "PHP Versie"
392
 
393
- #: lib/yith-system-status.php:126
394
  msgid "TLS Version"
395
  msgstr "TLS Versie"
396
 
397
- #: lib/yith-system-status.php:127
398
  msgid "WordPress Cron"
399
  msgstr "WordPress Cron"
400
 
401
- #: lib/yith-system-status.php:128
402
  msgid "SimpleXML"
403
  msgstr "SimpleXML"
404
 
405
- #: lib/yith-system-status.php:129
406
  msgid "MultiByte String"
407
  msgstr "MultiByte String"
408
 
409
- #: lib/yith-system-status.php:130
410
  msgid "ImageMagick Version"
411
  msgstr "ImageMagick Versie"
412
 
413
- #: lib/yith-system-status.php:131
414
  msgid "GD Library"
415
  msgstr "GD Library"
416
 
417
- #: lib/yith-system-status.php:132
418
  msgid "Iconv Module"
419
  msgstr "Verzendmodule inschakelen"
420
 
421
- #: lib/yith-system-status.php:133
422
  msgid "OPCache Save Comments"
423
  msgstr "OPCache Opmerkingen opslaan"
424
 
425
- #: lib/yith-system-status.php:134
426
  msgid "URL FOpen"
427
  msgstr "URL FOpen"
428
 
429
- #: lib/yith-system-status.php:152 lib/yith-system-status.php:153
430
- #: templates/sysinfo/system-information-panel.php:14
 
431
  msgid "System Status"
432
  msgstr "Systeem Status"
433
 
434
- #: lib/yith-system-status.php:195
435
  msgid "YITH Plugins"
436
  msgstr "YITH Plugins"
437
 
438
- #: lib/yith-system-status.php:203
439
  msgid "WooCommerce"
440
  msgstr "WooCommerce"
441
 
442
- #: lib/yith-system-status.php:355
443
  msgid "Warning!"
444
  msgstr "Waarschuwing!"
445
 
446
  #. translators: %1$s open link tag, %2$s open link tag
447
- #: lib/yith-system-status.php:359
448
  msgid ""
449
  "The system check has detected some compatibility issues on your installation."
450
  "%1$sClick here%2$s to know more"
@@ -452,34 +497,34 @@ msgstr ""
452
  "Het systeem heeft enkele compatibiliteitsproblemen gevonden op uw "
453
  "installatie.%1$sklik hier%2$s om meer te weten te komen"
454
 
455
- #: lib/yith-system-status.php:544
456
  msgid "Enabled"
457
  msgstr "Ingeschakeld"
458
 
459
- #: lib/yith-system-status.php:544
460
  msgid "Disabled"
461
  msgstr "Uitgeschakeld"
462
 
463
- #: lib/yith-system-status.php:549
464
  msgid "N/A"
465
  msgstr "N.v.t"
466
 
467
  #. translators: %1$s plugin name, %2$s requirement name
468
- #: lib/yith-system-status.php:577
469
  msgid "%1$s needs %2$s enabled"
470
  msgstr "%1$s heeft nodig %2$s ingeschakeld"
471
 
472
  #. translators: %1$s plugin name, %2$s required memory amount
473
- #: lib/yith-system-status.php:580
474
  msgid "%1$s needs at least %2$s of available memory"
475
  msgstr "%1$ss heeft ten minste %2$s beschikbaar geheugen nodig"
476
 
477
  #. translators: %1$s plugin name, %2$s version number
478
- #: lib/yith-system-status.php:583
479
  msgid "%1$s needs at least %2$s version"
480
  msgstr "%1$s heeft minstens %2$s versie nodig"
481
 
482
- #: lib/yith-system-status.php:608
483
  msgid ""
484
  "Update it to the latest version in order to benefit of all new features and "
485
  "security updates."
@@ -487,25 +532,27 @@ msgstr ""
487
  "Bijwerken naar de laatste versie, om te profiteren van alle nieuwe opties en "
488
  "veiligheidsupdates."
489
 
490
- #: lib/yith-system-status.php:612 lib/yith-system-status.php:618
 
491
  msgid "Contact your hosting company in order to update it."
492
  msgstr "Neem contact op met uw hosting provider om het bij te werken."
493
 
494
- #: lib/yith-system-status.php:616
495
  msgid "Contact your hosting company in order to install it."
496
  msgstr "Neem contact op met je hostingbedrijf om het te installeren."
497
 
498
  #. translators: %1$s code, %2$s file name
499
- #: lib/yith-system-status.php:623
500
  msgid "Remove %1$s from %2$s file"
501
  msgstr "Verwijder %1$s uit %2$s bestand"
502
 
503
- #: lib/yith-system-status.php:631
504
  msgid "Contact your hosting company in order to enable it."
505
  msgstr "Neem contact op met uw hosting provider om het in te schakelen."
506
 
507
  #. translators: %1$s opening link tag, %2$s closing link tag
508
- #: lib/yith-system-status.php:635 lib/yith-system-status.php:659
 
509
  msgid ""
510
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
511
  "it."
@@ -514,7 +561,7 @@ msgstr ""
514
  "het te verhogen."
515
 
516
  #. translators: %s recommended memory amount
517
- #: lib/yith-system-status.php:656
518
  msgid ""
519
  "For optimal functioning of our plugins, we suggest setting at least %s of "
520
  "available memory"
@@ -523,7 +570,7 @@ msgstr ""
523
  "beschikbaar geheugen"
524
 
525
  #. translators: %1$s TLS label, %2$s cURL label
526
- #: lib/yith-system-status.php:664
527
  msgid ""
528
  "The system check cannot determine which %1$s version is installed because "
529
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -532,7 +579,7 @@ msgstr ""
532
  "module is uitgeschakeld. Vraag je hostingmaatschappij om het in te schakelen."
533
 
534
  #. translators: %1$s TLS label
535
- #: lib/yith-system-status.php:667
536
  msgid ""
537
  "The system check cannot determine which %1$s version is installed due to a "
538
  "connection issue between your site and our server."
@@ -540,68 +587,73 @@ msgstr ""
540
  "De systeemcontrole kan niet bepalen welke versie van %1$s is geïnstalleerd "
541
  "vanwege een verbindingsprobleem tussen je site en onze server."
542
 
543
- #: templates/fields/ajax-customers.php:57
544
  msgid "Search Customers"
545
  msgstr "Klanten zoeken"
546
 
547
- #: templates/fields/ajax-customers.php:83
548
- #: templates/fields/ajax-customers.php:93
 
549
  msgid "%1$s (#%2$s &ndash; %3$s)"
550
  msgstr "%1$s (#%2$s &ndash; %3$s)"
551
 
552
- #: templates/fields/ajax-posts.php:57
553
  msgid "Search Posts"
554
  msgstr "Posts zoeken"
555
 
556
- #: templates/fields/ajax-products.php:16
557
  msgid "Search Product"
558
  msgstr "Zoek Product"
559
 
560
- #: templates/fields/customtabs.php:28
561
  msgid "Close all"
562
  msgstr "Sluit allen"
563
 
564
- #: templates/fields/customtabs.php:28
565
  msgid "Expand all"
566
  msgstr "Open allen"
567
 
568
- #: templates/fields/customtabs.php:37 templates/fields/customtabs.php:81
569
  msgid "Remove"
570
  msgstr "Verwijderen"
571
 
572
- #: templates/fields/customtabs.php:52 templates/fields/customtabs.php:94
573
  msgid "Value"
574
  msgstr "Waarde"
575
 
576
- #: templates/fields/customtabs.php:53 templates/fields/customtabs.php:95
577
  msgid "Content of the tab. (HTML is supported)"
578
  msgstr "Inhoud van het tabblad. (HTML wordt ondersteund)"
579
 
580
- #: templates/fields/customtabs.php:65
581
  msgid "Add custom product tab"
582
  msgstr "Aangepaste product tabblad toevoegen"
583
 
584
- #: templates/fields/customtabs.php:106
585
  msgid "Do you want to remove the custom tab?"
586
  msgstr "Wil je dit aangepaste tabblad verwijderen?"
587
 
588
- #: templates/fields/date-format.php:50
589
  msgid "Custom:"
590
  msgstr "Aangepast:"
591
 
592
- #: templates/fields/icons.php:58
 
 
 
 
593
  msgid "Set Default"
594
  msgstr "Op standaard instellen"
595
 
596
- #: templates/fields/image-gallery.php:34 templates/fields/image-gallery.php:39
597
  msgid "Delete image"
598
  msgstr "Afbeelding verwijderen"
599
 
600
- #: templates/fields/image-gallery.php:39
601
  msgid "Add Images to Gallery"
602
  msgstr "Afbeeldingen toevoegen aan galerij"
603
 
604
- #: templates/fields/image-gallery.php:39
605
  msgid "Add to gallery"
606
  msgstr "Aan galerij toevoegen"
607
 
@@ -609,27 +661,27 @@ msgstr "Aan galerij toevoegen"
609
  msgid "Add images"
610
  msgstr "Voeg images toe"
611
 
612
- #: templates/fields/image-gallery.php:39
613
  msgid "Delete"
614
  msgstr "Verwijderen"
615
 
616
- #: templates/fields/select-buttons.php:21
617
  msgid "Add All"
618
  msgstr "Allen toevoegen"
619
 
620
- #: templates/fields/select-buttons.php:34
621
  msgid "Remove All"
622
  msgstr "Allen verwijderen"
623
 
624
- #: templates/fields/sidebars.php:22
625
  msgid "Left sidebar"
626
  msgstr "Linker sidebar"
627
 
628
- #: templates/fields/sidebars.php:25
629
  msgid "Right sidebar"
630
  msgstr "Rechter sidebar"
631
 
632
- #: templates/fields/sidebars.php:28 templates/fields/sidebars.php:31
633
  msgid "No sidebar"
634
  msgstr "Geen sidebar"
635
 
@@ -637,118 +689,106 @@ msgstr "Geen sidebar"
637
  msgid "Left Sidebar"
638
  msgstr "Linker sidebar"
639
 
640
- #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:54
641
  msgid "Choose a sidebar"
642
  msgstr "Kies een sidebar"
643
 
644
- #: templates/fields/sidebars.php:52
645
  msgid "Right Sidebar"
646
  msgstr "Rechter sidebar"
647
 
648
- #: templates/fields/upload.php:27 templates/metaboxes/types/icon-list.php:70
649
- #: templates/panel/woocommerce/woocommerce-upload.php:40
650
  msgid "Upload"
651
  msgstr "Upload"
652
 
653
- #: templates/fields/upload.php:29
654
  msgid "Reset"
655
  msgstr "Resetten"
656
 
657
- #: templates/metaboxes/types/icon-list.php:76
658
- msgid "Image preview"
659
- msgstr "Voorbeeld afbeelding"
660
-
661
- #: templates/metaboxes/types/icon-list.php:90
662
- msgid "(Default: %s <img src=\"%s\"/>)"
663
- msgstr "(Default: %s <img src=\"%s\"/>)"
664
-
665
- #: templates/metaboxes/types/icon-list.php:92
666
- msgid "(Default: <i %s></i> )"
667
- msgstr "(Default: <i %s></i> )"
668
-
669
- #: templates/panel/woocommerce/woocommerce-form.php:22
670
  msgid "Reset Defaults"
671
  msgstr "Reset Standaard instellingen"
672
 
673
- #: templates/sysinfo/system-information-panel.php:15
674
  msgid "PHPInfo"
675
  msgstr ""
676
 
677
- #: templates/sysinfo/system-information-panel.php:16
678
- #: templates/sysinfo/tabs/error-log.php:28
679
  #, fuzzy
680
  msgid "Log Files"
681
  msgstr "Logbestanden tonen"
682
 
683
- #: templates/sysinfo/system-information-panel.php:25
684
  msgid "YITH System Information"
685
  msgstr "YITH Systeem Informatie"
686
 
687
- #: templates/sysinfo/tabs/error-log.php:16
688
  msgid "WP debug.log file"
689
  msgstr "WP debug.log bestand"
690
 
691
- #: templates/sysinfo/tabs/error-log.php:21
692
  msgid "PHP error_log file"
693
  msgstr "PHP error_log bestand"
694
 
695
- #: templates/sysinfo/tabs/error-log.php:64
696
  msgid "Download"
697
  msgstr ""
698
 
699
- #: templates/sysinfo/tabs/error-log.php:78
700
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
701
  msgstr ""
702
 
703
- #. translators: %s file name
704
- #: templates/sysinfo/tabs/error-log.php:106
705
  msgid ""
706
  "No Log file available. Enable the WordPress debug by adding this in the %s "
707
  "file of your installation"
708
  msgstr ""
709
 
710
- #: templates/sysinfo/tabs/error-log.php:115
711
  msgid "Copied!"
712
  msgstr ""
713
 
714
- #: templates/sysinfo/tabs/error-log.php:115
715
  msgid "Copy Code"
716
  msgstr ""
717
 
718
- #: templates/sysinfo/tabs/main.php:43
719
  msgid "Site Info"
720
  msgstr ""
721
 
722
- #: templates/sysinfo/tabs/main.php:48
723
  msgid "Site URL"
724
  msgstr "Site URL"
725
 
726
- #: templates/sysinfo/tabs/main.php:57
727
  msgid "Output IP Address"
728
  msgstr "Output IP Adres"
729
 
730
- #: templates/sysinfo/tabs/main.php:65
731
  msgid "Defined WP_CACHE"
732
  msgstr "Gedefinieerde WP_CACHE"
733
 
734
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
735
  msgid "Yes"
736
  msgstr "Ja"
737
 
738
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
739
  msgid "No"
740
  msgstr "Nee"
741
 
742
- #: templates/sysinfo/tabs/main.php:73
743
  msgid "External object cache"
744
  msgstr ""
745
 
746
- #: templates/sysinfo/tabs/main.php:82
747
  #, fuzzy
748
  msgid "Plugins Requirements"
749
  msgstr "Plugin instellingen"
750
 
751
- #: yit-plugin.php:194
752
  msgid "License"
753
  msgstr "Licentie"
754
 
@@ -756,12 +796,43 @@ msgstr "Licentie"
756
  msgid "YITH"
757
  msgstr "YITH"
758
 
759
- #: lib/privacy/yit-privacy.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
760
  msgctxt "Privacy Policy Guide Title"
761
  msgid "YITH Plugins"
762
  msgstr "YITH Plugins"
763
 
764
- #: lib/privacy/yit-privacy.php:59
765
  msgctxt "Privacy Policy Content"
766
  msgid ""
767
  "This sample language includes the basics around what personal data your "
@@ -778,112 +849,82 @@ msgstr ""
778
  "door je winkel variëren. We raden aan om een advocaat te raadplegen wanneer "
779
  "je besluit je privacy beleid op te stellen."
780
 
781
- #: lib/privacy/yit-privacy.php:63
782
  msgctxt "Privacy Policy Content"
783
  msgid "What we collect and store"
784
  msgstr "Wat we verzamelen en bewaren"
785
 
786
- #: lib/privacy/yit-privacy.php:66
787
  msgctxt "Privacy Policy Content"
788
  msgid "Who on our team has access"
789
  msgstr "Wie van ons team heeft toegang"
790
 
791
- #: lib/privacy/yit-privacy.php:69
792
  msgctxt "Privacy Policy Content"
793
  msgid "What we share with others"
794
  msgstr "Wat wij delen met anderen"
795
 
796
- #: lib/privacy/yit-privacy.php:72
797
  msgctxt "Privacy Policy Content"
798
  msgid "Payments"
799
  msgstr "Betalingen"
800
 
801
- #: lib/yit-cpt-unlimited.php:627
802
- msgctxt "taxonomy general name"
803
- msgid "%s Categories"
804
- msgstr "%s Categorieën"
805
-
806
- #: lib/yit-cpt-unlimited.php:628
807
- msgctxt "taxonomy singular name"
808
- msgid "Category"
809
- msgstr "Categorie"
810
-
811
- #: lib/yith-dashboard.php:99
812
- msgctxt "Plugin FW"
813
- msgid "View Changelog"
814
- msgstr "Bekijk wijzigingenlogboek"
815
-
816
- #: lib/yith-dashboard.php:100
817
- msgctxt "Plugin FW"
818
- msgid "Latest update released on"
819
- msgstr "Laatste update uitgebracht op"
820
-
821
- #: lib/yith-dashboard.php:143
822
- msgctxt "Button label"
823
- msgid "Close"
824
- msgstr "Sluiten"
825
-
826
- #: lib/yith-gutenberg.php:134
827
- msgctxt "[gutenberg]: Category Name"
828
- msgid "YITH"
829
- msgstr "YITH"
830
-
831
- #: templates/fields/dimensions.php:16
832
  msgctxt "Position in the \"Dimensions\" field"
833
  msgid "Top"
834
  msgstr "Boven"
835
 
836
- #: templates/fields/dimensions.php:17
837
  msgctxt "Position in the \"Dimensions\" field"
838
  msgid "Right"
839
  msgstr "Rechts"
840
 
841
- #: templates/fields/dimensions.php:18
842
  msgctxt "Position in the \"Dimensions\" field"
843
  msgid "Bottom"
844
  msgstr "Onder"
845
 
846
- #: templates/fields/dimensions.php:19
847
  msgctxt "Position in the \"Dimensions\" field"
848
  msgid "Left"
849
  msgstr "Links"
850
 
851
- #: templates/fields/dimensions.php:99
852
  msgctxt "Tooltip in the \"Dimensions\" field"
853
  msgid "Link values together"
854
  msgstr "Waarden aan elkaar koppelen"
855
 
856
- #: templates/fields/onoff.php:24
857
  msgctxt "YES/NO button: use MAX 3 characters!"
858
  msgid "YES"
859
  msgstr "Ja"
860
 
861
- #: templates/fields/onoff.php:25
862
  msgctxt "YES/NO button: use MAX 3 characters!"
863
  msgid "NO"
864
  msgstr "Nee"
865
 
866
- #: yit-plugin.php:83
867
  msgctxt "Plugin Row Meta"
868
  msgid "Live Demo"
869
  msgstr "Live Demo"
870
 
871
- #: yit-plugin.php:88
872
  msgctxt "Plugin Row Meta"
873
  msgid "Documentation"
874
  msgstr "Documentatie"
875
 
876
- #: yit-plugin.php:93
877
  msgctxt "Plugin Row Meta"
878
  msgid "Support"
879
  msgstr "Ondersteuning"
880
 
881
- #: yit-plugin.php:98
882
  msgctxt "Plugin Row Meta"
883
  msgid "Premium version"
884
  msgstr "Premium versie"
885
 
886
- #: yit-plugin.php:190
887
  msgctxt "Action links"
888
  msgid "Settings"
889
  msgstr "Instellingen"
@@ -896,3 +937,15 @@ msgstr "Instellingen"
896
 
897
  #~ msgid "Back to System panel"
898
  #~ msgstr "Terugkeren naar systeem paneel"
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-12-28 12:30:11+00:00\n"
8
  "PO-Revision-Date: 2020-09-24 14:36:33+0000\n"
9
  "Language: nl\n"
10
  "MIME-Version: 1.0\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
  "X-Generator: GlotPress/3.0.0-alpha.2\n"
15
 
16
+ #: includes/class-yit-assets.php:117
17
  msgid "Clear"
18
  msgstr "Wissen"
19
 
20
+ #: includes/class-yit-assets.php:118
21
  msgid "Clear color"
22
  msgstr "Kleur wissen"
23
 
24
+ #: includes/class-yit-assets.php:119
25
  msgid "Default"
26
  msgstr "Standaard"
27
 
28
+ #: includes/class-yit-assets.php:120
29
  msgid "Select default color"
30
  msgstr "Standaardkleur selecteren"
31
 
32
+ #: includes/class-yit-assets.php:121
33
  msgid "Select Color"
34
  msgstr "Kleur selecteren"
35
 
36
+ #: includes/class-yit-assets.php:122
37
  msgid "Color value"
38
  msgstr "Kleurwaarde"
39
 
40
+ #. translators: %s is the singular name of the post type.
41
+ #. translators: $s is the singular name of the post type.
42
+ #. translators: %s is the singular name of the post type.
43
+ #. translators: %s is the plural name of the post type.
44
+ #: includes/class-yit-cpt-unlimited.php:486
45
+ #: includes/class-yit-cpt-unlimited.php:619
46
+ #: includes/class-yit-cpt-unlimited.php:768
47
+ #: includes/class-yit-cpt-unlimited.php:1755
48
  msgid "Add %s"
49
  msgstr "%s toevoegen"
50
 
51
+ #. translators: %s is the singular name of the post type.
52
+ #. translators: $s is the singular name of the post type.
53
+ #: includes/class-yit-cpt-unlimited.php:488
54
+ #: includes/class-yit-cpt-unlimited.php:621
55
  msgid "Add New %s"
56
  msgstr "Nieuwe %s toevoegen"
57
 
58
+ #. translators: %s is the singular name of the post type.
59
+ #. translators: $s is the singular name of the post type.
60
+ #. translators: %s is the post title.
61
+ #. translators: %s is the singular name of the post type.
62
+ #: includes/class-yit-cpt-unlimited.php:490
63
+ #: includes/class-yit-cpt-unlimited.php:623
64
+ #: includes/class-yit-cpt-unlimited.php:1350
65
+ #: includes/class-yit-cpt-unlimited.php:1401
66
  msgid "Edit %s"
67
  msgstr "Bewerk %s"
68
 
69
+ #. translators: %s is the singular name of the post type.
70
+ #. translators: $s is the singular name of the post type.
71
+ #: includes/class-yit-cpt-unlimited.php:492
72
+ #: includes/class-yit-cpt-unlimited.php:625
73
  msgid "New %s"
74
  msgstr "Nieuw %s"
75
 
76
+ #. translators: %s is the plural name of the post type.
77
+ #. translators: $s is the plural name of the post type.
78
+ #: includes/class-yit-cpt-unlimited.php:494
79
+ #: includes/class-yit-cpt-unlimited.php:627
80
  msgid "All %s"
81
  msgstr "Alle %s"
82
 
83
+ #. translators: %s is the singular name of the post type.
84
+ #. translators: $s is the singular name of the post type.
85
+ #. translators: %s is the plural label of the post type.
86
+ #. translators: %s is the plural name of the post type.
87
+ #: includes/class-yit-cpt-unlimited.php:496
88
+ #: includes/class-yit-cpt-unlimited.php:629
89
+ #: includes/class-yit-cpt-unlimited.php:1323
90
+ #: includes/class-yit-cpt-unlimited.php:1406
91
  msgid "View %s"
92
  msgstr "Bekijk %s"
93
 
94
+ #. translators: %s is the plural name of the post type.
95
+ #. translators: $s is the plural name of the post type.
96
+ #: includes/class-yit-cpt-unlimited.php:498
97
+ #: includes/class-yit-cpt-unlimited.php:631
98
  msgid "Search %s"
99
  msgstr "Zoeken %s"
100
 
101
+ #. translators: %s is the plural name of the post type.
102
+ #. translators: $s is the plural name of the post type.
103
+ #: includes/class-yit-cpt-unlimited.php:500
104
+ #: includes/class-yit-cpt-unlimited.php:633
105
  msgid "No %s found"
106
  msgstr "Geen %s gevonden"
107
 
108
+ #. translators: %s is the plural name of the post type.
109
+ #. translators: $s is the plural name of the post type.
110
+ #: includes/class-yit-cpt-unlimited.php:502
111
+ #: includes/class-yit-cpt-unlimited.php:635
112
  msgid "No %s found in Trash"
113
  msgstr "No %s gevonden in de prullenbak"
114
 
115
+ #: includes/class-yit-cpt-unlimited.php:678 templates/fields/ajax-terms.php:41
116
  msgid "Search Categories"
117
  msgstr "Zoek categorieën"
118
 
119
+ #: includes/class-yit-cpt-unlimited.php:679
120
  msgid "All Categories"
121
  msgstr "Alle categorieën"
122
 
123
+ #: includes/class-yit-cpt-unlimited.php:680
124
  msgid "Parent Category"
125
  msgstr "Hoofdcategorie"
126
 
127
+ #: includes/class-yit-cpt-unlimited.php:681
128
  msgid "Parent Category:"
129
  msgstr "Hoofdcategorie:"
130
 
131
+ #: includes/class-yit-cpt-unlimited.php:682
132
  msgid "Edit Category"
133
  msgstr "Categorie aanpassen"
134
 
135
+ #: includes/class-yit-cpt-unlimited.php:683
136
  msgid "Update Category"
137
  msgstr "Update categorie"
138
 
139
+ #: includes/class-yit-cpt-unlimited.php:684
140
  msgid "Add New Category"
141
  msgstr "Categorie toevoegen"
142
 
143
+ #: includes/class-yit-cpt-unlimited.php:685
144
  msgid "New Category Name"
145
  msgstr "Nieuwe categorie naam"
146
 
147
+ #: includes/class-yit-cpt-unlimited.php:686
148
  msgid "Category"
149
  msgstr "Categorie"
150
 
151
+ #: includes/class-yit-cpt-unlimited.php:778
152
  msgid "Categories"
153
  msgstr "Categorieën"
154
 
155
+ #. translators: %s is the singular name of the post type.
156
+ #: includes/class-yit-cpt-unlimited.php:1098
157
  msgid "%s Settings"
158
  msgstr "%s instellingen"
159
 
160
+ #: includes/class-yit-cpt-unlimited.php:1106
161
+ #: includes/class-yit-cpt-unlimited.php:1260
162
+ #: includes/class-yit-cpt-unlimited.php:1266
163
+ #: includes/class-yit-plugin-panel.php:84
164
  msgid "Settings"
165
  msgstr "Instellingen"
166
 
167
+ #: includes/class-yit-cpt-unlimited.php:1111
168
  msgid "Type"
169
  msgstr "Type"
170
 
171
+ #. translators: %s is the singular name of the post type.
172
+ #: includes/class-yit-cpt-unlimited.php:1114
173
  msgid "Layout for this %s"
174
  msgstr "De lay-out hiervoor %s"
175
 
176
+ #: includes/class-yit-cpt-unlimited.php:1122
177
  msgid "Rewrite"
178
  msgstr "Herschrijf"
179
 
180
+ #: includes/class-yit-cpt-unlimited.php:1123
181
  msgid ""
182
  "Univocal identification name in the URL for each product (slug from post if "
183
  "empty)"
185
  "Unieke identificatie naam in de URL voor ieder product (slug van post indien "
186
  "leeg)"
187
 
188
+ #: includes/class-yit-cpt-unlimited.php:1128
189
  msgid "Label in Singular"
190
  msgstr "Label in enkelvoud"
191
 
192
+ #: includes/class-yit-cpt-unlimited.php:1129
193
  msgid "Set a label in singular (title of portfolio if empty)"
194
  msgstr "Zet een label op enkelvoud (titel van portfolio indien leeg)"
195
 
196
+ #: includes/class-yit-cpt-unlimited.php:1134
197
  msgid "Label in Plural"
198
  msgstr "Label in meervoud"
199
 
200
+ #: includes/class-yit-cpt-unlimited.php:1135
201
  msgid "Set a label in plural (title of portfolio if empty)"
202
  msgstr "Zet een label op meervoud (titel van portfolio indien leeg)"
203
 
204
+ #: includes/class-yit-cpt-unlimited.php:1140
205
  msgid "Taxonomy"
206
  msgstr "Taxonomie"
207
 
208
+ #: includes/class-yit-cpt-unlimited.php:1141
209
  msgid ""
210
  "If you want to use categories in the portfolio, set a name for taxonomy. "
211
  "Name should be a slug (must not contain capital letters nor spaces) and must "
216
  "bevatten) en mag niet meer zijn dan 32 tekens lang (database structuur "
217
  "beperking)."
218
 
219
+ #: includes/class-yit-cpt-unlimited.php:1146
220
  msgid "Taxonomy Rewrite"
221
  msgstr "Herschrijf taxonomie"
222
 
223
+ #: includes/class-yit-cpt-unlimited.php:1147
224
  msgid "Set univocal name for each category page URL."
225
  msgstr "Stel een unieke naam in voor elke categorie pagina URL."
226
 
227
+ #: includes/class-yit-cpt-unlimited.php:1152
228
  msgid "Single layout"
229
  msgstr "Single lay-out"
230
 
231
+ #: includes/class-yit-cpt-unlimited.php:1153
232
  msgid "Layout for single page of this portfolio"
233
  msgstr "Lay-out voor single pagina van dit portfolio"
234
 
235
+ #: includes/class-yit-cpt-unlimited.php:1196
236
  msgid "layout settings"
237
  msgstr "lay-out instellingen"
238
 
239
+ #: includes/class-yit-cpt-unlimited.php:1286
240
+ #: includes/class-yit-cpt-unlimited.php:1297
241
  msgid "Quick links"
242
  msgstr "Snelle links"
243
 
244
+ #. translators: %s is the name of the post type.
245
+ #: includes/class-yit-cpt-unlimited.php:1593
246
  msgid "Show frontend of the %s"
247
  msgstr "Toon frontend van de %s"
248
 
249
+ #: includes/class-yit-cpt-unlimited.php:1602 templates/fields/customtabs.php:34
250
+ #: templates/fields/customtabs.php:76
251
  msgid "Name"
252
  msgstr "Name"
253
 
254
+ #. translators: %s is the plural name of the post type.
255
+ #: includes/class-yit-cpt-unlimited.php:1749
256
  msgid "Add %s from images"
257
  msgstr "Voeg %s toe van afbeeldingen"
258
 
259
+ #: includes/class-yit-cpt-unlimited.php:1769
260
  msgid "Upload multiple files"
261
  msgstr "Upload meerdere bestanden"
262
 
263
+ #: includes/class-yit-plugin-panel-woocommerce.php:419
264
  msgid "The changes you have made will be lost if you leave this page."
265
  msgstr "Als je deze pagina verlaat zullen alle wijzigingen verloren gaan."
266
 
267
+ #: includes/class-yit-plugin-panel.php:83
268
  msgid "Plugin Settings"
269
  msgstr "Plugin instellingen"
270
 
271
+ #: includes/class-yit-plugin-panel.php:450
272
+ #: includes/class-yit-plugin-panel.php:453
273
  msgid "How to install premium version"
274
  msgstr "Hoe installeer ik de premium versie"
275
 
276
+ #: includes/class-yit-plugin-panel.php:619
277
+ #: includes/class-yit-plugin-subpanel.php:132
278
+ #: templates/panel/woocommerce/woocommerce-form.php:28
279
  msgid "Save Changes"
280
  msgstr "Wijzigingen opslaan"
281
 
282
+ #: includes/class-yit-plugin-panel.php:624
283
+ #: includes/class-yit-plugin-subpanel.php:136
284
+ #: templates/panel/woocommerce/woocommerce-form.php:14
285
  msgid ""
286
  "If you continue with this action, you will reset all options in this page."
287
  msgstr ""
288
  "Als je doorgaat met deze actie, zal je alle opties op deze pagina resetten."
289
 
290
+ #: includes/class-yit-plugin-panel.php:624
291
+ #: includes/class-yit-plugin-subpanel.php:136
292
+ #: templates/panel/woocommerce/woocommerce-form.php:14
 
 
 
293
  msgid "Are you sure?"
294
  msgstr "Weet je het zeker?"
295
 
296
+ #: includes/class-yit-plugin-panel.php:628
297
+ #: includes/class-yit-plugin-subpanel.php:139
298
+ msgid "Reset to default"
299
+ msgstr "Resetten naar standaard"
300
+
301
+ #: includes/class-yit-plugin-panel.php:865
302
  msgid ""
303
  "The element you have entered already exists. Please, enter another name."
304
  msgstr "Het element dat je hebt ingevoerd bestaat al. Voer een andere naam in."
305
 
306
+ #: includes/class-yit-plugin-panel.php:866
307
  msgid "Settings saved"
308
  msgstr "Instellingen opgeslagen"
309
 
310
+ #: includes/class-yit-plugin-panel.php:867
311
  msgid "Settings reset"
312
  msgstr "Instellingen resetten"
313
 
314
+ #: includes/class-yit-plugin-panel.php:868
315
  msgid "Element deleted correctly."
316
  msgstr "Element juist verwijderd."
317
 
318
+ #: includes/class-yit-plugin-panel.php:869
319
+ #: includes/class-yit-plugin-panel.php:870
320
  msgid "Element updated correctly."
321
  msgstr "Element juist geüpdatet."
322
 
323
+ #: includes/class-yit-plugin-panel.php:871
324
  msgid "Database imported correctly."
325
  msgstr "Database juist geïmporteerd."
326
 
327
+ #: includes/class-yit-plugin-panel.php:872
328
  msgid "An error has occurred during import. Please try again."
329
  msgstr "Er is een fout opgetreden tijdens importeren. Probeer opnieuw."
330
 
331
+ #: includes/class-yit-plugin-panel.php:873
332
  msgid "The added file is not valid."
333
  msgstr "Het toegevoegde bestand is niet geldig."
334
 
335
+ #: includes/class-yit-plugin-panel.php:874
336
  msgid "Sorry, import is disabled."
337
  msgstr "Sorry, importeren is uitgeschakeld."
338
 
339
+ #: includes/class-yit-plugin-panel.php:875
340
  msgid "Sorting successful."
341
  msgstr "Succesvol gesorteerd."
342
 
343
+ #: includes/class-yit-plugin-panel.php:1343
344
  msgid "We need your support"
345
  msgstr "We hebben je hulp nodig"
346
 
347
+ #: includes/class-yit-plugin-panel.php:1344
348
  msgid "to keep updating and improving the plugin. Please,"
349
  msgstr "om de plugin te blijven bijwerken en verbeteren. A.u.b.,"
350
 
351
+ #: includes/class-yit-plugin-panel.php:1346
352
  msgid "help us by leaving a five-star rating"
353
  msgstr "help ons door een 5-sterren waardering achter te laten"
354
 
355
+ #: includes/class-yit-plugin-panel.php:1347
356
  msgid ":) Thanks!"
357
  msgstr ":) Bedankt!"
358
 
359
+ #: includes/class-yit-pointers.php:80
360
  msgid "Plugins Activated"
361
  msgstr "Plugins geactiveerd"
362
 
363
+ #: includes/class-yit-pointers.php:81
364
+ #, fuzzy
365
  msgid ""
366
+ "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
367
+ "customization settings will be available as a new entry in YITH Plugins menu."
 
368
  msgstr ""
369
  "Vanaf nu kunt u alle plugin opties vinden onder het YITH Plugins menu.\n"
370
  " Plugin aanpassing instellingen zullen "
371
  "beschikbaar zijn als een nieuwe toegang in YITH Plugins menu."
372
 
373
+ #. translators: 1. YITH site link; 2. WordPress site link.
374
+ #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
375
+ #, fuzzy
376
+ msgid "Discover all our plugins available on: %1$s and %2$s"
377
  msgstr "Ontdek al onze beschikbare plugins op:"
378
 
379
+ #: includes/class-yit-pointers.php:96
 
 
 
 
380
  msgid "Plugins Upgraded"
381
  msgstr "Plugins Upgraded"
382
 
383
+ #: includes/class-yit-pointers.php:97
384
+ #, fuzzy
385
  msgid ""
386
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
387
+ "menu. Every time one of our plugins is added, a new entry will be added to "
388
+ "this menu. For example, after the update, plugin options (such as for YITH "
389
+ "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved from "
390
+ "previous location to YITH Plugins tab."
 
 
 
 
391
  msgstr ""
392
  "Vanaf nu kun je het optie paneel van YITH plugins vinden in het YITH plugins "
393
  "menu.\n"
398
  " zullen worden verplaatst van de vorige "
399
  "locatie naar het YITH plugins tabblad."
400
 
401
+ #: includes/class-yith-dashboard.php:35
402
  msgid "YITH Latest Updates"
403
  msgstr "YITH laatste updates"
404
 
405
+ #: includes/class-yith-dashboard.php:36
406
  msgid "Latest news from YITH Blog"
407
  msgstr "Laatste nieuws van YITH Blog"
408
 
409
+ #: includes/class-yith-dashboard.php:56
410
  msgid "RSS Error:"
411
  msgstr "RSS-fout:"
412
 
413
+ #: includes/class-yith-dashboard.php:63
414
  msgid ""
415
  "An error has occurred, which probably means the feed is down. Try again "
416
  "later."
418
  "Er is een fout opgetreden, wat waarschijnlijk betekent dat de feed niet "
419
  "werkt. Probeer het later opnieuw."
420
 
421
+ #: includes/class-yith-system-status.php:110
422
  msgid "WordPress Version"
423
  msgstr "WordPress Versie"
424
 
425
+ #: includes/class-yith-system-status.php:111
426
  msgid "WooCommerce Version"
427
  msgstr "WooCommerce Versie"
428
 
429
+ #: includes/class-yith-system-status.php:112
430
  msgid "Available Memory"
431
  msgstr "Beschikbaar geheugen"
432
 
433
+ #: includes/class-yith-system-status.php:113
434
  msgid "PHP Version"
435
  msgstr "PHP Versie"
436
 
437
+ #: includes/class-yith-system-status.php:114
438
  msgid "TLS Version"
439
  msgstr "TLS Versie"
440
 
441
+ #: includes/class-yith-system-status.php:115
442
  msgid "WordPress Cron"
443
  msgstr "WordPress Cron"
444
 
445
+ #: includes/class-yith-system-status.php:116
446
  msgid "SimpleXML"
447
  msgstr "SimpleXML"
448
 
449
+ #: includes/class-yith-system-status.php:117
450
  msgid "MultiByte String"
451
  msgstr "MultiByte String"
452
 
453
+ #: includes/class-yith-system-status.php:118
454
  msgid "ImageMagick Version"
455
  msgstr "ImageMagick Versie"
456
 
457
+ #: includes/class-yith-system-status.php:119
458
  msgid "GD Library"
459
  msgstr "GD Library"
460
 
461
+ #: includes/class-yith-system-status.php:120
462
  msgid "Iconv Module"
463
  msgstr "Verzendmodule inschakelen"
464
 
465
+ #: includes/class-yith-system-status.php:121
466
  msgid "OPCache Save Comments"
467
  msgstr "OPCache Opmerkingen opslaan"
468
 
469
+ #: includes/class-yith-system-status.php:122
470
  msgid "URL FOpen"
471
  msgstr "URL FOpen"
472
 
473
+ #: includes/class-yith-system-status.php:140
474
+ #: includes/class-yith-system-status.php:141
475
+ #: templates/sysinfo/system-information-panel.php:11
476
  msgid "System Status"
477
  msgstr "Systeem Status"
478
 
479
+ #: includes/class-yith-system-status.php:183
480
  msgid "YITH Plugins"
481
  msgstr "YITH Plugins"
482
 
483
+ #: includes/class-yith-system-status.php:191
484
  msgid "WooCommerce"
485
  msgstr "WooCommerce"
486
 
487
+ #: includes/class-yith-system-status.php:342
488
  msgid "Warning!"
489
  msgstr "Waarschuwing!"
490
 
491
  #. translators: %1$s open link tag, %2$s open link tag
492
+ #: includes/class-yith-system-status.php:346
493
  msgid ""
494
  "The system check has detected some compatibility issues on your installation."
495
  "%1$sClick here%2$s to know more"
497
  "Het systeem heeft enkele compatibiliteitsproblemen gevonden op uw "
498
  "installatie.%1$sklik hier%2$s om meer te weten te komen"
499
 
500
+ #: includes/class-yith-system-status.php:488
501
  msgid "Enabled"
502
  msgstr "Ingeschakeld"
503
 
504
+ #: includes/class-yith-system-status.php:488
505
  msgid "Disabled"
506
  msgstr "Uitgeschakeld"
507
 
508
+ #: includes/class-yith-system-status.php:493
509
  msgid "N/A"
510
  msgstr "N.v.t"
511
 
512
  #. translators: %1$s plugin name, %2$s requirement name
513
+ #: includes/class-yith-system-status.php:520
514
  msgid "%1$s needs %2$s enabled"
515
  msgstr "%1$s heeft nodig %2$s ingeschakeld"
516
 
517
  #. translators: %1$s plugin name, %2$s required memory amount
518
+ #: includes/class-yith-system-status.php:523
519
  msgid "%1$s needs at least %2$s of available memory"
520
  msgstr "%1$ss heeft ten minste %2$s beschikbaar geheugen nodig"
521
 
522
  #. translators: %1$s plugin name, %2$s version number
523
+ #: includes/class-yith-system-status.php:526
524
  msgid "%1$s needs at least %2$s version"
525
  msgstr "%1$s heeft minstens %2$s versie nodig"
526
 
527
+ #: includes/class-yith-system-status.php:550
528
  msgid ""
529
  "Update it to the latest version in order to benefit of all new features and "
530
  "security updates."
532
  "Bijwerken naar de laatste versie, om te profiteren van alle nieuwe opties en "
533
  "veiligheidsupdates."
534
 
535
+ #: includes/class-yith-system-status.php:554
536
+ #: includes/class-yith-system-status.php:560
537
  msgid "Contact your hosting company in order to update it."
538
  msgstr "Neem contact op met uw hosting provider om het bij te werken."
539
 
540
+ #: includes/class-yith-system-status.php:558
541
  msgid "Contact your hosting company in order to install it."
542
  msgstr "Neem contact op met je hostingbedrijf om het te installeren."
543
 
544
  #. translators: %1$s code, %2$s file name
545
+ #: includes/class-yith-system-status.php:565
546
  msgid "Remove %1$s from %2$s file"
547
  msgstr "Verwijder %1$s uit %2$s bestand"
548
 
549
+ #: includes/class-yith-system-status.php:573
550
  msgid "Contact your hosting company in order to enable it."
551
  msgstr "Neem contact op met uw hosting provider om het in te schakelen."
552
 
553
  #. translators: %1$s opening link tag, %2$s closing link tag
554
+ #: includes/class-yith-system-status.php:577
555
+ #: includes/class-yith-system-status.php:600
556
  msgid ""
557
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
558
  "it."
561
  "het te verhogen."
562
 
563
  #. translators: %s recommended memory amount
564
+ #: includes/class-yith-system-status.php:597
565
  msgid ""
566
  "For optimal functioning of our plugins, we suggest setting at least %s of "
567
  "available memory"
570
  "beschikbaar geheugen"
571
 
572
  #. translators: %1$s TLS label, %2$s cURL label
573
+ #: includes/class-yith-system-status.php:605
574
  msgid ""
575
  "The system check cannot determine which %1$s version is installed because "
576
  "%2$s module is disabled. Ask your hosting company to enable it."
579
  "module is uitgeschakeld. Vraag je hostingmaatschappij om het in te schakelen."
580
 
581
  #. translators: %1$s TLS label
582
+ #: includes/class-yith-system-status.php:608
583
  msgid ""
584
  "The system check cannot determine which %1$s version is installed due to a "
585
  "connection issue between your site and our server."
587
  "De systeemcontrole kan niet bepalen welke versie van %1$s is geïnstalleerd "
588
  "vanwege een verbindingsprobleem tussen je site en onze server."
589
 
590
+ #: templates/fields/ajax-customers.php:41
591
  msgid "Search Customers"
592
  msgstr "Klanten zoeken"
593
 
594
+ #. translators: 1. user display name; 2. user ID; 3. user email.
595
+ #: templates/fields/ajax-customers.php:68
596
+ #: templates/fields/ajax-customers.php:79
597
  msgid "%1$s (#%2$s &ndash; %3$s)"
598
  msgstr "%1$s (#%2$s &ndash; %3$s)"
599
 
600
+ #: templates/fields/ajax-posts.php:41
601
  msgid "Search Posts"
602
  msgstr "Posts zoeken"
603
 
604
+ #: templates/fields/ajax-products.php:14
605
  msgid "Search Product"
606
  msgstr "Zoek Product"
607
 
608
+ #: templates/fields/customtabs.php:17
609
  msgid "Close all"
610
  msgstr "Sluit allen"
611
 
612
+ #: templates/fields/customtabs.php:17
613
  msgid "Expand all"
614
  msgstr "Open allen"
615
 
616
+ #: templates/fields/customtabs.php:25 templates/fields/customtabs.php:68
617
  msgid "Remove"
618
  msgstr "Verwijderen"
619
 
620
+ #: templates/fields/customtabs.php:40 templates/fields/customtabs.php:81
621
  msgid "Value"
622
  msgstr "Waarde"
623
 
624
+ #: templates/fields/customtabs.php:41 templates/fields/customtabs.php:82
625
  msgid "Content of the tab. (HTML is supported)"
626
  msgstr "Inhoud van het tabblad. (HTML wordt ondersteund)"
627
 
628
+ #: templates/fields/customtabs.php:52
629
  msgid "Add custom product tab"
630
  msgstr "Aangepaste product tabblad toevoegen"
631
 
632
+ #: templates/fields/customtabs.php:93
633
  msgid "Do you want to remove the custom tab?"
634
  msgstr "Wil je dit aangepaste tabblad verwijderen?"
635
 
636
+ #: templates/fields/date-format.php:65
637
  msgid "Custom:"
638
  msgstr "Aangepast:"
639
 
640
+ #: templates/fields/date-format.php:70
641
+ msgid "Preview:"
642
+ msgstr ""
643
+
644
+ #: templates/fields/icons.php:63
645
  msgid "Set Default"
646
  msgstr "Op standaard instellen"
647
 
648
+ #: templates/fields/image-gallery.php:29 templates/fields/image-gallery.php:40
649
  msgid "Delete image"
650
  msgstr "Afbeelding verwijderen"
651
 
652
+ #: templates/fields/image-gallery.php:37
653
  msgid "Add Images to Gallery"
654
  msgstr "Afbeeldingen toevoegen aan galerij"
655
 
656
+ #: templates/fields/image-gallery.php:38
657
  msgid "Add to gallery"
658
  msgstr "Aan galerij toevoegen"
659
 
661
  msgid "Add images"
662
  msgstr "Voeg images toe"
663
 
664
+ #: templates/fields/image-gallery.php:41
665
  msgid "Delete"
666
  msgstr "Verwijderen"
667
 
668
+ #: templates/fields/select-buttons.php:19
669
  msgid "Add All"
670
  msgstr "Allen toevoegen"
671
 
672
+ #: templates/fields/select-buttons.php:32
673
  msgid "Remove All"
674
  msgstr "Allen verwijderen"
675
 
676
+ #: templates/fields/sidebars.php:20
677
  msgid "Left sidebar"
678
  msgstr "Linker sidebar"
679
 
680
+ #: templates/fields/sidebars.php:23
681
  msgid "Right sidebar"
682
  msgstr "Rechter sidebar"
683
 
684
+ #: templates/fields/sidebars.php:26 templates/fields/sidebars.php:29
685
  msgid "No sidebar"
686
  msgstr "Geen sidebar"
687
 
689
  msgid "Left Sidebar"
690
  msgstr "Linker sidebar"
691
 
692
+ #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:56
693
  msgid "Choose a sidebar"
694
  msgstr "Kies een sidebar"
695
 
696
+ #: templates/fields/sidebars.php:54
697
  msgid "Right Sidebar"
698
  msgstr "Rechter sidebar"
699
 
700
+ #: templates/fields/upload.php:34
701
+ #: templates/panel/woocommerce/woocommerce-upload.php:37
702
  msgid "Upload"
703
  msgstr "Upload"
704
 
705
+ #: templates/fields/upload.php:39
706
  msgid "Reset"
707
  msgstr "Resetten"
708
 
709
+ #: templates/panel/woocommerce/woocommerce-form.php:34
 
 
 
 
 
 
 
 
 
 
 
 
710
  msgid "Reset Defaults"
711
  msgstr "Reset Standaard instellingen"
712
 
713
+ #: templates/sysinfo/system-information-panel.php:12
714
  msgid "PHPInfo"
715
  msgstr ""
716
 
717
+ #: templates/sysinfo/system-information-panel.php:13
718
+ #: templates/sysinfo/tabs/error-log.php:25
719
  #, fuzzy
720
  msgid "Log Files"
721
  msgstr "Logbestanden tonen"
722
 
723
+ #: templates/sysinfo/system-information-panel.php:22
724
  msgid "YITH System Information"
725
  msgstr "YITH Systeem Informatie"
726
 
727
+ #: templates/sysinfo/tabs/error-log.php:13
728
  msgid "WP debug.log file"
729
  msgstr "WP debug.log bestand"
730
 
731
+ #: templates/sysinfo/tabs/error-log.php:18
732
  msgid "PHP error_log file"
733
  msgstr "PHP error_log bestand"
734
 
735
+ #: templates/sysinfo/tabs/error-log.php:60
736
  msgid "Download"
737
  msgstr ""
738
 
739
+ #: templates/sysinfo/tabs/error-log.php:72
740
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
741
  msgstr ""
742
 
743
+ #. translators: %s file name.
744
+ #: templates/sysinfo/tabs/error-log.php:96
745
  msgid ""
746
  "No Log file available. Enable the WordPress debug by adding this in the %s "
747
  "file of your installation"
748
  msgstr ""
749
 
750
+ #: templates/sysinfo/tabs/error-log.php:105
751
  msgid "Copied!"
752
  msgstr ""
753
 
754
+ #: templates/sysinfo/tabs/error-log.php:105
755
  msgid "Copy Code"
756
  msgstr ""
757
 
758
+ #: templates/sysinfo/tabs/main.php:15
759
  msgid "Site Info"
760
  msgstr ""
761
 
762
+ #: templates/sysinfo/tabs/main.php:20
763
  msgid "Site URL"
764
  msgstr "Site URL"
765
 
766
+ #: templates/sysinfo/tabs/main.php:29
767
  msgid "Output IP Address"
768
  msgstr "Output IP Adres"
769
 
770
+ #: templates/sysinfo/tabs/main.php:37
771
  msgid "Defined WP_CACHE"
772
  msgstr "Gedefinieerde WP_CACHE"
773
 
774
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
775
  msgid "Yes"
776
  msgstr "Ja"
777
 
778
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
779
  msgid "No"
780
  msgstr "Nee"
781
 
782
+ #: templates/sysinfo/tabs/main.php:45
783
  msgid "External object cache"
784
  msgstr ""
785
 
786
+ #: templates/sysinfo/tabs/main.php:54
787
  #, fuzzy
788
  msgid "Plugins Requirements"
789
  msgstr "Plugin instellingen"
790
 
791
+ #: yit-plugin.php:187
792
  msgid "License"
793
  msgstr "Licentie"
794
 
796
  msgid "YITH"
797
  msgstr "YITH"
798
 
799
+ #. translators: %s is the singular name of the post type.
800
+ #: includes/class-yit-cpt-unlimited.php:676
801
+ msgctxt "taxonomy general name"
802
+ msgid "%s Categories"
803
+ msgstr "%s Categorieën"
804
+
805
+ #: includes/class-yit-cpt-unlimited.php:677
806
+ msgctxt "taxonomy singular name"
807
+ msgid "Category"
808
+ msgstr "Categorie"
809
+
810
+ #: includes/class-yith-dashboard.php:96
811
+ msgctxt "Plugin FW"
812
+ msgid "View Changelog"
813
+ msgstr "Bekijk wijzigingenlogboek"
814
+
815
+ #: includes/class-yith-dashboard.php:97
816
+ msgctxt "Plugin FW"
817
+ msgid "Latest update released on"
818
+ msgstr "Laatste update uitgebracht op"
819
+
820
+ #: includes/class-yith-dashboard.php:137
821
+ msgctxt "Button label"
822
+ msgid "Close"
823
+ msgstr "Sluiten"
824
+
825
+ #: includes/class-yith-gutenberg.php:131
826
+ msgctxt "[gutenberg]: Category Name"
827
+ msgid "YITH"
828
+ msgstr "YITH"
829
+
830
+ #: includes/privacy/class-yith-privacy.php:61
831
  msgctxt "Privacy Policy Guide Title"
832
  msgid "YITH Plugins"
833
  msgstr "YITH Plugins"
834
 
835
+ #: includes/privacy/class-yith-privacy.php:93
836
  msgctxt "Privacy Policy Content"
837
  msgid ""
838
  "This sample language includes the basics around what personal data your "
849
  "door je winkel variëren. We raden aan om een advocaat te raadplegen wanneer "
850
  "je besluit je privacy beleid op te stellen."
851
 
852
+ #: includes/privacy/class-yith-privacy.php:97
853
  msgctxt "Privacy Policy Content"
854
  msgid "What we collect and store"
855
  msgstr "Wat we verzamelen en bewaren"
856
 
857
+ #: includes/privacy/class-yith-privacy.php:100
858
  msgctxt "Privacy Policy Content"
859
  msgid "Who on our team has access"
860
  msgstr "Wie van ons team heeft toegang"
861
 
862
+ #: includes/privacy/class-yith-privacy.php:103
863
  msgctxt "Privacy Policy Content"
864
  msgid "What we share with others"
865
  msgstr "Wat wij delen met anderen"
866
 
867
+ #: includes/privacy/class-yith-privacy.php:106
868
  msgctxt "Privacy Policy Content"
869
  msgid "Payments"
870
  msgstr "Betalingen"
871
 
872
+ #: templates/fields/dimensions.php:13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
873
  msgctxt "Position in the \"Dimensions\" field"
874
  msgid "Top"
875
  msgstr "Boven"
876
 
877
+ #: templates/fields/dimensions.php:14
878
  msgctxt "Position in the \"Dimensions\" field"
879
  msgid "Right"
880
  msgstr "Rechts"
881
 
882
+ #: templates/fields/dimensions.php:15
883
  msgctxt "Position in the \"Dimensions\" field"
884
  msgid "Bottom"
885
  msgstr "Onder"
886
 
887
+ #: templates/fields/dimensions.php:16
888
  msgctxt "Position in the \"Dimensions\" field"
889
  msgid "Left"
890
  msgstr "Links"
891
 
892
+ #: templates/fields/dimensions.php:88
893
  msgctxt "Tooltip in the \"Dimensions\" field"
894
  msgid "Link values together"
895
  msgstr "Waarden aan elkaar koppelen"
896
 
897
+ #: templates/fields/onoff.php:28
898
  msgctxt "YES/NO button: use MAX 3 characters!"
899
  msgid "YES"
900
  msgstr "Ja"
901
 
902
+ #: templates/fields/onoff.php:29
903
  msgctxt "YES/NO button: use MAX 3 characters!"
904
  msgid "NO"
905
  msgstr "Nee"
906
 
907
+ #: yit-plugin.php:75
908
  msgctxt "Plugin Row Meta"
909
  msgid "Live Demo"
910
  msgstr "Live Demo"
911
 
912
+ #: yit-plugin.php:79
913
  msgctxt "Plugin Row Meta"
914
  msgid "Documentation"
915
  msgstr "Documentatie"
916
 
917
+ #: yit-plugin.php:83
918
  msgctxt "Plugin Row Meta"
919
  msgid "Support"
920
  msgstr "Ondersteuning"
921
 
922
+ #: yit-plugin.php:87
923
  msgctxt "Plugin Row Meta"
924
  msgid "Premium version"
925
  msgstr "Premium versie"
926
 
927
+ #: yit-plugin.php:183
928
  msgctxt "Action links"
929
  msgid "Settings"
930
  msgstr "Instellingen"
937
 
938
  #~ msgid "Back to System panel"
939
  #~ msgstr "Terugkeren naar systeem paneel"
940
+
941
+ #~ msgid "(Default: <i %s></i> )"
942
+ #~ msgstr "(Default: <i %s></i> )"
943
+
944
+ #~ msgid "(Default: %s <img src=\"%s\"/>)"
945
+ #~ msgstr "(Default: %s <img src=\"%s\"/>)"
946
+
947
+ #~ msgid "Image preview"
948
+ #~ msgstr "Voorbeeld afbeelding"
949
+
950
+ #~ msgid "and"
951
+ #~ msgstr "en"
plugin-fw/languages/yith-plugin-fw.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2020-11-23 14:47:23+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -24,561 +24,611 @@ msgstr ""
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n 1.0.3\n"
26
 
27
- #: lib/yit-assets.php:103
28
  msgid "Clear"
29
  msgstr ""
30
 
31
- #: lib/yit-assets.php:104
32
  msgid "Clear color"
33
  msgstr ""
34
 
35
- #: lib/yit-assets.php:105
36
  msgid "Default"
37
  msgstr ""
38
 
39
- #: lib/yit-assets.php:106
40
  msgid "Select default color"
41
  msgstr ""
42
 
43
- #: lib/yit-assets.php:107
44
  msgid "Select Color"
45
  msgstr ""
46
 
47
- #: lib/yit-assets.php:108
48
  msgid "Color value"
49
  msgstr ""
50
 
51
- #: lib/yit-cpt-unlimited.php:462 lib/yit-cpt-unlimited.php:576
52
- #: lib/yit-cpt-unlimited.php:721 lib/yit-cpt-unlimited.php:1636
 
 
 
 
 
 
53
  msgid "Add %s"
54
  msgstr ""
55
 
56
- #: lib/yit-cpt-unlimited.php:463 lib/yit-cpt-unlimited.php:577
 
 
 
57
  msgid "Add New %s"
58
  msgstr ""
59
 
60
- #: lib/yit-cpt-unlimited.php:464 lib/yit-cpt-unlimited.php:578
61
- #: lib/yit-cpt-unlimited.php:1269 lib/yit-cpt-unlimited.php:1306
 
 
 
 
 
 
62
  msgid "Edit %s"
63
  msgstr ""
64
 
65
- #: lib/yit-cpt-unlimited.php:465 lib/yit-cpt-unlimited.php:579
 
 
 
66
  msgid "New %s"
67
  msgstr ""
68
 
69
- #: lib/yit-cpt-unlimited.php:466 lib/yit-cpt-unlimited.php:580
 
 
 
70
  msgid "All %s"
71
  msgstr ""
72
 
73
- #: lib/yit-cpt-unlimited.php:467 lib/yit-cpt-unlimited.php:581
74
- #: lib/yit-cpt-unlimited.php:1253 lib/yit-cpt-unlimited.php:1307
 
 
 
 
 
 
75
  msgid "View %s"
76
  msgstr ""
77
 
78
- #: lib/yit-cpt-unlimited.php:468 lib/yit-cpt-unlimited.php:582
 
 
 
79
  msgid "Search %s"
80
  msgstr ""
81
 
82
- #: lib/yit-cpt-unlimited.php:469 lib/yit-cpt-unlimited.php:583
 
 
 
83
  msgid "No %s found"
84
  msgstr ""
85
 
86
- #: lib/yit-cpt-unlimited.php:470 lib/yit-cpt-unlimited.php:584
 
 
 
87
  msgid "No %s found in Trash"
88
  msgstr ""
89
 
90
- #: lib/yit-cpt-unlimited.php:629 templates/fields/ajax-terms.php:56
91
  msgid "Search Categories"
92
  msgstr ""
93
 
94
- #: lib/yit-cpt-unlimited.php:630
95
  msgid "All Categories"
96
  msgstr ""
97
 
98
- #: lib/yit-cpt-unlimited.php:631
99
  msgid "Parent Category"
100
  msgstr ""
101
 
102
- #: lib/yit-cpt-unlimited.php:632
103
  msgid "Parent Category:"
104
  msgstr ""
105
 
106
- #: lib/yit-cpt-unlimited.php:633
107
  msgid "Edit Category"
108
  msgstr ""
109
 
110
- #: lib/yit-cpt-unlimited.php:634
111
  msgid "Update Category"
112
  msgstr ""
113
 
114
- #: lib/yit-cpt-unlimited.php:635
115
  msgid "Add New Category"
116
  msgstr ""
117
 
118
- #: lib/yit-cpt-unlimited.php:636
119
  msgid "New Category Name"
120
  msgstr ""
121
 
122
- #: lib/yit-cpt-unlimited.php:637
123
  msgid "Category"
124
  msgstr ""
125
 
126
- #: lib/yit-cpt-unlimited.php:726
127
  msgid "Categories"
128
  msgstr ""
129
 
130
- #: lib/yit-cpt-unlimited.php:1044
 
131
  msgid "%s Settings"
132
  msgstr ""
133
 
134
- #: lib/yit-cpt-unlimited.php:1050 lib/yit-cpt-unlimited.php:1198
135
- #: lib/yit-cpt-unlimited.php:1204 lib/yit-plugin-panel.php:81
 
 
136
  msgid "Settings"
137
  msgstr ""
138
 
139
- #: lib/yit-cpt-unlimited.php:1053
140
  msgid "Type"
141
  msgstr ""
142
 
143
- #: lib/yit-cpt-unlimited.php:1054
 
144
  msgid "Layout for this %s"
145
  msgstr ""
146
 
147
- #: lib/yit-cpt-unlimited.php:1060
148
  msgid "Rewrite"
149
  msgstr ""
150
 
151
- #: lib/yit-cpt-unlimited.php:1061
152
  msgid ""
153
  "Univocal identification name in the URL for each product (slug from post if "
154
  "empty)"
155
  msgstr ""
156
 
157
- #: lib/yit-cpt-unlimited.php:1066
158
  msgid "Label in Singular"
159
  msgstr ""
160
 
161
- #: lib/yit-cpt-unlimited.php:1067
162
  msgid "Set a label in singular (title of portfolio if empty)"
163
  msgstr ""
164
 
165
- #: lib/yit-cpt-unlimited.php:1072
166
  msgid "Label in Plural"
167
  msgstr ""
168
 
169
- #: lib/yit-cpt-unlimited.php:1073
170
  msgid "Set a label in plural (title of portfolio if empty)"
171
  msgstr ""
172
 
173
- #: lib/yit-cpt-unlimited.php:1078
174
  msgid "Taxonomy"
175
  msgstr ""
176
 
177
- #: lib/yit-cpt-unlimited.php:1079
178
  msgid ""
179
  "If you want to use categories in the portfolio, set a name for taxonomy. "
180
  "Name should be a slug (must not contain capital letters nor spaces) and "
181
  "must not be more than 32 characters long (database structure restriction)."
182
  msgstr ""
183
 
184
- #: lib/yit-cpt-unlimited.php:1084
185
  msgid "Taxonomy Rewrite"
186
  msgstr ""
187
 
188
- #: lib/yit-cpt-unlimited.php:1085
189
  msgid "Set univocal name for each category page URL."
190
  msgstr ""
191
 
192
- #: lib/yit-cpt-unlimited.php:1090
193
  msgid "Single layout"
194
  msgstr ""
195
 
196
- #: lib/yit-cpt-unlimited.php:1091
197
  msgid "Layout for single page of this portfolio"
198
  msgstr ""
199
 
200
- #: lib/yit-cpt-unlimited.php:1132
201
  msgid "layout settings"
202
  msgstr ""
203
 
204
- #: lib/yit-cpt-unlimited.php:1224 lib/yit-cpt-unlimited.php:1237
 
205
  msgid "Quick links"
206
  msgstr ""
207
 
208
- #: lib/yit-cpt-unlimited.php:1477
 
209
  msgid "Show frontend of the %s"
210
  msgstr ""
211
 
212
- #: lib/yit-cpt-unlimited.php:1484 templates/fields/customtabs.php:46
213
- #: templates/fields/customtabs.php:89
214
  msgid "Name"
215
  msgstr ""
216
 
217
- #: lib/yit-cpt-unlimited.php:1635
 
218
  msgid "Add %s from images"
219
  msgstr ""
220
 
221
- #: lib/yit-cpt-unlimited.php:1638
222
  msgid "Upload multiple files"
223
  msgstr ""
224
 
225
- #: lib/yit-plugin-panel-wc.php:427
226
  msgid "The changes you have made will be lost if you leave this page."
227
  msgstr ""
228
 
229
- #: lib/yit-plugin-panel.php:80
230
  msgid "Plugin Settings"
231
  msgstr ""
232
 
233
- #: lib/yit-plugin-panel.php:466 lib/yit-plugin-panel.php:469
 
234
  msgid "How to install premium version"
235
  msgstr ""
236
 
237
- #: lib/yit-plugin-panel.php:633 lib/yit-plugin-subpanel.php:151
238
- #: templates/panel/woocommerce/woocommerce-form.php:15
 
239
  msgid "Save Changes"
240
  msgstr ""
241
 
242
- #: lib/yit-plugin-panel.php:637 lib/yit-plugin-subpanel.php:154
243
- #: templates/panel/woocommerce/woocommerce-form.php:19
 
244
  msgid "If you continue with this action, you will reset all options in this page."
245
  msgstr ""
246
 
247
- #: lib/yit-plugin-panel.php:640 lib/yit-plugin-subpanel.php:156
248
- msgid "Reset to default"
 
 
249
  msgstr ""
250
 
251
- #: lib/yit-plugin-panel.php:641 lib/yit-plugin-subpanel.php:157
252
- #: templates/panel/woocommerce/woocommerce-form.php:23
253
- msgid "Are you sure?"
254
  msgstr ""
255
 
256
- #: lib/yit-plugin-panel.php:842
257
  msgid "The element you have entered already exists. Please, enter another name."
258
  msgstr ""
259
 
260
- #: lib/yit-plugin-panel.php:843
261
  msgid "Settings saved"
262
  msgstr ""
263
 
264
- #: lib/yit-plugin-panel.php:844
265
  msgid "Settings reset"
266
  msgstr ""
267
 
268
- #: lib/yit-plugin-panel.php:845
269
  msgid "Element deleted correctly."
270
  msgstr ""
271
 
272
- #: lib/yit-plugin-panel.php:846 lib/yit-plugin-panel.php:847
 
273
  msgid "Element updated correctly."
274
  msgstr ""
275
 
276
- #: lib/yit-plugin-panel.php:848
277
  msgid "Database imported correctly."
278
  msgstr ""
279
 
280
- #: lib/yit-plugin-panel.php:849
281
  msgid "An error has occurred during import. Please try again."
282
  msgstr ""
283
 
284
- #: lib/yit-plugin-panel.php:850
285
  msgid "The added file is not valid."
286
  msgstr ""
287
 
288
- #: lib/yit-plugin-panel.php:851
289
  msgid "Sorry, import is disabled."
290
  msgstr ""
291
 
292
- #: lib/yit-plugin-panel.php:852
293
  msgid "Sorting successful."
294
  msgstr ""
295
 
296
- #: lib/yit-plugin-panel.php:1315
297
  msgid "We need your support"
298
  msgstr ""
299
 
300
- #: lib/yit-plugin-panel.php:1316
301
  msgid "to keep updating and improving the plugin. Please,"
302
  msgstr ""
303
 
304
- #: lib/yit-plugin-panel.php:1318
305
  msgid "help us by leaving a five-star rating"
306
  msgstr ""
307
 
308
- #: lib/yit-plugin-panel.php:1319
309
  msgid ":) Thanks!"
310
  msgstr ""
311
 
312
- #: lib/yit-pointers.php:70
313
  msgid "Plugins Activated"
314
  msgstr ""
315
 
316
- #: lib/yit-pointers.php:71
317
  msgid ""
318
- "From now on, you can find all plugin options in YITH Plugins menu.\n"
319
- " Plugin customization settings will be "
320
- "available as a new entry in YITH Plugins menu."
321
  msgstr ""
322
 
323
- #: lib/yit-pointers.php:73 lib/yit-pointers.php:89
324
- msgid "Discover all our plugins available on:"
 
325
  msgstr ""
326
 
327
- #: lib/yit-pointers.php:74 lib/yit-pointers.php:90
328
- msgid "and"
329
- msgstr ""
330
-
331
- #: lib/yit-pointers.php:84
332
  msgid "Plugins Upgraded"
333
  msgstr ""
334
 
335
- #: lib/yit-pointers.php:85
336
  msgid ""
337
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
338
- "menu.\n"
339
- " Every time one of our plugins is added, "
340
- "a new entry will be added to this menu.\n"
341
- " For example, after the update, plugin "
342
- "options (such as for YITH WooCommerce Wishlist, YITH WooCommerce Ajax "
343
- "Search, etc.)\n"
344
- " will be moved from previous location to "
345
- "YITH Plugins tab."
346
  msgstr ""
347
 
348
- #: lib/yith-dashboard.php:40
349
  msgid "YITH Latest Updates"
350
  msgstr ""
351
 
352
- #: lib/yith-dashboard.php:41
353
  msgid "Latest news from YITH Blog"
354
  msgstr ""
355
 
356
- #: lib/yith-dashboard.php:65
357
  msgid "RSS Error:"
358
  msgstr ""
359
 
360
- #: lib/yith-dashboard.php:71
361
  msgid ""
362
  "An error has occurred, which probably means the feed is down. Try again "
363
  "later."
364
  msgstr ""
365
 
366
- #: lib/yith-system-status.php:122
367
  msgid "WordPress Version"
368
  msgstr ""
369
 
370
- #: lib/yith-system-status.php:123
371
  msgid "WooCommerce Version"
372
  msgstr ""
373
 
374
- #: lib/yith-system-status.php:124
375
  msgid "Available Memory"
376
  msgstr ""
377
 
378
- #: lib/yith-system-status.php:125
379
  msgid "PHP Version"
380
  msgstr ""
381
 
382
- #: lib/yith-system-status.php:126
383
  msgid "TLS Version"
384
  msgstr ""
385
 
386
- #: lib/yith-system-status.php:127
387
  msgid "WordPress Cron"
388
  msgstr ""
389
 
390
- #: lib/yith-system-status.php:128
391
  msgid "SimpleXML"
392
  msgstr ""
393
 
394
- #: lib/yith-system-status.php:129
395
  msgid "MultiByte String"
396
  msgstr ""
397
 
398
- #: lib/yith-system-status.php:130
399
  msgid "ImageMagick Version"
400
  msgstr ""
401
 
402
- #: lib/yith-system-status.php:131
403
  msgid "GD Library"
404
  msgstr ""
405
 
406
- #: lib/yith-system-status.php:132
407
  msgid "Iconv Module"
408
  msgstr ""
409
 
410
- #: lib/yith-system-status.php:133
411
  msgid "OPCache Save Comments"
412
  msgstr ""
413
 
414
- #: lib/yith-system-status.php:134
415
  msgid "URL FOpen"
416
  msgstr ""
417
 
418
- #: lib/yith-system-status.php:152 lib/yith-system-status.php:153
419
- #: templates/sysinfo/system-information-panel.php:14
 
420
  msgid "System Status"
421
  msgstr ""
422
 
423
- #: lib/yith-system-status.php:195
424
  msgid "YITH Plugins"
425
  msgstr ""
426
 
427
- #: lib/yith-system-status.php:203
428
  msgid "WooCommerce"
429
  msgstr ""
430
 
431
- #: lib/yith-system-status.php:355
432
  msgid "Warning!"
433
  msgstr ""
434
 
435
- #: lib/yith-system-status.php:359
436
  #. translators: %1$s open link tag, %2$s open link tag
437
  msgid ""
438
  "The system check has detected some compatibility issues on your "
439
  "installation.%1$sClick here%2$s to know more"
440
  msgstr ""
441
 
442
- #: lib/yith-system-status.php:544
443
  msgid "Enabled"
444
  msgstr ""
445
 
446
- #: lib/yith-system-status.php:544
447
  msgid "Disabled"
448
  msgstr ""
449
 
450
- #: lib/yith-system-status.php:549
451
  msgid "N/A"
452
  msgstr ""
453
 
454
- #: lib/yith-system-status.php:577
455
  #. translators: %1$s plugin name, %2$s requirement name
456
  msgid "%1$s needs %2$s enabled"
457
  msgstr ""
458
 
459
- #: lib/yith-system-status.php:580
460
  #. translators: %1$s plugin name, %2$s required memory amount
461
  msgid "%1$s needs at least %2$s of available memory"
462
  msgstr ""
463
 
464
- #: lib/yith-system-status.php:583
465
  #. translators: %1$s plugin name, %2$s version number
466
  msgid "%1$s needs at least %2$s version"
467
  msgstr ""
468
 
469
- #: lib/yith-system-status.php:608
470
  msgid ""
471
  "Update it to the latest version in order to benefit of all new features and "
472
  "security updates."
473
  msgstr ""
474
 
475
- #: lib/yith-system-status.php:612 lib/yith-system-status.php:618
 
476
  msgid "Contact your hosting company in order to update it."
477
  msgstr ""
478
 
479
- #: lib/yith-system-status.php:616
480
  msgid "Contact your hosting company in order to install it."
481
  msgstr ""
482
 
483
- #: lib/yith-system-status.php:623
484
  #. translators: %1$s code, %2$s file name
485
  msgid "Remove %1$s from %2$s file"
486
  msgstr ""
487
 
488
- #: lib/yith-system-status.php:631
489
  msgid "Contact your hosting company in order to enable it."
490
  msgstr ""
491
 
492
- #: lib/yith-system-status.php:635 lib/yith-system-status.php:659
 
493
  #. translators: %1$s opening link tag, %2$s closing link tag
494
  msgid ""
495
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
496
  "it."
497
  msgstr ""
498
 
499
- #: lib/yith-system-status.php:656
500
  #. translators: %s recommended memory amount
501
  msgid ""
502
  "For optimal functioning of our plugins, we suggest setting at least %s of "
503
  "available memory"
504
  msgstr ""
505
 
506
- #: lib/yith-system-status.php:664
507
  #. translators: %1$s TLS label, %2$s cURL label
508
  msgid ""
509
  "The system check cannot determine which %1$s version is installed because "
510
  "%2$s module is disabled. Ask your hosting company to enable it."
511
  msgstr ""
512
 
513
- #: lib/yith-system-status.php:667
514
  #. translators: %1$s TLS label
515
  msgid ""
516
  "The system check cannot determine which %1$s version is installed due to a "
517
  "connection issue between your site and our server."
518
  msgstr ""
519
 
520
- #: templates/fields/ajax-customers.php:57
521
  msgid "Search Customers"
522
  msgstr ""
523
 
524
- #: templates/fields/ajax-customers.php:83
525
- #: templates/fields/ajax-customers.php:93
 
526
  msgid "%1$s (#%2$s &ndash; %3$s)"
527
  msgstr ""
528
 
529
- #: templates/fields/ajax-posts.php:57
530
  msgid "Search Posts"
531
  msgstr ""
532
 
533
- #: templates/fields/ajax-products.php:16
534
  msgid "Search Product"
535
  msgstr ""
536
 
537
- #: templates/fields/customtabs.php:28
538
  msgid "Close all"
539
  msgstr ""
540
 
541
- #: templates/fields/customtabs.php:28
542
  msgid "Expand all"
543
  msgstr ""
544
 
545
- #: templates/fields/customtabs.php:37 templates/fields/customtabs.php:81
546
  msgid "Remove"
547
  msgstr ""
548
 
549
- #: templates/fields/customtabs.php:52 templates/fields/customtabs.php:94
550
  msgid "Value"
551
  msgstr ""
552
 
553
- #: templates/fields/customtabs.php:53 templates/fields/customtabs.php:95
554
  msgid "Content of the tab. (HTML is supported)"
555
  msgstr ""
556
 
557
- #: templates/fields/customtabs.php:65
558
  msgid "Add custom product tab"
559
  msgstr ""
560
 
561
- #: templates/fields/customtabs.php:106
562
  msgid "Do you want to remove the custom tab?"
563
  msgstr ""
564
 
565
- #: templates/fields/date-format.php:50
566
  msgid "Custom:"
567
  msgstr ""
568
 
569
- #: templates/fields/icons.php:58
 
 
 
 
570
  msgid "Set Default"
571
  msgstr ""
572
 
573
- #: templates/fields/image-gallery.php:34 templates/fields/image-gallery.php:39
574
  msgid "Delete image"
575
  msgstr ""
576
 
577
- #: templates/fields/image-gallery.php:39
578
  msgid "Add Images to Gallery"
579
  msgstr ""
580
 
581
- #: templates/fields/image-gallery.php:39
582
  msgid "Add to gallery"
583
  msgstr ""
584
 
@@ -586,27 +636,27 @@ msgstr ""
586
  msgid "Add images"
587
  msgstr ""
588
 
589
- #: templates/fields/image-gallery.php:39
590
  msgid "Delete"
591
  msgstr ""
592
 
593
- #: templates/fields/select-buttons.php:21
594
  msgid "Add All"
595
  msgstr ""
596
 
597
- #: templates/fields/select-buttons.php:34
598
  msgid "Remove All"
599
  msgstr ""
600
 
601
- #: templates/fields/sidebars.php:22
602
  msgid "Left sidebar"
603
  msgstr ""
604
 
605
- #: templates/fields/sidebars.php:25
606
  msgid "Right sidebar"
607
  msgstr ""
608
 
609
- #: templates/fields/sidebars.php:28 templates/fields/sidebars.php:31
610
  msgid "No sidebar"
611
  msgstr ""
612
 
@@ -614,116 +664,104 @@ msgstr ""
614
  msgid "Left Sidebar"
615
  msgstr ""
616
 
617
- #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:54
618
  msgid "Choose a sidebar"
619
  msgstr ""
620
 
621
- #: templates/fields/sidebars.php:52
622
  msgid "Right Sidebar"
623
  msgstr ""
624
 
625
- #: templates/fields/upload.php:27 templates/metaboxes/types/icon-list.php:70
626
- #: templates/panel/woocommerce/woocommerce-upload.php:40
627
  msgid "Upload"
628
  msgstr ""
629
 
630
- #: templates/fields/upload.php:29
631
  msgid "Reset"
632
  msgstr ""
633
 
634
- #: templates/metaboxes/types/icon-list.php:76
635
- msgid "Image preview"
636
- msgstr ""
637
-
638
- #: templates/metaboxes/types/icon-list.php:90
639
- msgid "(Default: %s <img src=\"%s\"/>)"
640
- msgstr ""
641
-
642
- #: templates/metaboxes/types/icon-list.php:92
643
- msgid "(Default: <i %s></i> )"
644
- msgstr ""
645
-
646
- #: templates/panel/woocommerce/woocommerce-form.php:22
647
  msgid "Reset Defaults"
648
  msgstr ""
649
 
650
- #: templates/sysinfo/system-information-panel.php:15
651
  msgid "PHPInfo"
652
  msgstr ""
653
 
654
- #: templates/sysinfo/system-information-panel.php:16
655
- #: templates/sysinfo/tabs/error-log.php:28
656
  msgid "Log Files"
657
  msgstr ""
658
 
659
- #: templates/sysinfo/system-information-panel.php:25
660
  msgid "YITH System Information"
661
  msgstr ""
662
 
663
- #: templates/sysinfo/tabs/error-log.php:16
664
  msgid "WP debug.log file"
665
  msgstr ""
666
 
667
- #: templates/sysinfo/tabs/error-log.php:21
668
  msgid "PHP error_log file"
669
  msgstr ""
670
 
671
- #: templates/sysinfo/tabs/error-log.php:64
672
  msgid "Download"
673
  msgstr ""
674
 
675
- #: templates/sysinfo/tabs/error-log.php:78
676
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
677
  msgstr ""
678
 
679
- #: templates/sysinfo/tabs/error-log.php:106
680
- #. translators: %s file name
681
  msgid ""
682
  "No Log file available. Enable the WordPress debug by adding this in the %s "
683
  "file of your installation"
684
  msgstr ""
685
 
686
- #: templates/sysinfo/tabs/error-log.php:115
687
  msgid "Copied!"
688
  msgstr ""
689
 
690
- #: templates/sysinfo/tabs/error-log.php:115
691
  msgid "Copy Code"
692
  msgstr ""
693
 
694
- #: templates/sysinfo/tabs/main.php:43
695
  msgid "Site Info"
696
  msgstr ""
697
 
698
- #: templates/sysinfo/tabs/main.php:48
699
  msgid "Site URL"
700
  msgstr ""
701
 
702
- #: templates/sysinfo/tabs/main.php:57
703
  msgid "Output IP Address"
704
  msgstr ""
705
 
706
- #: templates/sysinfo/tabs/main.php:65
707
  msgid "Defined WP_CACHE"
708
  msgstr ""
709
 
710
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
711
  msgid "Yes"
712
  msgstr ""
713
 
714
- #: templates/sysinfo/tabs/main.php:68 templates/sysinfo/tabs/main.php:76
715
  msgid "No"
716
  msgstr ""
717
 
718
- #: templates/sysinfo/tabs/main.php:73
719
  msgid "External object cache"
720
  msgstr ""
721
 
722
- #: templates/sysinfo/tabs/main.php:82
723
  msgid "Plugins Requirements"
724
  msgstr ""
725
 
726
- #: yit-plugin.php:194
727
  msgid "License"
728
  msgstr ""
729
 
@@ -731,12 +769,43 @@ msgstr ""
731
  msgid "YITH"
732
  msgstr ""
733
 
734
- #: lib/privacy/yit-privacy.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
  msgctxt "Privacy Policy Guide Title"
736
  msgid "YITH Plugins"
737
  msgstr ""
738
 
739
- #: lib/privacy/yit-privacy.php:59
740
  msgctxt "Privacy Policy Content"
741
  msgid ""
742
  "This sample language includes the basics around what personal data your "
@@ -747,112 +816,82 @@ msgid ""
747
  "information to disclose on your privacy policy."
748
  msgstr ""
749
 
750
- #: lib/privacy/yit-privacy.php:63
751
  msgctxt "Privacy Policy Content"
752
  msgid "What we collect and store"
753
  msgstr ""
754
 
755
- #: lib/privacy/yit-privacy.php:66
756
  msgctxt "Privacy Policy Content"
757
  msgid "Who on our team has access"
758
  msgstr ""
759
 
760
- #: lib/privacy/yit-privacy.php:69
761
  msgctxt "Privacy Policy Content"
762
  msgid "What we share with others"
763
  msgstr ""
764
 
765
- #: lib/privacy/yit-privacy.php:72
766
  msgctxt "Privacy Policy Content"
767
  msgid "Payments"
768
  msgstr ""
769
 
770
- #: lib/yit-cpt-unlimited.php:627
771
- msgctxt "taxonomy general name"
772
- msgid "%s Categories"
773
- msgstr ""
774
-
775
- #: lib/yit-cpt-unlimited.php:628
776
- msgctxt "taxonomy singular name"
777
- msgid "Category"
778
- msgstr ""
779
-
780
- #: lib/yith-dashboard.php:99
781
- msgctxt "Plugin FW"
782
- msgid "View Changelog"
783
- msgstr ""
784
-
785
- #: lib/yith-dashboard.php:100
786
- msgctxt "Plugin FW"
787
- msgid "Latest update released on"
788
- msgstr ""
789
-
790
- #: lib/yith-dashboard.php:143
791
- msgctxt "Button label"
792
- msgid "Close"
793
- msgstr ""
794
-
795
- #: lib/yith-gutenberg.php:134
796
- msgctxt "[gutenberg]: Category Name"
797
- msgid "YITH"
798
- msgstr ""
799
-
800
- #: templates/fields/dimensions.php:16
801
  msgctxt "Position in the \"Dimensions\" field"
802
  msgid "Top"
803
  msgstr ""
804
 
805
- #: templates/fields/dimensions.php:17
806
  msgctxt "Position in the \"Dimensions\" field"
807
  msgid "Right"
808
  msgstr ""
809
 
810
- #: templates/fields/dimensions.php:18
811
  msgctxt "Position in the \"Dimensions\" field"
812
  msgid "Bottom"
813
  msgstr ""
814
 
815
- #: templates/fields/dimensions.php:19
816
  msgctxt "Position in the \"Dimensions\" field"
817
  msgid "Left"
818
  msgstr ""
819
 
820
- #: templates/fields/dimensions.php:99
821
  msgctxt "Tooltip in the \"Dimensions\" field"
822
  msgid "Link values together"
823
  msgstr ""
824
 
825
- #: templates/fields/onoff.php:24
826
  msgctxt "YES/NO button: use MAX 3 characters!"
827
  msgid "YES"
828
  msgstr ""
829
 
830
- #: templates/fields/onoff.php:25
831
  msgctxt "YES/NO button: use MAX 3 characters!"
832
  msgid "NO"
833
  msgstr ""
834
 
835
- #: yit-plugin.php:83
836
  msgctxt "Plugin Row Meta"
837
  msgid "Live Demo"
838
  msgstr ""
839
 
840
- #: yit-plugin.php:88
841
  msgctxt "Plugin Row Meta"
842
  msgid "Documentation"
843
  msgstr ""
844
 
845
- #: yit-plugin.php:93
846
  msgctxt "Plugin Row Meta"
847
  msgid "Support"
848
  msgstr ""
849
 
850
- #: yit-plugin.php:98
851
  msgctxt "Plugin Row Meta"
852
  msgid "Premium version"
853
  msgstr ""
854
 
855
- #: yit-plugin.php:190
856
  msgctxt "Action links"
857
  msgid "Settings"
858
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2020-12-28 12:30:11+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
24
  "X-Textdomain-Support: yes\n"
25
  "X-Generator: grunt-wp-i18n 1.0.3\n"
26
 
27
+ #: includes/class-yit-assets.php:117
28
  msgid "Clear"
29
  msgstr ""
30
 
31
+ #: includes/class-yit-assets.php:118
32
  msgid "Clear color"
33
  msgstr ""
34
 
35
+ #: includes/class-yit-assets.php:119
36
  msgid "Default"
37
  msgstr ""
38
 
39
+ #: includes/class-yit-assets.php:120
40
  msgid "Select default color"
41
  msgstr ""
42
 
43
+ #: includes/class-yit-assets.php:121
44
  msgid "Select Color"
45
  msgstr ""
46
 
47
+ #: includes/class-yit-assets.php:122
48
  msgid "Color value"
49
  msgstr ""
50
 
51
+ #: includes/class-yit-cpt-unlimited.php:486
52
+ #: includes/class-yit-cpt-unlimited.php:619
53
+ #: includes/class-yit-cpt-unlimited.php:768
54
+ #: includes/class-yit-cpt-unlimited.php:1755
55
+ #. translators: %s is the singular name of the post type.
56
+ #. translators: $s is the singular name of the post type.
57
+ #. translators: %s is the singular name of the post type.
58
+ #. translators: %s is the plural name of the post type.
59
  msgid "Add %s"
60
  msgstr ""
61
 
62
+ #: includes/class-yit-cpt-unlimited.php:488
63
+ #: includes/class-yit-cpt-unlimited.php:621
64
+ #. translators: %s is the singular name of the post type.
65
+ #. translators: $s is the singular name of the post type.
66
  msgid "Add New %s"
67
  msgstr ""
68
 
69
+ #: includes/class-yit-cpt-unlimited.php:490
70
+ #: includes/class-yit-cpt-unlimited.php:623
71
+ #: includes/class-yit-cpt-unlimited.php:1350
72
+ #: includes/class-yit-cpt-unlimited.php:1401
73
+ #. translators: %s is the singular name of the post type.
74
+ #. translators: $s is the singular name of the post type.
75
+ #. translators: %s is the post title.
76
+ #. translators: %s is the singular name of the post type.
77
  msgid "Edit %s"
78
  msgstr ""
79
 
80
+ #: includes/class-yit-cpt-unlimited.php:492
81
+ #: includes/class-yit-cpt-unlimited.php:625
82
+ #. translators: %s is the singular name of the post type.
83
+ #. translators: $s is the singular name of the post type.
84
  msgid "New %s"
85
  msgstr ""
86
 
87
+ #: includes/class-yit-cpt-unlimited.php:494
88
+ #: includes/class-yit-cpt-unlimited.php:627
89
+ #. translators: %s is the plural name of the post type.
90
+ #. translators: $s is the plural name of the post type.
91
  msgid "All %s"
92
  msgstr ""
93
 
94
+ #: includes/class-yit-cpt-unlimited.php:496
95
+ #: includes/class-yit-cpt-unlimited.php:629
96
+ #: includes/class-yit-cpt-unlimited.php:1323
97
+ #: includes/class-yit-cpt-unlimited.php:1406
98
+ #. translators: %s is the singular name of the post type.
99
+ #. translators: $s is the singular name of the post type.
100
+ #. translators: %s is the plural label of the post type.
101
+ #. translators: %s is the plural name of the post type.
102
  msgid "View %s"
103
  msgstr ""
104
 
105
+ #: includes/class-yit-cpt-unlimited.php:498
106
+ #: includes/class-yit-cpt-unlimited.php:631
107
+ #. translators: %s is the plural name of the post type.
108
+ #. translators: $s is the plural name of the post type.
109
  msgid "Search %s"
110
  msgstr ""
111
 
112
+ #: includes/class-yit-cpt-unlimited.php:500
113
+ #: includes/class-yit-cpt-unlimited.php:633
114
+ #. translators: %s is the plural name of the post type.
115
+ #. translators: $s is the plural name of the post type.
116
  msgid "No %s found"
117
  msgstr ""
118
 
119
+ #: includes/class-yit-cpt-unlimited.php:502
120
+ #: includes/class-yit-cpt-unlimited.php:635
121
+ #. translators: %s is the plural name of the post type.
122
+ #. translators: $s is the plural name of the post type.
123
  msgid "No %s found in Trash"
124
  msgstr ""
125
 
126
+ #: includes/class-yit-cpt-unlimited.php:678 templates/fields/ajax-terms.php:41
127
  msgid "Search Categories"
128
  msgstr ""
129
 
130
+ #: includes/class-yit-cpt-unlimited.php:679
131
  msgid "All Categories"
132
  msgstr ""
133
 
134
+ #: includes/class-yit-cpt-unlimited.php:680
135
  msgid "Parent Category"
136
  msgstr ""
137
 
138
+ #: includes/class-yit-cpt-unlimited.php:681
139
  msgid "Parent Category:"
140
  msgstr ""
141
 
142
+ #: includes/class-yit-cpt-unlimited.php:682
143
  msgid "Edit Category"
144
  msgstr ""
145
 
146
+ #: includes/class-yit-cpt-unlimited.php:683
147
  msgid "Update Category"
148
  msgstr ""
149
 
150
+ #: includes/class-yit-cpt-unlimited.php:684
151
  msgid "Add New Category"
152
  msgstr ""
153
 
154
+ #: includes/class-yit-cpt-unlimited.php:685
155
  msgid "New Category Name"
156
  msgstr ""
157
 
158
+ #: includes/class-yit-cpt-unlimited.php:686
159
  msgid "Category"
160
  msgstr ""
161
 
162
+ #: includes/class-yit-cpt-unlimited.php:778
163
  msgid "Categories"
164
  msgstr ""
165
 
166
+ #: includes/class-yit-cpt-unlimited.php:1098
167
+ #. translators: %s is the singular name of the post type.
168
  msgid "%s Settings"
169
  msgstr ""
170
 
171
+ #: includes/class-yit-cpt-unlimited.php:1106
172
+ #: includes/class-yit-cpt-unlimited.php:1260
173
+ #: includes/class-yit-cpt-unlimited.php:1266
174
+ #: includes/class-yit-plugin-panel.php:84
175
  msgid "Settings"
176
  msgstr ""
177
 
178
+ #: includes/class-yit-cpt-unlimited.php:1111
179
  msgid "Type"
180
  msgstr ""
181
 
182
+ #: includes/class-yit-cpt-unlimited.php:1114
183
+ #. translators: %s is the singular name of the post type.
184
  msgid "Layout for this %s"
185
  msgstr ""
186
 
187
+ #: includes/class-yit-cpt-unlimited.php:1122
188
  msgid "Rewrite"
189
  msgstr ""
190
 
191
+ #: includes/class-yit-cpt-unlimited.php:1123
192
  msgid ""
193
  "Univocal identification name in the URL for each product (slug from post if "
194
  "empty)"
195
  msgstr ""
196
 
197
+ #: includes/class-yit-cpt-unlimited.php:1128
198
  msgid "Label in Singular"
199
  msgstr ""
200
 
201
+ #: includes/class-yit-cpt-unlimited.php:1129
202
  msgid "Set a label in singular (title of portfolio if empty)"
203
  msgstr ""
204
 
205
+ #: includes/class-yit-cpt-unlimited.php:1134
206
  msgid "Label in Plural"
207
  msgstr ""
208
 
209
+ #: includes/class-yit-cpt-unlimited.php:1135
210
  msgid "Set a label in plural (title of portfolio if empty)"
211
  msgstr ""
212
 
213
+ #: includes/class-yit-cpt-unlimited.php:1140
214
  msgid "Taxonomy"
215
  msgstr ""
216
 
217
+ #: includes/class-yit-cpt-unlimited.php:1141
218
  msgid ""
219
  "If you want to use categories in the portfolio, set a name for taxonomy. "
220
  "Name should be a slug (must not contain capital letters nor spaces) and "
221
  "must not be more than 32 characters long (database structure restriction)."
222
  msgstr ""
223
 
224
+ #: includes/class-yit-cpt-unlimited.php:1146
225
  msgid "Taxonomy Rewrite"
226
  msgstr ""
227
 
228
+ #: includes/class-yit-cpt-unlimited.php:1147
229
  msgid "Set univocal name for each category page URL."
230
  msgstr ""
231
 
232
+ #: includes/class-yit-cpt-unlimited.php:1152
233
  msgid "Single layout"
234
  msgstr ""
235
 
236
+ #: includes/class-yit-cpt-unlimited.php:1153
237
  msgid "Layout for single page of this portfolio"
238
  msgstr ""
239
 
240
+ #: includes/class-yit-cpt-unlimited.php:1196
241
  msgid "layout settings"
242
  msgstr ""
243
 
244
+ #: includes/class-yit-cpt-unlimited.php:1286
245
+ #: includes/class-yit-cpt-unlimited.php:1297
246
  msgid "Quick links"
247
  msgstr ""
248
 
249
+ #: includes/class-yit-cpt-unlimited.php:1593
250
+ #. translators: %s is the name of the post type.
251
  msgid "Show frontend of the %s"
252
  msgstr ""
253
 
254
+ #: includes/class-yit-cpt-unlimited.php:1602 templates/fields/customtabs.php:34
255
+ #: templates/fields/customtabs.php:76
256
  msgid "Name"
257
  msgstr ""
258
 
259
+ #: includes/class-yit-cpt-unlimited.php:1749
260
+ #. translators: %s is the plural name of the post type.
261
  msgid "Add %s from images"
262
  msgstr ""
263
 
264
+ #: includes/class-yit-cpt-unlimited.php:1769
265
  msgid "Upload multiple files"
266
  msgstr ""
267
 
268
+ #: includes/class-yit-plugin-panel-woocommerce.php:419
269
  msgid "The changes you have made will be lost if you leave this page."
270
  msgstr ""
271
 
272
+ #: includes/class-yit-plugin-panel.php:83
273
  msgid "Plugin Settings"
274
  msgstr ""
275
 
276
+ #: includes/class-yit-plugin-panel.php:450
277
+ #: includes/class-yit-plugin-panel.php:453
278
  msgid "How to install premium version"
279
  msgstr ""
280
 
281
+ #: includes/class-yit-plugin-panel.php:619
282
+ #: includes/class-yit-plugin-subpanel.php:132
283
+ #: templates/panel/woocommerce/woocommerce-form.php:28
284
  msgid "Save Changes"
285
  msgstr ""
286
 
287
+ #: includes/class-yit-plugin-panel.php:624
288
+ #: includes/class-yit-plugin-subpanel.php:136
289
+ #: templates/panel/woocommerce/woocommerce-form.php:14
290
  msgid "If you continue with this action, you will reset all options in this page."
291
  msgstr ""
292
 
293
+ #: includes/class-yit-plugin-panel.php:624
294
+ #: includes/class-yit-plugin-subpanel.php:136
295
+ #: templates/panel/woocommerce/woocommerce-form.php:14
296
+ msgid "Are you sure?"
297
  msgstr ""
298
 
299
+ #: includes/class-yit-plugin-panel.php:628
300
+ #: includes/class-yit-plugin-subpanel.php:139
301
+ msgid "Reset to default"
302
  msgstr ""
303
 
304
+ #: includes/class-yit-plugin-panel.php:865
305
  msgid "The element you have entered already exists. Please, enter another name."
306
  msgstr ""
307
 
308
+ #: includes/class-yit-plugin-panel.php:866
309
  msgid "Settings saved"
310
  msgstr ""
311
 
312
+ #: includes/class-yit-plugin-panel.php:867
313
  msgid "Settings reset"
314
  msgstr ""
315
 
316
+ #: includes/class-yit-plugin-panel.php:868
317
  msgid "Element deleted correctly."
318
  msgstr ""
319
 
320
+ #: includes/class-yit-plugin-panel.php:869
321
+ #: includes/class-yit-plugin-panel.php:870
322
  msgid "Element updated correctly."
323
  msgstr ""
324
 
325
+ #: includes/class-yit-plugin-panel.php:871
326
  msgid "Database imported correctly."
327
  msgstr ""
328
 
329
+ #: includes/class-yit-plugin-panel.php:872
330
  msgid "An error has occurred during import. Please try again."
331
  msgstr ""
332
 
333
+ #: includes/class-yit-plugin-panel.php:873
334
  msgid "The added file is not valid."
335
  msgstr ""
336
 
337
+ #: includes/class-yit-plugin-panel.php:874
338
  msgid "Sorry, import is disabled."
339
  msgstr ""
340
 
341
+ #: includes/class-yit-plugin-panel.php:875
342
  msgid "Sorting successful."
343
  msgstr ""
344
 
345
+ #: includes/class-yit-plugin-panel.php:1343
346
  msgid "We need your support"
347
  msgstr ""
348
 
349
+ #: includes/class-yit-plugin-panel.php:1344
350
  msgid "to keep updating and improving the plugin. Please,"
351
  msgstr ""
352
 
353
+ #: includes/class-yit-plugin-panel.php:1346
354
  msgid "help us by leaving a five-star rating"
355
  msgstr ""
356
 
357
+ #: includes/class-yit-plugin-panel.php:1347
358
  msgid ":) Thanks!"
359
  msgstr ""
360
 
361
+ #: includes/class-yit-pointers.php:80
362
  msgid "Plugins Activated"
363
  msgstr ""
364
 
365
+ #: includes/class-yit-pointers.php:81
366
  msgid ""
367
+ "From now on, you can find all plugin options in YITH Plugins menu. Plugin "
368
+ "customization settings will be available as a new entry in YITH Plugins "
369
+ "menu."
370
  msgstr ""
371
 
372
+ #: includes/class-yit-pointers.php:84 includes/class-yit-pointers.php:100
373
+ #. translators: 1. YITH site link; 2. WordPress site link.
374
+ msgid "Discover all our plugins available on: %1$s and %2$s"
375
  msgstr ""
376
 
377
+ #: includes/class-yit-pointers.php:96
 
 
 
 
378
  msgid "Plugins Upgraded"
379
  msgstr ""
380
 
381
+ #: includes/class-yit-pointers.php:97
382
  msgid ""
383
  "From now on, you can find the option panel of YITH plugins in YITH Plugins "
384
+ "menu. Every time one of our plugins is added, a new entry will be added to "
385
+ "this menu. For example, after the update, plugin options (such as for YITH "
386
+ "WooCommerce Wishlist, YITH WooCommerce Ajax Search, etc.) will be moved "
387
+ "from previous location to YITH Plugins tab."
 
 
 
 
388
  msgstr ""
389
 
390
+ #: includes/class-yith-dashboard.php:35
391
  msgid "YITH Latest Updates"
392
  msgstr ""
393
 
394
+ #: includes/class-yith-dashboard.php:36
395
  msgid "Latest news from YITH Blog"
396
  msgstr ""
397
 
398
+ #: includes/class-yith-dashboard.php:56
399
  msgid "RSS Error:"
400
  msgstr ""
401
 
402
+ #: includes/class-yith-dashboard.php:63
403
  msgid ""
404
  "An error has occurred, which probably means the feed is down. Try again "
405
  "later."
406
  msgstr ""
407
 
408
+ #: includes/class-yith-system-status.php:110
409
  msgid "WordPress Version"
410
  msgstr ""
411
 
412
+ #: includes/class-yith-system-status.php:111
413
  msgid "WooCommerce Version"
414
  msgstr ""
415
 
416
+ #: includes/class-yith-system-status.php:112
417
  msgid "Available Memory"
418
  msgstr ""
419
 
420
+ #: includes/class-yith-system-status.php:113
421
  msgid "PHP Version"
422
  msgstr ""
423
 
424
+ #: includes/class-yith-system-status.php:114
425
  msgid "TLS Version"
426
  msgstr ""
427
 
428
+ #: includes/class-yith-system-status.php:115
429
  msgid "WordPress Cron"
430
  msgstr ""
431
 
432
+ #: includes/class-yith-system-status.php:116
433
  msgid "SimpleXML"
434
  msgstr ""
435
 
436
+ #: includes/class-yith-system-status.php:117
437
  msgid "MultiByte String"
438
  msgstr ""
439
 
440
+ #: includes/class-yith-system-status.php:118
441
  msgid "ImageMagick Version"
442
  msgstr ""
443
 
444
+ #: includes/class-yith-system-status.php:119
445
  msgid "GD Library"
446
  msgstr ""
447
 
448
+ #: includes/class-yith-system-status.php:120
449
  msgid "Iconv Module"
450
  msgstr ""
451
 
452
+ #: includes/class-yith-system-status.php:121
453
  msgid "OPCache Save Comments"
454
  msgstr ""
455
 
456
+ #: includes/class-yith-system-status.php:122
457
  msgid "URL FOpen"
458
  msgstr ""
459
 
460
+ #: includes/class-yith-system-status.php:140
461
+ #: includes/class-yith-system-status.php:141
462
+ #: templates/sysinfo/system-information-panel.php:11
463
  msgid "System Status"
464
  msgstr ""
465
 
466
+ #: includes/class-yith-system-status.php:183
467
  msgid "YITH Plugins"
468
  msgstr ""
469
 
470
+ #: includes/class-yith-system-status.php:191
471
  msgid "WooCommerce"
472
  msgstr ""
473
 
474
+ #: includes/class-yith-system-status.php:342
475
  msgid "Warning!"
476
  msgstr ""
477
 
478
+ #: includes/class-yith-system-status.php:346
479
  #. translators: %1$s open link tag, %2$s open link tag
480
  msgid ""
481
  "The system check has detected some compatibility issues on your "
482
  "installation.%1$sClick here%2$s to know more"
483
  msgstr ""
484
 
485
+ #: includes/class-yith-system-status.php:488
486
  msgid "Enabled"
487
  msgstr ""
488
 
489
+ #: includes/class-yith-system-status.php:488
490
  msgid "Disabled"
491
  msgstr ""
492
 
493
+ #: includes/class-yith-system-status.php:493
494
  msgid "N/A"
495
  msgstr ""
496
 
497
+ #: includes/class-yith-system-status.php:520
498
  #. translators: %1$s plugin name, %2$s requirement name
499
  msgid "%1$s needs %2$s enabled"
500
  msgstr ""
501
 
502
+ #: includes/class-yith-system-status.php:523
503
  #. translators: %1$s plugin name, %2$s required memory amount
504
  msgid "%1$s needs at least %2$s of available memory"
505
  msgstr ""
506
 
507
+ #: includes/class-yith-system-status.php:526
508
  #. translators: %1$s plugin name, %2$s version number
509
  msgid "%1$s needs at least %2$s version"
510
  msgstr ""
511
 
512
+ #: includes/class-yith-system-status.php:550
513
  msgid ""
514
  "Update it to the latest version in order to benefit of all new features and "
515
  "security updates."
516
  msgstr ""
517
 
518
+ #: includes/class-yith-system-status.php:554
519
+ #: includes/class-yith-system-status.php:560
520
  msgid "Contact your hosting company in order to update it."
521
  msgstr ""
522
 
523
+ #: includes/class-yith-system-status.php:558
524
  msgid "Contact your hosting company in order to install it."
525
  msgstr ""
526
 
527
+ #: includes/class-yith-system-status.php:565
528
  #. translators: %1$s code, %2$s file name
529
  msgid "Remove %1$s from %2$s file"
530
  msgstr ""
531
 
532
+ #: includes/class-yith-system-status.php:573
533
  msgid "Contact your hosting company in order to enable it."
534
  msgstr ""
535
 
536
+ #: includes/class-yith-system-status.php:577
537
+ #: includes/class-yith-system-status.php:600
538
  #. translators: %1$s opening link tag, %2$s closing link tag
539
  msgid ""
540
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
541
  "it."
542
  msgstr ""
543
 
544
+ #: includes/class-yith-system-status.php:597
545
  #. translators: %s recommended memory amount
546
  msgid ""
547
  "For optimal functioning of our plugins, we suggest setting at least %s of "
548
  "available memory"
549
  msgstr ""
550
 
551
+ #: includes/class-yith-system-status.php:605
552
  #. translators: %1$s TLS label, %2$s cURL label
553
  msgid ""
554
  "The system check cannot determine which %1$s version is installed because "
555
  "%2$s module is disabled. Ask your hosting company to enable it."
556
  msgstr ""
557
 
558
+ #: includes/class-yith-system-status.php:608
559
  #. translators: %1$s TLS label
560
  msgid ""
561
  "The system check cannot determine which %1$s version is installed due to a "
562
  "connection issue between your site and our server."
563
  msgstr ""
564
 
565
+ #: templates/fields/ajax-customers.php:41
566
  msgid "Search Customers"
567
  msgstr ""
568
 
569
+ #: templates/fields/ajax-customers.php:68
570
+ #: templates/fields/ajax-customers.php:79
571
+ #. translators: 1. user display name; 2. user ID; 3. user email.
572
  msgid "%1$s (#%2$s &ndash; %3$s)"
573
  msgstr ""
574
 
575
+ #: templates/fields/ajax-posts.php:41
576
  msgid "Search Posts"
577
  msgstr ""
578
 
579
+ #: templates/fields/ajax-products.php:14
580
  msgid "Search Product"
581
  msgstr ""
582
 
583
+ #: templates/fields/customtabs.php:17
584
  msgid "Close all"
585
  msgstr ""
586
 
587
+ #: templates/fields/customtabs.php:17
588
  msgid "Expand all"
589
  msgstr ""
590
 
591
+ #: templates/fields/customtabs.php:25 templates/fields/customtabs.php:68
592
  msgid "Remove"
593
  msgstr ""
594
 
595
+ #: templates/fields/customtabs.php:40 templates/fields/customtabs.php:81
596
  msgid "Value"
597
  msgstr ""
598
 
599
+ #: templates/fields/customtabs.php:41 templates/fields/customtabs.php:82
600
  msgid "Content of the tab. (HTML is supported)"
601
  msgstr ""
602
 
603
+ #: templates/fields/customtabs.php:52
604
  msgid "Add custom product tab"
605
  msgstr ""
606
 
607
+ #: templates/fields/customtabs.php:93
608
  msgid "Do you want to remove the custom tab?"
609
  msgstr ""
610
 
611
+ #: templates/fields/date-format.php:65
612
  msgid "Custom:"
613
  msgstr ""
614
 
615
+ #: templates/fields/date-format.php:70
616
+ msgid "Preview:"
617
+ msgstr ""
618
+
619
+ #: templates/fields/icons.php:63
620
  msgid "Set Default"
621
  msgstr ""
622
 
623
+ #: templates/fields/image-gallery.php:29 templates/fields/image-gallery.php:40
624
  msgid "Delete image"
625
  msgstr ""
626
 
627
+ #: templates/fields/image-gallery.php:37
628
  msgid "Add Images to Gallery"
629
  msgstr ""
630
 
631
+ #: templates/fields/image-gallery.php:38
632
  msgid "Add to gallery"
633
  msgstr ""
634
 
636
  msgid "Add images"
637
  msgstr ""
638
 
639
+ #: templates/fields/image-gallery.php:41
640
  msgid "Delete"
641
  msgstr ""
642
 
643
+ #: templates/fields/select-buttons.php:19
644
  msgid "Add All"
645
  msgstr ""
646
 
647
+ #: templates/fields/select-buttons.php:32
648
  msgid "Remove All"
649
  msgstr ""
650
 
651
+ #: templates/fields/sidebars.php:20
652
  msgid "Left sidebar"
653
  msgstr ""
654
 
655
+ #: templates/fields/sidebars.php:23
656
  msgid "Right sidebar"
657
  msgstr ""
658
 
659
+ #: templates/fields/sidebars.php:26 templates/fields/sidebars.php:29
660
  msgid "No sidebar"
661
  msgstr ""
662
 
664
  msgid "Left Sidebar"
665
  msgstr ""
666
 
667
+ #: templates/fields/sidebars.php:41 templates/fields/sidebars.php:56
668
  msgid "Choose a sidebar"
669
  msgstr ""
670
 
671
+ #: templates/fields/sidebars.php:54
672
  msgid "Right Sidebar"
673
  msgstr ""
674
 
675
+ #: templates/fields/upload.php:34
676
+ #: templates/panel/woocommerce/woocommerce-upload.php:37
677
  msgid "Upload"
678
  msgstr ""
679
 
680
+ #: templates/fields/upload.php:39
681
  msgid "Reset"
682
  msgstr ""
683
 
684
+ #: templates/panel/woocommerce/woocommerce-form.php:34
 
 
 
 
 
 
 
 
 
 
 
 
685
  msgid "Reset Defaults"
686
  msgstr ""
687
 
688
+ #: templates/sysinfo/system-information-panel.php:12
689
  msgid "PHPInfo"
690
  msgstr ""
691
 
692
+ #: templates/sysinfo/system-information-panel.php:13
693
+ #: templates/sysinfo/tabs/error-log.php:25
694
  msgid "Log Files"
695
  msgstr ""
696
 
697
+ #: templates/sysinfo/system-information-panel.php:22
698
  msgid "YITH System Information"
699
  msgstr ""
700
 
701
+ #: templates/sysinfo/tabs/error-log.php:13
702
  msgid "WP debug.log file"
703
  msgstr ""
704
 
705
+ #: templates/sysinfo/tabs/error-log.php:18
706
  msgid "PHP error_log file"
707
  msgstr ""
708
 
709
+ #: templates/sysinfo/tabs/error-log.php:60
710
  msgid "Download"
711
  msgstr ""
712
 
713
+ #: templates/sysinfo/tabs/error-log.php:72
714
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
715
  msgstr ""
716
 
717
+ #: templates/sysinfo/tabs/error-log.php:96
718
+ #. translators: %s file name.
719
  msgid ""
720
  "No Log file available. Enable the WordPress debug by adding this in the %s "
721
  "file of your installation"
722
  msgstr ""
723
 
724
+ #: templates/sysinfo/tabs/error-log.php:105
725
  msgid "Copied!"
726
  msgstr ""
727
 
728
+ #: templates/sysinfo/tabs/error-log.php:105
729
  msgid "Copy Code"
730
  msgstr ""
731
 
732
+ #: templates/sysinfo/tabs/main.php:15
733
  msgid "Site Info"
734
  msgstr ""
735
 
736
+ #: templates/sysinfo/tabs/main.php:20
737
  msgid "Site URL"
738
  msgstr ""
739
 
740
+ #: templates/sysinfo/tabs/main.php:29
741
  msgid "Output IP Address"
742
  msgstr ""
743
 
744
+ #: templates/sysinfo/tabs/main.php:37
745
  msgid "Defined WP_CACHE"
746
  msgstr ""
747
 
748
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
749
  msgid "Yes"
750
  msgstr ""
751
 
752
+ #: templates/sysinfo/tabs/main.php:40 templates/sysinfo/tabs/main.php:48
753
  msgid "No"
754
  msgstr ""
755
 
756
+ #: templates/sysinfo/tabs/main.php:45
757
  msgid "External object cache"
758
  msgstr ""
759
 
760
+ #: templates/sysinfo/tabs/main.php:54
761
  msgid "Plugins Requirements"
762
  msgstr ""
763
 
764
+ #: yit-plugin.php:187
765
  msgid "License"
766
  msgstr ""
767
 
769
  msgid "YITH"
770
  msgstr ""
771
 
772
+ #: includes/class-yit-cpt-unlimited.php:676
773
+ #. translators: %s is the singular name of the post type.
774
+ msgctxt "taxonomy general name"
775
+ msgid "%s Categories"
776
+ msgstr ""
777
+
778
+ #: includes/class-yit-cpt-unlimited.php:677
779
+ msgctxt "taxonomy singular name"
780
+ msgid "Category"
781
+ msgstr ""
782
+
783
+ #: includes/class-yith-dashboard.php:96
784
+ msgctxt "Plugin FW"
785
+ msgid "View Changelog"
786
+ msgstr ""
787
+
788
+ #: includes/class-yith-dashboard.php:97
789
+ msgctxt "Plugin FW"
790
+ msgid "Latest update released on"
791
+ msgstr ""
792
+
793
+ #: includes/class-yith-dashboard.php:137
794
+ msgctxt "Button label"
795
+ msgid "Close"
796
+ msgstr ""
797
+
798
+ #: includes/class-yith-gutenberg.php:131
799
+ msgctxt "[gutenberg]: Category Name"
800
+ msgid "YITH"
801
+ msgstr ""
802
+
803
+ #: includes/privacy/class-yith-privacy.php:61
804
  msgctxt "Privacy Policy Guide Title"
805
  msgid "YITH Plugins"
806
  msgstr ""
807
 
808
+ #: includes/privacy/class-yith-privacy.php:93
809
  msgctxt "Privacy Policy Content"
810
  msgid ""
811
  "This sample language includes the basics around what personal data your "
816
  "information to disclose on your privacy policy."
817
  msgstr ""
818
 
819
+ #: includes/privacy/class-yith-privacy.php:97
820
  msgctxt "Privacy Policy Content"
821
  msgid "What we collect and store"
822
  msgstr ""
823
 
824
+ #: includes/privacy/class-yith-privacy.php:100
825
  msgctxt "Privacy Policy Content"
826
  msgid "Who on our team has access"
827
  msgstr ""
828
 
829
+ #: includes/privacy/class-yith-privacy.php:103
830
  msgctxt "Privacy Policy Content"
831
  msgid "What we share with others"
832
  msgstr ""
833
 
834
+ #: includes/privacy/class-yith-privacy.php:106
835
  msgctxt "Privacy Policy Content"
836
  msgid "Payments"
837
  msgstr ""
838
 
839
+ #: templates/fields/dimensions.php:13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
840
  msgctxt "Position in the \"Dimensions\" field"
841
  msgid "Top"
842
  msgstr ""
843
 
844
+ #: templates/fields/dimensions.php:14
845
  msgctxt "Position in the \"Dimensions\" field"
846
  msgid "Right"
847
  msgstr ""
848
 
849
+ #: templates/fields/dimensions.php:15
850
  msgctxt "Position in the \"Dimensions\" field"
851
  msgid "Bottom"
852
  msgstr ""
853
 
854
+ #: templates/fields/dimensions.php:16
855
  msgctxt "Position in the \"Dimensions\" field"
856
  msgid "Left"
857
  msgstr ""
858
 
859
+ #: templates/fields/dimensions.php:88
860
  msgctxt "Tooltip in the \"Dimensions\" field"
861
  msgid "Link values together"
862
  msgstr ""
863
 
864
+ #: templates/fields/onoff.php:28
865
  msgctxt "YES/NO button: use MAX 3 characters!"
866
  msgid "YES"
867
  msgstr ""
868
 
869
+ #: templates/fields/onoff.php:29
870
  msgctxt "YES/NO button: use MAX 3 characters!"
871
  msgid "NO"
872
  msgstr ""
873
 
874
+ #: yit-plugin.php:75
875
  msgctxt "Plugin Row Meta"
876
  msgid "Live Demo"
877
  msgstr ""
878
 
879
+ #: yit-plugin.php:79
880
  msgctxt "Plugin Row Meta"
881
  msgid "Documentation"
882
  msgstr ""
883
 
884
+ #: yit-plugin.php:83
885
  msgctxt "Plugin Row Meta"
886
  msgid "Support"
887
  msgstr ""
888
 
889
+ #: yit-plugin.php:87
890
  msgctxt "Plugin Row Meta"
891
  msgid "Premium version"
892
  msgstr ""
893
 
894
+ #: yit-plugin.php:183
895
  msgctxt "Action links"
896
  msgid "Settings"
897
  msgstr ""
plugin-fw/lib/privacy/yit-privacy-plugin-abstract.php CHANGED
@@ -1,29 +1,11 @@
1
  <?php
2
- !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
3
-
4
- if ( !class_exists( 'YITH_Privacy_Plugin_Abstract' ) ) {
5
- class YITH_Privacy_Plugin_Abstract {
6
- private $_name;
7
-
8
- public function __construct( $name ) {
9
- $this->_name = $name;
10
- $this->init();
11
- }
12
-
13
- protected function init() {
14
- add_filter( 'yith_plugin_fw_privacy_guide_content', array( $this, 'add_message_in_section' ), 10, 2 );
15
- }
16
-
17
- public function add_message_in_section( $html, $section ) {
18
- if ( $message = $this->get_privacy_message( $section ) ) {
19
- $html .= "<p class='privacy-policy-tutorial'><strong>{$this->_name}</strong></p>";
20
- $html .= $message;
21
- }
22
- return $html;
23
- }
24
-
25
- public function get_privacy_message( $section ) {
26
- return '';
27
- }
28
- }
29
- }
1
  <?php
2
+ /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
+ *
5
+ * @package YITH\PluginFramework\Classes
6
+ */
7
+
8
+ /**
9
+ * Require the correct file
10
+ */
11
+ require_once __DIR__ . '/../../includes/privacy/class-yith-privacy-plugin-abstract.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/lib/privacy/yit-privacy.php CHANGED
@@ -1,79 +1,11 @@
1
  <?php
2
- !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
3
-
4
- if ( !class_exists( 'YITH_Privacy' ) ) {
5
- /**
6
- * Class YITH_Privacy
7
- * Privacy Class
8
- *
9
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
10
- */
11
- class YITH_Privacy {
12
- private static $_instance;
13
-
14
- private $_title;
15
-
16
- public static function get_instance() {
17
- return !is_null( self::$_instance ) ? self::$_instance : self::$_instance = new self();
18
- }
19
-
20
- /**
21
- * YITH_Privacy constructor.
22
- */
23
- private function __construct() {
24
- $this->_title = apply_filters( 'yith_plugin_fw_privacy_policy_guide_title', _x( 'YITH Plugins', 'Privacy Policy Guide Title', 'yith-plugin-fw' ) );
25
- add_action( 'admin_init', array( $this, 'add_privacy_message' ) );
26
- }
27
-
28
- /**
29
- * Adds the privacy message on YITH privacy page.
30
- */
31
- public function add_privacy_message() {
32
- if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
33
- $content = $this->get_privacy_message();
34
-
35
- if ( $content ) {
36
- wp_add_privacy_policy_content( $this->_title, $this->get_privacy_message() );
37
- }
38
- }
39
- }
40
-
41
- /**
42
- * get the privacy message
43
- *
44
- * @return string
45
- */
46
- public function get_privacy_message() {
47
- $privacy_content_path = YIT_CORE_PLUGIN_TEMPLATE_PATH . '/privacy/html-policy-content.php';
48
- ob_start();
49
- $sections = $this->get_sections();
50
- if ( file_exists( $privacy_content_path ) )
51
- include $privacy_content_path;
52
-
53
- return apply_filters( 'yith_plugin_fw_privacy_policy_content', ob_get_clean() );
54
- }
55
-
56
- public function get_sections() {
57
- return apply_filters( 'yith_plugin_fw_privacy_policy_content_sections', array(
58
- 'general' => array(
59
- 'tutorial' => _x( 'This sample language includes the basics around what personal data your store may be collecting, storing and sharing, as well as who may have access to that data. Depending on what settings are enabled and which additional plugins are used, the specific information shared by your store will vary. We recommend consulting with a lawyer when deciding what information to disclose on your privacy policy.', 'Privacy Policy Content', 'yith-plugin-fw' ),
60
- 'description' => '',
61
- ),
62
- 'collect_and_store' => array(
63
- 'title' => _x( 'What we collect and store', 'Privacy Policy Content', 'yith-plugin-fw' )
64
- ),
65
- 'has_access' => array(
66
- 'title' => _x( 'Who on our team has access', 'Privacy Policy Content', 'yith-plugin-fw' )
67
- ),
68
- 'share' => array(
69
- 'title' => _x( 'What we share with others', 'Privacy Policy Content', 'yith-plugin-fw' ),
70
- ),
71
- 'payments' => array(
72
- 'title' => _x( 'Payments', 'Privacy Policy Content', 'yith-plugin-fw' )
73
- ),
74
- ) );
75
- }
76
- }
77
- }
78
-
79
- YITH_Privacy::get_instance();
1
  <?php
2
+ /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
+ *
5
+ * @package YITH\PluginFramework\Classes
6
+ */
7
+
8
+ /**
9
+ * Require the correct file
10
+ */
11
+ require_once __DIR__ . '/../../includes/privacy/class-yith-privacy.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/lib/promo/yith-promo.php CHANGED
@@ -1,220 +1,11 @@
1
  <?php
2
  /**
3
- * This file belongs to the YIT Plugin Framework.
4
  *
5
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
- if( ! function_exists( 'simplexml_load_string' ) ){
12
- return false;
13
- }
14
-
15
- add_action( 'admin_notices', 'yith_plugin_fw_regenerate_transient' );
16
- add_action( 'admin_notices', 'yith_plugin_fw_promo_notices', 15 );
17
- add_action( 'admin_enqueue_scripts', 'yith_plugin_fw_notice_dismiss', 20 );
18
-
19
- if( ! function_exists( 'yith_plugin_fw_promo_notices' ) ){
20
- function yith_plugin_fw_promo_notices(){
21
- global $pagenow;
22
- $not_administrator = function_exists( 'current_user_can' ) && ! current_user_can( 'administrator' );
23
- $is_dashboard = 'index.php' == $pagenow;
24
- $is_wc_pages = '';
25
- $is_plugin_page = 'plugins.php' == $pagenow || 'plugin-install.php' == $pagenow && 'plugin-editor.php' == $pagenow;
26
- $wc_post_types = array( 'shop_order', 'shop_coupon', );
27
- $is_wc_post_types = isset( $_GET['post_type'] ) && in_array( $_GET['post_type'], $wc_post_types );
28
- $wc_pages = array( 'wc-reports', 'wc-settings', 'wc-status', 'wc-addons' );
29
- $is_wc_pages = isset( $_GET['page'] ) && in_array( $_GET['page'], $wc_pages );
30
- $is_yith_page = isset( $_GET['page'] ) && false !== strstr( $_GET['page'], 'yith' ) ;
31
-
32
- if( $not_administrator ){
33
- return false;
34
- }
35
-
36
- if( ! $is_plugin_page && ! $is_wc_pages && ! $is_wc_post_types && ! $is_yith_page ){
37
- return false;
38
- }
39
-
40
- $base_url = apply_filters( 'yith_plugin_fw_promo_base_url', YIT_CORE_PLUGIN_URL . '/lib/promo/' );
41
- $xml = apply_filters( 'yith_plugin_fw_promo_xml_url', YIT_CORE_PLUGIN_PATH . '/lib/promo/yith-promo.xml' );
42
- $transient = "yith_promo_message";
43
- $remote_data = get_site_transient( $transient );
44
- $regenerate_promo_transient = isset( $_GET['yith_regenerate_promo_transient'] ) && 'yes' == $_GET['yith_regenerate_promo_transient'] ? $_GET['yith_regenerate_promo_transient'] : '';
45
- $promo_data = false;
46
- $create_transient = false;
47
-
48
- if( false === $remote_data || apply_filters( 'yith_plugin_fw_force_regenerate_promo_transient', false ) || 'yes' == $regenerate_promo_transient ){
49
- $remote_data = file_get_contents( $xml );
50
- $create_transient = true;
51
- }
52
-
53
- if ( ! is_wp_error( $remote_data ) && ! empty( $remote_data ) ) {
54
- $promo_data = @simplexml_load_string( $remote_data );
55
-
56
- /**
57
- * Check if current user is an YITH Club Members
58
- */
59
- $is_membership_user = false;
60
- $license = function_exists( 'YITH_Plugin_Licence' ) ? YITH_Plugin_Licence()->get_licence() : array();
61
- $xml_expiry_date = '';
62
-
63
- if( is_array( $license ) && apply_filters( 'yith_plugin_fw_check_for_membership_user', true ) ){
64
- /* === Check is the user have the YITH Club === */
65
- foreach( $license as $plugin => $data ){
66
- if( ! empty( $data['is_membership'] ) ){
67
- $is_membership_user = true;
68
- $xml_expiry_date = $data['licence_expires'];
69
- $remote_data = $promo_data = array();
70
- $create_transient = true;
71
- break;
72
- }
73
- }
74
- }
75
-
76
- if( empty( $is_membership_user ) && ! empty( $promo_data->expiry_date ) ){
77
- $xml_expiry_date = $promo_data->expiry_date;
78
- }
79
-
80
- if( true === $create_transient ){
81
- //Set Site Transient
82
- set_site_transient( $transient, $remote_data, yith_plugin_fw_get_promo_transient_expiry_date( $xml_expiry_date ) );
83
- }
84
-
85
- if ( $promo_data && ! empty( $promo_data->promo ) ) {
86
- $now = apply_filters( 'yith_plugin_fw_promo_now_date', strtotime( current_time( 'mysql' ) ) );
87
-
88
- foreach ($promo_data->promo as $promo ){
89
- $show_promo = true;
90
- /* === Check for Special Promo === */
91
- if( ! empty( $promo->show_promo_in ) ){
92
- $show_promo_in = explode( ',', $promo->show_promo_in );
93
- $show_promo_in = array_map( 'trim', $show_promo_in );
94
- if( ! empty( $show_promo_in ) ){
95
- $show_promo = false;
96
- foreach( $show_promo_in as $plugin ){
97
- $plugin_slug = constant( $plugin );
98
- $plugin_is_activated = ! empty( $license[ $plugin_slug ]['activated'] );
99
- if( defined( $plugin ) && ! apply_filters( 'yith_plugin_fw_promo_plugin_is_activated', $plugin_is_activated ) ){
100
- $show_promo = true;
101
- break;
102
- }
103
- }
104
- }
105
- }
106
-
107
- $start_date = isset( $promo->start_date ) ? $promo->start_date : '';
108
- $end_date = isset( $promo->end_date ) ? $promo->end_date : '';
109
-
110
- if( $show_promo && ! empty( $start_date ) && ! empty( $end_date ) ){
111
- $start_date = strtotime( $start_date );
112
- $end_date = strtotime( $end_date );
113
-
114
- if( $end_date >= $start_date && $now >= $start_date && $now <= $end_date ){
115
- //is valid promo
116
- $title = isset( $promo->title ) ? $promo->title : '';
117
- $description = isset( $promo->description ) ? $promo->description : '';
118
- $url = isset( $promo->link->url ) ? $promo->link->url : '';
119
- $url_label = isset( $promo->link->label ) ? $promo->link->label : '';
120
- $image_bg_color = isset( $promo->style->image_bg_color ) ? $promo->style->image_bg_color : '';
121
- $border_color = isset( $promo->style->border_color ) ? $promo->style->border_color : '';
122
- $background_color = isset( $promo->style->background_color ) ? $promo->style->background_color : '';
123
- $promo_id = isset( $promo->promo_id ) ? $promo->promo_id : '';
124
- $banner = isset( $promo->banner ) ? $promo->banner : '';
125
- $style = $link = '';
126
- $show_notice = false;
127
-
128
- if( ! empty( $border_color ) ){
129
- $style .= "border-left-color: {$border_color};";
130
- }
131
-
132
- if( ! empty( $background_color ) ){
133
- $style .= "background-color: {$background_color};";
134
- }
135
-
136
- if( ! empty( $image_bg_color ) ){
137
- $image_bg_color = "background-color: {$image_bg_color};";
138
- }
139
-
140
- if( ! empty( $title ) ) {
141
- $promo_id .= $title;
142
- $title = sprintf( '%s: ', $title );
143
- $show_notice = true;
144
- }
145
-
146
- if( ! empty( $description ) ) {
147
- $promo_id .= $description;
148
- $description = sprintf( '%s', $description );
149
- $show_notice = true;
150
- }
151
-
152
- if( ! empty( $url ) && ! empty( $url_label )) {
153
- $promo_id .= $url . $url_label;
154
- $link = sprintf( '<a href="%s" target="_blank">%s</a>', $url, $url_label );
155
- $show_notice = true;
156
- }
157
-
158
- if( ! empty( $banner ) ){
159
- $banner = sprintf( '<img src="%s" class="yith-promo-banner-image">', $base_url . $banner );
160
-
161
- if( ! empty( $url ) ){
162
- $banner = sprintf( '<a class="yith-promo-banner-image-link" href="%s" target="_blank" style="%s">%s</a>', $url, $image_bg_color, $banner);
163
- }
164
- }
165
-
166
- $unique_promo_id = "yith-notice-" . md5 ( $promo_id );
167
-
168
- if( ! empty( $_COOKIE[ 'hide_' . $unique_promo_id ] ) && 'yes' == $_COOKIE[ 'hide_' . $unique_promo_id ] ){
169
- $show_notice = false;
170
- }
171
-
172
- if ( true === $show_notice ) :
173
- wp_enqueue_script( 'yith-promo' );
174
- ?>
175
- <div id="<?php echo $unique_promo_id; ?>" class="yith-notice-is-dismissible notice notice-yith notice-alt is-dismissible" style="<?php echo $style; ?>" data-expiry= <?php echo $promo->end_date; ?>>
176
- <p>
177
- <?php if( ! empty( $banner ) ) { printf( '%s', $banner ); } ?>
178
- <?php printf( "%s %s %s", $title, $description, $link ); ?>
179
- </p>
180
- </div>
181
- <?php endif;
182
- }
183
- }
184
- }
185
- }
186
- }
187
- }
188
- }
189
-
190
- if( ! function_exists( 'yith_plugin_fw_notice_dismiss' ) ){
191
- function yith_plugin_fw_notice_dismiss(){
192
- $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
193
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
194
- wp_register_script( 'yith-promo', $script_path . '/assets/js/yith-promo' . $suffix . '.js', array( 'jquery' ), '1.0.0', true );
195
- }
196
- }
197
-
198
- if( ! function_exists( 'yith_plugin_fw_get_promo_transient_expiry_date' ) ){
199
- function yith_plugin_fw_get_promo_transient_expiry_date( $expiry_date ) {
200
- $xml_expiry_date = ! empty( $expiry_date ) ? $expiry_date : '+24 hours';
201
- $current = strtotime( current_time( 'Y-m-d H:i:s' ) );
202
- $expiry_date = strtotime( $xml_expiry_date, $current );
203
-
204
- if( $expiry_date <= $current ){
205
- $expiry_date = strtotime( '+24 hours', $current );
206
- }
207
-
208
- return $expiry_date;
209
- }
210
- }
211
-
212
- if( ! function_exists( 'yith_plugin_fw_regenerate_transient' ) ){
213
- function yith_plugin_fw_regenerate_transient(){
214
- if( false === get_option( 'yith_plugin_fw_promo_2019_bis', false ) ){
215
- delete_option( 'yith_plugin_fw_promo_2019' );
216
- delete_site_transient( 'yith_promo_message' );
217
- update_option( 'yith_plugin_fw_promo_2019_bis', true );
218
- }
219
- }
220
- }
1
  <?php
2
  /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
  *
5
+ * @package YITH\PluginFramework\Classes
 
 
 
6
  */
7
 
8
+ /**
9
+ * Require the correct file
10
+ */
11
+ require_once __DIR__ . '/../../includes/promo/yith-promo.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/lib/yit-ajax.php CHANGED
@@ -1,266 +1,11 @@
1
  <?php
2
  /**
3
- * This file belongs to the YIT Plugin Framework.
4
  *
5
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
- if ( !defined( 'ABSPATH' ) ) {
12
- exit;
13
- } // Exit if accessed directly
14
-
15
- if ( !class_exists( 'YIT_Ajax' ) ) {
16
- /**
17
- * YIT Ajax
18
- *
19
- * @class YIT_Ajax
20
- * @package YITH
21
- * @since 1.0
22
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
23
- */
24
- class YIT_Ajax {
25
- /**
26
- * @var string version of class
27
- */
28
- public $version = '1.0.0';
29
-
30
- /**
31
- * @var object The single instance of the class
32
- * @since 1.0
33
- */
34
- protected static $_instance = null;
35
-
36
- /**
37
- * get single instance
38
- *
39
- * @static
40
- * @return YIT_Ajax
41
- *
42
- * @since 1.0
43
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
44
- */
45
- public static function instance() {
46
- if ( is_null( self::$_instance ) ) {
47
- self::$_instance = new self();
48
- }
49
-
50
- return self::$_instance;
51
- }
52
-
53
- /**
54
- * Constructor
55
- *
56
- * @since 1.0
57
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
58
- */
59
- private function __construct() {
60
- $ajax_actions = array(
61
- 'json_search_posts',
62
- 'json_search_products',
63
- 'json_search_orders',
64
- 'json_search_terms'
65
- );
66
-
67
- foreach ( $ajax_actions as $ajax_action ) {
68
- add_action( 'wp_ajax_yith_plugin_fw_' . $ajax_action, array( $this, $ajax_action ) );
69
- add_action( 'wp_ajax_nopriv_yith_plugin_fw_' . $ajax_action, array( $this, $ajax_action ) );
70
- }
71
- }
72
-
73
- /**
74
- * Post Search
75
- *
76
- * @param bool|array $request
77
- */
78
- public function json_search_posts( $request = false ) {
79
- ob_start();
80
-
81
- if ( !$request )
82
- check_ajax_referer( 'search-posts', 'security' );
83
-
84
- $request = $request ? $request : $_REQUEST;
85
-
86
- $term = (string) sanitize_text_field( stripslashes( $request[ 'term' ] ) );
87
- if ( empty( $term ) ) {
88
- die();
89
- }
90
-
91
- $found_posts = array();
92
-
93
- $args = array(
94
- 'post_type' => 'post',
95
- 'post_status' => 'publish',
96
- 'numberposts' => -1,
97
- 'orderby' => 'title',
98
- 'order' => 'asc',
99
- 'post_parent' => 0,
100
- 'suppress_filters' => 0,
101
- 'include' => '',
102
- 'exclude' => '',
103
- );
104
-
105
- foreach ( $args as $key => $default_value ) {
106
- if ( !empty( $request[ $key ] ) ) {
107
- $args[ $key ] = $request[ $key ];
108
- }
109
- }
110
-
111
- $show_id = isset( $request[ 'show_id' ] ) && $request[ 'show_id' ];
112
-
113
- $args[ 's' ] = $term;
114
- $args[ 'fields' ] = 'ids';
115
-
116
- $posts = get_posts( $args );
117
-
118
- if ( !empty( $posts ) ) {
119
- foreach ( $posts as $post_id ) {
120
- if ( !current_user_can( 'read_product', $post_id ) ) {
121
- continue;
122
- }
123
- $title = get_the_title( $post_id ) . ( $show_id ? " (#{$post_id})" : '' );
124
- $found_posts[ $post_id ] = apply_filters( 'yith_plugin_fw_json_search_found_post_title', rawurldecode( $title ), $post_id, $request );
125
- }
126
- }
127
- $found_posts = apply_filters( 'yith_plugin_fw_json_search_found_posts', $found_posts, $request );
128
-
129
- wp_send_json( $found_posts );
130
- }
131
-
132
- /**
133
- * Product Search
134
- */
135
- public function json_search_products() {
136
- check_ajax_referer( 'search-posts', 'security' );
137
-
138
- $term = (string) wc_clean( stripslashes( $_REQUEST[ 'term' ] ) );
139
- if ( empty( $term ) ) {
140
- die();
141
- }
142
-
143
- $request = $_REQUEST;
144
- $request[ 'post_type' ] = 'product';
145
-
146
- $request_include = isset( $request[ 'include' ] ) && !is_array( $request[ 'include' ] ) ? explode( ',', $request[ 'include' ] ) : array();
147
-
148
- if ( !empty( $request[ 'product_type' ] ) ) {
149
- if ( $product_type_term = get_term_by( 'slug', $request[ 'product_type' ], 'product_type' ) ) {
150
- $posts_in = array_unique( (array) get_objects_in_term( $product_type_term->term_id, 'product_type' ) );
151
- if ( !!$request_include )
152
- $posts_in = array_intersect( $posts_in, $request_include );
153
-
154
- if ( !!$posts_in ) {
155
- $request[ 'include' ] = implode( ',', $posts_in );
156
- } else {
157
- $request[ 'include' ] = '-1';
158
- }
159
- }
160
- }
161
-
162
- $request = apply_filters( 'yith_plugin_fw_json_search_products_request', $request );
163
-
164
- $this->json_search_posts( $request );
165
- }
166
-
167
- /**
168
- * Order Search
169
- */
170
- public function json_search_orders() {
171
- global $wpdb;
172
- ob_start();
173
-
174
- check_ajax_referer( 'search-posts', 'security' );
175
-
176
- $term = wc_clean( stripslashes( $_REQUEST[ 'term' ] ) );
177
-
178
- if ( empty( $term ) ) {
179
- die();
180
- }
181
-
182
- $found_orders = array();
183
-
184
- $term = apply_filters( 'yith_plugin_fw_json_search_order_number', $term );
185
-
186
- $query_orders = $wpdb->get_results( $wpdb->prepare( "
187
- SELECT ID, post_title FROM {$wpdb->posts} AS posts
188
- WHERE posts.post_type = 'shop_order'
189
- AND posts.ID LIKE %s
190
- ", '%' . $term . '%' ) );
191
-
192
- if ( $query_orders ) {
193
- foreach ( $query_orders as $item ) {
194
- $order_number = apply_filters( 'yith_plugin_fw_order_number', '#' . $item->ID, $item->ID );
195
- $found_orders[ $item->ID ] = $order_number . ' &ndash; ' . esc_html( $item->post_title );
196
- }
197
- }
198
-
199
- wp_send_json( $found_orders );
200
- }
201
-
202
- /**
203
- * Order Search
204
- */
205
- public function json_search_terms() {
206
- global $wpdb;
207
- ob_start();
208
-
209
- check_ajax_referer( 'search-terms', 'security' );
210
-
211
- $term = (string) sanitize_text_field( stripslashes( $_REQUEST[ 'term' ] ) );
212
-
213
- if ( empty( $term ) ) {
214
- die();
215
- }
216
-
217
- $request = $_REQUEST;
218
-
219
- $args = array(
220
- 'taxonomy' => 'category',
221
- 'hide_empty' => false,
222
- 'order' => 'ASC',
223
- 'orderby' => 'name',
224
- 'include' => '',
225
- 'exclude' => '',
226
- 'exclude_tree' => '',
227
- 'number' => '',
228
- 'hierarchical' => true,
229
- 'child_of' => 0,
230
- 'parent' => '',
231
- 'term_field' => 'id'
232
- );
233
-
234
- $args = apply_filters( 'yith_plugin_fw_json_search_terms_default_args', $args, $request );
235
-
236
- foreach ( $args as $key => $default_value ) {
237
- if ( !empty( $request[ $key ] ) ) {
238
- $args[ $key ] = $request[ $key ];
239
- }
240
- }
241
-
242
- $args = apply_filters( 'yith_plugin_fw_json_search_terms_args', $args, $request );
243
-
244
- $args[ 'name__like' ] = $term;
245
- $args[ 'fields' ] = 'id=>name';
246
-
247
- if ( !taxonomy_exists( $args[ 'taxonomy' ] ) )
248
- die();
249
-
250
- $terms = yith_get_terms( $args );
251
-
252
- if ( $args[ 'term_field' ] !== 'id' ) {
253
- $temp_terms = $terms;
254
- $terms = array();
255
- foreach ( $temp_terms as $term_id => $term_name ) {
256
- $current_term_field = get_term_field( $args[ 'term_field' ], $term_id, $args[ 'taxonomy' ] );
257
- $terms[ $current_term_field ] = $term_name;
258
- }
259
- }
260
-
261
- wp_send_json( $terms );
262
- }
263
- }
264
- }
265
-
266
- YIT_Ajax::instance();
1
  <?php
2
  /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
  *
5
+ * @package YITH\PluginFramework\Classes
 
 
 
6
  */
7
 
8
+ /**
9
+ * Require the correct file
10
+ */
11
+ require_once __DIR__ . '/../includes/class-yit-ajax.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/lib/yit-assets.php CHANGED
@@ -1,117 +1,11 @@
1
  <?php
2
  /**
3
- * This file belongs to the YIT Plugin Framework.
4
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
- * that is bundled with this package in the file LICENSE.txt.
6
- * It is also available through the world-wide-web at this URL:
7
- * http://www.gnu.org/licenses/gpl-3.0.txt
8
  */
9
 
10
- ! defined( 'ABSPATH' ) && exit; // Exit if accessed directly
11
-
12
- if ( ! class_exists( 'YIT_Assets' ) ) {
13
- /**
14
- * YIT Assets
15
- *
16
- * @class YIT_Assets
17
- * @package YITH
18
- * @since 3.0.0
19
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
20
- */
21
- class YIT_Assets {
22
- /** @var string */
23
- public $version = '1.0.0';
24
-
25
- /** @var YIT_Assets */
26
- private static $_instance;
27
-
28
- /** @return YIT_Assets */
29
- public static function instance() {
30
- return ! is_null( self::$_instance ) ? self::$_instance : self::$_instance = new self();
31
- }
32
-
33
- /**
34
- * Constructor
35
- *
36
- * @since 1.0
37
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
38
- */
39
- private function __construct() {
40
- $this->version = yith_plugin_fw_get_version();
41
- add_action( 'admin_enqueue_scripts', array( $this, 'register_styles_and_scripts' ) );
42
- }
43
-
44
- /**
45
- * Register styles and scripts
46
- */
47
- public function register_styles_and_scripts() {
48
- global $wp_scripts, $woocommerce, $wp_version;
49
-
50
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
51
-
52
- //scripts
53
- wp_register_script( 'yith-colorpicker', YIT_CORE_PLUGIN_URL . '/assets/js/yith-colorpicker.min.js', array( 'jquery', 'wp-color-picker' ), $this->version, true );
54
- wp_register_script( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/js/yith-fields' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'yith-colorpicker', 'codemirror', 'codemirror-javascript', 'jquery-ui-slider', 'jquery-ui-sortable' ), $this->version, true );
55
-
56
- wp_register_script( 'yit-metabox', YIT_CORE_PLUGIN_URL . '/assets/js/metabox' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'yith-plugin-fw-fields' ), $this->version, true );
57
- wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel' . $suffix . '.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-sortable', 'yith-plugin-fw-fields' ), $this->version, true );
58
- wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), '3.15', true );
59
- wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), '3.15', true );
60
- wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox' . $suffix . '.js', array( 'jquery' ), '1.6.3', true );
61
- wp_register_script( 'yith_how_to', YIT_CORE_PLUGIN_URL . '/assets/js/how-to' . $suffix . '.js', array( 'jquery' ), $this->version, true );
62
- wp_register_script( 'yith-plugin-fw-wp-pages', YIT_CORE_PLUGIN_URL . '/assets/js/wp-pages' . $suffix . '.js', array( 'jquery' ), $this->version, false );
63
-
64
- //styles
65
- $jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
66
- wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
67
- wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', array(), $this->version );
68
- wp_register_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
69
- wp_register_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
70
- wp_register_style( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/css/colorbox.css', array(), $this->version );
71
- wp_register_style( 'yit-upgrade-to-pro', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrade-to-pro.css', array( 'colorbox' ), $this->version );
72
- wp_register_style( 'yit-plugin-metaboxes', YIT_CORE_PLUGIN_URL . '/assets/css/metaboxes.css', array(), $this->version );
73
- wp_register_style( 'yith-plugin-fw-fields', YIT_CORE_PLUGIN_URL . '/assets/css/yith-fields.css', false, $this->version );
74
-
75
- $wc_version_suffix = '';
76
- if ( function_exists( 'WC' ) || ! empty( $woocommerce ) ) {
77
- $woocommerce_version = function_exists( 'WC' ) ? WC()->version : $woocommerce->version;
78
- $wc_version_suffix = version_compare( $woocommerce_version, '3.0.0', '>=' ) ? '' : '-wc-2.6';
79
-
80
- wp_register_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css', array(), $woocommerce_version );
81
- } else {
82
- wp_register_script( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js', array( 'jquery' ), '4.0.3', true );
83
- wp_register_style( 'yith-select2-no-wc', YIT_CORE_PLUGIN_URL . '/assets/css/yith-select2-no-wc.css', false, $this->version );
84
- }
85
-
86
- wp_register_script( 'yith-enhanced-select', YIT_CORE_PLUGIN_URL . '/assets/js/yith-enhanced-select' . $wc_version_suffix . $suffix . '.js', array( 'jquery', 'select2' ), $this->version, true );
87
- wp_localize_script( 'yith-enhanced-select', 'yith_framework_enhanced_select_params', array(
88
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
89
- 'search_posts_nonce' => wp_create_nonce( 'search-posts' ),
90
- 'search_terms_nonce' => wp_create_nonce( 'search-terms' ),
91
- 'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
92
- ) );
93
-
94
- wp_localize_script( 'yith-plugin-fw-fields', 'yith_framework_fw_fields', array(
95
- 'admin_url' => admin_url( 'admin.php' ),
96
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
97
- ) );
98
-
99
-
100
- // Localize Colorpicker to avoid issues with WordPress 5.5
101
- if ( version_compare( $wp_version, '5.5-RC', '>=' ) ) {
102
- wp_localize_script( 'yith-colorpicker', 'wpColorPickerL10n', array(
103
- 'clear' => __( 'Clear' ),
104
- 'clearAriaLabel' => __( 'Clear color' ),
105
- 'defaultString' => __( 'Default' ),
106
- 'defaultAriaLabel' => __( 'Select default color' ),
107
- 'pick' => __( 'Select Color' ),
108
- 'defaultLabel' => __( 'Color value' ),
109
- ) );
110
- }
111
-
112
- wp_enqueue_style( 'yith-plugin-fw-admin', YIT_CORE_PLUGIN_URL . '/assets/css/admin.css', array(), $this->version );
113
- }
114
- }
115
- }
116
-
117
- YIT_Assets::instance();
1
  <?php
2
  /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
+ *
5
+ * @package YITH\PluginFramework\Classes
 
 
6
  */
7
 
8
+ /**
9
+ * Require the correct file
10
+ */
11
+ require_once __DIR__ . '/../includes/class-yit-assets.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/lib/yit-cpt-unlimited.php CHANGED
@@ -1,1783 +1,11 @@
1
  <?php
2
- /*
3
- * This file belongs to the YIT Framework.
4
  *
5
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
- if (!defined('ABSPATH')) {exit('Direct access forbidden.');
11
- }
12
 
13
  /**
14
- * Manage the custom post types as Portfolio, Contact Forms and similar (called CPTU)
15
- *
16
- * @class YIT_CPT_Unlimited
17
- * @package YITH
18
- * @since 2.0.0
19
- * @author Your Inspiration Themes
20
- *
21
  */
22
-
23
- class YIT_CPT_Unlimited {
24
-
25
- /**
26
- * @var string The name of main post type of CPTU
27
- * @since 1.0
28
- */
29
- protected $_name = '';
30
-
31
- /**
32
- * @var string The prefix of each post type created by the post of main CPTU
33
- * @since 1.0
34
- */
35
- protected $_prefix_cpt = '';
36
-
37
- /**
38
- * @var string The labels defined for the main CPTU
39
- * @since 1.0
40
- */
41
- protected $_labels = '';
42
-
43
- /**
44
- * @var string The configuration arguments of post type
45
- * @since 1.0
46
- */
47
- protected $_args = '';
48
-
49
- /**
50
- * @var array All post types created by the post of main CPTU
51
- * @since 1.0
52
- */
53
- public $post_types = array();
54
-
55
- /**
56
- * @var array $layouts Array with all portfolio layouts available for this site
57
- * @since 1.0
58
- */
59
- public $layouts = array();
60
-
61
- /**
62
- * @var string $template_path The pathname of template folder
63
- * @since 1.0
64
- */
65
- protected $template_path = '';
66
-
67
- /**
68
- * @var string $template_url The URL of template folder
69
- * @since 1.0
70
- */
71
- protected $template_url = '';
72
-
73
- /**
74
- * @var int $_index Unique sequential ID to differentiate same shortcodes in the same page
75
- */
76
- public $index = 0;
77
-
78
- /**
79
- * @var string $_layout Temporary attribute to load automatically the settings for each layout
80
- * @since 1.0
81
- */
82
- private $_layout = '';
83
-
84
-
85
- /**
86
- * Constructor
87
- *
88
- * Accept an array of arguments to define the characteristics of CPTU to register.
89
- *
90
- * @since 1.0
91
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
92
- */
93
- public function __construct( $args = array() ) {
94
-
95
- $defaults = array(
96
- 'name' => '',
97
- 'post_type_prefix' => '',
98
- 'labels' => array(
99
- 'main_name' => '',
100
- 'singular' => '',
101
- 'plural' => '',
102
- 'menu' => ''
103
- ),
104
- 'manage_layouts' => false,
105
- 'add_multiuploader' => false,
106
- 'sortable' => false,
107
- 'has_single' => false,
108
- 'has_taxonomy' => false,
109
- 'label_item_sing' => '',
110
- 'label_item_plur' => '',
111
- 'shortcode_name' => '',
112
- 'shortcode_icon' => '', // URL or icon name from http://melchoyce.github.io/dashicons/
113
- 'layout_option' => '_type' // the option ID of layout metabox
114
- );
115
- $this->_args = wp_parse_args( $args, $defaults );
116
-
117
- // fix labels
118
- if ( empty( $this->_args['labels']['main_name'] ) ) {
119
- $this->_args['labels']['main_name'] = $this->_args['labels']['singular'];
120
- }
121
- if ( empty( $this->_args['labels']['menu'] ) ) {
122
- $this->_args['labels']['menu'] = $this->_args['labels']['singular'];
123
- }
124
-
125
- /* populate */
126
- $this->_name = $this->_args['name'];
127
- $this->_prefix_cpt = $this->_args['post_type_prefix'];
128
- $this->_labels = $this->_args['labels'];
129
-
130
- add_action( 'init', array( $this, 'register_post_type' ) );
131
- add_action( 'init', array( $this, 'register_cptu_post_types' ) );
132
-
133
- add_action( 'save_post', array( $this, 'rewrite_flush') );
134
-
135
- // admin interface
136
- add_action( 'admin_head', array( $this, 'add_cptu_menu_item' ) );
137
- add_action( 'admin_init', array( $this, 'add_quick_links_metaboxes' ) );
138
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_assets' ) );
139
-
140
- // metaboxes
141
- if ( is_admin() ) {
142
- add_action( 'init', array( $this, 'add_metabox_cptu' ) );
143
- add_action( 'init', array( $this, 'add_metabox_item_fields' ) );
144
- }
145
-
146
- // multiuploader
147
- if ( $this->_args['add_multiuploader'] ) {
148
- add_action( 'admin_footer', array( $this, 'add_button_multiuploader' ) );
149
- add_action( 'wp_ajax_yit_cptu_multiuploader', array( $this, 'post_multiuploader' ) );
150
- }
151
-
152
- // layouts
153
- if ( $this->_args['manage_layouts'] ) {
154
- // get all layouts available
155
- $this->get_layouts();
156
- }
157
-
158
- // single layout
159
- if ( $this->_args['has_single'] ) {
160
- add_action( 'yit_loop', array( $this, 'single_template' ) );
161
- add_action( 'wp', array( $this, 'single_template_config' ) );
162
-
163
- if ( defined('DOING_AJAX') && DOING_AJAX ) {
164
- add_action( 'init', array( $this, 'single_template_config' ) );
165
- }
166
- }
167
-
168
- // archive template
169
- add_action( 'wp', array( $this, 'archive_template' ) );
170
-
171
- // enqueue the assets of each layout
172
- add_action( 'wp_enqueue_scripts', array( $this, 'frontend_assets' ) );
173
-
174
- // add the shortcode, used to show the frontend
175
- if ( ! empty( $this->_args['shortcode_name'] ) ) {
176
- add_shortcode( $this->_args['shortcode_name'], array( &$this, 'add_shortcode' ) );
177
- add_filter( 'yit_shortcode_' . $this->_args['shortcode_name'] . '_icon', array( $this, 'shortcode_icon') );
178
- add_filter( 'yit-shortcode-plugin-init', array( $this, 'add_shortcode_to_box' ) );
179
- }
180
-
181
- // add sortable feature
182
- if ( $this->_args['sortable'] ) {
183
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_sortable_assets' ) );
184
- add_action( 'wp_ajax_cpt_sort_posts', array( $this, 'sort_posts' ) );
185
- add_action( 'admin_init', array( $this, 'init_menu_order' ) );
186
- add_filter( 'pre_get_posts', array( $this, 'filter_active' ) );
187
- add_filter( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
188
- add_filter( 'get_next_post_where', array( $this, 'sorted_next_post_where' ) );
189
- add_filter( 'get_previous_post_where', array( $this, 'sorted_prev_post_where' ) );
190
- add_filter( 'get_next_post_sort', array( $this, 'sorted_next_post_sort' ) );
191
- add_filter( 'get_previous_post_sort', array( $this, 'sorted_prev_post_sort' ) );
192
- }
193
-
194
- // add default columns to post type table list
195
- add_filter( 'manage_edit-' . $this->_name . '_columns', array( $this, 'cptu_define_columns' ) );
196
- add_action( 'manage_' . $this->_name . '_posts_custom_column' , array( $this, 'cptu_change_columns' ), 10, 2 );
197
-
198
- // add required post type for wordpress importer
199
- add_filter( 'wp_import_post_data_raw', array( $this, 'add_importer_required_post_type' ) );
200
- add_filter( 'wp_import_terms', array( $this, 'add_importer_required_taxonomy' ) );
201
- add_action( 'wp_import_set_post_terms', array( $this, 'recount_terms_post' ), 10, 3 );
202
-
203
- }
204
-
205
- /**
206
- * Enqueue the assets for the sortable feature
207
- *
208
- * @return void
209
- * @since 1.0
210
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
211
- */
212
- public function admin_sortable_assets() {
213
- global $post;
214
-
215
- if ( ! isset( $post->post_type ) || ! $this->_is_valid( $post->post_type ) ) {
216
- return;
217
- }
218
-
219
- wp_enqueue_script( 'yit-cptu-sortable-posts', YIT_CORE_PLUGIN_URL . '/assets/js/yit-cptu-sortable-posts.js', array( 'jquery', 'jquery-ui-sortable' ), '1.0', true );
220
- }
221
-
222
- public function init_menu_order( $post_types = array() ) {
223
- global $wpdb;
224
-
225
- if ( empty( $post_types ) ) {
226
- $post_types = $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT post_type FROM $wpdb->posts WHERE post_type LIKE %s", str_replace( '_', '\_', $this->_prefix_cpt ) . '%' ) );
227
- } elseif ( ! is_array( $post_types ) ) {
228
- $post_types = array( $post_types );
229
- }
230
-
231
- foreach ( $post_types as $post_type ) {
232
- $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = '{$post_type}' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') AND menu_order = 0" );
233
-
234
- if ( empty( $count ) ) {
235
- continue;
236
- }
237
-
238
- $sql = "SELECT ID
239
- FROM $wpdb->posts
240
- WHERE post_type = '" . $post_type . "'
241
- AND post_status IN ('publish', 'pending', 'draft', 'private', 'future')
242
- ORDER BY post_date DESC
243
- ";
244
-
245
- $results = $wpdb->get_results( $sql );
246
-
247
- foreach ( $results as $key => $result ) {
248
- $wpdb->update( $wpdb->posts, array( 'menu_order' => $key + 1 ), array( 'ID' => $result->ID ) );
249
- }
250
- }
251
- }
252
-
253
- /**
254
- * Save the order of posts from sortable feature
255
- *
256
- * @return void
257
- * @since 1.0
258
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
259
- */
260
- public function sort_posts() {
261
- global $wpdb;
262
-
263
- parse_str( $_REQUEST['order'], $data );
264
-
265
- if ( is_array( $data ) ) {
266
- //$this->init_menu_order( $_REQUEST['post_type'] );
267
-
268
- $id_arr = array( );
269
- foreach ( $data as $key => $values ) {
270
- foreach ( $values as $position => $id ) {
271
- $id_arr[] = $id;
272
- }
273
- }
274
-
275
-
276
- $menu_order_arr = array( );
277
- foreach ( $id_arr as $key => $id ) {
278
- $results = $wpdb->get_results( "SELECT menu_order FROM $wpdb->posts WHERE ID = " . $id );
279
- foreach ( $results as $result ) {
280
- $menu_order_arr[] = $result->menu_order;
281
- }
282
- }
283
-
284
- sort( $menu_order_arr );
285
-
286
- foreach ( $data as $key => $values ) {
287
- foreach ( $values as $position => $id ) {
288
- $wpdb->update( $wpdb->posts, array( 'menu_order' => $menu_order_arr[$position] ), array( 'ID' => $id ) );
289
- }
290
- }
291
- }
292
-
293
- die();
294
- }
295
-
296
- public function filter_active( $wp_query ) {
297
- if ( is_admin() && isset( $wp_query->query['suppress_filters'] ) )
298
- $wp_query->query['suppress_filters'] = false;
299
- if ( is_admin() && isset( $wp_query->query_vars['suppress_filters'] ) )
300
- $wp_query->query_vars['suppress_filters'] = false;
301
- return $wp_query;
302
- }
303
-
304
- public function pre_get_posts( $wp_query ) {
305
- if ( is_admin() && !defined( 'DOING_AJAX' ) ) {
306
- if ( isset( $wp_query->query['post_type'] ) ) {
307
- $post_types = (array) $wp_query->query['post_type'];
308
- foreach ( $post_types as $post_type ) {
309
- if ( $this->_is_valid( $post_type ) ) {
310
- $wp_query->set( 'orderby', 'menu_order' );
311
- $wp_query->set( 'order', 'ASC' );
312
- }
313
- }
314
- }
315
-
316
- } else {
317
-
318
- $active = false;
319
-
320
- if ( isset( $wp_query->query['suppress_filters'] ) || isset( $wp_query->query['post_type'] ) ) {
321
- $post_types = (array) $wp_query->query['post_type'];
322
- foreach ( $post_types as $post_type ) {
323
- if ( $this->_is_valid( $post_type ) ) {
324
- $active = true;
325
- }
326
- }
327
- }
328
-
329
- if ( $active ) {
330
- if ( !isset( $wp_query->query['orderby'] ) || $wp_query->query['orderby'] == 'post_date' )
331
- $wp_query->set( 'orderby', 'menu_order' );
332
- if ( !isset( $wp_query->query['order'] ) || $wp_query->query['order'] == 'DESC' )
333
- $wp_query->set( 'order', 'ASC' );
334
- }
335
- }
336
- }
337
-
338
- /**
339
- * Filters where clause for get next post
340
- *
341
- * @param $where
342
- *
343
- * @return string
344
- * @since 1.0
345
- * @author Antonio La Rocca <antonio.larocca@yithemes.com>
346
- */
347
- public function sorted_next_post_where( $where ){
348
- global $post;
349
- if( defined('DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['post_id'] ) ){
350
- $post = get_post( intval( $_REQUEST['post_id'] ) );
351
- }
352
- else{
353
- $post = get_post();
354
- }
355
-
356
- if( ! $post || ! $this->_is_valid( $post->post_type ) ){
357
- return $where;
358
- }
359
-
360
- $result = str_replace( "'" . $post->post_date . "'", $post->menu_order, $where );
361
- $result = str_replace( 'p.post_date', 'p.menu_order', $result );
362
-
363
- return $result;
364
- }
365
-
366
- /**
367
- * Filters where clause for get prev post
368
- *
369
- * @param $where
370
- *
371
- * @return string
372
- * @since 1.0
373
- * @author Antonio La Rocca <antonio.larocca@yithemes.com>
374
- */
375
- public function sorted_prev_post_where( $where ){
376
- global $post;
377
-
378
- if( defined('DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['post_id'] ) ){
379
- $post = get_post( intval( $_REQUEST['post_id'] ) );
380
- }
381
- else{
382
- $post = get_post();
383
- }
384
-
385
- if( ! $post || ! $this->_is_valid( $post->post_type ) ){
386
- return $where;
387
- }
388
-
389
- $result = str_replace( "'" . $post->post_date . "'", $post->menu_order, $where );
390
- $result = str_replace( 'p.post_date', 'p.menu_order', $result );
391
-
392
- return $result;
393
- }
394
-
395
- /**
396
- * Filters sort clause for get next post
397
- *
398
- * @param $sort
399
- *
400
- * @return string
401
- * @since 1.0
402
- * @author Antonio La Rocca <antonio.larocca@yithemes.com>
403
- */
404
- public function sorted_next_post_sort( $sort ){
405
- global $post;
406
-
407
- if( defined('DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['post_id'] ) ){
408
- $post = get_post( intval( $_REQUEST['post_id'] ) );
409
- }
410
- else{
411
- $post = get_post();
412
- }
413
-
414
- if( ! $post || ! $this->_is_valid( $post->post_type ) ){
415
- return $sort;
416
- }
417
-
418
- $result = str_replace( 'p.post_date', 'p.menu_order', $sort );
419
- return $result;
420
- }
421
-
422
- /**
423
- * Filters sort clause for get prev post
424
- *
425
- * @param $sort
426
- *
427
- * @return string
428
- * @since 1.0
429
- * @author Antonio La Rocca <antonio.larocca@yithemes.com>
430
- */
431
- public function sorted_prev_post_sort( $sort ){
432
- global $post;
433
-
434
- if( defined('DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['post_id'] ) ){
435
- $post = get_post( intval( $_REQUEST['post_id'] ) );
436
- }
437
- else{
438
- $post = get_post();
439
- }
440
-
441
- if( ! $post || ! $this->_is_valid( $post->post_type ) ){
442
- return $sort;
443
- }
444
-
445
- $result = str_replace( 'p.post_date', 'p.menu_order', $sort );
446
- return $result;
447
- }
448
-
449
- /**
450
- * Register post type
451
- *
452
- * Register the post type for the creation of portfolios
453
- *
454
- * @return void
455
- * @since 1.0
456
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
457
- */
458
- public function register_post_type() {
459
- $labels = array(
460
- 'name' => ucfirst( $this->_labels['main_name'] ),
461
- 'singular_name' => ucfirst( $this->_labels['singular'] ),
462
- 'add_new' => sprintf( __( 'Add %s', 'yith-plugin-fw' ), ucfirst( $this->_labels['singular'] ) ),
463
- 'add_new_item' => sprintf( __( 'Add New %s', 'yith-plugin-fw' ), ucfirst( $this->_labels['singular'] ) ),
464
- 'edit_item' => sprintf( __( 'Edit %s', 'yith-plugin-fw' ), ucfirst( $this->_labels['singular'] ) ),
465
- 'new_item' => sprintf( __( 'New %s', 'yith-plugin-fw' ), ucfirst( $this->_labels['singular'] ) ),
466
- 'all_items' => sprintf( __( 'All %s', 'yith-plugin-fw' ), ucfirst( $this->_labels['plural'] ) ),
467
- 'view_item' => sprintf( __( 'View %s', 'yith-plugin-fw' ), ucfirst( $this->_labels['singular'] ) ),
468
- 'search_items' => sprintf( __( 'Search %s', 'yith-plugin-fw' ), ucfirst( $this->_labels['plural'] ) ),
469
- 'not_found' => sprintf( __( 'No %s found', 'yith-plugin-fw' ), ucfirst( $this->_labels['plural'] ) ),
470
- 'not_found_in_trash' => sprintf( __( 'No %s found in Trash', 'yith-plugin-fw' ), ucfirst( $this->_labels['plural'] ) ),
471
- 'parent_item_colon' => '',
472
- 'menu_name' => ucfirst( $this->_labels['menu'] )
473
- );
474
-
475
- $args = array(
476
- 'labels' => apply_filters( 'yit_' . $this->_name . '_labels', $labels ),
477
- 'public' => false,
478
- 'publicly_queryable' => false,
479
- 'show_ui' => true,
480
- 'show_in_menu' => true,
481
- 'query_var' => false,
482
- 'capability_type' => 'post',
483
- 'hierarchical' => false,
484
- 'menu_position' => null,
485
- 'supports' => array( 'title' )
486
- );
487
-
488
- if ( ! empty( $this->_args['menu_icon'] ) ) {
489
- $args['menu_icon'] = $this->_args['menu_icon'];
490
- }
491
-
492
- register_post_type( $this->_name, apply_filters( 'yit_' . $this->_name . '_args', $args ) );
493
- }
494
-
495
- /**
496
- * Retrieve the values configured inside the custom post type
497
- *
498
- * @param $post /WP_Query The post where get the arguments configured in the cpt
499
- *
500
- * @return array
501
- * @since 1.0
502
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
503
- */
504
- protected function _cpt_args( $post ) {
505
- if ( ! isset( $post->ID ) ) {
506
- return;
507
- }
508
-
509
- $args = apply_filters( 'yit_cptu_register_post_type_args', array(
510
- 'layout' => get_post_meta( $post->ID, $this->_args['layout_option'], true ),
511
- 'rewrite' => get_post_meta( $post->ID, '_rewrite', true ),
512
- 'label_singular' => ! empty( $this->_args['label_item_sing'] ) ? $this->_args['label_item_sing'] : get_post_meta( $post->ID, '_label_singular', true ),
513
- 'label_plural' => ! empty( $this->_args['label_item_plur'] ) ? $this->_args['label_item_plur'] : get_post_meta( $post->ID, '_label_plural', true ),
514
- 'taxonomy' => get_post_meta( $post->ID, '_taxonomy', true ),
515
- 'taxonomy_rewrite' => get_post_meta( $post->ID, '_taxonomy_rewrite', true ),
516
- ), $this->_name, $post );
517
-
518
- $title = $post->post_title;
519
-
520
- if ( empty( $args['label_singular'] ) ) {
521
- $args['label_singular'] = $title;
522
- }
523
-
524
- if ( empty( $args['label_plural'] ) ) {
525
- $args['label_plural'] = $title;
526
- }
527
-
528
- return $args;
529
- }
530
-
531
- /**
532
- * Retrieve the post types created for this CPTU
533
- *
534
- * @return array The link changed
535
- * @since 1.0
536
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
537
- */
538
- public function get_post_types() {
539
- if ( ! empty( $this->post_types ) ) {
540
- return $this->post_types;
541
- }
542
-
543
- $args = array(
544
- 'post_type' => $this->_name,
545
- 'posts_per_page' => -1,
546
- 'post_status' => 'publish'
547
- );
548
- $this->post_types = get_posts( $args );
549
-
550
- return $this->post_types;
551
- }
552
-
553
- /**
554
- * Register portfolio post types
555
- *
556
- * Register the post types for each portfolio created by admin
557
- *
558
- * @return void
559
- * @since 1.0
560
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
561
- */
562
- public function register_cptu_post_types() {
563
- $post_types = $this->get_post_types();
564
- $pts = array();
565
-
566
- foreach ( $post_types as $pt ) {
567
-
568
- extract( $this->_cpt_args( $pt ) );
569
-
570
- $name = $pt->post_name;
571
- $title = $pt->post_title;
572
-
573
- $labels = array(
574
- 'name' => $title,
575
- 'singular_name' => $label_singular,
576
- 'add_new' => sprintf( __( 'Add %s', 'yith-plugin-fw' ), $label_singular ),
577
- 'add_new_item' => sprintf( __( 'Add New %s', 'yith-plugin-fw' ), $label_singular ),
578
- 'edit_item' => sprintf( __( 'Edit %s', 'yith-plugin-fw' ), $label_singular ),
579
- 'new_item' => sprintf( __( 'New %s', 'yith-plugin-fw' ), $label_singular ),
580
- 'all_items' => sprintf( __( 'All %s', 'yith-plugin-fw' ), $label_plural ),
581
- 'view_item' => sprintf( __( 'View %s', 'yith-plugin-fw' ), $label_singular ),
582
- 'search_items' => sprintf( __( 'Search %s', 'yith-plugin-fw' ), $label_plural ),
583
- 'not_found' => sprintf( __( 'No %s found', 'yith-plugin-fw' ), $label_plural ),
584
- 'not_found_in_trash' => sprintf( __( 'No %s found in Trash', 'yith-plugin-fw' ), $label_plural ),
585
- 'parent_item_colon' => '',
586
- 'menu_name' => $title
587
- );
588
-
589
- $args = array(
590
- 'labels' => apply_filters( 'yit_' . $this->_prefix_cpt . $name . '_labels', $labels ),
591
- 'public' => true,
592
- 'publicly_queryable' => true,
593
- 'show_ui' => true,
594
- 'show_in_menu' => false,
595
- 'query_var' => true,
596
- 'capability_type' => 'post',
597
- 'hierarchical' => false,
598
- 'menu_position' => null,
599
- 'supports' => array( 'title', 'editor', 'thumbnail' )
600
- );
601
-
602
- if ( ! $this->_args['has_single'] ) {
603
- $args['public'] = false;
604
- $args['publicly_queryable'] = false;
605
- $args['query_var'] = false;
606
- }
607
-
608
- if ( $this->_args['manage_layouts'] && isset($this->layouts[ $layout ]) && ! $this->layouts[ $layout ]['support']['description'] ) {
609
- unset( $args['supports'][1] ); // remove 'editor'
610
- }
611
-
612
- if ( ! empty( $rewrite ) ) {
613
- $args['rewrite'] = array( 'slug' => $rewrite );
614
- }
615
-
616
- // register post type
617
- $post_type = yit_avoid_duplicate( str_replace( '-', '_', substr( $this->_prefix_cpt . $name, 0, 16) ), $post_types );
618
- register_post_type( $post_type, apply_filters( 'yit_' . $this->_prefix_cpt . $name . '_args', $args, $pt ) ); // save the post type in post meta
619
-
620
- update_post_meta( $pt->ID, '_post_type', $post_type );
621
- $pts[] = $post_type;
622
-
623
- // register taxonomy
624
- if ( $this->_args['has_taxonomy'] && ! empty( $taxonomy ) ) {
625
-
626
- $labels = array(
627
- 'name' => sprintf( _x( '%s Categories', 'taxonomy general name', 'yith-plugin-fw' ), $label_singular ),
628
- 'singular_name' => _x( 'Category', 'taxonomy singular name', 'yith-plugin-fw' ),
629
- 'search_items' => __( 'Search Categories', 'yith-plugin-fw' ),
630
- 'all_items' => __( 'All Categories', 'yith-plugin-fw' ),
631
- 'parent_item' => __( 'Parent Category', 'yith-plugin-fw' ),
632
- 'parent_item_colon' => __( 'Parent Category:', 'yith-plugin-fw' ),
633
- 'edit_item' => __( 'Edit Category', 'yith-plugin-fw' ),
634
- 'update_item' => __( 'Update Category', 'yith-plugin-fw' ),
635
- 'add_new_item' => __( 'Add New Category', 'yith-plugin-fw' ),
636
- 'new_item_name' => __( 'New Category Name', 'yith-plugin-fw' ),
637
- 'menu_name' => __( 'Category', 'yith-plugin-fw' ),
638
- );
639
-
640
- $args = array(
641
- 'hierarchical' => true,
642
- 'labels' => $labels,
643
- 'show_ui' => true,
644
- 'show_admin_column' => true,
645
- 'query_var' => true,
646
- );
647
-
648
- if ( ! empty( $taxonomy_rewrite ) ) {
649
- $args['rewrite'] = array( 'slug' => $taxonomy_rewrite );
650
- }
651
-
652
- register_taxonomy( substr( $taxonomy, 0, 32 ), $post_type, $args );
653
-
654
- }
655
-
656
- }
657
-
658
- wp_cache_set( 'yit_cptu_post_types', $post_types );
659
- }
660
-
661
- /**
662
- * Flush Rewrite Rules
663
- *
664
- * rewrite rules when a cpt unlimited is saved
665
- *
666
- * @return void
667
- * @since 1.0
668
- * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
669
- */
670
-
671
- public function rewrite_flush( $post ){
672
-
673
- if ( isset( $post ) && $this->_is_valid( get_post_type( intval( $post ) ) ) ) {
674
- flush_rewrite_rules();
675
- }
676
-
677
- }
678
-
679
- /**
680
- * Add the item for each portfolio under "Portfolios"
681
- *
682
- * @return void
683
- * @since 1.0
684
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
685
- */
686
- public function add_cptu_menu_item() {
687
- global $submenu, $post, $parent_file, $pagenow;
688
-
689
- // get current post type
690
- if ( isset( $post->post_type ) ) {
691
- $post_type = $post->post_type;
692
- } else if ( isset( $_REQUEST['post_type'] ) ) {
693
- $post_type = $_REQUEST['post_type'];
694
- } else {
695
- return;
696
- }
697
-
698
- $item = 'edit.php?post_type=' . $this->_name;
699
-
700
- // add new items
701
- if ( strpos( $post_type, $this->_prefix_cpt ) !== false ) {
702
- global $wpdb;
703
- $portfolio = $wpdb->get_row( $wpdb->prepare( "SELECT p.* FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s AND p.post_type = %s", '_post_type', $post_type, $this->_name ) );
704
-
705
- if ( ! isset( $portfolio->ID ) ) {
706
- return;
707
- }
708
-
709
- $label_singular = ! empty( $this->_args['label_item_sing'] ) ? $this->_args['label_item_sing'] : get_post_meta( $portfolio->ID, '_label_singular', true );
710
- $label_plural = ! empty( $this->_args['label_item_plur'] ) ? $this->_args['label_item_plur'] : get_post_meta( $portfolio->ID, '_label_plural', true );
711
-
712
- if ( empty( $label_plural ) ) {
713
- $label_plural = $portfolio->post_title;
714
- }
715
-
716
- if ( empty( $label_singular ) ) {
717
- $label_singular = $portfolio->post_title;
718
- }
719
-
720
- $submenu[ $item ][15] = array( ucfirst( $label_plural ), 'edit_posts', 'edit.php?post_type=' . $post_type );
721
- $submenu[ $item ][20] = array( sprintf( __('Add %s', 'yith-plugin-fw'), ucfirst( $label_singular ) ), 'edit_posts', 'post-new.php?post_type=' . $post_type );
722
-
723
- global $wp_taxonomies;
724
- $taxonomy = get_post_meta( $portfolio->ID, '_taxonomy', true );
725
- if ( isset( $wp_taxonomies[ $taxonomy ] ) ) {
726
- $submenu[ $item ][25] = array( __('Categories', 'yith-plugin-fw'), 'edit_posts', 'edit-tags.php?taxonomy=' . $taxonomy . '&post_type=' . $post_type );
727
- }
728
- }
729
-
730
- // set the parent item inside the single of each post type
731
- if ( $pagenow == 'post.php' && isset( $_GET['post'] ) && $this->_is_valid( get_post_type( intval( $_GET['post'] ) ) ) ) {
732
- $parent_file = 'edit.php?post_type=' . $this->_name;
733
- }
734
- }
735
-
736
- /**
737
- * Locate folder of CPTU templates, if there isn't a layouts management
738
- *
739
- * @return string
740
- * @since 1.0
741
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
742
- */
743
- public function template_path() {
744
- if ( ! empty( $this->template_path ) ) {
745
- return $this->template_path;
746
- }
747
-
748
- // paths
749
- $stylesheet_path_1 = get_stylesheet_directory() . '/theme/templates/' . $this->_name . '/';
750
- $stylesheet_path_2 = get_template_directory() . '/theme/templates/' . $this->_name . '/';
751
- $template_path_1 = get_stylesheet_directory() . '/' . $this->_name . '/';
752
- $template_path_2 = get_template_directory() . '/' . $this->_name . '/';
753
- $plugin_path = $this->_args['plugin_path'] . '/templates/';
754
-
755
- foreach ( array( 'stylesheet_path_1', 'stylesheet_path_2', 'template_path_1', 'template_path_2', 'plugin_path' ) as $var ) {
756
- $path = ${$var};
757
-
758
- if ( file_exists( $path ) ) {
759
- $this->template_path = $path;
760
- }
761
- }
762
-
763
- return $this->template_path;
764
- }
765
-
766
- /**
767
- * Locate folder of CPTU templates, if there isn't a layouts management
768
- *
769
- * @return string
770
- * @since 1.0
771
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
772
- */
773
- public function template_url() {
774
- if ( ! empty( $this->template_url ) ) {
775
- return $this->template_path;
776
- }
777
-
778
- $this->template_url = str_replace( array(
779
- get_stylesheet_directory(),
780
- get_template_directory(),
781
- $this->_args['plugin_path']
782
- ), array(
783
- get_stylesheet_directory_uri(),
784
- get_template_directory_uri(),
785
- $this->_args['plugin_url']
786
- ), $this->template_path() );
787
-
788
- return $this->template_url;
789
- }
790
-
791
- /**
792
- * Retrieve all layouts to manage by custom post type added in the site in this order:
793
- * 1. Child theme (if exists)
794
- * 2. Theme
795
- * 3. Plugin
796
- *
797
- * It also load the config.php file of each layout
798
- *
799
- * @return void
800
- * @since 1.0
801
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
802
- */
803
- public function get_layouts() {
804
-
805
- // paths
806
- $stylesheet_path_1 = get_stylesheet_directory() . '/theme/templates/' . $this->_name . '/';
807
- $stylesheet_path_2 = get_template_directory() . '/theme/templates/' . $this->_name . '/';
808
- $template_path_1 = get_stylesheet_directory() . '/' . $this->_name . '/';
809
- $template_path_2 = get_template_directory() . '/' . $this->_name . '/';
810
- $plugin_path = $this->_args['plugin_path'] . '/templates/';
811
-
812
- foreach ( array( 'stylesheet_path_1', 'stylesheet_path_2', 'template_path_1', 'template_path_2', 'plugin_path' ) as $var ) {
813
- $path = ${$var};
814
-
815
- if ( file_exists( $path ) ) {
816
- foreach ( scandir( $path ) as $scan ) {
817
- if ( ! isset( $this->layouts[$scan] ) && is_dir( $path . $scan ) && ! in_array( $scan, array( '.', '..', '.svn' ) ) && $scan[0] != '_' ) {
818
- $this->layouts[$scan] = array(
819
- 'name' => ucfirst( str_replace( '-', ' ', $scan ) ),
820
- 'path' => $path . $scan,
821
- 'url' => str_replace( array(
822
- get_stylesheet_directory(),
823
- get_template_directory(),
824
- $this->_args['plugin_path']
825
- ), array(
826
- get_stylesheet_directory_uri(),
827
- get_template_directory_uri(),
828
- $this->_args['plugin_url']
829
- ), $path . $scan ),
830
- 'css' => array(),
831
- 'js' => array(),
832
- 'support' => array(
833
- 'description' => true
834
- ),
835
- 'columns' => array()
836
- );
837
-
838
- // set the vars for config.php
839
- $layout = $scan;
840
- $this->_layout = $layout; // temporary attribute to load automatically the configuration inside the config.php, for this layout
841
-
842
- // TODO Fare in modo di caricare il file config.php soltanto quando realmente serve
843
- if ( ! in_array( $scan, array( 'single' ) ) && file_exists( $path . $scan . '/config.php' ) ) {
844
- include_once( $path . $scan . '/config.php' );
845
- }
846
- }
847
- }
848
- }
849
-
850
- }
851
- }
852
-
853
- /**
854
- * Say if you want to set description for the current layout or not. This method must be used only inside the
855
- * config.php file of layout
856
- *
857
- * @param $v string 'yes' or 'no'
858
- *
859
- * @return void
860
- * @since 1.0
861
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
862
- */
863
- public function add_description_field( $v ) {
864
- $this->layouts[ $this->_layout ]['support']['description'] = $v == 'yes' ? true : false;
865
- }
866
-
867
- /**
868
- * Add the extra fields for the specific layout type of portfolio
869
- *
870
- * @param array $fields The fields to add
871
- *
872
- * @return void
873
- * @since 1.0
874
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
875
- */
876
- public function add_layout_fields( $fields = array() ) {
877
- // change the ID
878
- foreach ( $fields as $id => $val ) {
879
- unset( $fields[ $id ] );
880
- $id = $this->_layout . '_' . $id;
881
- $fields[ $id ] = $val;
882
- }
883
-
884
- $this->layouts[ $this->_layout ]['fields'] = $fields;
885
- }
886
-
887
- /**
888
- * Add fields to add to the metabox of each item of each post type created
889
- *
890
- * @param array $fields The fields to add
891
- *
892
- * @return void
893
- * @since 1.0
894
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
895
- */
896
- public function add_item_fields( $fields = array() ) {
897
- // change the ID
898
- foreach ( $fields as $id => $val ) {
899
- unset( $fields[ $id ] );
900
- //$id = $this->_layout . '_' . $id;
901
- $fields[ $id ] = $val;
902
- }
903
- $this->layouts[ $this->_layout ]['item_fields'] = $fields;
904
- }
905
-
906
- /**
907
- * Add columns to the table list
908
- *
909
- * @param array $columns The columns to add in the table list
910
- *
911
- * @return void
912
- * @since 1.0
913
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
914
- */
915
- public function add_table_columns( $columns ) {
916
- $this->layouts[ $this->_layout ]['columns'] = $columns;
917
- }
918
-
919
- /**
920
- * Enqueue the css files of layout
921
- *
922
- * @param string $handle Name of the stylesheet.
923
- * @param string|bool $src Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
924
- * @param array $deps An array of registered style handles this stylesheet depends on. Default empty array.
925
- * @param string|bool $ver String specifying the stylesheet version number, if it has one. This parameter is used
926
- * to ensure that the correct version is sent to the client regardless of caching, and so
927
- * should be included if a version number is available and makes sense for the stylesheet.
928
- * @param string $media Optional. The media for which this stylesheet has been defined.
929
- * Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print',
930
- * 'screen', 'tty', or 'tv'.
931
- *
932
- * @return void
933
- * @since 1.0
934
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
935
- */
936
- public function enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
937
- $this->layouts[ $this->_layout ]['css'][] = compact( 'handle', 'src', 'deps', 'ver', 'media' );
938
- }
939
-
940
- /**
941
- * Enqueue the js files of layout
942
- *
943
- * @param string $handle Name of the script.
944
- * @param string|bool $src Path to the script from the root directory of WordPress. Example: '/js/myscript.js'.
945
- * @param array $deps An array of registered handles this script depends on. Default empty array.
946
- * @param string|bool $ver Optional. String specifying the script version number, if it has one. This parameter
947
- * is used to ensure that the correct version is sent to the client regardless of caching,
948
- * and so should be included if a version number is available and makes sense for the script.
949
- * @param bool $in_footer Optional. Whether to enqueue the script before </head> or before </body>.
950
- * Default 'false'. Accepts 'false' or 'true'.
951
- *
952
- * @return void
953
- * @since 1.0
954
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
955
- */
956
- public function enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {
957
- $this->layouts[ $this->_layout ]['js'][] = compact( 'handle', 'src', 'deps', 'ver', 'in_footer' );
958
- }
959
-
960
- /**
961
- * Enqueue the assets for the frontend
962
- *
963
- * @return void
964
- * @since 1.0
965
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
966
- */
967
- public function frontend_assets() {
968
- global $post;
969
-
970
- // not single
971
- if ( ! is_single() || ! isset( $post->post_type ) || ! $this->_is_valid( $post->post_type ) ) {
972
- $posts = get_posts(array(
973
- 'post_type' => $this->_name,
974
- 'posts_per_page' => -1,
975
- 'post_status' => 'publish',
976
- 'fields' => 'ids'
977
- ));
978
-
979
- $enqueued = array();
980
-
981
- foreach ( $posts as $post_id ) {
982
- $layout = get_post_meta( $post_id, $this->_args['layout_option'], true );
983
-
984
- if ( in_array( $layout, array( $enqueued ) ) || ! isset( $this->layouts[ $layout ]['css'] ) ) {
985
- continue;
986
- }
987
-
988
- foreach ( $this->layouts[ $layout ]['css'] as $asset ) {
989
- if ( empty( $asset ) ) {
990
- continue;
991
- }
992
- yit_enqueue_style( $asset['handle'], empty( $asset['src'] ) ? false : $this->locate_url( $layout ) . $asset['src'], $asset['deps'], $asset['ver'], $asset['media'] );
993
- }
994
-
995
- $enqueued[] = $layout;
996
- }
997
- }
998
-
999
- // load assets of single template
1000
- else {
1001
- $layout = 'single';
1002
-
1003
- if ( ! isset( $this->layouts[ $layout ]['css'] ) ) {
1004
- return;
1005
- }
1006
-
1007
- foreach ( $this->layouts[ $layout ]['css'] as $asset ) {
1008
- if ( empty( $asset ) ) {
1009
- continue;
1010
- }
1011
- yit_enqueue_style( $asset['handle'], $this->locate_url( $layout ) . $asset['src'], $asset['deps'], $asset['ver'], $asset['media'] );
1012
- }
1013
- }
1014
-
1015
- }
1016
-
1017
- /**
1018
- * Register Metaboxes options
1019
- *
1020
- * Add the metabox for the portfolio settings
1021
- *
1022
- * @return void
1023
- * @since 1.0
1024
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1025
- */
1026
- public function add_metabox_cptu() {
1027
-
1028
- // Reorganize layouts
1029
- if ( $this->_args['manage_layouts'] ) {
1030
- $layouts = array();
1031
- foreach ( $this->layouts as $layout_id => $layout ) {
1032
- if ( 'single' == $layout_id ) {
1033
- continue;
1034
- }
1035
- $layouts[ $layout_id ] = $layout['name'];
1036
- }
1037
-
1038
- $layouts = apply_filters( 'yit_cptu_' . $this->_name . '_layout_values', $layouts );
1039
- }
1040
-
1041
- $single_layouts = apply_filters( 'yit_cptu_' . $this->_name . '_single_layout_values', array() );
1042
-
1043
- $metabox_args = array(
1044
- 'label' => sprintf( __( '%s Settings', 'yith-plugin-fw' ), $this->_labels['singular'] ),
1045
- 'pages' => $this->_name, //or array( 'post-type1', 'post-type2')
1046
- 'context' => 'normal', //('normal', 'advanced', or 'side')
1047
- 'priority' => 'default',
1048
- 'tabs' => array(
1049
- 'settings' => array(
1050
- 'label' => __( 'Settings', 'yith-plugin-fw' ),
1051
- 'fields' => apply_filters( 'yit_cptu_fields', array(
1052
- 'type' => array(
1053
- 'label' => __( 'Type', 'yith-plugin-fw' ),
1054
- 'desc' => sprintf( __( 'Layout for this %s' , 'yith-plugin-fw' ), strtolower( $this->_labels['singular'] ) ),
1055
- 'type' => 'select',
1056
- 'options' => isset( $layouts ) ? $layouts : array(),
1057
- 'std' => '' ),
1058
-
1059
- 'rewrite' => array(
1060
- 'label' => __( 'Rewrite', 'yith-plugin-fw' ),
1061
- 'desc' => __( 'Univocal identification name in the URL for each product (slug from post if empty)', 'yith-plugin-fw' ),
1062
- 'type' => 'text',
1063
- 'std' => '' ),
1064
-
1065
- 'label_singular' => array(
1066
- 'label' => __( 'Label in Singular', 'yith-plugin-fw' ),
1067
- 'desc' => __( 'Set a label in singular (title of portfolio if empty)', 'yith-plugin-fw' ),
1068
- 'type' => 'text',
1069
- 'std' => '' ),
1070
-
1071
- 'label_plural' => array(
1072
- 'label' => __( 'Label in Plural', 'yith-plugin-fw' ),
1073
- 'desc' => __( 'Set a label in plural (title of portfolio if empty)', 'yith-plugin-fw' ),
1074
- 'type' => 'text',
1075
- 'std' => '' ),
1076
-
1077
- 'taxonomy' => array(
1078
- 'label' => __( 'Taxonomy', 'yith-plugin-fw' ),
1079
- 'desc' => __( 'If you want to use categories in the portfolio, set a name for taxonomy. Name should be a slug (must not contain capital letters nor spaces) and must not be more than 32 characters long (database structure restriction).', 'yith-plugin-fw' ),
1080
- 'type' => 'text',
1081
- 'std' => '' ),
1082
-
1083
- 'taxonomy_rewrite' => array(
1084
- 'label' => __( 'Taxonomy Rewrite', 'yith-plugin-fw' ),
1085
- 'desc' => __( 'Set univocal name for each category page URL.', 'yith-plugin-fw' ),
1086
- 'type' => 'text',
1087
- 'std' => '' ),
1088
-
1089
- 'single_layout' => array(
1090
- 'label' => __( 'Single layout', 'yith-plugin-fw' ),
1091
- 'desc' => __( 'Layout for single page of this portfolio', 'yith-plugin-fw' ),
1092
- 'type' => 'select',
1093
- 'options' => $single_layouts,
1094
- 'std' => '' ),
1095
- ) )
1096
- )
1097
- )
1098
-
1099
- );
1100
-
1101
- if ( ! $this->_args['has_single'] ) {
1102
- unset( $metabox_args['tabs']['settings']['fields']['rewrite'] );
1103
- }
1104
-
1105
- if ( ! $this->_args['has_taxonomy'] ) {
1106
- unset( $metabox_args['tabs']['settings']['fields']['taxonomy'] );
1107
- unset( $metabox_args['tabs']['settings']['fields']['taxonomy_rewrite'] );
1108
- }
1109
-
1110
- if ( ! empty( $this->_args['label_item_sing'] ) ) {
1111
- unset( $metabox_args['tabs']['settings']['fields']['label_singular'] );
1112
- }
1113
-
1114
- if ( ! empty( $this->_args['label_item_plur'] ) ) {
1115
- unset( $metabox_args['tabs']['settings']['fields']['label_plural'] );
1116
- }
1117
-
1118
- if ( $this->_args['manage_layouts'] ) {
1119
-
1120
- if ( count( $layouts ) < 1 ) {
1121
- unset( $metabox_args['tabs']['settings']['fields']['type'] );
1122
- }
1123
-
1124
- // Layouts options
1125
- foreach ( $this->layouts as $layout => $args ) {
1126
- if ( ! isset( $args['fields'] ) ) {
1127
- continue;
1128
- }
1129
-
1130
- // Section title
1131
- $metabox_args['tabs']['settings']['fields'][ $layout . '_title' ] = array(
1132
- 'desc' => $args['name'] . ' ' . __( 'layout settings', 'yith-plugin-fw' ),
1133
- 'type' => 'title',
1134
- 'deps' => array(
1135
- 'ids' => '_type',
1136
- 'values' => $layout
1137
- )
1138
- );
1139
-
1140
- // Options
1141
- foreach( $args['fields'] as $field_id => $field ) {
1142
- $metabox_args['tabs']['settings']['fields'][ $field_id ] = $field;
1143
- $metabox_args['tabs']['settings']['fields'][ $field_id ]['deps'] = array(
1144
- 'ids' => '_type',
1145
- 'values' => $layout
1146
- );
1147
- }
1148
- }
1149
- }else {
1150
- unset( $metabox_args['tabs']['settings']['fields']['type'] );
1151
- }
1152
-
1153
- if( count( $single_layouts ) < 1 ){
1154
- unset( $metabox_args['tabs']['settings']['fields']['single_layout'] );
1155
- }
1156
-
1157
- // undo if tab empty
1158
- if ( empty( $metabox_args['tabs']['settings']['fields'] ) ) {
1159
- return;
1160
- }
1161
-
1162
- $metabox = YIT_Metabox( $this->_name . '_cptu_settings' );
1163
- $metabox->init( $metabox_args );
1164
- }
1165
-
1166
- /**
1167
- * Register Metaboxes options
1168
- *
1169
- * Add the metabox for the portfolio settings
1170
- *
1171
- * @return void
1172
- * @since 1.0
1173
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1174
- */
1175
- public function add_metabox_item_fields() {
1176
- global $pagenow, $post_type;
1177
-
1178
- // get the actual post type, to add the metabox only if necessary
1179
- if ( $pagenow == 'post.php' && isset( $_REQUEST['post'] ) ) {
1180
- $post_type = get_post_type( intval( $_REQUEST['post'] ) );
1181
- }
1182
- elseif( $pagenow == 'post.php' && isset( $_REQUEST['post_ID'] ) ){
1183
- $post_type = get_post_type( intval( $_REQUEST['post_ID'] ) );
1184
- }
1185
- elseif ( $pagenow == 'post-new.php' && isset( $_REQUEST['post_type'] ) ) {
1186
- $post_type = $_REQUEST['post_type'];
1187
- } else {
1188
- return;
1189
- }
1190
-
1191
- $layout = get_post_meta( $this->_get_id_by_name( $post_type ), $this->_args['layout_option'], true );
1192
-
1193
- if ( empty( $this->layouts[ $layout ]['item_fields'] ) ) {
1194
- return;
1195
- }
1196
-
1197
- $metabox_args = array(
1198
- 'label' => __( 'Settings', 'yith-plugin-fw' ),
1199
- 'pages' => $post_type, //or array( 'post-type1', 'post-type2')
1200
- 'context' => 'normal', //('normal', 'advanced', or 'side')
1201
- 'priority' => 'default',
1202
- 'tabs' => array(
1203
- 'settings' => array(
1204
- 'label' => __( 'Settings', 'yith-plugin-fw' ),
1205
- 'fields' => $this->layouts[ $layout ]['item_fields']
1206
- )
1207
- )
1208
- );
1209
-
1210
- $metabox = YIT_Metabox( $post_type . '_item_fields' );
1211
- $metabox->init( $metabox_args );
1212
-
1213
- }
1214
-
1215
- /**
1216
- * Add quick links inside the editing page of CPTU and Custom Post Types
1217
- *
1218
- * @return void
1219
- * @since 1.0
1220
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1221
- */
1222
- public function add_quick_links_metaboxes() {
1223
- // CPTU
1224
- add_meta_box( $this->_name . '_quick_links', __( 'Quick links', 'yith-plugin-fw' ), array( $this, 'quick_links_cptu_inner' ), $this->_name, 'side', 'high' );
1225
-
1226
- // CPTs
1227
- $args = array(
1228
- 'post_type' => $this->_name,
1229
- 'posts_per_page' => -1,
1230
- 'post_status' => 'publish'
1231
- );
1232
- $post_types = get_posts( $args );
1233
-
1234
- foreach ( $post_types as $post ) {
1235
- $post_type = get_post_meta( $post->ID, '_post_type', true );
1236
- extract( $this->_cpt_args( $post ) );
1237
- add_meta_box( $post->post_type . '_quick_links', __( 'Quick links', 'yith-plugin-fw' ), array( $this, 'quick_links_cpt_inner' ), $post_type, 'side', 'high' );
1238
- }
1239
- }
1240
-
1241
- /**
1242
- * Link to: "View Items", inside the CPTU
1243
- *
1244
- * @param $post
1245
- *
1246
- * @return void
1247
- * @since 1.0
1248
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1249
- */
1250
- public function quick_links_cptu_inner( $post ) {
1251
- extract( $this->_cpt_args( $post ) );
1252
- ?>
1253
- <a href="<?php echo admin_url( 'edit.php?post_type=' . get_post_meta( $post->ID, '_post_type', true ) ) ?>"><?php printf( __( 'View %s', 'yith-plugin-fw' ), $label_plural ) ?></a>
1254
- <?php
1255
- }
1256
-
1257
- /**
1258
- * Link to: "Edit %s", inside the CPTU
1259
- *
1260
- * @param $post
1261
- *
1262
- * @return void
1263
- * @since 1.0
1264
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1265
- */
1266
- public function quick_links_cpt_inner( $post ) {
1267
- $post = get_post( $this->_get_id_by_name( $post->post_type ) );
1268
- ?>
1269
- <a href="<?php echo admin_url( "post.php?post={$post->ID}&action=edit" ) ?>"><?php printf( __( 'Edit %s', 'yith-plugin-fw' ), $post->post_title ) ?></a>
1270
- <?php
1271
- }
1272
-
1273
- /**
1274
- * Define the columns to use in the list table of main sliders post type
1275
- *
1276
- * @param $columns array The columns used in the list table
1277
- *
1278
- * @return array
1279
- * @since 1.0
1280
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1281
- */
1282
- public function cptu_define_columns( $columns ) {
1283
- unset( $columns['date'] );
1284
-
1285
- $columns['actions'] = '';
1286
-
1287
- return $columns;
1288
- }
1289
-
1290
- /**
1291
- * Change the content of each column of the table list
1292
- *
1293
- * @param $column string The current column
1294
- * @param $post_id int The current post ID
1295
- *
1296
- * @return void
1297
- * @since 1.0
1298
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1299
- */
1300
- public function cptu_change_columns( $column, $post_id ) {
1301
- $post = get_post( $post_id );
1302
- extract( $this->_cpt_args( $post ) );
1303
-
1304
- switch ( $column ) {
1305
- case 'actions' :
1306
- echo '<a href="' . admin_url( "post.php?post={$post_id}&action=edit" ) . '" class="button-secondary">' . sprintf( __( 'Edit %s', 'yith-plugin-fw' ), ucfirst( $this->_labels['singular'] ) ) . '</a> ';
1307
- echo '<a href="' . admin_url( 'edit.php?post_type=' . get_post_meta( $post_id, '_post_type', true ) ) . '" class="button-secondary">' . sprintf( __( 'View %s', 'yith-plugin-fw' ), $label_plural ) . '</a> ';
1308
- break;
1309
- }
1310
- }
1311
-
1312
- /**
1313
- * Retrieve the path of layout specified in parameter
1314
- *
1315
- * @param $layout
1316
- * @param $file string The file to find
1317
- *
1318
- * @return bool|string
1319
- * @since 1.0
1320
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1321
- */
1322
- public function locate_file( $layout, $file = '' ) {
1323
- if ( ! $this->_args['manage_layouts'] ) {
1324
- return $this->template_path(). '/' . ( ! empty( $file ) ? $file . '.php' : '' );
1325
- }
1326
-
1327
- if ( ! isset( $this->layouts[ $layout ] ) ) {
1328
- $layout = 'default';
1329
- }
1330
-
1331
- return $this->layouts[ $layout ]['path'] . '/' . ( ! empty( $file ) ? $file . '.php' : '' );
1332
- }
1333
-
1334
- /**
1335
- * Retrieve the URL of layout specified in parameter
1336
- *
1337
- * @param $layout
1338
- * @param $file string The file to find
1339
- *
1340
- * @return bool|string
1341
- * @since 1.0
1342
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1343
- */
1344
- public function locate_url( $layout, $file = '' ) {
1345
- if ( ! $this->_args['manage_layouts'] ) {
1346
- return $this->template_url();
1347
-
1348
- }
1349
-
1350
- if ( ! isset( $this->layouts[ $layout ] ) ) {
1351
- $layout = 'default';
1352
- }
1353
-
1354
- return $this->layouts[ $layout ]['url'] . '/' . ( ! empty( $file ) ? $file . '.php' : '' );
1355
- }
1356
-
1357
- /**
1358
- * Retrieve the post ID relative to the post of post type
1359
- *
1360
- * @param $name string
1361
- *
1362
- * @return mixed
1363
- * @since 1.0
1364
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1365
- */
1366
- protected function _get_id_by_name( $name ) {
1367
- global $wpdb;
1368
- return $wpdb->get_var( $wpdb->prepare( "SELECT pm.post_id FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s AND p.post_type = %s", '_post_type', $name, $this->_name ) );
1369
- }
1370
-
1371
- /**
1372
- * Retrieve the post_type of portfolio by portfolio name
1373
- *
1374
- * @param $name string
1375
- *
1376
- * @return mixed
1377
- * @since 1.0
1378
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1379
- */
1380
- protected function _get_post_type_by_name( $name ) {
1381
- global $wpdb;
1382
- return $wpdb->get_var( $wpdb->prepare( "SELECT pm.meta_value FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND p.post_name = %s AND p.post_type = %s", '_post_type', $name, $this->_name ) );
1383
- }
1384
-
1385
- /**
1386
- * The shortcode used to show the frontend
1387
- *
1388
- * @param array $atts
1389
- * @param null $content
1390
- *
1391
- * @return string|null
1392
- * @since 1.0
1393
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1394
- */
1395
- public function add_shortcode( $atts, $content = null ) {
1396
- $atts = wp_parse_args( $atts, array(
1397
- 'name' => null,
1398
- 'cat' => array(),
1399
- 'posts_per_page' => false,
1400
- 'style' => null,
1401
- ) );
1402
-
1403
- // don't show the slider if 'name' is empty or is 'none'
1404
- if ( empty( $atts['name'] ) || 'none' == $atts['name'] ) return null;
1405
-
1406
- // compatibility fix: remove prefix if exists in portfolio object
1407
- if( function_exists( 'YIT_Portfolio' ) && method_exists( YIT_Portfolio(), 'is' ) && YIT_Portfolio()->is( $atts['name'] ) ){
1408
- $atts['name'] = str_replace( YIT_Portfolio()->post_type_prefix, '', $atts['name'] );
1409
- }
1410
-
1411
- // pass vars to template
1412
- $atts['post_type'] = $this->_get_post_type_by_name( $atts['name'] );
1413
- $atts['layout'] = $this->_args['manage_layouts'] ? get_post_meta( $this->_get_id_by_name( $atts['post_type'] ), $this->_args['layout_option'], true ) : '';
1414
- extract( apply_filters( 'yit_cptu_frontend_vars', $atts, $this->_name ) );
1415
-
1416
- // add the javascript assets
1417
- if ( $this->_args['manage_layouts'] && isset( $this->layouts[ $layout ]['js'] ) && ! empty( $this->layouts[ $layout ]['js'] ) ) {
1418
- foreach ( $this->layouts[ $layout ]['js'] as $asset ) {
1419
- if ( empty( $asset ) ) continue;
1420
-
1421
- if ( empty( $asset['src'] ) ) {
1422
- wp_enqueue_script( $asset['handle'] );
1423
- continue;
1424
- }
1425
-
1426
- yit_enqueue_script( $asset['handle'], $this->locate_url( $layout ) . $asset['src'], $asset['deps'], $asset['ver'], $asset['in_footer'] );
1427
- }
1428
- }
1429
-
1430
- // Unique sequential index to differentiate more cpt in the same page
1431
- ++$this->index;
1432
-
1433
- ob_start();
1434
-
1435
- include( $this->locate_file( $layout, 'markup' ) );
1436
-
1437
- return ob_get_clean();
1438
-
1439
- }
1440
-
1441
- /**
1442
- * Shortcode icon
1443
- *
1444
- * Return the shortcode icone to display on shortcode panel
1445
- *
1446
- * @param $icon_url string Icone url found by yit_shortcode plugin
1447
- *
1448
- * @return string
1449
- * @since 1.0.0
1450
- * @author Antonino Scarfi' <antonio.scarfi@yithemes.it>
1451
- */
1452
- public function shortcode_icon( $icon_url ) {
1453
- return ! empty( $this->_args['shortcode_icon'] ) ? $this->_args['shortcode_icon'] : $icon_url;
1454
- }
1455
-
1456
- /**
1457
- * Return an array with cptu options to shortcode panel
1458
- *
1459
- * All definition settings to add cptu shortcode to Yit Shortcode Panel
1460
- *
1461
- * @param array $shortcodes
1462
- *
1463
- * @return array
1464
- * @since 1.0
1465
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1466
- */
1467
- public function add_shortcode_to_box( $shortcodes ) {
1468
- $post_types = array();
1469
-
1470
- foreach ( $this->get_post_types() as $post ) {
1471
- $post_types[ $post->post_name ] = $post->post_title;
1472
- }
1473
-
1474
- $args = array(
1475
- $this->_args['shortcode_name'] => array(
1476
- 'title' => $this->_labels['singular'],
1477
- 'description' => sprintf( __( 'Show frontend of the %s', 'yith-plugin-fw' ), $this->_labels['main_name'] ),
1478
- 'tab' => 'cpt',
1479
- 'create' => false,
1480
- 'has_content' => false,
1481
- 'in_visual_composer' => true,
1482
- 'attributes' => array(
1483
- 'name' => array(
1484
- 'title' => __( 'Name', 'yith-plugin-fw' ),
1485
- 'type' => 'select',
1486
- 'options' => $post_types,
1487
- 'std' => ''
1488
- ),
1489
- )
1490
- )
1491
- );
1492
-
1493
- return array_merge( $shortcodes, $args );
1494
- }
1495
-
1496
- /**
1497
- * Check the post type passed in parameter, if is generated by this CPTU
1498
- *
1499
- * @param $post_type string The post type to check
1500
- *
1501
- * @return bool
1502
- * @since 1.0
1503
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1504
- */
1505
- protected function _is_valid( $post_type ) {
1506
- return (bool)( strpos( $post_type, $this->_args['post_type_prefix'] ) !== false );
1507
- }
1508
-
1509
- /**
1510
- * Add as a valid post type all cptu when importing dummy data
1511
- *
1512
- * @param $post array The post object
1513
- *
1514
- * @return array
1515
- * @since 1.0
1516
- * @author Antonio La Rocca <antonio.larocca@yithemes.com>
1517
- */
1518
- public function add_importer_required_post_type( $post ){
1519
- global $wp_post_types, $wp_taxonomies;
1520
-
1521
- if( strpos( $post['post_type'], $this->_prefix_cpt ) === FALSE ){
1522
- return $post;
1523
- }
1524
-
1525
- if( ! isset( $wp_post_types[ $post['post_type'] ] ) ){
1526
- $wp_post_types[ $post['post_type'] ] = array(
1527
- 'name' => ''
1528
- );
1529
- }
1530
-
1531
- if( ! empty( $post['terms'] ) ){
1532
- foreach( $post['terms'] as $term ){
1533
- if( ! isset( $wp_taxonomies[ $term['domain'] ] ) ){
1534
- $wp_taxonomies[ $term['domain'] ] = array(
1535
- 'name' => ''
1536
- );
1537
- }
1538
- }
1539
- }
1540
-
1541
-
1542
- return $post;
1543
- }
1544
-
1545
- /**
1546
- * Add taxonomy when importing dummy data
1547
- *
1548
- * @param $terms array Array of terms
1549
- *
1550
- * @return array
1551
- * @since 1.0
1552
- * @author Antonio La Rocca <antonio.larocca@yithemes.com>
1553
- */
1554
- public function add_importer_required_taxonomy( $terms ){
1555
- global $wp_taxonomies;
1556
-
1557
- if( ! empty( $terms ) ){
1558
- foreach ( $terms as $term ) {
1559
- if( isset( $term['domain'] ) && ! isset( $wp_taxonomies[ $term['domain'] ] ) ){
1560
- $wp_taxonomies[ $term['domain'] ] = array(
1561
- 'name' => ''
1562
- );
1563
- }
1564
- }
1565
- }
1566
-
1567
- return $terms;
1568
- }
1569
-
1570
- /**
1571
- * Force terms recount for imported taxonomy
1572
- *
1573
- * @param $tt_ids array Terms ids
1574
- * @param $ids array Post ids
1575
- * @param $tax string Taxonomy name
1576
- *
1577
- * @return void
1578
- * @since 1.0
1579
- * @author Antonio La Rocca <antonio.larocca@yithemes.com>
1580
- */
1581
- public function recount_terms_post( $tt_ids, $ids, $tax ){
1582
- wp_update_term_count( $tt_ids, $tax );
1583
- }
1584
-
1585
- // ### ASSETS ###
1586
-
1587
- /**
1588
- * Enqueue the assets for the admin
1589
- *
1590
- * @return void
1591
- * @since 1.0
1592
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1593
- */
1594
- public function admin_assets() {
1595
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
1596
- wp_enqueue_media();
1597
- wp_enqueue_script( 'yit-cptu', YIT_CORE_PLUGIN_URL . '/assets/js/yit-cpt-unlimited' . $suffix . '.js', array('jquery'), '', true );
1598
- }
1599
-
1600
- /**
1601
- * Add the button to the top of the list table page of CPTU
1602
- *
1603
- * @return void
1604
- * @since 1.0
1605
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1606
- */
1607
- public function add_button_multiuploader() {
1608
- global $pagenow, $post_type, $wpdb;
1609
-
1610
- if( $pagenow != 'edit.php' ){
1611
- return;
1612
- }
1613
-
1614
- $cptu = $wpdb->get_var( $wpdb->prepare( "SELECT p.post_type FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s", '_post_type', $post_type ) );
1615
-
1616
- $post = get_post( $this->_get_id_by_name( $post_type ) );
1617
- if ( empty( $post ) ) {
1618
- return;
1619
- }
1620
- extract( $this->_cpt_args( $post ) );
1621
-
1622
- if ( $cptu != $this->_name || ! $this->_is_valid( $post_type ) ) {
1623
- return;
1624
- }
1625
-
1626
- ?>
1627
- <script>
1628
- (function($) {
1629
- "use strict";
1630
- // Author code here
1631
-
1632
- var button = $('<a />', {
1633
- href: '#',
1634
- class: 'multi-uploader add-new-h2',
1635
- 'data-uploader_title': '<?php printf( __( 'Add %s from images', 'yith-plugin-fw' ), $label_plural ) ?>',
1636
- 'data-uploader_button_text': '<?php printf( __( 'Add %s', 'yith-plugin-fw' ), $label_plural ) ?>',
1637
- 'data-nonce': '<?php echo wp_create_nonce( 'cpt-unlimited-multiuploader' ); ?>'
1638
- }).text('<?php _e( 'Upload multiple files', 'yith-plugin-fw' ) ?>');
1639
-
1640
- var spinner = $('<span />', {
1641
- class: 'spinner',
1642
- style: 'float: none;'
1643
- });
1644
-
1645
- button.appendTo('.wrap h2, .wrap h1').after(spinner);
1646
-
1647
- })(jQuery);
1648
- </script>
1649
- <?php
1650
- }
1651
-
1652
- /**
1653
- * Add more posts by multiupload
1654
- *
1655
- * @return void
1656
- * @since 1.0
1657
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1658
- */
1659
- public function post_multiuploader() {
1660
-
1661
- check_ajax_referer( 'cpt-unlimited-multiuploader' );
1662
-
1663
- if ( ! isset( $_REQUEST['images'] ) || ! isset( $_REQUEST['post_type'] ) && $this->_is_valid( $_REQUEST['post_type'] ) ) {
1664
- return;
1665
- }
1666
-
1667
- foreach ( $_REQUEST['images'] as $the ) {
1668
-
1669
- // Create post object
1670
- $arg = array(
1671
- 'post_title' => $the['title'],
1672
- 'post_type' => $_REQUEST['post_type']
1673
- );
1674
- $post_id = wp_insert_post( $arg );
1675
-
1676
- set_post_thumbnail( $post_id, $the['id'] );
1677
-
1678
- }
1679
-
1680
- die();
1681
- }
1682
-
1683
-
1684
- // ###### SINGLE TEMPLATE ######
1685
-
1686
- /**
1687
- * Load the single template file
1688
- *
1689
- * @return void
1690
- * @since 1.0
1691
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1692
- */
1693
- public function single_template() {
1694
- global $post, $wpdb;
1695
-
1696
- // if ( defined('DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['post_id'] ) ) {
1697
- // $post = get_post( $_REQUEST['post_id'] );
1698
- // }
1699
-
1700
- if ( ( ( ! defined('DOING_AJAX') || ! DOING_AJAX ) && ! is_single() ) || ! isset( $post->post_type ) || ! $this->_is_valid( $post->post_type ) ) {
1701
- return;
1702
- }
1703
-
1704
- // add the javascript assets
1705
- if ( $this->_args['manage_layouts'] ) {
1706
- foreach ( $this->layouts[ 'single' ]['js'] as $asset ) {
1707
- yit_enqueue_script( $asset['handle'], $this->locate_url( 'single' ) . $asset['src'], $asset['deps'], $asset['ver'], $asset['in_footer'] );
1708
- }
1709
- }
1710
-
1711
- $post_name = $wpdb->get_var( $wpdb->prepare( "SELECT p.post_name FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s AND p.post_type = %s", '_post_type', $post->post_type, $this->_name ) );
1712
- extract( apply_filters( 'yit_cptu_frontend_vars', array( 'name' => $post_name ), $this->_name ) );
1713
-
1714
- include( $this->locate_file( 'single', 'markup' ) );
1715
- }
1716
-
1717
- /**
1718
- * Load a file for the configuration of single template page of portfolio
1719
- *
1720
- * @return void
1721
- * @since 1.0
1722
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1723
- */
1724
- public function single_template_config() {
1725
- global $post, $wpdb;
1726
-
1727
- if ( defined('DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['post_id'] ) ) {
1728
- $post = get_post( $_REQUEST['post_id'] );
1729
- }
1730
-
1731
- if ( ( ( ! defined('DOING_AJAX') || ! DOING_AJAX ) && ! is_single() ) || ! isset( $post->post_type ) || ! $this->_is_valid( $post->post_type ) ) {
1732
- return;
1733
- }
1734
-
1735
- $this->_layout = 'single';
1736
- $path = $this->locate_file( 'single', 'config' );
1737
-
1738
- if ( file_exists( $path ) ) {
1739
- $post_name = $wpdb->get_var( $wpdb->prepare( "SELECT p.post_name FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s AND p.post_type = %s", '_post_type', $post->post_type, $this->_name ) );
1740
- extract( apply_filters( 'yit_cptu_frontend_vars', array( 'name' => $post_name ), $this->_name ) );
1741
-
1742
- include( $path );
1743
- }
1744
- }
1745
-
1746
-
1747
- // ########################## ARCHIVE TEMPLATE ###############################
1748
-
1749
-
1750
- /**
1751
- * Load the template for archive page
1752
- *
1753
- * @return void
1754
- * @since 1.0
1755
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1756
- */
1757
- public function archive_template() {
1758
- global $wp_query;
1759
-
1760
-
1761
- // check if we are in archive template
1762
- if ( !( ! is_admin() && is_archive() && isset($wp_query->post) && $this->_is_valid( $wp_query->post->post_type ) ) ) {
1763
- return;
1764
- }
1765
-
1766
- // remove the action from loop of theme
1767
- remove_action( 'yit_content_loop', 'yit_content_loop', 10 );
1768
- add_action( 'yit_content_loop', array( $this, 'archive_template_loop' ), 10 );
1769
-
1770
- }
1771
-
1772
- /**
1773
- * Load loop for the archive template
1774
- *
1775
- * @return void
1776
- * @since 1.0
1777
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
1778
- */
1779
- public function archive_template_loop() {
1780
- echo $this->add_shortcode( array( 'name' => $GLOBALS['wp_query']->post->post_type ) );
1781
- }
1782
-
1783
- }
1
  <?php
2
+ /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
  *
5
+ * @package YITH\PluginFramework\Classes
 
 
 
6
  */
 
 
7
 
8
  /**
9
+ * Require the correct file
 
 
 
 
 
 
10
  */
11
+ require_once __DIR__ . '/../includes/class-yit-cpt-unlimited.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/lib/yit-debug.php CHANGED
@@ -1,270 +1,11 @@
1
  <?php
2
  /**
3
- * This file belongs to the YIT Framework.
4
  *
5
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
- !defined( 'ABSPATH' ) && exit; // Exit if accessed directly
12
-
13
- if ( !class_exists( 'YITH_Debug' ) ) {
14
- /**
15
- * YITH_Debug
16
- *
17
- * manages debug
18
- *
19
- * @class YITH_Debug
20
- * @package YITH
21
- * @since 1.0.0
22
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
23
- *
24
- */
25
- class YITH_Debug {
26
-
27
- /** @var YITH_Debug */
28
- private static $_instance;
29
-
30
- public static function get_instance() {
31
- return isset( self::$_instance ) ? self::$_instance : self::$_instance = new self();
32
- }
33
-
34
- /**
35
- * @access private
36
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
37
- */
38
- private function __construct() {
39
- add_action( 'init', array( $this, 'init' ) );
40
- }
41
-
42
- /**
43
- * fired on init
44
- */
45
- public function init() {
46
- if ( !is_admin() || defined( 'DOING_AJAX' ) )
47
- return;
48
-
49
- $is_debug = apply_filters( 'yith_plugin_fw_is_debug', isset( $_GET[ 'yith-debug' ] ) );
50
-
51
- if ( $is_debug ) {
52
- add_action( 'admin_bar_menu', array( $this, 'add_debug_in_admin_bar' ), 99 );
53
- }
54
- }
55
-
56
- /**
57
- * add debug node in admin bar
58
- *
59
- * @param $wp_admin_bar
60
- */
61
- public function add_debug_in_admin_bar( $wp_admin_bar ) {
62
- $args = array(
63
- 'id' => 'yith-debug-admin-bar',
64
- 'title' => 'YITH Debug',
65
- 'href' => '',
66
- 'meta' => array(
67
- 'class' => 'yith-debug-admin-bar'
68
- )
69
- );
70
- $wp_admin_bar->add_node( $args );
71
-
72
- $subnodes = array();
73
-
74
- foreach ( $this->get_debug_information() as $key => $information ) {
75
- $label = $information[ 'label' ];
76
- $value = $information[ 'value' ];
77
- $url = !empty( $information[ 'url' ] ) ? $information[ 'url' ] : '';
78
-
79
- if ( !!$value ) {
80
- $title = "<strong>$label:</strong> $value";
81
- } else {
82
- $title = "<strong>$label</strong>";
83
- }
84
-
85
- $subnodes[] = array(
86
- 'id' => 'yith-debug-admin-bar-' . $key,
87
- 'parent' => 'yith-debug-admin-bar',
88
- 'title' => $title,
89
- 'href' => $url,
90
- 'meta' => array(
91
- 'class' => 'yith-debug-admin-bar-' . $key
92
- )
93
- );
94
-
95
- if ( isset( $information[ 'subsub' ] ) ) {
96
- foreach ( $information[ 'subsub' ] as $sub_key => $sub_value ) {
97
- $title = isset( $sub_value[ 'title' ] ) ? $sub_value[ 'title' ] : '';
98
- $html = isset( $sub_value[ 'html' ] ) ? $sub_value[ 'html' ] : '';
99
- $subnodes[] = array(
100
- 'id' => 'yith-debug-admin-bar-' . $key . '-' . $sub_key,
101
- 'parent' => 'yith-debug-admin-bar-' . $key,
102
- 'title' => $title,
103
- 'href' => '',
104
- 'meta' => array(
105
- 'class' => 'yith-debug-admin-bar-' . $key . '-' . $sub_key,
106
- 'html' => $html,
107
- )
108
- );
109
- }
110
- }
111
- }
112
-
113
- foreach ( $subnodes as $subnode ) {
114
- $wp_admin_bar->add_node( $subnode );
115
- }
116
- }
117
-
118
-
119
- /**
120
- * return an array of debug information
121
- *
122
- * @return array
123
- */
124
- public function get_debug_information() {
125
- $debug = array(
126
- 'plugin-fw-info' => array(
127
- 'label' => 'Framework',
128
- 'value' => $this->get_plugin_framework_info()
129
- ),
130
- 'yith-premium-plugins' => array(
131
- 'label' => 'YITH Premium Plugins',
132
- 'value' => '',
133
- 'subsub' => $this->get_premium_plugins_info()
134
- ),
135
- 'wc-version' => array(
136
- 'label' => 'WooCommerce',
137
- 'value' => $this->get_woocommerce_version_info()
138
- ),
139
- 'theme' => array(
140
- 'label' => 'Theme',
141
- 'value' => $this->get_theme_info()
142
- ),
143
- 'screen-id' => array(
144
- 'label' => 'Screen ID',
145
- 'value' => $this->get_current_screen_info()
146
- ),
147
- 'post-meta' => array(
148
- 'label' => 'Post Meta',
149
- 'value' => '',
150
- 'url' => add_query_arg( array( 'yith-debug-post-meta' => 'all' ) )
151
- ),
152
- 'option' => array(
153
- 'label' => 'Option',
154
- 'value' => '',
155
- 'url' => add_query_arg( array( 'yith-debug-option' => '' ) )
156
- ),
157
- );
158
-
159
- // Post Meta debug -------------
160
- global $post;
161
- if ( !empty( $_GET[ 'yith-debug-post-meta' ] ) && $post ) {
162
- $meta_key = $_GET[ 'yith-debug-post-meta' ];
163
- $meta_value = 'all' !== $meta_key ? get_post_meta( $post->ID, $meta_key, true ) : get_post_meta( $post->ID );
164
-
165
- ob_start();
166
- echo '<pre>';
167
- var_dump( $meta_value );
168
- echo '</pre>';
169
- $meta_value_html = ob_get_clean();
170
-
171
- $debug[ 'post-meta' ][ 'value' ] = $meta_key;
172
- $debug[ 'post-meta' ][ 'subsub' ] = array( array( 'html' => $meta_value_html ) );
173
- }
174
-
175
- // Option debug -------------
176
-
177
- if ( !empty( $_GET[ 'yith-debug-option' ] ) ) {
178
- $option_key = $_GET[ 'yith-debug-option' ];
179
- $option_value = get_option( $option_key );
180
-
181
- ob_start();
182
- echo '<pre>';
183
- var_dump( $option_value );
184
- echo '</pre>';
185
- $option_value_html = ob_get_clean();
186
-
187
- $debug[ 'option' ][ 'value' ] = $option_key;
188
- $debug[ 'option' ][ 'subsub' ] = array( array( 'html' => $option_value_html ) );
189
- }
190
-
191
- return $debug;
192
- }
193
-
194
- /** -----------------------------------------------------------
195
- * GETTER INFO
196
- * -----------------------------------------------------------
197
- */
198
-
199
-
200
- /**
201
- * return the current screen id
202
- *
203
- * @return string
204
- */
205
- public function get_current_screen_info() {
206
- $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
207
-
208
- return !!$screen ? $screen->id : 'null';
209
- }
210
-
211
- /**
212
- * return the current theme name and version
213
- *
214
- * @return string
215
- */
216
- public function get_theme_info() {
217
- $theme = function_exists( 'wp_get_theme' ) ? wp_get_theme() : false;
218
-
219
- return !!$theme ? $theme->get( 'Name' ) . ' (' . $theme->get( 'Version' ) . ')' : 'null';
220
- }
221
-
222
- /**
223
- * return the WooCommerce version if active
224
- *
225
- * @return string
226
- */
227
- public function get_woocommerce_version_info() {
228
- return function_exists( 'WC' ) ? WC()->version : 'not active';
229
- }
230
-
231
- /**
232
- * return plugin framework information (version and loaded_by)
233
- *
234
- * @return string
235
- */
236
- public function get_plugin_framework_info() {
237
- $plugin_fw_version = yith_plugin_fw_get_version();
238
- $plugin_fw_loaded_by = basename( dirname( YIT_CORE_PLUGIN_PATH ) );
239
-
240
- return "$plugin_fw_version (by $plugin_fw_loaded_by)";
241
- }
242
-
243
- /**
244
- * return premium plugins list with versions
245
- *
246
- * @return array
247
- */
248
- public function get_premium_plugins_info() {
249
- $plugins = YIT_Plugin_Licence()->get_products();
250
- $plugins_info = array();
251
-
252
- if ( !!$plugins ) {
253
- foreach ( $plugins as $plugin ) {
254
- $plugins_info[ $plugin[ 'product_id' ] ] = array( 'title' => $plugin[ 'Name' ] . ' (' . $plugin[ 'Version' ] . ')' );
255
- }
256
-
257
- sort( $plugins_info );
258
- }
259
-
260
- return $plugins_info;
261
- }
262
- }
263
- }
264
- if ( !function_exists( 'YITH_Debug' ) ) {
265
- function YITH_Debug() {
266
- return YITH_Debug::get_instance();
267
- }
268
-
269
- YITH_Debug();
270
- }
1
  <?php
2
  /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
  *
5
+ * @package YITH\PluginFramework\Classes
 
 
 
6
  */
7
 
8
+ /**
9
+ * Require the correct file
10
+ */
11
+ require_once __DIR__ . '/../includes/class-yith-debug.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/lib/yit-icons.php CHANGED
@@ -1,1145 +1,11 @@
1
  <?php
2
  /**
3
- * This file belongs to the YIT Framework.
4
  *
5
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
-
12
- if ( !defined( 'ABSPATH' ) ) {
13
- exit;
14
- } // Exit if accessed directly
15
-
16
- if ( !class_exists( 'YIT_Icons' ) ) {
17
- /**
18
- * YIT Icons
19
- *
20
- * Class to manage icons
21
- *
22
- * @class YIT_Icons
23
- * @package YITH
24
- * @since 1.0.0
25
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
26
- *
27
- */
28
- class YIT_Icons {
29
-
30
- /**
31
- * Single instance of the class
32
- *
33
- * @var YIT_Icons
34
- */
35
- private static $_instance;
36
-
37
- /**
38
- * @var array
39
- */
40
- private $_data
41
- = array(
42
- 'font_awesome_version' => '4.6.3',
43
- 'icons' => array(
44
- 'FontAwesome' => array(
45
- '\f000' => 'glass',
46
- '\f001' => 'music',
47
- '\f002' => 'search',
48
- '\f003' => 'envelope-o',
49
- '\f004' => 'heart',
50
- '\f005' => 'star',
51
- '\f006' => 'star-o',
52
- '\f007' => 'user',
53
- '\f008' => 'film',
54
- '\f009' => 'th-large',
55
- '\f00a' => 'th',
56
- '\f00b' => 'th-list',
57
- '\f00c' => 'check',
58
- '\f00d' => 'times',
59
- '\f00e' => 'search-plus',
60
- '\f010' => 'search-minus',
61
- '\f011' => 'power-off',
62
- '\f012' => 'signal',
63
- '\f013' => 'cog',
64
- '\f014' => 'trash-o',
65
- '\f015' => 'home',
66
- '\f016' => 'file-o',
67
- '\f017' => 'clock-o',
68
- '\f018' => 'road',
69
- '\f019' => 'download',
70
- '\f01a' => 'arrow-circle-o-down',
71
- '\f01b' => 'arrow-circle-o-up',
72
- '\f01c' => 'inbox',
73
- '\f01d' => 'play-circle-o',
74
- '\f01e' => 'repeat',
75
- '\f021' => 'refresh',
76
- '\f022' => 'list-alt',
77
- '\f023' => 'lock',
78
- '\f024' => 'flag',
79
- '\f025' => 'headphones',
80
- '\f026' => 'volume-off',
81
- '\f027' => 'volume-down',
82
- '\f028' => 'volume-up',
83
- '\f029' => 'qrcode',
84
- '\f02a' => 'barcode',
85
- '\f02b' => 'tag',
86
- '\f02c' => 'tags',
87
- '\f02d' => 'book',
88
- '\f02e' => 'bookmark',
89
- '\f02f' => 'print',
90
- '\f030' => 'camera',
91
- '\f031' => 'font',
92
- '\f032' => 'bold',
93
- '\f033' => 'italic',
94
- '\f034' => 'text-height',
95
- '\f035' => 'text-width',
96
- '\f036' => 'align-left',
97
- '\f037' => 'align-center',
98
- '\f038' => 'align-right',
99
- '\f039' => 'align-justify',
100
- '\f03a' => 'list',
101
- '\f03b' => 'outdent',
102
- '\f03c' => 'indent',
103
- '\f03d' => 'video-camera',
104
- '\f03e' => 'picture-o',
105
- '\f040' => 'pencil',
106
- '\f041' => 'map-marker',
107
- '\f042' => 'adjust',
108
- '\f043' => 'tint',
109
- '\f044' => 'pencil-square-o',
110
- '\f045' => 'share-square-o',
111
- '\f046' => 'check-square-o',
112
- '\f047' => 'arrows',
113
- '\f048' => 'step-backward',
114
- '\f049' => 'fast-backward',
115
- '\f04a' => 'backward',
116
- '\f04b' => 'play',
117
- '\f04c' => 'pause',
118
- '\f04d' => 'stop',
119
- '\f04e' => 'forward',
120
- '\f050' => 'fast-forward',
121
- '\f051' => 'step-forward',
122
- '\f052' => 'eject',
123
- '\f053' => 'chevron-left',
124
- '\f054' => 'chevron-right',
125
- '\f055' => 'plus-circle',
126
- '\f056' => 'minus-circle',
127
- '\f057' => 'times-circle',
128
- '\f058' => 'check-circle',
129
- '\f059' => 'question-circle',
130
- '\f05a' => 'info-circle',
131
- '\f05b' => 'crosshairs',
132
- '\f05c' => 'times-circle-o',
133
- '\f05d' => 'check-circle-o',
134
- '\f05e' => 'ban',
135
- '\f060' => 'arrow-left',
136
- '\f061' => 'arrow-right',
137
- '\f062' => 'arrow-up',
138
- '\f063' => 'arrow-down',
139
- '\f064' => 'share',
140
- '\f065' => 'expand',
141
- '\f066' => 'compress',
142
- '\f067' => 'plus',
143
- '\f068' => 'minus',
144
- '\f069' => 'asterisk',
145
- '\f06a' => 'exclamation-circle',
146
- '\f06b' => 'gift',
147
- '\f06c' => 'leaf',
148
- '\f06d' => 'fire',
149
- '\f06e' => 'eye',
150
- '\f070' => 'eye-slash',
151
- '\f071' => 'exclamation-triangle',
152
- '\f072' => 'plane',
153
- '\f073' => 'calendar',
154
- '\f074' => 'random',
155
- '\f075' => 'comment',
156
- '\f076' => 'magnet',
157
- '\f077' => 'chevron-up',
158
- '\f078' => 'chevron-down',
159
- '\f079' => 'retweet',
160
- '\f07a' => 'shopping-cart',
161
- '\f07b' => 'folder',
162
- '\f07c' => 'folder-open',
163
- '\f07d' => 'arrows-v',
164
- '\f07e' => 'arrows-h',
165
- '\f080' => 'bar-chart',
166
- '\f081' => 'twitter-square',
167
- '\f082' => 'facebook-square',
168
- '\f083' => 'camera-retro',
169
- '\f084' => 'key',
170
- '\f085' => 'cogs',
171
- '\f086' => 'comments',
172
- '\f087' => 'thumbs-o-up',
173
- '\f088' => 'thumbs-o-down',
174
- '\f089' => 'star-half',
175
- '\f08a' => 'heart-o',
176
- '\f08b' => 'sign-out',
177
- '\f08c' => 'linkedin-square',
178
- '\f08d' => 'thumb-tack',
179
- '\f08e' => 'external-link',
180
- '\f090' => 'sign-in',
181
- '\f091' => 'trophy',
182
- '\f092' => 'github-square',
183
- '\f093' => 'upload',
184
- '\f094' => 'lemon-o',
185
- '\f095' => 'phone',
186
- '\f096' => 'square-o',
187
- '\f097' => 'bookmark-o',
188
- '\f098' => 'phone-square',
189
- '\f099' => 'twitter',
190
- '\f09a' => 'facebook',
191
- '\f09b' => 'github',
192
- '\f09c' => 'unlock',
193
- '\f09d' => 'credit-card',
194
- '\f09e' => 'rss',
195
- '\f0a0' => 'hdd-o',
196
- '\f0a1' => 'bullhorn',
197
- '\f0a2' => 'bell-o',
198
- '\f0a3' => 'certificate',
199
- '\f0a4' => 'hand-o-right',
200
- '\f0a5' => 'hand-o-left',
201
- '\f0a6' => 'hand-o-up',
202
- '\f0a7' => 'hand-o-down',
203
- '\f0a8' => 'arrow-circle-left',
204
- '\f0a9' => 'arrow-circle-right',
205
- '\f0aa' => 'arrow-circle-up',
206
- '\f0ab' => 'arrow-circle-down',
207
- '\f0ac' => 'globe',
208
- '\f0ad' => 'wrench',
209
- '\f0ae' => 'tasks',
210
- '\f0b0' => 'filter',
211
- '\f0b1' => 'briefcase',
212
- '\f0b2' => 'arrows-alt',
213
- '\f0c0' => 'users',
214
- '\f0c1' => 'link',
215
- '\f0c2' => 'cloud',
216
- '\f0c3' => 'flask',
217
- '\f0c4' => 'scissors',
218
- '\f0c5' => 'files-o',
219
- '\f0c6' => 'paperclip',
220
- '\f0c7' => 'floppy-o',
221
- '\f0c8' => 'square',
222
- '\f0c9' => 'bars',
223
- '\f0ca' => 'list-ul',
224
- '\f0cb' => 'list-ol',
225
- '\f0cc' => 'strikethrough',
226
- '\f0cd' => 'underline',
227
- '\f0ce' => 'table',
228
- '\f0d0' => 'magic',
229
- '\f0d1' => 'truck',
230
- '\f0d2' => 'pinterest',
231
- '\f0d3' => 'pinterest-square',
232
- '\f0d4' => 'google-plus-square',
233
- '\f0d5' => 'google-plus',
234
- '\f0d6' => 'money',
235
- '\f0d7' => 'caret-down',
236
- '\f0d8' => 'caret-up',
237
- '\f0d9' => 'caret-left',
238
- '\f0da' => 'caret-right',
239
- '\f0db' => 'columns',
240
- '\f0dc' => 'sort',
241
- '\f0dd' => 'sort-desc',
242
- '\f0de' => 'sort-asc',
243
- '\f0e0' => 'envelope',
244
- '\f0e1' => 'linkedin',
245
- '\f0e2' => 'undo',
246
- '\f0e3' => 'gavel',
247
- '\f0e4' => 'tachometer',
248
- '\f0e5' => 'comment-o',
249
- '\f0e6' => 'comments-o',
250
- '\f0e7' => 'bolt',
251
- '\f0e8' => 'sitemap',
252
- '\f0e9' => 'umbrella',
253
- '\f0ea' => 'clipboard',
254
- '\f0eb' => 'lightbulb-o',
255
- '\f0ec' => 'exchange',
256
- '\f0ed' => 'cloud-download',
257
- '\f0ee' => 'cloud-upload',
258
- '\f0f0' => 'user-md',
259
- '\f0f1' => 'stethoscope',
260
- '\f0f2' => 'suitcase',
261
- '\f0f3' => 'bell',
262
- '\f0f4' => 'coffee',
263
- '\f0f5' => 'cutlery',
264
- '\f0f6' => 'file-text-o',
265
- '\f0f7' => 'building-o',
266
- '\f0f8' => 'hospital-o',
267
- '\f0f9' => 'ambulance',
268
- '\f0fa' => 'medkit',
269
- '\f0fb' => 'fighter-jet',
270
- '\f0fc' => 'beer',
271
- '\f0fd' => 'h-square',
272
- '\f0fe' => 'plus-square',
273
- '\f100' => 'angle-double-left',
274
- '\f101' => 'angle-double-right',
275
- '\f102' => 'angle-double-up',
276
- '\f103' => 'angle-double-down',
277
- '\f104' => 'angle-left',
278
- '\f105' => 'angle-right',
279
- '\f106' => 'angle-up',
280
- '\f107' => 'angle-down',
281
- '\f108' => 'desktop',
282
- '\f109' => 'laptop',
283
- '\f10a' => 'tablet',
284
- '\f10b' => 'mobile',
285
- '\f10c' => 'circle-o',
286
- '\f10d' => 'quote-left',
287
- '\f10e' => 'quote-right',
288
- '\f110' => 'spinner',
289
- '\f111' => 'circle',
290
- '\f112' => 'reply',
291
- '\f113' => 'github-alt',
292
- '\f114' => 'folder-o',
293
- '\f115' => 'folder-open-o',
294
- '\f118' => 'smile-o',
295
- '\f119' => 'frown-o',
296
- '\f11a' => 'meh-o',
297
- '\f11b' => 'gamepad',
298
- '\f11c' => 'keyboard-o',
299
- '\f11d' => 'flag-o',
300
- '\f11e' => 'flag-checkered',
301
- '\f120' => 'terminal',
302
- '\f121' => 'code',
303
- '\f122' => 'reply-all',
304
- '\f123' => 'star-half-o',
305
- '\f124' => 'location-arrow',
306
- '\f125' => 'crop',
307
- '\f126' => 'code-fork',
308
- '\f127' => 'chain-broken',
309
- '\f128' => 'question',
310
- '\f129' => 'info',
311
- '\f12a' => 'exclamation',
312
- '\f12b' => 'superscript',
313
- '\f12c' => 'subscript',
314
- '\f12d' => 'eraser',
315
- '\f12e' => 'puzzle-piece',
316
- '\f130' => 'microphone',
317
- '\f131' => 'microphone-slash',
318
- '\f132' => 'shield',
319
- '\f133' => 'calendar-o',
320
- '\f134' => 'fire-extinguisher',
321
- '\f135' => 'rocket',
322
- '\f136' => 'maxcdn',
323
- '\f137' => 'chevron-circle-left',
324
- '\f138' => 'chevron-circle-right',
325
- '\f139' => 'chevron-circle-up',
326
- '\f13a' => 'chevron-circle-down',
327
- '\f13b' => 'html5',
328
- '\f13c' => 'css3',
329
- '\f13d' => 'anchor',
330
- '\f13e' => 'unlock-alt',
331
- '\f140' => 'bullseye',
332
- '\f141' => 'ellipsis-h',
333
- '\f142' => 'ellipsis-v',
334
- '\f143' => 'rss-square',
335
- '\f144' => 'play-circle',
336
- '\f145' => 'ticket',
337
- '\f146' => 'minus-square',
338
- '\f147' => 'minus-square-o',
339
- '\f148' => 'level-up',
340
- '\f149' => 'level-down',
341
- '\f14a' => 'check-square',
342
- '\f14b' => 'pencil-square',
343
- '\f14c' => 'external-link-square',
344
- '\f14d' => 'share-square',
345
- '\f14e' => 'compass',
346
- '\f150' => 'caret-square-o-down',
347
- '\f151' => 'caret-square-o-up',
348
- '\f152' => 'caret-square-o-right',
349
- '\f153' => 'eur',
350
- '\f154' => 'gbp',
351
- '\f155' => 'usd',
352
- '\f156' => 'inr',
353
- '\f157' => 'jpy',
354
- '\f158' => 'rub',
355
- '\f159' => 'krw',
356
- '\f15a' => 'btc',
357
- '\f15b' => 'file',
358
- '\f15c' => 'file-text',
359
- '\f15d' => 'sort-alpha-asc',
360
- '\f15e' => 'sort-alpha-desc',
361
- '\f160' => 'sort-amount-asc',
362
- '\f161' => 'sort-amount-desc',
363
- '\f162' => 'sort-numeric-asc',
364
- '\f163' => 'sort-numeric-desc',
365
- '\f164' => 'thumbs-up',
366
- '\f165' => 'thumbs-down',
367
- '\f166' => 'youtube-square',
368
- '\f167' => 'youtube',
369
- '\f168' => 'xing',
370
- '\f169' => 'xing-square',
371
- '\f16a' => 'youtube-play',
372
- '\f16b' => 'dropbox',
373
- '\f16c' => 'stack-overflow',
374
- '\f16d' => 'instagram',
375
- '\f16e' => 'flickr',
376
- '\f170' => 'adn',
377
- '\f171' => 'bitbucket',
378
- '\f172' => 'bitbucket-square',
379
- '\f173' => 'tumblr',
380
- '\f174' => 'tumblr-square',
381
- '\f175' => 'long-arrow-down',
382
- '\f176' => 'long-arrow-up',
383
- '\f177' => 'long-arrow-left',
384
- '\f178' => 'long-arrow-right',
385
- '\f179' => 'apple',
386
- '\f17a' => 'windows',
387
- '\f17b' => 'android',
388
- '\f17c' => 'linux',
389
- '\f17d' => 'dribbble',
390
- '\f17e' => 'skype',
391
- '\f180' => 'foursquare',
392
- '\f181' => 'trello',
393
- '\f182' => 'female',
394
- '\f183' => 'male',
395
- '\f184' => 'gratipay',
396
- '\f185' => 'sun-o',
397
- '\f186' => 'moon-o',
398
- '\f187' => 'archive',
399
- '\f188' => 'bug',
400
- '\f189' => 'vk',
401
- '\f18a' => 'weibo',
402
- '\f18b' => 'renren',
403
- '\f18c' => 'pagelines',
404
- '\f18d' => 'stack-exchange',
405
- '\f18e' => 'arrow-circle-o-right',
406
- '\f190' => 'arrow-circle-o-left',
407
- '\f191' => 'caret-square-o-left',
408
- '\f192' => 'dot-circle-o',
409
- '\f193' => 'wheelchair',
410
- '\f194' => 'vimeo-square',
411
- '\f195' => 'try',
412
- '\f196' => 'plus-square-o',
413
- '\f197' => 'space-shuttle',
414
- '\f198' => 'slack',
415
- '\f199' => 'envelope-square',
416
- '\f19a' => 'wordpress',
417
- '\f19b' => 'openid',
418
- '\f19c' => 'university',
419
- '\f19d' => 'graduation-cap',
420
- '\f19e' => 'yahoo',
421
- '\f1a0' => 'google',
422
- '\f1a1' => 'reddit',
423
- '\f1a2' => 'reddit-square',
424
- '\f1a3' => 'stumbleupon-circle',
425
- '\f1a4' => 'stumbleupon',
426
- '\f1a5' => 'delicious',
427
- '\f1a6' => 'digg',
428
- '\f1a7' => 'pied-piper-pp',
429
- '\f1a8' => 'pied-piper-alt',
430
- '\f1a9' => 'drupal',
431
- '\f1aa' => 'joomla',
432
- '\f1ab' => 'language',
433
- '\f1ac' => 'fax',
434
- '\f1ad' => 'building',
435
- '\f1ae' => 'child',
436
- '\f1b0' => 'paw',
437
- '\f1b1' => 'spoon',
438
- '\f1b2' => 'cube',
439
- '\f1b3' => 'cubes',
440
- '\f1b4' => 'behance',
441
- '\f1b5' => 'behance-square',
442
- '\f1b6' => 'steam',
443
- '\f1b7' => 'steam-square',
444
- '\f1b8' => 'recycle',
445
- '\f1b9' => 'car',
446
- '\f1ba' => 'taxi',
447
- '\f1bb' => 'tree',
448
- '\f1bc' => 'spotify',
449
- '\f1bd' => 'deviantart',
450
- '\f1be' => 'soundcloud',
451
- '\f1c0' => 'database',
452
- '\f1c1' => 'file-pdf-o',
453
- '\f1c2' => 'file-word-o',
454
- '\f1c3' => 'file-excel-o',
455
- '\f1c4' => 'file-powerpoint-o',
456
- '\f1c5' => 'file-image-o',
457
- '\f1c6' => 'file-archive-o',
458
- '\f1c7' => 'file-audio-o',
459
- '\f1c8' => 'file-video-o',
460
- '\f1c9' => 'file-code-o',
461
- '\f1ca' => 'vine',
462
- '\f1cb' => 'codepen',
463
- '\f1cc' => 'jsfiddle',
464
- '\f1cd' => 'life-ring',
465
- '\f1ce' => 'circle-o-notch',
466
- '\f1d0' => 'rebel',
467
- '\f1d1' => 'empire',
468
- '\f1d2' => 'git-square',
469
- '\f1d3' => 'git',
470
- '\f1d4' => 'hacker-news',
471
- '\f1d5' => 'tencent-weibo',
472
- '\f1d6' => 'qq',
473
- '\f1d7' => 'weixin',
474
- '\f1d8' => 'paper-plane',
475
- '\f1d9' => 'paper-plane-o',
476
- '\f1da' => 'history',
477
- '\f1db' => 'circle-thin',
478
- '\f1dc' => 'header',
479
- '\f1dd' => 'paragraph',
480
- '\f1de' => 'sliders',
481
- '\f1e0' => 'share-alt',
482
- '\f1e1' => 'share-alt-square',
483
- '\f1e2' => 'bomb',
484
- '\f1e3' => 'futbol-o',
485
- '\f1e4' => 'tty',
486
- '\f1e5' => 'binoculars',
487
- '\f1e6' => 'plug',
488
- '\f1e7' => 'slideshare',
489
- '\f1e8' => 'twitch',
490
- '\f1e9' => 'yelp',
491
- '\f1ea' => 'newspaper-o',
492
- '\f1eb' => 'wifi',
493
- '\f1ec' => 'calculator',
494
- '\f1ed' => 'paypal',
495
- '\f1ee' => 'google-wallet',
496
- '\f1f0' => 'cc-visa',
497
- '\f1f1' => 'cc-mastercard',
498
- '\f1f2' => 'cc-discover',
499
- '\f1f3' => 'cc-amex',
500
- '\f1f4' => 'cc-paypal',
501
- '\f1f5' => 'cc-stripe',
502
- '\f1f6' => 'bell-slash',
503
- '\f1f7' => 'bell-slash-o',
504
- '\f1f8' => 'trash',
505
- '\f1f9' => 'copyright',
506
- '\f1fa' => 'at',
507
- '\f1fb' => 'eyedropper',
508
- '\f1fc' => 'paint-brush',
509
- '\f1fd' => 'birthday-cake',
510
- '\f1fe' => 'area-chart',
511
- '\f200' => 'pie-chart',
512
- '\f201' => 'line-chart',
513
- '\f202' => 'lastfm',
514
- '\f203' => 'lastfm-square',
515
- '\f204' => 'toggle-off',
516
- '\f205' => 'toggle-on',
517
- '\f206' => 'bicycle',
518
- '\f207' => 'bus',
519
- '\f208' => 'ioxhost',
520
- '\f209' => 'angellist',
521
- '\f20a' => 'cc',
522
- '\f20b' => 'ils',
523
- '\f20c' => 'meanpath',
524
- '\f20d' => 'buysellads',
525
- '\f20e' => 'connectdevelop',
526
- '\f210' => 'dashcube',
527
- '\f211' => 'forumbee',
528
- '\f212' => 'leanpub',
529
- '\f213' => 'sellsy',
530
- '\f214' => 'shirtsinbulk',
531
- '\f215' => 'simplybuilt',
532
- '\f216' => 'skyatlas',
533
- '\f217' => 'cart-plus',
534
- '\f218' => 'cart-arrow-down',
535
- '\f219' => 'diamond',
536
- '\f21a' => 'ship',
537
- '\f21b' => 'user-secret',
538
- '\f21c' => 'motorcycle',
539
- '\f21d' => 'street-view',
540
- '\f21e' => 'heartbeat',
541
- '\f221' => 'venus',
542
- '\f222' => 'mars',
543
- '\f223' => 'mercury',
544
- '\f224' => 'transgender',
545
- '\f225' => 'transgender-alt',
546
- '\f226' => 'venus-double',
547
- '\f227' => 'mars-double',
548
- '\f228' => 'venus-mars',
549
- '\f229' => 'mars-stroke',
550
- '\f22a' => 'mars-stroke-v',
551
- '\f22b' => 'mars-stroke-h',
552
- '\f22c' => 'neuter',
553
- '\f22d' => 'genderless',
554
- '\f230' => 'facebook-official',
555
- '\f231' => 'pinterest-p',
556
- '\f232' => 'whatsapp',
557
- '\f233' => 'server',
558
- '\f234' => 'user-plus',
559
- '\f235' => 'user-times',
560
- '\f236' => 'bed',
561
- '\f237' => 'viacoin',
562
- '\f238' => 'train',
563
- '\f239' => 'subway',
564
- '\f23a' => 'medium',
565
- '\f23b' => 'y-combinator',
566
- '\f23c' => 'optin-monster',
567
- '\f23d' => 'opencart',
568
- '\f23e' => 'expeditedssl',
569
- '\f240' => 'battery-full',
570
- '\f241' => 'battery-three-quarters',
571
- '\f242' => 'battery-half',
572
- '\f243' => 'battery-quarter',
573
- '\f244' => 'battery-empty',
574
- '\f245' => 'mouse-pointer',
575
- '\f246' => 'i-cursor',
576
- '\f247' => 'object-group',
577
- '\f248' => 'object-ungroup',
578
- '\f249' => 'sticky-note',
579
- '\f24a' => 'sticky-note-o',
580
- '\f24b' => 'cc-jcb',
581
- '\f24c' => 'cc-diners-club',
582
- '\f24d' => 'clone',
583
- '\f24e' => 'balance-scale',
584
- '\f250' => 'hourglass-o',
585
- '\f251' => 'hourglass-start',
586
- '\f252' => 'hourglass-half',
587
- '\f253' => 'hourglass-end',
588
- '\f254' => 'hourglass',
589
- '\f255' => 'hand-rock-o',
590
- '\f256' => 'hand-paper-o',
591
- '\f257' => 'hand-scissors-o',
592
- '\f258' => 'hand-lizard-o',
593
- '\f259' => 'hand-spock-o',
594
- '\f25a' => 'hand-pointer-o',
595
- '\f25b' => 'hand-peace-o',
596
- '\f25c' => 'trademark',
597
- '\f25d' => 'registered',
598
- '\f25e' => 'creative-commons',
599
- '\f260' => 'gg',
600
- '\f261' => 'gg-circle',
601
- '\f262' => 'tripadvisor',
602
- '\f263' => 'odnoklassniki',
603
- '\f264' => 'odnoklassniki-square',
604
- '\f265' => 'get-pocket',
605
- '\f266' => 'wikipedia-w',
606
- '\f267' => 'safari',
607
- '\f268' => 'chrome',
608
- '\f269' => 'firefox',
609
- '\f26a' => 'opera',
610
- '\f26b' => 'internet-explorer',
611
- '\f26c' => 'television',
612
- '\f26d' => 'contao',
613
- '\f26e' => '500px',
614
- '\f270' => 'amazon',
615
- '\f271' => 'calendar-plus-o',
616
- '\f272' => 'calendar-minus-o',
617
- '\f273' => 'calendar-times-o',
618
- '\f274' => 'calendar-check-o',
619
- '\f275' => 'industry',
620
- '\f276' => 'map-pin',
621
- '\f277' => 'map-signs',
622
- '\f278' => 'map-o',
623
- '\f279' => 'map',
624
- '\f27a' => 'commenting',
625
- '\f27b' => 'commenting-o',
626
- '\f27c' => 'houzz',
627
- '\f27d' => 'vimeo',
628
- '\f27e' => 'black-tie',
629
- '\f280' => 'fonticons',
630
- '\f281' => 'reddit-alien',
631
- '\f282' => 'edge',
632
- '\f283' => 'credit-card-alt',
633
- '\f284' => 'codiepie',
634
- '\f285' => 'modx',
635
- '\f286' => 'fort-awesome',
636
- '\f287' => 'usb',
637
- '\f288' => 'product-hunt',
638
- '\f289' => 'mixcloud',
639
- '\f28a' => 'scribd',
640
- '\f28b' => 'pause-circle',
641
- '\f28c' => 'pause-circle-o',
642
- '\f28d' => 'stop-circle',
643
- '\f28e' => 'stop-circle-o',
644
- '\f290' => 'shopping-bag',
645
- '\f291' => 'shopping-basket',
646
- '\f292' => 'hashtag',
647
- '\f293' => 'bluetooth',
648
- '\f294' => 'bluetooth-b',
649
- '\f295' => 'percent',
650
- '\f296' => 'gitlab',
651
- '\f297' => 'wpbeginner',
652
- '\f298' => 'wpforms',
653
- '\f299' => 'envira',
654
- '\f29a' => 'universal-access',
655
- '\f29b' => 'wheelchair-alt',
656
- '\f29c' => 'question-circle-o',
657
- '\f29d' => 'blind',
658
- '\f29e' => 'audio-description',
659
- '\f2a0' => 'volume-control-phone',
660
- '\f2a1' => 'braille',
661
- '\f2a2' => 'assistive-listening-systems',
662
- '\f2a3' => 'american-sign-language-interpreting',
663
- '\f2a4' => 'deaf',
664
- '\f2a5' => 'glide',
665
- '\f2a6' => 'glide-g',
666
- '\f2a7' => 'sign-language',
667
- '\f2a8' => 'low-vision',
668
- '\f2a9' => 'viadeo',
669
- '\f2aa' => 'viadeo-square',
670
- '\f2ab' => 'snapchat',
671
- '\f2ac' => 'snapchat-ghost',
672
- '\f2ad' => 'snapchat-square',
673
- '\f2ae' => 'pied-piper',
674
- '\f2b0' => 'first-order',
675
- '\f2b1' => 'yoast',
676
- '\f2b2' => 'themeisle',
677
- '\f2b3' => 'google-plus-official',
678
- '\f2b4' => 'font-awesome',
679
- ),
680
- 'Dashicons' => array(
681
- '\f100' => 'admin-appearance',
682
- '\f101' => 'admin-comments',
683
- '\f102' => 'admin-home',
684
- '\f104' => 'admin-media',
685
- '\f105' => 'admin-page',
686
- '\f106' => 'admin-plugins',
687
- '\f107' => 'admin-tools',
688
- '\f108' => 'admin-settings',
689
- '\f110' => 'admin-users',
690
- '\f111' => 'admin-generic',
691
- '\f112' => 'admin-network',
692
- '\f115' => 'welcome-view-site',
693
- '\f116' => 'welcome-widgets-menus',
694
- '\f117' => 'welcome-comments',
695
- '\f118' => 'welcome-learn-more',
696
- '\f120' => 'wordpress',
697
- '\f122' => 'format-quote',
698
- '\f123' => 'format-aside',
699
- '\f125' => 'format-chat',
700
- '\f126' => 'format-video',
701
- '\f127' => 'format-audio',
702
- '\f128' => 'format-image',
703
- '\f130' => 'format-status',
704
- '\f132' => 'plus',
705
- '\f133' => 'welcome-add-page',
706
- '\f134' => 'align-center',
707
- '\f135' => 'align-left',
708
- '\f136' => 'align-right',
709
- '\f138' => 'align-none',
710
- '\f139' => 'arrow-right',
711
- '\f140' => 'arrow-down',
712
- '\f141' => 'arrow-left',
713
- '\f142' => 'arrow-up',
714
- '\f145' => 'calendar',
715
- '\f147' => 'yes',
716
- '\f148' => 'admin-collapse',
717
- '\f153' => 'dismiss',
718
- '\f154' => 'star-empty',
719
- '\f155' => 'star-filled',
720
- '\f156' => 'sort',
721
- '\f157' => 'pressthis',
722
- '\f158' => 'no',
723
- '\f159' => 'marker',
724
- '\f160' => 'lock',
725
- '\f161' => 'format-gallery',
726
- '\f163' => 'list-view',
727
- '\f165' => 'image-crop',
728
- '\f166' => 'image-rotate-left',
729
- '\f167' => 'image-rotate-right',
730
- '\f168' => 'image-flip-vertical',
731
- '\f169' => 'image-flip-horizontal',
732
- '\f171' => 'undo',
733
- '\f172' => 'redo',
734
- '\f173' => 'post-status',
735
- '\f174' => 'cart',
736
- '\f175' => 'feedback',
737
- '\f176' => 'cloud',
738
- '\f177' => 'visibility',
739
- '\f178' => 'vault',
740
- '\f179' => 'search',
741
- '\f180' => 'screenoptions',
742
- '\f181' => 'slides',
743
- '\f183' => 'analytics',
744
- '\f184' => 'chart-pie',
745
- '\f185' => 'chart-bar',
746
- '\f200' => 'editor-bold',
747
- '\f201' => 'editor-italic',
748
- '\f203' => 'editor-ul',
749
- '\f204' => 'editor-ol',
750
- '\f205' => 'editor-quote',
751
- '\f206' => 'editor-alignleft',
752
- '\f207' => 'editor-aligncenter',
753
- '\f208' => 'editor-alignright',
754
- '\f209' => 'editor-insertmore',
755
- '\f210' => 'editor-spellcheck',
756
- '\f212' => 'editor-kitchensink',
757
- '\f213' => 'editor-underline',
758
- '\f214' => 'editor-justify',
759
- '\f215' => 'editor-textcolor',
760
- '\f216' => 'editor-paste-word',
761
- '\f217' => 'editor-paste-text',
762
- '\f218' => 'editor-removeformatting',
763
- '\f219' => 'editor-video',
764
- '\f220' => 'editor-customchar',
765
- '\f221' => 'editor-outdent',
766
- '\f222' => 'editor-indent',
767
- '\f223' => 'editor-help',
768
- '\f224' => 'editor-strikethrough',
769
- '\f225' => 'editor-unlink',
770
- '\f226' => 'dashboard',
771
- '\f227' => 'flag',
772
- '\f229' => 'leftright',
773
- '\f230' => 'location',
774
- '\f231' => 'location-alt',
775
- '\f232' => 'images-alt',
776
- '\f233' => 'images-alt2',
777
- '\f234' => 'video-alt',
778
- '\f235' => 'video-alt2',
779
- '\f236' => 'video-alt3',
780
- '\f237' => 'share1',
781
- '\f238' => 'chart-line',
782
- '\f239' => 'chart-area',
783
- '\f240' => 'share-alt',
784
- '\f242' => 'share-alt2',
785
- '\f301' => 'twitter',
786
- '\f303' => 'rss',
787
- '\f304' => 'facebook',
788
- '\f305' => 'facebook-alt',
789
- '\f306' => 'camera',
790
- '\f307' => 'groups',
791
- '\f308' => 'hammer',
792
- '\f309' => 'art',
793
- '\f310' => 'migrate',
794
- '\f311' => 'performance',
795
- '\f312' => 'products',
796
- '\f313' => 'awards',
797
- '\f314' => 'forms',
798
- '\f316' => 'download',
799
- '\f317' => 'upload',
800
- '\f318' => 'category',
801
- '\f319' => 'admin-site',
802
- '\f320' => 'editor-rtl',
803
- '\f321' => 'backup',
804
- '\f322' => 'portfolio',
805
- '\f323' => 'tag',
806
- '\f324' => 'wordpress-alt',
807
- '\f325' => 'networking',
808
- '\f326' => 'translation',
809
- '\f328' => 'smiley',
810
- '\f330' => 'book',
811
- '\f331' => 'book-alt',
812
- '\f332' => 'shield',
813
- '\f333' => 'menu',
814
- '\f334' => 'shield-alt',
815
- '\f335' => 'no-alt',
816
- '\f336' => 'id',
817
- '\f337' => 'id-alt',
818
- '\f338' => 'businessman',
819
- '\f339' => 'lightbulb',
820
- '\f340' => 'arrow-left-alt',
821
- '\f341' => 'arrow-left-alt2',
822
- '\f342' => 'arrow-up-alt',
823
- '\f343' => 'arrow-up-alt2',
824
- '\f344' => 'arrow-right-alt',
825
- '\f345' => 'arrow-right-alt2',
826
- '\f346' => 'arrow-down-alt',
827
- '\f347' => 'arrow-down-alt2',
828
- '\f348' => 'info',
829
- '\f459' => 'star-half',
830
- '\f460' => 'minus',
831
- '\f462' => 'googleplus',
832
- '\f463' => 'update',
833
- '\f464' => 'edit',
834
- '\f465' => 'email',
835
- '\f466' => 'email-alt',
836
- '\f468' => 'sos',
837
- '\f469' => 'clock',
838
- '\f470' => 'smartphone',
839
- '\f471' => 'tablet',
840
- '\f472' => 'desktop',
841
- '\f473' => 'testimonial',
842
- '\f474' => 'editor-break',
843
- '\f475' => 'editor-code',
844
- '\f476' => 'editor-paragraph',
845
- '\f478' => 'text',
846
- '\f479' => 'tagcloud',
847
- '\f480' => 'archive',
848
- '\f481' => 'clipboard',
849
- '\f482' => 'microphone',
850
- '\f483' => 'universal-access',
851
- '\f484' => 'nametag',
852
- '\f486' => 'tickets',
853
- '\f487' => 'heart',
854
- '\f488' => 'megaphone',
855
- '\f489' => 'schedule',
856
- '\f490' => 'media-video',
857
- '\f491' => 'media-text',
858
- '\f492' => 'playlist-audio',
859
- '\f493' => 'playlist-video',
860
- '\f495' => 'media-spreadsheet',
861
- '\f496' => 'media-interactive',
862
- '\f497' => 'media-document',
863
- '\f498' => 'media-default',
864
- '\f499' => 'media-code',
865
- '\f500' => 'media-audio',
866
- '\f501' => 'media-archive',
867
- '\f502' => 'plus-alt',
868
- '\f503' => 'randomize',
869
- '\f504' => 'external',
870
- '\f506' => 'editor-contract',
871
- '\f507' => 'universal-access-alt',
872
- '\f508' => 'calendar-alt',
873
- '\f509' => 'grid-view',
874
- '\f510' => 'index-card',
875
- '\f511' => 'carrot',
876
- '\f512' => 'building',
877
- '\f513' => 'store',
878
- '\f514' => 'album',
879
- '\f515' => 'controls-repeat',
880
- '\f516' => 'controls-skipback',
881
- '\f517' => 'controls-skipforward',
882
- '\f518' => 'controls-back',
883
- '\f519' => 'controls-forward',
884
- '\f520' => 'controls-volumeoff',
885
- '\f521' => 'controls-volumeon',
886
- '\f522' => 'controls-play',
887
- '\f523' => 'controls-pause',
888
- '\f524' => 'tickets-alt',
889
- '\f525' => 'phone',
890
- '\f526' => 'money',
891
- '\f527' => 'palmtree',
892
- '\f528' => 'unlock',
893
- '\f529' => 'thumbs-up',
894
- '\f530' => 'hidden',
895
- '\f531' => 'image-rotate',
896
- '\f533' => 'image-filter',
897
- '\f534' => 'warning',
898
- '\f535' => 'editor-table',
899
- '\f536' => 'filter',
900
- '\f537' => 'sticky',
901
- '\f538' => 'layout',
902
- '\f540' => 'admin-customizer',
903
- '\f541' => 'admin-multisite',
904
- '\f542' => 'thumbs-down',
905
- '\f543' => 'plus-alt2',
906
- '\f545' => 'move',
907
- '\f546' => 'paperclip',
908
- '\f547' => 'laptop',
909
- ),
910
- )
911
- );
912
-
913
-
914
- /**
915
- * Returns single instance of the class
916
- *
917
- * @return YIT_Icons
918
- * @since 1.0.0
919
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
920
- */
921
- public static function get_instance() {
922
- return isset( self::$_instance ) ? self::$_instance : self::$_instance = new self();
923
- }
924
-
925
- /**
926
- * @since 1.0.0
927
- * @access protected
928
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
929
- */
930
- private function __construct() {
931
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 99 );
932
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), 99 );
933
- }
934
-
935
- /**
936
- * __get function.
937
- *
938
- * @param string $key
939
- *
940
- * @return mixed
941
- */
942
- public function __get( $key ) {
943
- $value = isset( $this->_data[ $key ] ) ? $this->_data[ $key ] : false;
944
-
945
- return $value;
946
- }
947
-
948
- /**
949
- * __isset function.
950
- *
951
- * @param string $key
952
- *
953
- * @return bool
954
- */
955
- public function __isset( $key ) {
956
- return isset( $this->_data[ $key ] );
957
- }
958
-
959
- public function get_icons( $filter_icons = '' ) {
960
- $icons = $this->icons;
961
- if ( !empty( $filter_icons ) ) {
962
- $icons = apply_filters( 'yith_plugin_fw_icons_field_icons_' . sanitize_key( $filter_icons ), $icons );
963
- }
964
-
965
- return $icons;
966
- }
967
-
968
- /**
969
- * @param $icon_string
970
- *
971
- * @param string $filter_icons
972
- *
973
- * @return string
974
- */
975
- public function get_icon_data( $icon_string, $filter_icons = '' ) {
976
- $icon_data = '';
977
- if ( $icon_string ) {
978
- $icon_array = explode( ':', $icon_string );
979
-
980
- if ( count( $icon_array ) < 2 ) {
981
- return $icon_data;
982
- }
983
-
984
- $font_name = $icon_array[ 0 ];
985
- $icon_name = $icon_array[ 1 ];
986
-
987
- $icons = $this->get_icons( $filter_icons );
988
- if ( array_key_exists( $font_name, $icons ) ) {
989
- $icon_key = array_search( $icon_name, $icons[ $font_name ] );
990
- $icon_code = '&#x' . str_replace( '\\', '', $icon_key );
991
-
992
- $icon_data = 'data-font="' . esc_attr( $font_name ) . '" data-name="' . esc_attr( $icon_name ) . '" data-key="' . esc_attr( $icon_key ) . '" data-icon="' . $icon_code . '"';
993
- }
994
- }
995
-
996
- return $icon_data;
997
- }
998
-
999
- /**
1000
- * Retrieves the font awesome array
1001
- * the first time retrieves the array by the Font Awesome CSS
1002
- * [utility method]
1003
- *
1004
- * @return array
1005
- */
1006
- private function _get_font_awesome_array() {
1007
- $font_awesome_list = get_option( 'yit_font_awesome_list', array() );
1008
- $font_awesome_version = $this->font_awesome_version;
1009
-
1010
- $font_awesome_array = array();
1011
-
1012
- if ( !empty( $font_awesome_list[ $font_awesome_version ] ) ) {
1013
- $font_awesome_array = $font_awesome_list[ $font_awesome_version ];
1014
- } else {
1015
- // Create the array by css
1016
- $font_awesome_file = "https://maxcdn.bootstrapcdn.com/font-awesome/{$font_awesome_version}/css/font-awesome.min.css";
1017
-
1018
- $pattern = '/\.(fa-(?:\w+(?:-)?)+):before{content:"\\\\(....)"}/';
1019
- $subject = file_get_contents( $font_awesome_file );
1020
- preg_match_all( $pattern, $subject, $matches, PREG_SET_ORDER );
1021
- foreach ( $matches as $match ) {
1022
- $font_awesome_array[ $match[ 2 ] ] = $match[ 1 ];
1023
- }
1024
- ksort( $font_awesome_array );
1025
-
1026
- $font_awesome_list[ $font_awesome_version ] = $font_awesome_array;
1027
- update_option( 'yit_font_awesome_list', $font_awesome_list );
1028
- }
1029
-
1030
- return $font_awesome_array;
1031
- }
1032
-
1033
- /**
1034
- * Retrieves the dashicons array
1035
- * the first time retrieves the array by the Dashicons CSS
1036
- * [utility method]
1037
- *
1038
- * @return array
1039
- */
1040
- private function _get_dashicons_array() {
1041
- $dashicons_list = get_option( 'yit_dashicons_list', array() );
1042
-
1043
- $dashicons_array = array();
1044
- if ( false && !empty( $dashicons_list ) ) {
1045
- $dashicons_array = $dashicons_list;
1046
- } else {
1047
- // Create the array by css
1048
- $file = "https://s.w.org/wp-includes/css/dashicons.min.css";
1049
-
1050
- $pattern = '/\.dashicons-((?:\w+(?:-)?)+):before{content:"\\\\(....)"/';
1051
- $pattern = '/\.dashicons-((?:\w+(?:-)?)+):before.............../';
1052
- $subject = file_get_contents( $file );
1053
- preg_match_all( $pattern, $subject, $matches, PREG_SET_ORDER );
1054
-
1055
- foreach ( $matches as $match ) {
1056
- $code = str_replace( '.dashicons-' . $match[ 1 ] . ':before{content:"\\', '', $match[ 0 ] );
1057
- if ( strlen( $code ) == 4 )
1058
- $dashicons_array[ $code ] = $match[ 1 ];
1059
- }
1060
- ksort( $dashicons_array );
1061
- }
1062
-
1063
- return $dashicons_array;
1064
- }
1065
-
1066
- /**
1067
- * Enqueue Scripts
1068
- *
1069
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
1070
- */
1071
- public function enqueue_scripts() {
1072
- wp_register_style( 'font-awesome', "https://maxcdn.bootstrapcdn.com/font-awesome/{$this->font_awesome_version}/css/font-awesome.min.css", array(), $this->font_awesome_version );
1073
-
1074
- $font_awesome_inline = $this->get_inline_scripts( 'font-awesome' );
1075
- wp_add_inline_style( 'font-awesome', $font_awesome_inline );
1076
-
1077
- $dashicons_inline = $this->get_inline_scripts( 'dashicons' );
1078
- wp_add_inline_style( 'dashicons', $dashicons_inline );
1079
- }
1080
-
1081
- /**
1082
- * Return the icon HTML from icon_string passed
1083
- *
1084
- * @param string|array $icon
1085
- * @param array $args
1086
- *
1087
- * @return string
1088
- */
1089
- public function get_icon( $icon = '', $args = array() ) {
1090
- $icon = is_array( $icon ) && isset( $icon[ 'icon' ] ) ? $icon[ 'icon' ] : $icon;
1091
- $icon_html = "";
1092
- if ( $icon ) {
1093
- $default_args = array(
1094
- 'html_tag' => 'span',
1095
- 'class' => '',
1096
- 'style' => '',
1097
- 'filter_icons' => ''
1098
- );
1099
- $args = wp_parse_args( $args, $default_args );
1100
- /**
1101
- * @var string $html_tag
1102
- * @var string $class
1103
- * @var string $style
1104
- * @var string $filter_icons
1105
- */
1106
- extract( $args );
1107
-
1108
- if ( $icon_data = $this->get_icon_data( $icon, $filter_icons ) ) {
1109
- $icon_html = "<$html_tag class=\"$class\" style=\"$style\" $icon_data></$html_tag>";
1110
- }
1111
-
1112
- }
1113
-
1114
- return $icon_html;
1115
- }
1116
-
1117
- /**
1118
- * Get inline scripts
1119
- *
1120
- * @param $slug
1121
- *
1122
- * @return string
1123
- */
1124
- public function get_inline_scripts( $slug ) {
1125
- $css = '';
1126
- switch ( $slug ) {
1127
- case 'font-awesome':
1128
- $css = '[data-font="FontAwesome"]:before {font-family: \'FontAwesome\' !important;content: attr(data-icon) !important;speak: none !important;font-weight: normal !important;font-variant: normal !important;text-transform: none !important;line-height: 1 !important;font-style: normal !important;-webkit-font-smoothing: antialiased !important;-moz-osx-font-smoothing: grayscale !important;}';
1129
- break;
1130
- case 'dashicons':
1131
- $css = '[data-font="Dashicons"]:before {font-family: \'Dashicons\' !important;content: attr(data-icon) !important;speak: none !important;font-weight: normal !important;font-variant: normal !important;text-transform: none !important;line-height: 1 !important;font-style: normal !important;-webkit-font-smoothing: antialiased !important;-moz-osx-font-smoothing: grayscale !important;}';
1132
- }
1133
-
1134
- return $css;
1135
- }
1136
-
1137
- }
1138
- }
1139
- if( ! function_exists( 'YIT_Icons' ) ){
1140
- function YIT_Icons() {
1141
- return YIT_Icons::get_instance();
1142
- }
1143
- }
1144
-
1145
- YIT_Icons();
1
  <?php
2
  /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
  *
5
+ * @package YITH\PluginFramework\Classes
 
 
 
6
  */
7
 
8
+ /**
9
+ * Require the correct file
10
+ */
11
+ require_once __DIR__ . '/../includes/class-yit-icons.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/lib/yit-metabox.php CHANGED
@@ -1,641 +1,11 @@
1
  <?php
2
  /**
3
- * This file belongs to the YIT Framework.
4
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
- * that is bundled with this package in the file LICENSE.txt.
6
- * It is also available through the world-wide-web at this URL:
7
- * http://www.gnu.org/licenses/gpl-3.0.txt
8
  */
9
 
10
-
11
- if ( !defined( 'ABSPATH' ) ) {
12
- exit;
13
- } // Exit if accessed directly
14
-
15
- if ( !class_exists( 'YIT_Metabox' ) ) {
16
- /**
17
- * YIT Metabox
18
- * the metabox can be created using this code
19
- * <code>
20
- * $args1 = array(
21
- * 'label' => __( 'Metabox Label', 'yith-plugin-fw' ),
22
- * 'pages' => 'page', //or array( 'post-type1', 'post-type2')
23
- * 'context' => 'normal', //('normal', 'advanced', or 'side')
24
- * 'priority' => 'default',
25
- * 'tabs' => array(
26
- * 'settings' => array( //tab
27
- * 'label' => __( 'Settings', 'yith-plugin-fw' ),
28
- * 'fields' => array(
29
- * 'meta_checkbox' => array(
30
- * 'label' => __( 'Show title', 'yith-plugin-fw' ),
31
- * 'desc' => __( 'Choose whether to show title of the page or not.', 'yith-plugin-fw' ),
32
- * 'type' => 'checkbox',
33
- * 'private' => false,
34
- * 'std' => '1'),
35
- * ),
36
- * ),
37
- * );
38
- * $metabox1 = YIT_Metabox( 'yit-metabox-id' );
39
- * $metabox1->init( $args );
40
- * </code>
41
- *
42
- * @class YIT_Metaboxes
43
- * @package YITH
44
- * @since 1.0.0
45
- * @author Emanuela Castorina <emanuela.castorina@yithemes.com>
46
- */
47
- class YIT_Metabox {
48
-
49
- /**
50
- * @var string the id of metabox
51
- * @since 1.0
52
- */
53
-
54
- public $id;
55
-
56
- /**
57
- * @var array An array where are saved all metabox settings options
58
- * @since 1.0
59
- */
60
- private $options = array();
61
-
62
- /**
63
- * @var array An array where are saved all tabs of metabox
64
- * @since 1.0
65
- */
66
- private $tabs = array();
67
-
68
- /**
69
- * @var object The single instance of the class
70
- * @since 1.0
71
- */
72
- protected static $_instance = array();
73
-
74
- /**
75
- * Main Instance
76
- *
77
- * @static
78
- * @param $id
79
- * @return object Main instance
80
- * @since 1.0
81
- * @author Antonino Scarfi' <antonino.scarfi@yithemes.com>
82
- */
83
- public static function instance( $id ) {
84
- if ( !isset( self::$_instance[ $id ] ) ) {
85
- self::$_instance[ $id ] = new self( $id );
86
- }
87
-
88
- return self::$_instance[ $id ];
89
- }
90
-
91
- /**
92
- * Constructor
93
- *
94
- * @param string $id
95
- * @return \YIT_Metabox
96
- * @since 1.0
97
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
98
- */
99
- function __construct( $id = '' ) {
100
- $this->id = $id;
101
-
102
- }
103
-
104
-
105
- /**
106
- * Init
107
- * set options and tabs, add actions to register metabox, scripts and save data
108
- *
109
- * @param array $options
110
- * @return void
111
- * @since 1.0
112
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
113
- */
114
- public function init( $options = array() ) {
115
-
116
- $this->set_options( $options );
117
- $this->set_tabs();
118
-
119
- add_action( 'add_meta_boxes', array( $this, 'register_metabox' ), 99 );
120
- add_action( 'save_post', array( $this, 'save_postdata' ), 10, 1 );
121
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 15 );
122
-
123
- add_filter( 'yit_icons_screen_ids', array( $this, 'add_screen_ids_for_icons' ) );
124
-
125
- add_action( 'wp_ajax_yith_plugin_fw_save_toggle_element_metabox', array( $this, 'save_toggle_element' ) );
126
- }
127
-
128
- /**
129
- * Add Screen ids to include icons
130
- *
131
- * @param $screen_ids
132
- * @return array
133
- */
134
- public function add_screen_ids_for_icons( $screen_ids ) {
135
- return array_unique( array_merge( $screen_ids, (array) $this->options[ 'pages' ] ) );
136
- }
137
-
138
- /**
139
- * Enqueue script and styles in admin side
140
- * Add style and scripts to administrator
141
- *
142
- * @return void
143
- * @since 1.0
144
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
145
- * @author Leanza Francesco <leanzafrancesco@gmail.com>
146
- */
147
- public function enqueue() {
148
- $enqueue = function_exists( 'get_current_screen' ) && get_current_screen() && in_array( get_current_screen()->id, (array) $this->options[ 'pages' ] );
149
- $enqueue = apply_filters( 'yith_plugin_fw_metabox_enqueue_styles_and_scripts', $enqueue, $this );
150
-
151
- // load scripts and styles only where the metabox is displayed
152
- if ( $enqueue ) {
153
- wp_enqueue_media();
154
-
155
- wp_enqueue_style( 'woocommerce_admin_styles' );
156
-
157
- wp_enqueue_style( 'yith-plugin-fw-fields' );
158
- wp_enqueue_style( 'wp-color-picker' );
159
- wp_enqueue_style( 'yit-plugin-metaboxes' );
160
- wp_enqueue_style( 'yit-jquery-ui-style' );
161
-
162
- wp_enqueue_script( 'yit-metabox' );
163
-
164
- wp_enqueue_script( 'yith-plugin-fw-fields' );
165
- }
166
- }
167
-
168
- /**
169
- * Set Options
170
- * Set the variable options
171
- *
172
- * @param array $options
173
- * @return void
174
- * @since 1.0
175
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
176
- */
177
- public function set_options( $options = array() ) {
178
- $this->options = $options;
179
-
180
- }
181
-
182
- /**
183
- * Set Tabs
184
- * Set the variable tabs
185
- *
186
- * @return void
187
- * @internal param array $tabs
188
- * @since 1.0
189
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
190
- */
191
- public function set_tabs() {
192
- if ( !isset( $this->options[ 'tabs' ] ) ) {
193
- return;
194
- }
195
- $this->tabs = $this->options[ 'tabs' ];
196
- if ( isset( $this->tabs[ 'settings' ][ 'fields' ] ) ) {
197
- $this->tabs[ 'settings' ][ 'fields' ] = array_filter( $this->tabs[ 'settings' ][ 'fields' ] );
198
- }
199
- }
200
-
201
-
202
- /**
203
- * Add Tab
204
- * Add a tab inside the metabox
205
- *
206
- * @param array $tab the new tab to add to the metabox
207
- * @param string $where tell where insert the tab if after or before a $refer
208
- * @param null $refer an existent tab inside metabox
209
- * @return void
210
- * @internal param array $tabs
211
- * @since 1.0
212
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
213
- */
214
- public function add_tab( $tab, $where = 'after', $refer = null ) {
215
- if ( !is_null( $refer ) ) {
216
- $ref_pos = array_search( $refer, array_keys( $this->tabs ) );
217
- if ( $ref_pos !== false ) {
218
- if ( $where == 'after' ) {
219
- $this->tabs = array_slice( $this->tabs, 0, $ref_pos + 1, true ) +
220
- $tab +
221
- array_slice( $this->tabs, $ref_pos + 1, count( $this->tabs ) - 1, true );
222
- } else {
223
- $this->tabs = array_slice( $this->tabs, 0, $ref_pos, true ) +
224
- $tab +
225
- array_slice( $this->tabs, $ref_pos, count( $this->tabs ), true );
226
- }
227
- }
228
- } else {
229
- $this->tabs = array_merge( $tab, $this->tabs );
230
- }
231
-
232
- }
233
-
234
- /**
235
- * Remove Tab
236
- * Remove a tab from the tabs of metabox
237
- *
238
- * @param $id_tab
239
- * @return void
240
- * @internal param array $tabs
241
- * @since 1.0
242
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
243
- */
244
- public function remove_tab( $id_tab ) {
245
- if ( isset( $this->tabs[ $id_tab ] ) ) {
246
- unset ( $this->tabs[ $id_tab ] );
247
- }
248
- }
249
-
250
-
251
- /**
252
- * Add Field
253
- * Add a field inside a tab of metabox
254
- *
255
- * @param string $tab_id the id of the tabs where add the field
256
- * @param array $args the field to add
257
- * @param string $where tell where insert the field if after or before a $refer
258
- * @param null $refer an existent field inside tab
259
- * @return void
260
- * @internal param array $tabs
261
- * @since 1.0
262
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
263
- */
264
- public function add_field( $tab_id, $args, $where = 'after', $refer = null ) {
265
- if ( isset( $this->tabs[ $tab_id ] ) ) {
266
-
267
- $cf = $this->tabs[ $tab_id ][ 'fields' ];
268
- if ( !is_null( $refer ) ) {
269
- $ref_pos = array_search( $refer, array_keys( $cf ) );
270
- if ( $ref_pos !== false ) {
271
- if ( $where == 'after' ) {
272
- $this->tabs[ $tab_id ][ 'fields' ] = array_slice( $cf, 0, $ref_pos + 1, true ) +
273
- $args +
274
- array_slice( $cf, $ref_pos, count( $cf ) - 1, true );
275
-
276
- } elseif ( $where == 'before' ) {
277
- $this->tabs[ $tab_id ][ 'fields' ] = array_slice( $cf, 0, $ref_pos, true ) +
278
- $args +
279
- array_slice( $cf, $ref_pos, count( $cf ), true );
280
-
281
- }
282
- }
283
- } else {
284
- if ( $where == 'first' ) {
285
- $this->tabs[ $tab_id ][ 'fields' ] = $args + $cf;
286
-
287
- } else {
288
- $this->tabs[ $tab_id ][ 'fields' ] = array_merge( $this->tabs[ $tab_id ][ 'fields' ], $args );
289
- }
290
- }
291
-
292
- }
293
-
294
-
295
- }
296
-
297
- /**
298
- * Remove Field
299
- * Remove a field from the metabox, search inside the tabs and remove it if exists
300
- *
301
- * @param $id_field
302
- * @return void
303
- * @since 1.0
304
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
305
- */
306
- public function remove_field( $id_field ) {
307
- foreach ( $this->tabs as $tab_name => $tab ) {
308
- if ( isset( $tab[ 'fields' ][ $id_field ] ) ) {
309
- unset ( $this->tabs[ $tab_name ][ 'fields' ][ $id_field ] );
310
- }
311
- }
312
- }
313
-
314
- /**
315
- * Reorder tabs
316
- * Order the tabs and fields and set id and name to each field
317
- *
318
- * @return void
319
- * @internal param $id_field
320
- * @since 1.0
321
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
322
- */
323
- public function reorder_tabs() {
324
- foreach ( $this->tabs as $tab_name => $tab ) {
325
- foreach ( $tab[ 'fields' ] as $id_field => $field ) {
326
- $this->tabs[ $tab_name ][ 'fields' ][ $id_field ][ 'private' ] = ( isset( $field[ 'private' ] ) ) ? $field[ 'private' ] : true;
327
- if ( empty( $this->tabs[ $tab_name ][ 'fields' ][ $id_field ][ 'id' ] ) )
328
- $this->tabs[ $tab_name ][ 'fields' ][ $id_field ][ 'id' ] = $this->get_option_metabox_id( $id_field, $this->tabs[ $tab_name ][ 'fields' ][ $id_field ][ 'private' ] );
329
- if ( empty( $this->tabs[ $tab_name ][ 'fields' ][ $id_field ][ 'name' ] ) )
330
- $this->tabs[ $tab_name ][ 'fields' ][ $id_field ][ 'name' ] = $this->get_option_metabox_name( $this->tabs[ $tab_name ][ 'fields' ][ $id_field ][ 'id' ] );
331
- }
332
- }
333
-
334
- }
335
-
336
-
337
- /**
338
- * Get Option Metabox ID
339
- * return the id of the field
340
- *
341
- * @param string $id_field
342
- * @param bool $private if private add an _befor the id
343
- * @return string
344
- * @since 1.0
345
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
346
- */
347
- public function get_option_metabox_id( $id_field, $private = true ) {
348
- if ( $private ) {
349
- return '_' . $id_field;
350
- } else {
351
- return $id_field;
352
- }
353
- }
354
-
355
- /**
356
- * Get Option Metabox Name
357
- * return the name of the field, this name will be used as attribute name of the input field
358
- *
359
- * @param string $id_field
360
- * @param bool $private if private add an _befor the id
361
- * @return string
362
- * @since 1.0
363
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
364
- */
365
- public function get_option_metabox_name( $id_field, $private = true ) {
366
- $db_name = apply_filters( 'yit_metaboxes_option_main_name', 'yit_metaboxes' );
367
- $return = $db_name . '[';
368
-
369
- if ( !strpos( $id_field, '[' ) ) {
370
- return $return . $id_field . ']';
371
- }
372
- $return .= substr( $id_field, 0, strpos( $id_field, '[' ) );
373
- $return .= ']';
374
- $return .= substr( $id_field, strpos( $id_field, '[' ) );
375
-
376
- return $return;
377
- }
378
-
379
- /**
380
- * Register the metabox
381
- * call the wp function add_metabox to add the metabox
382
- *
383
- * @return void
384
- * @since 1.0
385
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
386
- */
387
- public function register_metabox( $post_type ) {
388
-
389
- if ( in_array( $post_type, (array) $this->options[ 'pages' ] ) ) {
390
- add_meta_box( $this->id, $this->options[ 'label' ], array( $this, 'show' ), $post_type, $this->options[ 'context' ], $this->options[ 'priority' ] );
391
- }
392
- }
393
-
394
- /**
395
- * Show metabox
396
- * show the html of metabox
397
- *
398
- * @return void
399
- * @since 1.0
400
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
401
- */
402
- public function show() {
403
- $this->reorder_tabs();
404
-
405
- $args = array(
406
- 'tabs' => $this->tabs,
407
- 'class' => isset( $this->options[ 'class' ] ) ? $this->options[ 'class' ] : '',
408
- );
409
-
410
- yit_plugin_get_template( YIT_CORE_PLUGIN_PATH, 'metaboxes/tab.php', $args );
411
- }
412
-
413
- /**
414
- * Save Post Data
415
- * Save the post data in the database when save the post
416
- *
417
- * @param $post_id
418
- * @return int
419
- * @since 1.0
420
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
421
- */
422
- public function save_postdata( $post_id ) {
423
- if ( !isset( $_POST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_POST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
424
- return $post_id;
425
- }
426
-
427
- $allow_ajax = isset( $_REQUEST[ 'yith_metabox_allow_ajax_saving' ] ) && $this->id === $_REQUEST[ 'yith_metabox_allow_ajax_saving' ];
428
- if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX && !$allow_ajax ) ) {
429
- return $post_id;
430
- }
431
-
432
- if ( isset( $_POST[ 'post_type' ] ) ) {
433
- $post_type = $_POST[ 'post_type' ];
434
- } else {
435
- return $post_id;
436
- }
437
-
438
- if ( 'page' === $post_type ) {
439
- if ( !current_user_can( 'edit_page', $post_id ) ) {
440
- return $post_id;
441
- }
442
- } else {
443
- if ( !current_user_can( 'edit_post', $post_id ) ) {
444
- return $post_id;
445
- }
446
- }
447
-
448
- if ( !in_array( $post_type, (array) $this->options[ 'pages' ] ) ) {
449
- return $post_id;
450
- }
451
-
452
- if ( isset( $_POST[ 'yit_metaboxes' ] ) ) {
453
- $yit_metabox_data = $_POST[ 'yit_metaboxes' ];
454
-
455
- if ( is_array( $yit_metabox_data ) ) {
456
- foreach ( $yit_metabox_data as $field_name => $field_value ) {
457
- if ( !add_post_meta( $post_id, $field_name, $field_value, true ) ) {
458
- update_post_meta( $post_id, $field_name, $field_value );
459
- }
460
- }
461
- }
462
- }
463
-
464
- $this->sanitize_and_save_fields( $post_id );
465
-
466
- return $post_id;
467
- }
468
-
469
- /**
470
- * @param $post_id
471
- * @since 3.2.1
472
- * @deprecated since 3.4.8
473
- */
474
- public function sanitize_fields( $post_id ) {
475
- $this->sanitize_and_save_fields( $post_id );
476
- }
477
-
478
- /**
479
- * Sanitize and save fields of the Metabox.
480
- *
481
- * @return void
482
- * @since 3.4.8
483
- */
484
- public function sanitize_and_save_fields( $post_id ) {
485
- $this->reorder_tabs();
486
- $tabs_to_sanitize = $this->tabs;
487
- $allow_ajax = isset( $_REQUEST[ 'yith_metabox_allow_ajax_saving' ] ) && $this->id === $_REQUEST[ 'yith_metabox_allow_ajax_saving' ];
488
- $ajax_partial_saving_tab = isset( $_REQUEST[ 'yith_metabox_allow_ajax_partial_saving_tab' ] ) ? $_REQUEST[ 'yith_metabox_allow_ajax_partial_saving_tab' ] : false;
489
-
490
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX && !$allow_ajax ) {
491
- return;
492
- } elseif ( $ajax_partial_saving_tab ) {
493
- if ( array_key_exists( $ajax_partial_saving_tab, $tabs_to_sanitize ) ) {
494
- $tabs_to_sanitize = array( $ajax_partial_saving_tab => $tabs_to_sanitize[ $ajax_partial_saving_tab ] );
495
- } else {
496
- return;
497
- }
498
- }
499
-
500
- foreach ( $tabs_to_sanitize as $tab ) {
501
- foreach ( $tab[ 'fields' ] as $field ) {
502
- $this->sanitize_and_save_field( $field, $post_id );
503
- }
504
- }
505
- }
506
-
507
- /**
508
- * Sanitize and save a single field
509
- *
510
- * @param array $field
511
- * @param int $post_id
512
- * @since 3.4.8
513
- */
514
- public function sanitize_and_save_field( $field, $post_id ) {
515
- if ( in_array( $field[ 'type' ], array( 'title' ) ) ) {
516
- return;
517
- }
518
-
519
- if ( isset( $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ] ) ) {
520
- if ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
521
- update_post_meta( $post_id, $field[ 'id' ], '1' );
522
- } elseif ( in_array( $field[ 'type' ], array( 'toggle-element' ) ) ) {
523
- if ( isset( $field[ 'elements' ] ) && $field[ 'elements' ] ) {
524
- $elements_value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
525
- if ( $elements_value ) {
526
- if ( isset( $elements_value[ 'box_id' ] ) ) {
527
- unset( $elements_value[ 'box_id' ] );
528
- }
529
-
530
- foreach ( $field[ 'elements' ] as $element ) {
531
- foreach ( $elements_value as $key => $element_value ) {
532
- if ( isset( $field[ 'onoff_field' ] ) ) {
533
- $elements_value[ $key ][ $field[ 'onoff_field' ][ 'id' ] ] = !isset( $element_value[ $field[ 'onoff_field' ][ 'id' ] ] ) ? 0 : $element_value[ $field[ 'onoff_field' ][ 'id' ] ];
534
- }
535
- if ( in_array( $element[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
536
- $elements_value[ $key ][ $element[ 'id' ] ] = !isset( $element_value[ $element[ 'id' ] ] ) ? 0 : 1;
537
- }
538
-
539
- if ( !empty( $element[ 'yith-sanitize-callback' ] ) && is_callable( $element[ 'yith-sanitize-callback' ] ) ) {
540
- $elements_value[ $key ][ $element[ 'id' ] ] = call_user_func( $element[ 'yith-sanitize-callback' ], $elements_value[ $key ][ $element[ 'id' ] ] );
541
- }
542
- }
543
- }
544
- }
545
-
546
- update_post_meta( $post_id, $field[ 'id' ], maybe_serialize( $elements_value ) );
547
- }
548
- } else {
549
- $value = $_POST[ 'yit_metaboxes' ][ $field[ 'id' ] ];
550
- if ( !empty( $field[ 'yith-sanitize-callback' ] ) && is_callable( $field[ 'yith-sanitize-callback' ] ) ) {
551
- $value = call_user_func( $field[ 'yith-sanitize-callback' ], $value );
552
- }
553
- add_post_meta( $post_id, $field[ 'id' ], $value, true ) || update_post_meta( $post_id, $field[ 'id' ], $value );
554
- }
555
- } elseif ( in_array( $field[ 'type' ], array( 'onoff', 'checkbox' ) ) ) {
556
- update_post_meta( $post_id, $field[ 'id' ], '0' );
557
- } elseif ( in_array( $field[ 'type' ], array( 'checkbox-array' ) ) ) {
558
- update_post_meta( $post_id, $field[ 'id' ], array() );
559
- } else {
560
- delete_post_meta( $post_id, $field[ 'id' ] );
561
- }
562
- }
563
-
564
- /**
565
- * Remove Fields
566
- * Remove a fields list from the metabox, search inside the tabs and remove it if exists
567
- *
568
- * @param $id_fields
569
- * @return void
570
- * @since 2.0.0
571
- * @author Andrea Grillo <andrea.grillo@yithemes.com>
572
- */
573
- public function remove_fields( $id_fields ) {
574
- foreach ( $id_fields as $k => $field ) {
575
- $this->remove_field( $field );
576
- }
577
- }
578
-
579
- /**
580
- * Save the element toggle via Ajax.
581
- *
582
- * @return void
583
- * @since 3.2.1
584
- * @author Emanuela Castorina
585
- */
586
- public function save_toggle_element() {
587
- if ( !isset( $_REQUEST[ 'post_ID' ] ) ) {
588
- return;
589
- }
590
-
591
- if ( !isset( $_REQUEST[ 'yit_metaboxes_nonce' ] ) || !wp_verify_nonce( $_REQUEST[ 'yit_metaboxes_nonce' ], 'metaboxes-fields-nonce' ) ) {
592
- return;
593
- }
594
- $post_id = $_REQUEST[ 'post_ID' ];
595
-
596
- if ( isset( $_REQUEST[ 'yit_metaboxes' ], $_REQUEST[ 'toggle_id' ], $_REQUEST[ 'metabox_tab' ], $_REQUEST[ 'yit_metaboxes' ][ $_REQUEST[ 'toggle_id' ] ] ) ) {
597
- $yit_metabox_data = $_REQUEST[ 'yit_metaboxes' ];
598
- $metabox_tab = $_REQUEST[ 'metabox_tab' ];
599
- $field_id = $_REQUEST[ 'toggle_id' ];
600
- if ( strpos( $field_id, '_' ) === 0 ) {
601
- $field_id = substr( $field_id, 1 );
602
- }
603
-
604
- if ( is_array( $yit_metabox_data ) ) {
605
- $this->reorder_tabs();
606
- $tabs = $this->tabs;
607
-
608
- if ( isset( $tabs[ $metabox_tab ], $tabs[ $metabox_tab ][ 'fields' ] ) && isset( $tabs[ $metabox_tab ][ 'fields' ][ $field_id ] ) ) {
609
- $field = $tabs[ $metabox_tab ][ 'fields' ][ $field_id ];
610
- if ( $field ) {
611
- $this->sanitize_and_save_field( $field, $post_id );
612
- }
613
- }
614
- }
615
- } elseif ( isset( $_REQUEST[ 'toggle_id' ] ) ) {
616
- delete_post_meta( $post_id, $_REQUEST[ 'toggle_id' ] );
617
- }
618
- }
619
- }
620
- }
621
-
622
- if ( !function_exists( 'YIT_Metabox' ) ) {
623
-
624
- /**
625
- * Main instance of plugin
626
- *
627
- * @param $id
628
- * @return \YIT_Metabox
629
- * @since 1.0
630
- * @author Emanuela Castorina <emanuela.castorina@yithemes.it>
631
- */
632
-
633
-
634
- function YIT_Metabox( $id ) {
635
- return YIT_Metabox::instance( $id );
636
- }
637
- }
638
-
639
-
640
-
641
-
1
  <?php
2
  /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
+ *
5
+ * @package YITH\PluginFramework\Classes
 
 
6
  */
7
 
8
+ /**
9
+ * Require the correct file
10
+ */
11
+ require_once __DIR__ . '/../includes/class-yit-metabox.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
plugin-fw/lib/yit-plugin-common.php CHANGED
@@ -1,1260 +1,11 @@
1
  <?php
2
  /**
3
- * This file belongs to the YIT Plugin Framework.
4
  *
5
- * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
- * that is bundled with this package in the file LICENSE.txt.
7
- * It is also available through the world-wide-web at this URL:
8
- * http://www.gnu.org/licenses/gpl-3.0.txt
9
  */
10
 
11
- if ( ! class_exists( 'YIT_Plugin_Common' ) ) :
12
-
13
  /**
14
- * Core configuration class
15
- *
16
- * @since 1.0.0
17
  */
18
- class YIT_Plugin_Common {
19
-
20
- /**
21
- * Config array
22
- *
23
- * @var array
24
- */
25
- protected static $_config = array(
26
- 'slider' => array( 'nivo', 'elegant' ),
27
-
28
-
29
- 'awesome_icons' => array(
30
- '' => 'no-icon',
31
- 'f042' => 'adjust',
32
- 'f170' => 'adn',
33
- 'f037' => 'align-center',
34
- 'f039' => 'align-justify',
35
- 'f036' => 'align-left',
36
- 'f038' => 'align-right',
37
- 'f0f9' => 'ambulance',
38
- 'f13d' => 'anchor',
39
- 'f17b' => 'android',
40
- 'f103' => 'angle-double-down',
41
- 'f100' => 'angle-double-left',
42
- 'f101' => 'angle-double-right',
43
- 'f102' => 'angle-double-up',
44
- 'f107' => 'angle-down',
45
- 'f104' => 'angle-left',
46
- 'f105' => 'angle-right',
47
- 'f106' => 'angle-up',
48
- 'f179' => 'apple',
49
- 'f187' => 'archive',
50
- 'f0ab' => 'arrow-circle-down',
51
- 'f0a8' => 'arrow-circle-left',
52
- 'f01a' => 'arrow-circle-o-down',
53
- 'f190' => 'arrow-circle-o-left',
54
- 'f18e' => 'arrow-circle-o-right',
55
- 'f01b' => 'arrow-circle-o-up',
56
- 'f0a9' => 'arrow-circle-right',
57
- 'f0aa' => 'arrow-circle-up',
58
- 'f063' => 'arrow-down',
59
- 'f060' => 'arrow-left',
60
- 'f061' => 'arrow-right',
61
- 'f062' => 'arrow-up',
62
- 'f047' => 'arrows',
63
- 'f0b2' => 'arrows-alt',
64
- 'f07e' => 'arrows-h',
65
- 'f07d' => 'arrows-v',
66
- 'f069' => 'asterisk',
67
- 'f04a' => 'backward',
68
- 'f05e' => 'ban',
69
- 'f080' => 'bar-chart-o',
70
- 'f02a' => 'barcode',
71
- 'f0c9' => 'bars',
72
- 'f0fc' => 'beer',
73
- 'f0f3' => 'bell',
74
- 'f0a2' => 'bell-o',
75
- 'f171' => 'bitbucket',
76
- 'f172' => 'bitbucket-square',
77
- 'f032' => 'bold',
78
- 'f0e7' => 'bolt',
79
- 'f02d' => 'book',
80
- 'f02e' => 'bookmark',
81
- 'f097' => 'bookmark-o',
82
- 'f0b1' => 'briefcase',
83
- 'f15a' => 'btc',
84
- 'f188' => 'bug',
85
- 'f0f7' => 'building-o',
86
- 'f0a1' => 'bullhorn',
87
- 'f140' => 'bullseye',
88
- 'f073' => 'calendar',
89
- 'f133' => 'calendar-o',
90
- 'f030' => 'camera',
91
- 'f083' => 'camera-retro',
92
- 'f0d7' => 'caret-down',
93
- 'f0d9' => 'caret-left',
94
- 'f0da' => 'caret-right',
95
- 'f150' => 'caret-square-o-down',
96
- 'f191' => 'caret-square-o-left',
97
- 'f152' => 'caret-square-o-right',
98
- 'f151' => 'caret-square-o-up',
99
- 'f0d8' => 'caret-up',
100
- 'f0a3' => 'certificate',
101
- 'f127' => 'chain-broken',
102
- 'f00c' => 'check',
103
- 'f058' => 'check-circle',
104
- 'f05d' => 'check-circle-o',
105
- 'f14a' => 'check-square',
106
- 'f046' => 'check-square-o',
107
- 'f13a' => 'chevron-circle-down',
108
- 'f137' => 'chevron-circle-left',
109
- 'f138' => 'chevron-circle-right',
110
- 'f139' => 'chevron-circle-up',
111
- 'f078' => 'chevron-down',
112
- 'f053' => 'chevron-left',
113
- 'f054' => 'chevron-right',
114
- 'f077' => 'chevron-up',
115
- 'f10c' => 'circle-o',
116
- 'f0ea' => 'clipboard',
117
- 'f017' => 'clock-o',
118
- 'f0c2' => 'cloud',
119
- 'f0ed' => 'cloud-download',
120
- 'f0ee' => 'cloud-upload',
121
- 'f121' => 'code',
122
- 'f126' => 'code-fork',
123
- 'f0f4' => 'coffee',
124
- 'f013' => 'cog',
125
- 'f085' => 'cogs',
126
- 'f0db' => 'columns',
127
- 'f075' => 'comment',
128
- 'f0e5' => 'comment-o',
129
- 'f086' => 'comments',
130
- 'f0e6' => 'comments-o',
131
- 'f14e' => 'compass',
132
- 'f066' => 'compress',
133
- 'f09d' => 'credit-card',
134
- 'f125' => 'crop',
135
- 'f05b' => 'crosshairs',
136
- 'f13c' => 'css3',
137
- 'f0f5' => 'cutlery',
138
- 'f108' => 'desktop',
139
- 'f192' => 'dot-circle-o',
140
- 'f019' => 'download',
141
- 'f17d' => 'dribbble',
142
- 'f16b' => 'dropbox',
143
- 'f052' => 'eject',
144
- 'f141' => 'ellipsis-h',
145
- 'f142' => 'ellipsis-v',
146
- 'f0e0' => 'envelope',
147
- 'f003' => 'envelope-o',
148
- 'f12d' => 'eraser',
149
- 'f153' => 'eur',
150
- 'f0ec' => 'exchange',
151
- 'f12a' => 'exclamation',
152
- 'f06a' => 'exclamation-circle',
153
- 'f071' => 'exclamation-triangle',
154
- 'f065' => 'expand',
155
- 'f08e' => 'external-link',
156
- 'f14c' => 'external-link-square',
157
- 'f06e' => 'eye',
158
- 'f070' => 'eye-slash',
159
- 'f09a' => 'facebook',
160
- 'f082' => 'facebook-square',
161
- 'f049' => 'fast-backward',
162
- 'f050' => 'fast-forward',
163
- 'f182' => 'female',
164
- 'f0fb' => 'fighter-jet',
165
- 'f15b' => 'file',
166
- 'f016' => 'file-o',
167
- 'f15c' => 'file-text',
168
- 'f0f6' => 'file-text-o',
169
- 'f0c5' => 'files-o',
170
- 'f008' => 'film',
171
- 'f0b0' => 'filter',
172
- 'f06d' => 'fire',
173
- 'f134' => 'fire-extinguisher',
174
- 'f024' => 'flag',
175
- 'f11e' => 'flag-checkered',
176
- 'f11d' => 'flag-o',
177
- 'f0c3' => 'flask',
178
- 'f16e' => 'flickr',
179
- 'f0c7' => 'floppy-o',
180
- 'f07b' => 'folder',
181
- 'f114' => 'folder-o',
182
- 'f07c' => 'folder-open',
183
- 'f115' => 'folder-open-o',
184
- 'f031' => 'font',
185
- 'f04e' => 'forward',
186
- 'f180' => 'foursquare',
187
- 'f119' => 'frown-o',
188
- 'f11b' => 'gamepad',
189
- 'f0e3' => 'gavel',
190
- 'f154' => 'gbp',
191
- 'f06b' => 'gift',
192
- 'f09b' => 'github',
193
- 'f113' => 'github-alt',
194
- 'f092' => 'github-square',
195
- 'f184' => 'gittip',
196
- 'f000' => 'glass',
197
- 'f0ac' => 'globe',
198
- 'f0d5' => 'google-plus',
199
- 'f0d4' => 'google-plus-square',
200
- 'f0fd' => 'h-square',
201
- 'f0a7' => 'hand-o-down',
202
- 'f0a5' => 'hand-o-left',
203
- 'f0a4' => 'hand-o-right',
204
- 'f0a6' => 'hand-o-up',
205
- 'f0a0' => 'hdd-o',
206
- 'f025' => 'headphones',
207
- 'f004' => 'heart',
208
- 'f08a' => 'heart-o',
209
- 'f015' => 'home',
210
- 'f0f8' => 'hospital-o',
211
- 'f13b' => 'html5',
212
- 'f01c' => 'inbox',
213
- 'f03c' => 'indent',
214
- 'f129' => 'info',
215
- 'f05a' => 'info-circle',
216
- 'f156' => 'inr',
217
- 'f16d' => 'instagram',
218
- 'f033' => 'italic',
219
- 'f157' => 'jpy',
220
- 'f084' => 'key',
221
- 'f11c' => 'keyboard-o',
222
- 'f159' => 'krw',
223
- 'f109' => 'laptop',
224
- 'f06c' => 'leaf',
225
- 'f094' => 'lemon-o',
226
- 'f149' => 'level-down',
227
- 'f148' => 'level-up',
228
- 'f0eb' => 'lightbulb-o',
229
- 'f0c1' => 'link',
230
- 'f0e1' => 'linkedin',
231
- 'f08c' => 'linkedin-square',
232
- 'f17c' => 'linux',
233
- 'f03a' => 'list',
234
- 'f022' => 'list-alt',
235
- 'f0cb' => 'list-ol',
236
- 'f0ca' => 'list-ul',
237
- 'f124' => 'location-arrow',
238
- 'f023' => 'lock',
239
- 'f175' => 'long-arrow-down',
240
- 'f177' => 'long-arrow-left',
241
- 'f178' => 'long-arrow-right',
242
- 'f176' => 'long-arrow-up',
243
- 'f0d0' => 'magic',
244
- 'f076' => 'magnet',
245
- 'f122' => 'mail-reply-all',
246
- 'f183' => 'male',
247
- 'f041' => 'map-marker',
248
- 'f136' => 'maxcdn',
249
- 'f0fa' => 'medkit',
250
- 'f11a' => 'meh-o',
251
- 'f130' => 'microphone',
252
- 'f131' => 'microphone-slash',
253
- 'f068' => 'minus',
254
- 'f056' => 'minus-circle',
255
- 'f146' => 'minus-square',
256
- 'f147' => 'minus-square-o',
257
- 'f10b' => 'mobile',
258
- 'f0d6' => 'money',
259
- 'f186' => 'moon-o',
260
- 'f001' => 'music',
261
- 'f03b' => 'outdent',
262
- 'f18c' => 'pagelines',
263
- 'f0c6' => 'paperclip',
264
- 'f04c' => 'pause',
265
- 'f040' => 'pencil',
266
- 'f14b' => 'pencil-square',
267
- 'f044' => 'pencil-square-o',
268
- 'f095' => 'phone',
269
- 'f098' => 'phone-square',
270
- 'f03e' => 'picture-o',
271
- 'f0d2' => 'pinterest',
272
- 'f0d3' => 'pinterest-square',
273
- 'f072' => 'plane',
274
- 'f04b' => 'play',
275
- 'f144' => 'play-circle',
276
- 'f01d' => 'play-circle-o',
277
- 'f067' => 'plus',
278
- 'f055' => 'plus-circle',
279
- 'f0fe' => 'plus-square',
280
- 'f196' => 'plus-square-o',
281
- 'f011' => 'power-off',
282
- 'f02f' => 'print',
283
- 'f12e' => 'puzzle-piece',
284
- 'f029' => 'qrcode',
285
- 'f128' => 'question',
286
- 'f059' => 'question-circle',
287
- 'f10d' => 'quote-left',
288
- 'f10e' => 'quote-right',
289
- 'f074' => 'random',
290
- 'f021' => 'refresh',
291
- 'f18b' => 'renren',
292
- 'f01e' => 'repeat',
293
- 'f112' => 'reply',
294
- 'f122' => 'reply-all',
295
- 'f079' => 'retweet',
296
- 'f018' => 'road',
297
- 'f135' => 'rocket',
298
- 'f09e' => 'rss',
299
- 'f143' => 'rss-square',
300
- 'f158' => 'rub',
301
- 'f0c4' => 'scissors',
302
- 'f002' => 'search',
303
- 'f010' => 'search-minus',
304
- 'f00e' => 'search-plus',
305
- 'f064' => 'share',
306
- 'f14d' => 'share-square',
307
- 'f045' => 'share-square-o',
308
- 'f132' => 'shield',
309
- 'f07a' => 'shopping-cart',
310
- 'f090' => 'sign-in',
311
- 'f08b' => 'sign-out',
312
- 'f012' => 'signal',
313
- 'f0e8' => 'sitemap',
314
- 'f17e' => 'skype',
315
- 'f118' => 'smile-o',
316
- 'f0dc' => 'sort',
317
- 'f15d' => 'sort-alpha-asc',
318
- 'f15e' => 'sort-alpha-desc',
319
- 'f160' => 'sort-amount-asc',
320
- 'f161' => 'sort-amount-desc',
321
- 'f0dd' => 'sort-asc',
322
- 'f0de' => 'sort-desc',
323
- 'f162' => 'sort-numeric-asc',
324
- 'f163' => 'sort-numeric-desc',
325
- 'f110' => 'spinner',
326
- 'f0c8' => 'square',
327
- 'f096' => 'square-o',
328
- 'f18d' => 'stack-exchange',
329
- 'f16c' => 'stack-overflow',
330
- 'f005' => 'star',
331
- 'f089' => 'star-half',
332
- 'f123' => 'star-half-o',
333
- 'f006' => 'star-o',
334
- 'f048' => 'step-backward',
335
- 'f051' => 'step-forward',
336
- 'f0f1' => 'stethoscope',
337
- 'f04d' => 'stop',
338
- 'f0cc' => 'strikethrough',
339
- 'f12c' => 'subscript',
340
- 'f0f2' => 'suitcase',
341
- 'f185' => 'sun-o',
342
- 'f12b' => 'superscript',
343
- 'f0ce' => 'table',
344
- 'f10a' => 'tablet',
345
- 'f0e4' => 'tachometer',
346
- 'f02b' => 'tag',
347
- 'f02c' => 'tags',
348
- 'f0ae' => 'tasks',
349
- 'f120' => 'terminal',
350
- 'f034' => 'text-height',
351
- 'f035' => 'text-width',
352
- 'f00a' => 'th',
353
- 'f009' => 'th-large',
354
- 'f00b' => 'th-list',
355
- 'f08d' => 'thumb-tack',
356
- 'f165' => 'thumbs-down',
357
- 'f088' => 'thumbs-o-down',
358
- 'f087' => 'thumbs-o-up',
359
- 'f164' => 'thumbs-up',
360
- 'f145' => 'ticket',
361
- 'f00d' => 'times',
362
- 'f057' => 'times-circle',
363
- 'f05c' => 'times-circle-o',
364
- 'f043' => 'tint',
365
- 'f014' => 'trash-o',
366
- 'f181' => 'trello',
367
- 'f091' => 'trophy',
368
- 'f0d1' => 'truck',
369
- 'f195' => 'try',
370
- 'f173' => 'tumblr',
371
- 'f174' => 'tumblr-square',
372
- 'f099' => 'twitter',
373
- 'f081' => 'twitter-square',
374
- 'f0e9' => 'umbrella',
375
- 'f0cd' => 'underline',
376
- 'f0e2' => 'undo',
377
- 'f09c' => 'unlock',
378
- 'f13e' => 'unlock-alt',
379
- 'f093' => 'upload',
380
- 'f155' => 'usd',
381
- 'f007' => 'user',
382
- 'f0f0' => 'user-md',
383
- 'f0c0' => 'users',
384
- 'f03d' => 'video-camera',
385
- 'f194' => 'vimeo-square',
386
- 'f189' => 'vk',
387
- 'f027' => 'volume-down',
388
- 'f026' => 'volume-off',
389
- 'f028' => 'volume-up',
390
- 'f18a' => 'weibo',
391
- 'f193' => 'wheelchair',
392
- 'f17a' => 'windows',
393
- 'f0ad' => 'wrench',
394
- 'f168' => 'xing',
395
- 'f169' => 'xing-square',
396
- 'f167' => 'youtube',
397
- 'f16a' => 'youtube-play',
398
- 'f166' => 'youtube-square'
399
- ),
400
- 'awesome_icons2' => array(
401
- '\f042' => 'adjust',
402
- '\f170' => 'adn',
403
- '\f037' => 'align-center',
404
- '\f039' => 'align-justify',
405
- '\f036' => 'align-left',
406
- '\f038' => 'align-right',
407
- '\f0f9' => 'ambulance',
408
- '\f13d' => 'anchor',
409
- '\f17b' => 'android',
410
- '\f209' => 'angellist',
411
- '\f103' => 'angle-double-down',
412
- '\f100' => 'angle-double-left',
413
- '\f101' => 'angle-double-right',
414
- '\f102' => 'angle-double-up',
415
- '\f107' => 'angle-down',
416
- '\f104' => 'angle-left',
417
- '\f105' => 'angle-right',
418
- '\f106' => 'angle-up',
419
- '\f179' => 'apple',
420
- '\f187' => 'archive',
421
- '\f1fe' => 'area-chart',
422
- '\f0ab' => 'arrow-circle-down',
423
- '\f0a8' => 'arrow-circle-left',
424
- '\f01a' => 'arrow-circle-o-down',
425
- '\f190' => 'arrow-circle-o-left',
426
- '\f18e' => 'arrow-circle-o-right',
427
- '\f01b' => 'arrow-circle-o-up',
428
- '\f0a9' => 'arrow-circle-right',
429
- '\f0aa' => 'arrow-circle-up',
430
- '\f063' => 'arrow-down',
431
- '\f060' => 'arrow-left',
432
- '\f061' => 'arrow-right',
433
- '\f062' => 'arrow-up',
434
- '\f047' => 'arrows',
435
- '\f0b2' => 'arrows-alt',
436
- '\f07e' => 'arrows-h',
437
- '\f07d' => 'arrows-v',
438
- '\f069' => 'asterisk',
439
- '\f1fa' => 'at',
440
- '\f1b9' => 'automobile',
441
- '\f04a' => 'backward',
442
- '\f05e' => 'ban',
443
- '\f19c' => 'bank',
444
- '\f080' => 'bar-chart',
445
- '\f080' => 'bar-chart-o',
446
- '\f02a' => 'barcode',
447
- '\f0c9' => 'bars',
448
- '\f236' => 'bed',
449
- '\f0fc' => 'beer',
450
- '\f1b4' => 'behance',
451
- '\f1b5' => 'behance-square',
452
- '\f0f3' => 'bell',
453
- '\f0a2' => 'bell-o',
454
- '\f1f6' => 'bell-slash',
455
- '\f1f7' => 'bell-slash-o',
456
- '\f206' => 'bicycle',
457
- '\f1e5' => 'binoculars',
458
- '\f1fd' => 'birthday-cake',
459
- '\f171' => 'bitbucket',
460
- '\f172' => 'bitbucket-square',
461
- '\f15a' => 'bitcoin',
462
- '\f032' => 'bold',
463
- '\f0e7' => 'bolt',
464
- '\f1e2' => 'bomb',
465
- '\f02d' => 'book',
466
- '\f02e' => 'bookmark',
467
- '\f097' => 'bookmark-o',
468
- '\f0b1' => 'briefcase',
469
- '\f15a' => 'btc',
470
- '\f188' => 'bug',
471
- '\f1ad' => 'building',
472
- '\f0f7' => 'building-o',
473
- '\f0a1' => 'bullhorn',
474
- '\f140' => 'bullseye',
475
- '\f207' => 'bus',
476
- '\f20d' => 'buysellads',
477
- '\f1ba' => 'cab',
478
- '\f1ec' => 'calculator',
479
- '\f073' => 'calendar',
480
- '\f133' => 'calendar-o',
481
- '\f030' => 'camera',
482
- '\f083' => 'camera-retro',
483
- '\f1b9' => 'car',
484
- '\f0d7' => 'caret-down',
485
- '\f0d9' => 'caret-left',
486
- '\f0da' => 'caret-right',
487
- '\f150' => 'caret-square-o-down',
488
- '\f191' => 'caret-square-o-left',
489
- '\f152' => 'caret-square-o-right',
490
- '\f151' => 'caret-square-o-up',
491
- '\f0d8' => 'caret-up',
492
- '\f218' => 'cart-arrow-down',
493
- '\f217' => 'cart-plus',
494
- '\f20a' => 'cc',
495
- '\f1f3' => 'cc-amex',
496
- '\f1f2' => 'cc-discover',
497
- '\f1f1' => 'cc-mastercard',
498
- '\f1f4' => 'cc-paypal',
499
- '\f1f5' => 'cc-stripe',
500
- '\f1f0' => 'cc-visa',
501
- '\f0a3' => 'certificate',
502
- '\f0c1' => 'chain',
503
- '\f127' => 'chain-broken',
504
- '\f00c' => 'check',
505
- '\f058' => 'check-circle',
506
- '\f05d' => 'check-circle-o',
507
- '\f14a' => 'check-square',
508
- '\f046' => 'check-square-o',
509
- '\f13a' => 'chevron-circle-down',
510
- '\f137' => 'chevron-circle-left',
511
- '\f138' => 'chevron-circle-right',
512
- '\f139' => 'chevron-circle-up',
513
- '\f078' => 'chevron-down',
514
- '\f053' => 'chevron-left',
515
- '\f054' => 'chevron-right',
516
- '
1
  <?php
2
  /**
3
+ * Deprecated file. Use the correct one in includes folder instead
4
  *
5
+ * @package YITH\PluginFramework\Classes
 
 
 
6
  */
7
 
 
 
8
  /**
9
+ * Require the correct file
 
 
10
  */