Widget Options - Version 3.7.2

Version Description

  • Fix issue with latest ACF version
Download this release

Release Info

Developer phpbits
Plugin Icon 128x128 Widget Options
Version 3.7.2
Comparing to
See all releases

Version 3.7.2

Files changed (102) hide show
  1. LICENSE +674 -0
  2. assets/css/admin.css +939 -0
  3. assets/css/animate.min.css +10 -0
  4. assets/css/beaver-widgetopts.css +121 -0
  5. assets/css/extended-widget-options.css +1 -0
  6. assets/css/extended-widgets.css +570 -0
  7. assets/css/jqueryui/1.11.4/themes/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  8. assets/css/jqueryui/1.11.4/themes/ui-lightness/jquery-ui.css +1031 -0
  9. assets/css/select2.min.css +1 -0
  10. assets/css/welcome.css +1 -0
  11. assets/css/widget-options.css +1 -0
  12. assets/images/cover-book.jpg +0 -0
  13. assets/images/logo-mascot.png +0 -0
  14. assets/images/ui-icons_ffffff_256x240.png +0 -0
  15. assets/js/admin.js +128 -0
  16. assets/js/jquery.liveFilter.js +50 -0
  17. assets/js/jquery.liveFilter.min.js +1 -0
  18. assets/js/jquery.widgetopts.beaver.js +30 -0
  19. assets/js/jquery.widgetopts.beaver.min.js +1 -0
  20. assets/js/select2-settings.js +62 -0
  21. assets/js/select2-settings.min.js +1 -0
  22. assets/js/select2.min.js +3 -0
  23. assets/js/settings.js +352 -0
  24. assets/js/settings.min.js +1 -0
  25. assets/js/widgets.js +222 -0
  26. assets/js/widgets.min.js +1 -0
  27. assets/js/wpWidgetOpts.js +420 -0
  28. assets/js/wpWidgetOpts.min.js +1 -0
  29. assets/scss/extended-widget-options.scss +553 -0
  30. assets/scss/welcome.scss +42 -0
  31. assets/scss/widget-options.scss +68 -0
  32. includes/admin/globals.php +21 -0
  33. includes/admin/import-export.php +686 -0
  34. includes/admin/notices.php +78 -0
  35. includes/admin/settings/display-settings.php +120 -0
  36. includes/admin/settings/modules/acf.php +65 -0
  37. includes/admin/settings/modules/alignment.php +58 -0
  38. includes/admin/settings/modules/animation.php +35 -0
  39. includes/admin/settings/modules/beaver_builder.php +67 -0
  40. includes/admin/settings/modules/cache.php +35 -0
  41. includes/admin/settings/modules/classes.php +139 -0
  42. includes/admin/settings/modules/clone.php +35 -0
  43. includes/admin/settings/modules/columns.php +35 -0
  44. includes/admin/settings/modules/dates.php +36 -0
  45. includes/admin/settings/modules/devices.php +58 -0
  46. includes/admin/settings/modules/disable_widgets.php +35 -0
  47. includes/admin/settings/modules/elementor.php +67 -0
  48. includes/admin/settings/modules/fixed.php +36 -0
  49. includes/admin/settings/modules/import-export.php +63 -0
  50. includes/admin/settings/modules/links.php +35 -0
  51. includes/admin/settings/modules/logic.php +73 -0
  52. includes/admin/settings/modules/move.php +66 -0
  53. includes/admin/settings/modules/permission.php +36 -0
  54. includes/admin/settings/modules/roles.php +36 -0
  55. includes/admin/settings/modules/search.php +63 -0
  56. includes/admin/settings/modules/shortcodes.php +35 -0
  57. includes/admin/settings/modules/sidebar-more_plugins.php +35 -0
  58. includes/admin/settings/modules/sidebar-opt_in.php +60 -0
  59. includes/admin/settings/modules/sidebar-support_box.php +49 -0
  60. includes/admin/settings/modules/sidebar-upsell_pro.php +66 -0
  61. includes/admin/settings/modules/siteorigin.php +64 -0
  62. includes/admin/settings/modules/sliding.php +43 -0
  63. includes/admin/settings/modules/state.php +64 -0
  64. includes/admin/settings/modules/styling.php +35 -0
  65. includes/admin/settings/modules/taxonomies.php +35 -0
  66. includes/admin/settings/modules/title.php +58 -0
  67. includes/admin/settings/modules/urls.php +35 -0
  68. includes/admin/settings/modules/visibility.php +91 -0
  69. includes/admin/settings/modules/widget-area.php +88 -0
  70. includes/admin/settings/register-settings.php +174 -0
  71. includes/admin/welcome.php +103 -0
  72. includes/ajax-functions.php +121 -0
  73. includes/extras.php +187 -0
  74. includes/install.php +91 -0
  75. includes/pagebuilders/beaver/beaver.php +829 -0
  76. includes/pagebuilders/elementor/elementor.php +501 -0
  77. includes/pagebuilders/elementor/render.php +443 -0
  78. includes/pagebuilders/siteorigin.php +70 -0
  79. includes/scripts.php +169 -0
  80. includes/transient.php +49 -0
  81. includes/widgets/display.php +474 -0
  82. includes/widgets/extras.php +171 -0
  83. includes/widgets/option-tabs/alignment.php +70 -0
  84. includes/widgets/option-tabs/devices.php +92 -0
  85. includes/widgets/option-tabs/settings.php +193 -0
  86. includes/widgets/option-tabs/state.php +55 -0
  87. includes/widgets/option-tabs/upsell.php +91 -0
  88. includes/widgets/option-tabs/visibility.php +356 -0
  89. includes/widgets/widgets.php +147 -0
  90. plugin.php +252 -0
  91. readme.md +27 -0
  92. readme.txt +261 -0
  93. screenshot-1.png +0 -0
  94. screenshot-10.png +0 -0
  95. screenshot-2.png +0 -0
  96. screenshot-3.png +0 -0
  97. screenshot-4.png +0 -0
  98. screenshot-5.png +0 -0
  99. screenshot-6.png +0 -0
  100. screenshot-7.png +0 -0
  101. screenshot-8.png +0 -0
  102. screenshot-9.png +0 -0
LICENSE ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ {one line to give the program's name and a brief idea of what it does.}
635
+ Copyright (C) {year} {name of author}
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ {project} Copyright (C) {year} {fullname}
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <http://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
assets/css/admin.css ADDED
@@ -0,0 +1,939 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .extended-widget-opts-form{
2
+ margin-left: -15px;
3
+ margin-right: -15px;
4
+ clear: both;
5
+ }
6
+ .widgetopts-subtitle{
7
+ display: block;
8
+ text-align: center;
9
+ font-weight: bold;
10
+ border-top: 1px solid #ddd;
11
+ border-bottom: 1px solid #ddd;
12
+ background: #fafafa;
13
+ padding: 10px 0px;
14
+ margin: 5px 0px 10px;
15
+ }
16
+ .opts-label-small{
17
+ font-size: 13px;
18
+ }
19
+ .widget-opts-animation label{
20
+ font-weight: bold;
21
+ }
22
+ .so-content.panel-dialog .extended-widget-opts-form{
23
+ /*display: none;*/
24
+ }
25
+ .extended-widget-opts-form .alright{
26
+ text-align:right;
27
+ }
28
+ .extended-widget-opts-form.extended-widget-opts-form-large .ui-tabs-nav .dashicons{
29
+ display: none;
30
+ }
31
+ .extended-widget-opts-form.extended-widget-opts-form-small .ui-tabs-nav .dashicons{
32
+ display: inline-block;
33
+ }
34
+ .extended-widget-opts-form.extended-widget-opts-form-small .tabtitle{
35
+ display: none;
36
+ }
37
+ .extended-widget-opts-tabs.ui-widget, .extended-widget-opts-inside-tabs.ui-widget{
38
+ border: 0px !important;
39
+ background: transparent !important;
40
+ border-radius: 0px !important;
41
+ font-family: "Open Sans",sans-serif;
42
+ }
43
+ .extended-widget-opts-tabs .ui-tabs-nav{
44
+ border: 0px !important;
45
+ border-bottom: 1px solid #e5e5e5 !important;
46
+ background: transparent !important;
47
+ border-radius: 0px !important;
48
+ padding: 0px !important;
49
+ }
50
+ .extended-widget-opts-tabs .ui-tabs-nav li{
51
+ float: left !important;
52
+ margin-left: 1px !important;
53
+ margin-bottom: 0px !important;
54
+ margin-right: 2px !important;
55
+
56
+ border: 0px !important;
57
+ background: transparent !important;
58
+ border-radius: 0px !important;
59
+ }
60
+ .extended-widget-opts-tabs .ui-tabs-nav li:first-child{
61
+ margin-left: 5px !important;
62
+ }
63
+ .extended-widget-opts-tabs .ui-tabs-nav li:last-child{
64
+ margin-right: 0px !important;
65
+ }
66
+ .extended-widget-opts-tabs .ui-tabs-nav li:last-of-type{
67
+ margin-right: 0px !important;
68
+ }
69
+ .extended-widget-opts-tabs .ui-tabs-nav li.ui-tabs-active{
70
+ margin-bottom: -1px !important;
71
+ }
72
+ .extended-widget-opts-tabs .ui-tabs-nav li a{
73
+ display: block !important;
74
+ padding: 7px 4px 8px !important;
75
+ font-size: 12px !important;
76
+ background: #fafafa !important;
77
+ color: #444 !important;
78
+ text-decoration: none !important;
79
+ border: 1px solid #e5e5e5 !important;
80
+ border-bottom: 0px !important;
81
+ border-top-left-radius: 2px !important;
82
+ border-top-right-radius: 2px !important;
83
+ font-weight: normal !important;
84
+ }
85
+ .extended-widget-opts-form-large .extended-widget-opts-tabs .ui-tabs-nav li a{
86
+ padding: 7px 8px 8px !important;
87
+ }
88
+ .extended-widget-opts-tabs .ui-tabs-nav li.ui-tabs-active a{
89
+ margin-bottom: -1px !important;
90
+ padding-bottom: 9px !important;
91
+ box-shadow: none !important;
92
+ background: #fff !important;
93
+ }
94
+ .extended-widget-opts-tabs .ui-tabs-nav li .dashicons{
95
+ height: 15px !important;
96
+ font-size: 15px !important;
97
+ }
98
+ .extended-widget-opts-tabcontent{
99
+ padding: 0px 15px 15px 15px;
100
+ }
101
+ .extended-widget-opts-form .form-table td{
102
+ padding: 5px;
103
+ /*text-align: center;*/
104
+ }
105
+ .extended-widget-opts-inner-lists, .extended-widget-opts-class-lists, .extended-widget-opts-inner-roles{
106
+ display: block;
107
+ width: 100%;
108
+ height: 230px !important;
109
+ padding: 5px 8px !important;
110
+ overflow: auto;
111
+ border: 1px solid #dfdfdf;
112
+ margin-bottom: 5px;
113
+ box-sizing: border-box;
114
+ }
115
+ .extended-widget-opts-class-lists, .extended-widget-opts-inner-roles{
116
+ height: auto !important;
117
+ max-height: 230px !important;
118
+ }
119
+ .extended-widget-opts-inner-lists h4, .extended-widget-opts-inner-lists h4:hover{
120
+ cursor: pointer;
121
+ }
122
+ .extended-widget-opts-inner-lists small{
123
+ opacity: 0.5;
124
+ font-weight: normal;
125
+ font-size: 11px;
126
+ }
127
+ .extended-widget-opts-clearfix{
128
+ clear: both;
129
+ }
130
+ .extended-widget-opts-tabcontent.extended-widget-opts-inside-tabcontent{
131
+ padding: 10px 5px !important;
132
+ }
133
+ .extended-widget-opts-inside-tabcontent .extended-widget-opts-inner-tabcontent{
134
+ border: 1px solid #dddddd !important;
135
+ border-top: 0px !important;
136
+ padding: 10px !important;
137
+ }
138
+ .extended-widget-opts-inside-tabcontent .extended-widget-opts-styling-tabcontent tr td:last-child{
139
+ min-width: 117px;
140
+ }
141
+ .extended-widget-opts-inside-tabcontent .extended-widget-opts-styling-tabcontent p{
142
+ text-align: center;
143
+ }
144
+ .extended-widget-opts-inner-tabcontent.extended-widget-opts-visibility-tabcontent{
145
+ text-align: left;
146
+ }
147
+ .extended-widget-opts-inside-tabs .ui-tabs-nav li:first-child{
148
+ margin-left: 0px !important;
149
+ }
150
+ .extended-widget-opts-inside-tabs .ui-tabs-nav li a{
151
+ padding: 8px !important;
152
+ }
153
+ .widget-opts-toggle-note{
154
+ display: none;
155
+ }
156
+ .widget-opts-toggler-note{
157
+ font-size: 11px;
158
+ color: #0073aa !important;
159
+ }
160
+ .widgetops-sc-opts{
161
+ font-size: 12px;
162
+ }
163
+ .widgetops-sc-opts code{
164
+ font-size: 11px;
165
+ }
166
+
167
+ .widget-opts-learnmore{
168
+ text-decoration: none;
169
+ }
170
+
171
+ .extended-widget-opts-tabs .ui-tabs-nav li.ui-tabs-active.extended-widget-gopro-tab-alignment a{
172
+ background-color: #FFF1B8 !important;
173
+ }
174
+ .extended-widget-opts-tabcontent-gopro{
175
+ background-color: #FFF1B8 !important;
176
+ color: #444;
177
+ margin-bottom: 15px;
178
+ }
179
+ .extended-widget-opts-tabcontent-gopro li{
180
+ font-size: 12px;
181
+ line-height: 24px;
182
+ }
183
+ body .extended-widget-opts-tabs .extended-widget-gopro-tab-alignment a{
184
+ font-weight: bold !important;
185
+ padding-left: 9px !important;
186
+ padding-right: 9px !important;
187
+ }
188
+ .widgetopts-unlock-features{
189
+ text-align: center;
190
+ font-size: 16px;
191
+ font-weight: bold;
192
+ }
193
+ .widgetopts-unlock-features .dashicons{
194
+ font-size: 25px;
195
+ margin-right: 4px;
196
+ }
197
+
198
+ /* customizer fix */
199
+ #customize-theme-controls .ui-tabs .ui-tabs-panel.extended-widget-opts-tabcontent{
200
+ min-width: 100%;
201
+ -webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;
202
+ }
203
+ #customize-theme-controls .extended-widget-opts-form .ui-tabs-nav .dashicons{
204
+ display: inline-block;
205
+ }
206
+ #customize-theme-controls .extended-widget-opts-form .tabtitle{
207
+ display: none;
208
+ }
209
+ #customize-theme-controls .extended-widget-opts-form .ui-tabs .ui-tabs-nav li a{
210
+ line-height: 16px !important;
211
+ }
212
+ #customize-theme-controls .extended-widget-opts-form .extended-widget-opts-tabcontent-styling .inputsize5{
213
+ max-width: 50px;
214
+ }
215
+ #customize-theme-controls .widget-inside .widget-control-actions .widgetopts-control{
216
+ display: none !important;
217
+ }
218
+
219
+ /** Settings Page **/
220
+ .widgetopts-settings-desc{
221
+ margin: 20px 200px 20px 0;
222
+ min-height: 50px;
223
+ color: #555d66;
224
+ font-size: 15px;
225
+ line-height: 22px;
226
+ }
227
+ .widgetopts-mascot{
228
+ display: block;
229
+ text-align: center;
230
+ height: 150px;
231
+ width: 150px;
232
+ background: url('../images/logo-mascot.png');
233
+ -webkit-background-size: cover;
234
+ -moz-background-size: cover;
235
+ -o-background-size: cover;
236
+ background-size: cover;
237
+ }
238
+ .widgetopts-badge-settings{
239
+ position: absolute;
240
+ top: 10px;
241
+ right: 10px;
242
+ }
243
+ .opts-classes-setting-table tr strong{
244
+ display: inline-block;
245
+ min-width: 150px;
246
+ }
247
+ .opts-hidden-placeholder{
248
+ display: none;
249
+ }
250
+ .opts-add-class-btn .dashicons{
251
+ text-decoration: none !important;
252
+ line-height: 29px;
253
+ height: 29px;
254
+ }
255
+ .opts-remove-class-btn .dashicons{
256
+ text-decoration: none !important;
257
+ line-height: 18px;
258
+ height: 18px;
259
+ color: #b20820;
260
+ }
261
+ #opts-predefined-classes{
262
+ padding: 0px 10px;
263
+ }
264
+ #opts-predefined-classes .opts-li-value{
265
+ display: inline-block;
266
+ margin-right: 10px;
267
+ }
268
+ .widgetopts-sidebar-widget .email{
269
+ border: 1px solid #ddd;
270
+ }
271
+
272
+ #widgetopts-sidebar-widget-more_plugins table td{
273
+ width: 50%;
274
+ vertical-align: top;
275
+ text-align: center;
276
+ }
277
+ #widgetopts-sidebar-widget-more_plugins .dashicons{
278
+ font-size: 30px;
279
+ height: 30px;
280
+ width: 30px;
281
+ margin-bottom: 5px;
282
+ }
283
+ #widgetopts-sidebar-widget-more_plugins td a{
284
+ text-decoration: none;
285
+ color: #444;
286
+ background: #f3f3f3;
287
+ display: block;
288
+ padding: 8px 5px;
289
+ border-radius: 3px;
290
+ font-size: 13px;
291
+ }
292
+ #widgetopts-sidebar-widget-more_plugins td a:hover{
293
+ background: #ddd;
294
+ }
295
+
296
+ /** Modular Settings Page **/
297
+ .widgetopts-poststuff #post-body #postbox-container-1, .widgetopts-poststuff #post-body #postbox-container-2{
298
+ border-top: 1px solid #ddd;
299
+ padding-top: 20px;
300
+ }
301
+ .widgetopts-poststuff #post-body #postbox-container-2{
302
+ border-right: 1px solid #ddd;
303
+ box-sizing: border-box;
304
+ padding-right: 20px;
305
+ }
306
+ .widgetopts-poststuff #post-body #postbox-container-1{
307
+ box-sizing: border-box;
308
+ margin-right: -300px;
309
+ padding-left: 20px;
310
+ width: 300px;
311
+ }
312
+ .widgetopts-module-section-heading{
313
+ display: block;
314
+ margin: 0 0 1em 0;
315
+ overflow: hidden;
316
+ }
317
+ .widgetopts-settings-view-toggle{
318
+ float: left;
319
+ margin-right: 1em;
320
+ padding: .35em 0;
321
+ }
322
+ .widgetopts-settings-view-toggle a{
323
+ text-decoration: none;
324
+ color: #b4b9be;
325
+ }
326
+ .widgetopts-settings-view-toggle a.widgetopts-selected{
327
+ color: #0073aa;
328
+ }
329
+ .widgetopts-module-cards-container {
330
+ clear: both;
331
+ box-sizing: border-box;
332
+ }
333
+ .widgetopts-module-cards{
334
+ text-align: justify;
335
+ font-size: 0.1px;
336
+ }
337
+ .widgetopts-module-cards:after{
338
+ content: '';
339
+ display: inline-block;
340
+ width: 100%;
341
+ }
342
+ .widgetopts-module-card{
343
+ font-size: 16px;
344
+ display: inline-block;
345
+ width: 100%;
346
+ max-width: 32%;
347
+ text-align: left;
348
+ margin-bottom: 12px;
349
+ vertical-align: top;
350
+ }
351
+ .widgetopts-module-card-content{
352
+ font-size: 16px;
353
+ position: relative;
354
+ background: #fff;
355
+ border: 1px solid #ddd;
356
+ /*box-shadow: 1px 1px 0px rgba(0, 0, 0, .1);*/
357
+ padding: 1em;
358
+ }
359
+ .widgetopts-module-type-enabled .widgetopts-module-card-content{
360
+ background: #f7fcfe;
361
+ border-color: rgba( 0, 115, 179, 0.85 );
362
+ /*box-shadow: 1px 1px 0px rgba(0,0,0,.1);*/
363
+ }
364
+ .widgetopts-module-type-disabled .widgetopts-settings-section,
365
+ .widgetopts-module-type-disabled .widgetopts-module-settings-save,
366
+ .widgetopts-module-card.widgetopts-module-card-no-settings .widgetopts-module-settings-save{
367
+ display: none;
368
+ }
369
+ #poststuff .widgetopts-module-card h2{
370
+ font-size: 16px;
371
+ margin: 0;
372
+ padding: 0;
373
+ }
374
+ .widgetopts-modal-background{
375
+ display: none;
376
+ position: fixed;
377
+ top: 0;
378
+ right: 0;
379
+ bottom: 0;
380
+ left: 0;
381
+ background: rgba(0,0,0,0.2);
382
+ z-index: 500;
383
+ cursor: pointer;
384
+ }
385
+ .grid .widgetopts-module-settings-container{
386
+ display: none;
387
+ position: fixed;
388
+ top: 52px;
389
+ right: 20px;
390
+ bottom: 20px;
391
+ left: 20px;
392
+ margin-left: 160px;
393
+ background: #fff;
394
+ box-shadow: 0 0 20px rgba(0,0,0,0.2);
395
+ z-index: 510;
396
+ }
397
+ .widgetopts-modal-navigation{
398
+ position: absolute;
399
+ top: 0;
400
+ left: 0;
401
+ right: 0;
402
+ height: 40px;
403
+ border-bottom: 1px solid #ddd;
404
+ }
405
+ .widgetopts-modal-navigation button{
406
+ width: 40px;
407
+ height: 40px;
408
+ float: right;
409
+ background: #fff;
410
+ border: none;
411
+ outline: none;
412
+ border-left: 1px solid #ddd;
413
+ font-family: dashicons;
414
+ font-size: 20px;
415
+ }
416
+ .widgetopts-modal-navigation button:hover{
417
+ cursor: pointer;
418
+ background: #eee;
419
+ }
420
+ .widgetopts-modal-navigation button.widgetopts-close-modal:before{
421
+ content: '\f335';
422
+ }
423
+ .widgetopts-modal-content-footer{
424
+ position: absolute;
425
+ bottom: 0;
426
+ left: 0;
427
+ right: 0;
428
+ border-top: 1px solid #ddd;
429
+ padding: 15px;
430
+ background: #efefef;
431
+ box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
432
+ }
433
+ .widgetopts-modal-content-footer .align-right{
434
+ float: right;
435
+ }
436
+ .grid .widgetopts-module-settings-content-container{
437
+ position: absolute;
438
+ top: 40px;
439
+ right: 0;
440
+ bottom: 60px;
441
+ left: 0;
442
+ overflow: auto;
443
+ padding: 25px 50px;
444
+ }
445
+ .widgetopts-module-settings-content{
446
+ width: 100%;
447
+ max-width: 700px;
448
+ margin: 0 auto;
449
+ }
450
+ .widgetopts-settings-section label{
451
+ font-weight: bold;
452
+ }
453
+ p.widgetopts-settings-section{
454
+ font-style: italic;
455
+ color: #999;
456
+ }
457
+ #widgetopts-settings-messages-container {
458
+ position: fixed;
459
+ padding: 2em;
460
+ top: -100px;
461
+ left: 0;
462
+ right: 0;
463
+ max-width: 300px;
464
+ width: 100%;
465
+ margin: auto;
466
+ z-index: 500;
467
+ -webkit-transition: all .3s ease-in-out;
468
+ transition: all .3s ease-in-out;
469
+ opacity: 0;
470
+ border-radius: 3px;
471
+ background: #fff;
472
+ box-shadow: 0px 0px 25px rgba( 0,0,0,0.4 );
473
+ }
474
+ #widgetopts-settings-messages-container div, .widgetopts-module-messages-container div{
475
+ background: #f1f1f1;
476
+ }
477
+ #widgetopts-settings-messages-container.visible:not(.no-module) {
478
+ top: 52px;
479
+ opacity: 1;
480
+ }
481
+ #widgetopts-settings-messages-container div:first-child {
482
+ margin-top: 0;
483
+ }
484
+ #widgetopts-settings-messages-container div:last-child{
485
+ margin-bottom: 0px;
486
+ }
487
+ .widgetopts-dashicons{
488
+ font-size: 180px;
489
+ position: absolute;
490
+ left: -27px;
491
+ top: -45px;
492
+ opacity: 0.1;
493
+ }
494
+ .widgetopts-no-top{
495
+ top: 0px;
496
+ }
497
+ .widgetopts-module-type-pro{
498
+ opacity: .5;
499
+ }
500
+ .widgetopts-pro-upsell{
501
+ display: block;
502
+ height: 100%;
503
+ left: 0;
504
+ position: absolute;
505
+ top: 0;
506
+ width: 100%;
507
+ text-decoration: none;
508
+ }
509
+ .widgetopts-pro-label{
510
+ padding: 2px 0px;
511
+ position: absolute;
512
+ right: 6px;
513
+ top: 5px;
514
+ opacity: 0.6;
515
+
516
+ background: #ffb310;
517
+ /*box-shadow: 1px 1px 1px rgba(0,0,0,0.2);*/
518
+ font-size: 11px;
519
+ color: #5e5018;
520
+ text-transform: uppercase;
521
+ }
522
+ .widgetopts-pro-label .dashicons{
523
+ font-size: 18px;
524
+ }
525
+ .grid .widgetopts-list-content-footer, .grid #widgetopts-save {
526
+ display: none;
527
+ }
528
+
529
+ /** list module view **/
530
+ .list .widgetopts-module-card{
531
+ max-width: 100%;
532
+ padding: 0;
533
+ float: none;
534
+ margin-bottom: 1px;
535
+ }
536
+ .list .widgetopts-module-card:hover .widgetopts-module-card-content{
537
+ background: #fafafa;
538
+ }
539
+ .list .widgetopts-module-card-content{
540
+ cursor: pointer;
541
+ padding: .5em .5em .5em .75em;
542
+ }
543
+ .list .widgetopts-module-card-content:after{
544
+ content: "";
545
+ display: table;
546
+ clear: both;
547
+ }
548
+ .list .widgetopts-module-desc{
549
+ display: none;
550
+ }
551
+ #poststuff .list .widgetopts-module-card h2{
552
+ float: left;
553
+ line-height: 1.8;
554
+ font-size: 14px;
555
+ }
556
+ .list .widgetopts-module-card-content .widgetopts-module-actions{
557
+ float: right;
558
+ margin-top: 0;
559
+ }
560
+ .list .widgetopts-module-settings-container{
561
+ clear: both;
562
+ background: #fff;
563
+ padding: 2em 2em 4em 2em;
564
+ -moz-box-shadow: inset 0 8px 8px -8px #ddd, inset 0 -8px 8px -8px #ddd;
565
+ -webkit-box-shadow: inset 0 8px 8px -8px #ddd, inset 0 -8px 8px -8px #ddd;
566
+ box-shadow: inset 0 8px 8px -8px #ddd, inset 0 -8px 8px -8px #ddd;
567
+ }
568
+ .list .widgetopts-modal-navigation, .list .widgetopts-modal-content-footer, .list .widgetopts-dashicons, .list .widgetopts-modal-header{
569
+ display: none;
570
+ }
571
+ .list .widgetopts-pro-label{
572
+ display: inline;
573
+ float: left;
574
+ font-size: 10px;
575
+ margin: 0em 0 0 10px;
576
+ padding: 0px 3px;
577
+ position: relative;
578
+ }
579
+
580
+ /** License form **/
581
+ table.widgetopts-settings-license td{
582
+ padding: 0px !important;
583
+ }
584
+ .widgetopts-settings-license .td-right{
585
+ text-align: right;
586
+ }
587
+ .widgetopts-settings-license .widgetopts-even td{
588
+ padding-top: 5px !important;
589
+ }
590
+ .widgetopts-settings-license .td-left{
591
+ font-size: 10px;
592
+ }
593
+ @media ( max-width: 1400px ) {
594
+ .widgetopts-module-card {
595
+ max-width: 49%;
596
+ }
597
+ }
598
+ @media ( max-width: 782px ) {
599
+ .grid .widgetopts-module-settings-container {
600
+ margin-left: 0px;
601
+ top: 0px;
602
+ left: 0;
603
+ right: 0;
604
+ bottom: 0;
605
+ z-index: 100000; /* to get above wp admin bar */
606
+ }
607
+ .grid .widgetopts-module-settings-content-container {
608
+ padding: 15px 30px;
609
+ }
610
+ .widgetopts-module-settings-content .widgetopts-dashicons{
611
+ display: none;
612
+ }
613
+ }
614
+ @media (max-width: 500px){
615
+ .widgetopts-module-card {
616
+ max-width: 100%;
617
+ padding-right: 0;
618
+ padding-bottom: 10px;
619
+ }
620
+ .widgetopts-settings-desc{
621
+ margin-right: 70px;
622
+ }
623
+ .widgetopts-badge-settings{
624
+ top: 115px;
625
+ }
626
+ .widgetopts-mascot{
627
+ height: 69px;
628
+ width: 69px;
629
+ }
630
+ .widgetopts-poststuff #post-body #postbox-container-2{
631
+ padding-right: 0px;
632
+ border-right: 0px;
633
+ }
634
+ .widgetopts-poststuff #post-body #postbox-container-1{
635
+ padding-left: 0px;
636
+ }
637
+ .grid .widgetopts-module-settings-container{
638
+ margin-left: 0px;
639
+ }
640
+ }
641
+
642
+ /** SO **/
643
+ .so-content .widgetops-sc-opts{
644
+ display: none;
645
+ }
646
+ .so-content .extended-widget-opts-tab-visibility,
647
+ .so-content .extended-widget-opts-tabcontent-visibility,
648
+ .so-content .widgetopts_id_fld{
649
+ display: none;
650
+ }
651
+
652
+ .widgetopts-license-status{
653
+ display: block;
654
+ width: 100%;
655
+ font-size: 12px;
656
+ font-style: italic;
657
+ padding-top: 8px;
658
+ }
659
+ .widgetopts-license-inactive{
660
+ color: #dc3232;
661
+ font-weight: bold;
662
+ }
663
+ span.widgetopts-license-active{
664
+ color: #46b450;
665
+ font-weight: bold;
666
+ }
667
+ .widgetopts-license-status{
668
+ display: none;
669
+ }
670
+ .widgetopts-license-expired{
671
+ display: block;
672
+ width: 100%;
673
+ padding: 5px;
674
+ color: #a94442;
675
+ background-color: #f2dede;
676
+ border:1px solid #ebccd1;
677
+ box-sizing: border-box;
678
+ border-radius: 4px;
679
+ margin-top: 8px;
680
+ }
681
+
682
+ /** Search **/
683
+ #widgetopts-widgets-filter{
684
+ width: 100%;
685
+ max-width: 250px;
686
+ position: relative;
687
+ display: block;
688
+ padding: 12px 0px 1px;
689
+ clear: both;
690
+ }
691
+ input#widgetopts-widgets-search{
692
+ width: 100%;
693
+ height: 30px;
694
+ padding: 6px 30px;
695
+ }
696
+ .widgetopts-search-icon{
697
+ display: block;
698
+ position: absolute;
699
+ top: 13px;
700
+ left: 2px;
701
+ width: 30px;
702
+ height: 30px;
703
+ line-height: 28px;
704
+ text-align: center;
705
+ color: #72777c;
706
+ }
707
+ .widgetopts-search-icon:after{
708
+ content: "\f179";
709
+ font: 400 20px/1 dashicons;
710
+ vertical-align: middle;
711
+ -webkit-font-smoothing: antialiased;
712
+ -moz-osx-font-smoothing: grayscale;
713
+ }
714
+ .widgetopts-clear-results{
715
+ position: absolute;
716
+ top: 13px;
717
+ right: 2px;
718
+ width: 30px;
719
+ height: 30px;
720
+ padding: 0;
721
+ border: 0;
722
+ cursor: pointer;
723
+ background: 0 0;
724
+ color: #a00;
725
+ text-decoration: none;
726
+ outline: 0;
727
+ display: none;
728
+ }
729
+ .widgetopts-clear-results:before{
730
+ content: "\f335";
731
+ font: 400 20px/1 dashicons;
732
+ vertical-align: middle;
733
+ -webkit-font-smoothing: antialiased;
734
+ -moz-osx-font-smoothing: grayscale;
735
+ }
736
+ .widgetopts-is-visible{
737
+ display: block !important;
738
+ }
739
+ .widgetopts-is-hidden{
740
+ display: none !important;
741
+ }
742
+
743
+ /** Search **/
744
+ #widgetopts-widgets-filter{
745
+ width: 100%;
746
+ max-width: 250px;
747
+ position: relative;
748
+ display: block;
749
+ padding: 12px 0px 1px;
750
+ clear: both;
751
+ }
752
+ input#widgetopts-widgets-search{
753
+ width: 100%;
754
+ height: 30px;
755
+ padding: 6px 30px;
756
+ }
757
+ .widgetopts-search-icon{
758
+ display: block;
759
+ position: absolute;
760
+ top: 13px;
761
+ left: 2px;
762
+ width: 30px;
763
+ height: 30px;
764
+ line-height: 28px;
765
+ text-align: center;
766
+ color: #72777c;
767
+ }
768
+ .widgetopts-search-icon:after{
769
+ content: "\f179";
770
+ font: 400 20px/1 dashicons;
771
+ vertical-align: middle;
772
+ -webkit-font-smoothing: antialiased;
773
+ -moz-osx-font-smoothing: grayscale;
774
+ }
775
+ .widgetopts-clear-results{
776
+ position: absolute;
777
+ top: 13px;
778
+ right: 2px;
779
+ width: 30px;
780
+ height: 30px;
781
+ padding: 0;
782
+ border: 0;
783
+ cursor: pointer;
784
+ background: 0 0;
785
+ color: #a00;
786
+ text-decoration: none;
787
+ outline: 0;
788
+ display: none;
789
+ }
790
+ .widgetopts-clear-results:before{
791
+ content: "\f335";
792
+ font: 400 20px/1 dashicons;
793
+ vertical-align: middle;
794
+ -webkit-font-smoothing: antialiased;
795
+ -moz-osx-font-smoothing: grayscale;
796
+ }
797
+ .widgetopts-is-visible{
798
+ display: block !important;
799
+ }
800
+ .widgetopts-is-hidden{
801
+ display: none !important;
802
+ }
803
+
804
+
805
+ /** Widgets Chooser **/
806
+ #widgetopts-widgets-chooser{
807
+ position: relative;
808
+ width: 100%;
809
+ }
810
+ input.widgetopts-widgets-search{
811
+ width: 100%;
812
+ margin: 1px 0px;
813
+ height: 30px;
814
+ padding: 6px 30px;
815
+ }
816
+ #widgetopts-widgets-chooser .widgetopts-search-icon,
817
+ #widgetopts-widgets-chooser .widgetopts-clear-results{
818
+ top: 1px;
819
+ }
820
+
821
+ .widgetsopts-chooser ul,
822
+ #widgets-right .widget-in-question .widget-top,
823
+ .widget-top:hover,
824
+ div#widgets-right .widget-top:hover,
825
+ #widgets-right .widget-top:hover {
826
+ border-color: #999;
827
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1);
828
+ box-shadow: 0 1px 2px rgba(0,0,0,0.1);
829
+ }
830
+
831
+ .widgetsopts-chooser ul.widgetopts-chooser-sidebars {
832
+ margin: 0;
833
+ list-style-type: none;
834
+ max-height: 300px;
835
+ overflow: auto;
836
+ }
837
+
838
+ .widgetsopts-chooser {
839
+ margin-top: 10px;
840
+ padding: 10px;
841
+ background: #f7f7f7;
842
+ }
843
+
844
+ .widgetsopts-chooser ul {
845
+ border: 1px solid #ccc;
846
+ }
847
+
848
+ .widgetsopts-chooser li {
849
+ padding: 10px 15px 10px 35px;
850
+ border-bottom: 1px solid #ccc;
851
+ background: #fff;
852
+ margin: 0;
853
+ cursor: pointer;
854
+ outline: none;
855
+ position: relative;
856
+ -webkit-transition: background 0.2s ease-in-out;
857
+ transition: background 0.2s ease-in-out;
858
+ }
859
+
860
+ /* @todo looks like these hover/focus states are overridden by .widgets-chooser-selected */
861
+ .widgetsopts-chooser li:hover,
862
+ .widgetsopts-chooser li:focus {
863
+ background: rgba(255,255,255,0.7);
864
+ }
865
+
866
+ .widgetsopts-chooser li:focus:before {
867
+ content: "\f147";
868
+ display: block;
869
+ -webkit-font-smoothing: antialiased;
870
+ font: normal 26px/1 dashicons;
871
+ color: #555d66;
872
+ position: absolute;
873
+ top: 7px;
874
+ left: 5px;
875
+ }
876
+
877
+ .widgetsopts-chooser li:last-child {
878
+ border: none;
879
+ }
880
+
881
+ .widgetsopts-chooser li.widgetopts-chooser-selected {
882
+ background: #00a0d2;
883
+ color: #fff;
884
+ }
885
+
886
+ .widgetsopts-chooser li.widgetopts-chooser-selected:before,
887
+ .widgetsopts-chooser li.widgetopts-chooser-selected:focus:before {
888
+ content: "\f147";
889
+ display: block;
890
+ -webkit-font-smoothing: antialiased;
891
+ font: normal 26px/1 dashicons;
892
+ color: #fff;
893
+ position: absolute;
894
+ top: 7px;
895
+ left: 5px;
896
+ }
897
+
898
+ .widgetsopts-chooser .widgetsopts-chooser-actions {
899
+ padding: 10px 0 12px 0;
900
+ text-align: center;
901
+ }
902
+
903
+ .widgetsopts-chooser button {
904
+ margin-right: 5px;
905
+ }
906
+
907
+ /**
908
+ * Sidebar Options
909
+ */
910
+ .widgetopts-sidebaropts{
911
+ display: block;
912
+ clear: both;
913
+ padding: 10px;
914
+ background: #eee;
915
+ border-top: 1px solid #e5e5e5;
916
+ }
917
+ .widgets-holder-wrap.closed .widgetopts-sidebaropts{
918
+ display: none;
919
+ }
920
+ .widgetopts-sidebaropts a{
921
+ text-decoration: none !important;
922
+ color: #777 !important;
923
+ font-size: 11px !important;
924
+ padding-right: 2px !important;
925
+ }
926
+ .widgetopts-sidebaropts a .dashicons{
927
+ font-size: 15px !important;
928
+ line-height: 21px !important;
929
+ text-align: right !important;
930
+ }
931
+ .sidebaropts-confirm{
932
+ display: none;
933
+ background: #fff;
934
+ border: 1px solid #ccc;
935
+ color: #a00;
936
+ padding: 15px 18px;
937
+ margin: 10px 0px 0px;
938
+ text-align: center;
939
+ }
assets/css/animate.min.css ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ @charset "UTF-8";
2
+
3
+ /*!
4
+ * animate.css -http://daneden.me/animate
5
+ * Version - 3.5.1
6
+ * Licensed under the MIT license - http://opensource.org/licenses/MIT
7
+ *
8
+ * Copyright (c) 2016 Daniel Eden
9
+ */
10
+ .animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated.bounceIn,.animated.bounceOut,.animated.flipOutX,.animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}40%,43%,70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}70%{-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}40%,43%,70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}70%{-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:none;transform:none}}@keyframes wobble{0%{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:none;transform:none}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) rotateY(-1turn);transform:perspective(400px) rotateY(-1turn)}0%,40%{-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-190deg);transform:perspective(400px) translateZ(150px) rotateY(-190deg)}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-170deg);transform:perspective(400px) translateZ(150px) rotateY(-170deg)}50%,80%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95)}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) rotateY(-1turn);transform:perspective(400px) rotateY(-1turn)}0%,40%{-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-190deg);transform:perspective(400px) translateZ(150px) rotateY(-190deg)}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-170deg);transform:perspective(400px) translateZ(150px) rotateY(-170deg)}50%,80%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95)}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}0%,40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}0%,40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}0%,40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg)}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}0%,40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg)}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg)}60%,80%{opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg)}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg)}60%,80%{opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg)}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{transform-origin:center;-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}0%,to{-webkit-transform-origin:center}to{transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{0%{transform-origin:center;-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}0%,to{-webkit-transform-origin:center}to{transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{0%{transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{0%{transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{0%{transform-origin:right bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{0%{transform-origin:right bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{0%{transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{0%{transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{0%{transform-origin:right bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{0%{transform-origin:right bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{0%{transform-origin:center;opacity:1}0%,to{-webkit-transform-origin:center}to{transform-origin:center;-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{transform-origin:center;opacity:1}0%,to{-webkit-transform-origin:center}to{transform-origin:center;-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{0%{transform-origin:left bottom;opacity:1}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{transform-origin:left bottom;opacity:1}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{0%{transform-origin:right bottom;opacity:1}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{transform-origin:right bottom;opacity:1}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{0%{transform-origin:left bottom;opacity:1}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{transform-origin:left bottom;opacity:1}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{0%{transform-origin:right bottom;opacity:1}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{transform-origin:right bottom;opacity:1}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{transform-origin:top left}0%,20%,60%{-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);transform-origin:top left}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{transform-origin:top left}0%,20%,60%{-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);transform-origin:top left}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%,to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%,to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}
assets/css/beaver-widgetopts.css ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #fl-builder-settings-section-widgetopts-fields #fl-field-widgetopts-tabnav .fl-field-control{
2
+ padding: 0px;
3
+ }
4
+ .fl-builder-widgetopts-tab{
5
+ border-top: 1px solid #e6eaed;
6
+ border-bottom: 1px solid #e6eaed;
7
+ background: #f5f5f5;
8
+ }
9
+ .fl-builder-widgetopts-tab a{
10
+ display: inline-block;
11
+ margin: 0;
12
+ outline: none;
13
+ padding: 8px 10px;
14
+ color: #999 !important;
15
+ }
16
+ .fl-builder-widgetopts-tab a .dashicons{
17
+ font-size: 16px;
18
+ }
19
+ .fl-builder-widgetopts-tab a:first-child{
20
+ margin-left: 10px !important;
21
+ }
22
+ .fl-builder-widgetopts-tab a.widgetopts-s-active{
23
+ background: #fff;
24
+ color: #111 !important;
25
+ border-right: 1px solid #e6eaed;
26
+ border-left: 1px solid #e6eaed;
27
+ position: relative;
28
+ top: 1px;
29
+ }
30
+ #fl-builder-settings-tab-widgetopts .fl-builder-settings-section{
31
+ display: none;
32
+ }
33
+ #fl-builder-settings-tab-widgetopts .fl-builder-settings-section table{
34
+ margin: 0px !important;
35
+ width: 100% !important;
36
+ }
37
+ #fl-builder-settings-tab-widgetopts .fl-builder-settings-section table td:first-child{
38
+ padding-left: 0px !important;
39
+ }
40
+ #fl-builder-settings-tab-widgetopts .fl-builder-settings-section:nth-child(2){
41
+ display: block;
42
+ }
43
+ #fl-builder-settings-tab-widgetopts #fl-builder-settings-section-widgetopts-fields.fl-builder-settings-section{
44
+ display: block !important;
45
+ padding: 0px !important;
46
+ border-bottom: 0px;
47
+ background: transparent;
48
+ }
49
+ #fl-builder-settings-tab-widgetopts .fl-builder-settings-section{
50
+ border: 1px solid #dfdfdf;
51
+ border-top: 0px;
52
+ padding: 15px 10px;
53
+ background: #fff;
54
+ }
55
+ #fl-builder-settings-section-widgetopts-fields.fl-builder-settings-section{
56
+ margin-bottom: 0px;
57
+ }
58
+ .fl-builder-settings-section .fl-field-description{
59
+ margin-left: 10px !important;
60
+ opacity: 0.8;
61
+ font-size: 11px;
62
+ }
63
+ .fl-builder-settings-section .fl-field-description small{
64
+ display: block;
65
+ font-size: 11px;
66
+ padding: 0px 10px;
67
+ }
68
+ #fl-builder-settings-tab-widgetopts .fl-builder-settings-section textarea{
69
+ min-height: 90px;
70
+ }
71
+ .widgetopts-select2-l{
72
+ font-size: 10px;
73
+ color: #999;
74
+ font-style: italic;
75
+ }
76
+ .fl-builder-settings-section .select2-container--default .select2-selection--multiple, .fl-builder-settings .fl-builder-settings-section select, .fl-builder-settings .fl-builder-settings-section input[type="text"], .fl-builder-settings .fl-builder-settings-section textarea{
77
+ border: 1px solid #e6eaed !important;
78
+ }
79
+
80
+ .fl-builder-settings-section .extended-widget-opts-tabcontent-gopro{
81
+ padding: 20px;
82
+ }
83
+ .fl-builder-settings-section .extended-widget-opts-tabcontent-gopro ul{
84
+ margin-left: 20px;
85
+ padding: 0px;
86
+ }
87
+ .fl-builder-settings-section .extended-widget-opts-tabcontent-gopro li{
88
+ list-style: none;
89
+ }
90
+ .fl-builder-settings-section#fl-builder-settings-section-widgetopts-upgrade{
91
+ background-color: #FFF1B8 !important;
92
+ color: #444;
93
+ }
94
+ .fl-builder-settings-section .extended-widget-opts-tabcontent-gopro .widgetopts-unlock-features{
95
+ text-align: center;
96
+ font-size: 16px;
97
+ font-weight: bold;
98
+ }
99
+ .fl-builder-settings-section .extended-widget-opts-tabcontent-gopro .widgetopts-unlock-features .dashicons{
100
+ font-size: 26px;
101
+ padding-right: 6px;
102
+ }
103
+ .fl-builder-settings-section .extended-widget-opts-tabcontent-gopro .button-primary{
104
+ background: #0085ba;
105
+ border-color: #0073aa #006799 #006799;
106
+ color: #fff;
107
+ display: inline-block;
108
+ text-decoration: none;
109
+ font-size: 13px;
110
+ line-height: 26px;
111
+ height: 28px;
112
+ margin: 0;
113
+ padding: 0 10px 1px;
114
+ cursor: pointer;
115
+ border-width: 1px;
116
+ border-style: solid;
117
+ -webkit-appearance: none;
118
+ border-radius: 3px;
119
+ white-space: nowrap;
120
+ box-sizing: border-box;
121
+ }
assets/css/extended-widget-options.css ADDED
@@ -0,0 +1 @@
 
1
+ body .extendedwopts-show{display:none}body .extendedwopts-md-right{text-align:right}body .extendedwopts-md-left{text-align:left}body .extendedwopts-md-center{text-align:center}body .extendedwopts-md-justify{text-align:justify}body .widgetopts-hide_title .widget-title{display:none}@media screen and (min-width: 769px){body .extendedwopts-hide.extendedwopts-desktop{display:none}body .extendedwopts-show.extendedwopts-desktop{display:block}body .widget.clearfix-desktop{clear:both}}@media screen and (max-width: 768px) and (min-width: 481px){body .extendedwopts-hide.extendedwopts-tablet{display:none}body .extendedwopts-show.extendedwopts-tablet{display:block}body .widget.clearfix-desktop{clear:none}body .widget.clearfix-tablet{clear:both}}@media screen and (max-width: 480px){body .extendedwopts-hide.extendedwopts-mobile{display:none}body .extendedwopts-show.extendedwopts-mobile{display:block}body .widget.clearfix-desktop,body .widget.clearfix-tablet{clear:none}body .widget.clearfix-mobile{clear:both}}.widget.extendedwopts-col{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:15px}.widget.extendedwopts-col.col-xs-1,.widget.extendedwopts-col.col-sm-1,.widget.extendedwopts-col.col-md-1,.widget.extendedwopts-col.col-lg-1,.widget.extendedwopts-col.col-xs-2,.widget.extendedwopts-col.col-sm-2,.widget.extendedwopts-col.col-md-2,.widget.extendedwopts-col.col-lg-2,.widget.extendedwopts-col.col-xs-3,.widget.extendedwopts-col.col-sm-3,.widget.extendedwopts-col.col-md-3,.widget.extendedwopts-col.col-lg-3,.widget.extendedwopts-col.col-xs-4,.widget.extendedwopts-col.col-sm-4,.widget.extendedwopts-col.col-md-4,.widget.extendedwopts-col.col-lg-4,.widget.extendedwopts-col.col-xs-5,.widget.extendedwopts-col.col-sm-5,.widget.extendedwopts-col.col-md-5,.widget.extendedwopts-col.col-lg-5,.widget.extendedwopts-col.col-xs-6,.widget.extendedwopts-col.col-sm-6,.widget.extendedwopts-col.col-md-6,.widget.extendedwopts-col.col-lg-6,.widget.extendedwopts-col.col-xs-7,.widget.extendedwopts-col.col-sm-7,.widget.extendedwopts-col.col-md-7,.widget.extendedwopts-col.col-lg-7,.widget.extendedwopts-col.col-xs-8,.widget.extendedwopts-col.col-sm-8,.widget.extendedwopts-col.col-md-8,.widget.extendedwopts-col.col-lg-8,.widget.extendedwopts-col.col-xs-9,.widget.extendedwopts-col.col-sm-9,.widget.extendedwopts-col.col-md-9,.widget.extendedwopts-col.col-lg-9,.widget.extendedwopts-col.col-xs-10,.widget.extendedwopts-col.col-sm-10,.widget.extendedwopts-col.col-md-10,.widget.extendedwopts-col.col-lg-10,.widget.extendedwopts-col.col-xs-11,.widget.extendedwopts-col.col-sm-11,.widget.extendedwopts-col.col-md-11,.widget.extendedwopts-col.col-lg-11,.widget.extendedwopts-col.col-xs-12,.widget.extendedwopts-col.col-sm-12,.widget.extendedwopts-col.col-md-12,.widget.extendedwopts-col.col-lg-12{position:relative;min-height:1px}.widget.extendedwopts-col.col-xs-1,.widget.extendedwopts-col.col-xs-2,.widget.extendedwopts-col.col-xs-3,.widget.extendedwopts-col.col-xs-4,.widget.extendedwopts-col.col-xs-5,.widget.extendedwopts-col.col-xs-6,.widget.extendedwopts-col.col-xs-7,.widget.extendedwopts-col.col-xs-8,.widget.extendedwopts-col.col-xs-9,.widget.extendedwopts-col.col-xs-10,.widget.extendedwopts-col.col-xs-11,.widget.extendedwopts-col.col-xs-12{float:left}.widget.extendedwopts-col.col-xs-12{width:100%}.widget.extendedwopts-col.col-xs-11{width:91.66666667%}.widget.extendedwopts-col.col-xs-10{width:83.33333333%}.widget.extendedwopts-col.col-xs-9{width:75%}.widget.extendedwopts-col.col-xs-8{width:66.66666667%}.widget.extendedwopts-col.col-xs-7{width:58.33333333%}.widget.extendedwopts-col.col-xs-6{width:50%}.widget.extendedwopts-col.col-xs-5{width:41.66666667%}.widget.extendedwopts-col.col-xs-4{width:33.33333333%}.widget.extendedwopts-col.col-xs-3{width:25%}.widget.extendedwopts-col.col-xs-2{width:16.66666667%}.widget.extendedwopts-col.col-xs-1{width:8.33333333%}.widget.extendedwopts-col.col-xs-pull-12{right:100%}.widget.extendedwopts-col.col-xs-pull-11{right:91.66666667%}.widget.extendedwopts-col.col-xs-pull-10{right:83.33333333%}.widget.extendedwopts-col.col-xs-pull-9{right:75%}.widget.extendedwopts-col.col-xs-pull-8{right:66.66666667%}.widget.extendedwopts-col.col-xs-pull-7{right:58.33333333%}.widget.extendedwopts-col.col-xs-pull-6{right:50%}.widget.extendedwopts-col.col-xs-pull-5{right:41.66666667%}.widget.extendedwopts-col.col-xs-pull-4{right:33.33333333%}.widget.extendedwopts-col.col-xs-pull-3{right:25%}.widget.extendedwopts-col.col-xs-pull-2{right:16.66666667%}.widget.extendedwopts-col.col-xs-pull-1{right:8.33333333%}.widget.extendedwopts-col.col-xs-pull-0{right:auto}.widget.extendedwopts-col.col-xs-push-12{left:100%}.widget.extendedwopts-col.col-xs-push-11{left:91.66666667%}.widget.extendedwopts-col.col-xs-push-10{left:83.33333333%}.widget.extendedwopts-col.col-xs-push-9{left:75%}.widget.extendedwopts-col.col-xs-push-8{left:66.66666667%}.widget.extendedwopts-col.col-xs-push-7{left:58.33333333%}.widget.extendedwopts-col.col-xs-push-6{left:50%}.widget.extendedwopts-col.col-xs-push-5{left:41.66666667%}.widget.extendedwopts-col.col-xs-push-4{left:33.33333333%}.widget.extendedwopts-col.col-xs-push-3{left:25%}.widget.extendedwopts-col.col-xs-push-2{left:16.66666667%}.widget.extendedwopts-col.col-xs-push-1{left:8.33333333%}.widget.extendedwopts-col.col-xs-push-0{left:auto}.widget.extendedwopts-col.col-xs-offset-12{margin-left:100%}.widget.extendedwopts-col.col-xs-offset-11{margin-left:91.66666667%}.widget.extendedwopts-col.col-xs-offset-10{margin-left:83.33333333%}.widget.extendedwopts-col.col-xs-offset-9{margin-left:75%}.widget.extendedwopts-col.col-xs-offset-8{margin-left:66.66666667%}.widget.extendedwopts-col.col-xs-offset-7{margin-left:58.33333333%}.widget.extendedwopts-col.col-xs-offset-6{margin-left:50%}.widget.extendedwopts-col.col-xs-offset-5{margin-left:41.66666667%}.widget.extendedwopts-col.col-xs-offset-4{margin-left:33.33333333%}.widget.extendedwopts-col.col-xs-offset-3{margin-left:25%}.widget.extendedwopts-col.col-xs-offset-2{margin-left:16.66666667%}.widget.extendedwopts-col.col-xs-offset-1{margin-left:8.33333333%}.widget.extendedwopts-col.col-xs-offset-0{margin-left:0%}@media screen and (max-width: 768px) and (min-width: 481px){.widget.extendedwopts-col.col-sm-1,.widget.extendedwopts-col.col-sm-2,.widget.extendedwopts-col.col-sm-3,.widget.extendedwopts-col.col-sm-4,.widget.extendedwopts-col.col-sm-5,.widget.extendedwopts-col.col-sm-6,.widget.extendedwopts-col.col-sm-7,.widget.extendedwopts-col.col-sm-8,.widget.extendedwopts-col.col-sm-9,.widget.extendedwopts-col.col-sm-10,.widget.extendedwopts-col.col-sm-11,.widget.extendedwopts-col.col-sm-12{float:left}.widget.extendedwopts-col.col-sm-12{width:100%}.widget.extendedwopts-col.col-sm-11{width:91.66666667%}.widget.extendedwopts-col.col-sm-10{width:83.33333333%}.widget.extendedwopts-col.col-sm-9{width:75%}.widget.extendedwopts-col.col-sm-8{width:66.66666667%}.widget.extendedwopts-col.col-sm-7{width:58.33333333%}.widget.extendedwopts-col.col-sm-6{width:50%}.widget.extendedwopts-col.col-sm-5{width:41.66666667%}.widget.extendedwopts-col.col-sm-4{width:33.33333333%}.widget.extendedwopts-col.col-sm-3{width:25%}.widget.extendedwopts-col.col-sm-2{width:16.66666667%}.widget.extendedwopts-col.col-sm-1{width:8.33333333%}.widget.extendedwopts-col.col-sm-pull-12{right:100%}.widget.extendedwopts-col.col-sm-pull-11{right:91.66666667%}.widget.extendedwopts-col.col-sm-pull-10{right:83.33333333%}.widget.extendedwopts-col.col-sm-pull-9{right:75%}.widget.extendedwopts-col.col-sm-pull-8{right:66.66666667%}.widget.extendedwopts-col.col-sm-pull-7{right:58.33333333%}.widget.extendedwopts-col.col-sm-pull-6{right:50%}.widget.extendedwopts-col.col-sm-pull-5{right:41.66666667%}.widget.extendedwopts-col.col-sm-pull-4{right:33.33333333%}.widget.extendedwopts-col.col-sm-pull-3{right:25%}.widget.extendedwopts-col.col-sm-pull-2{right:16.66666667%}.widget.extendedwopts-col.col-sm-pull-1{right:8.33333333%}.widget.extendedwopts-col.col-sm-pull-0{right:auto}.widget.extendedwopts-col.col-sm-push-12{left:100%}.widget.extendedwopts-col.col-sm-push-11{left:91.66666667%}.widget.extendedwopts-col.col-sm-push-10{left:83.33333333%}.widget.extendedwopts-col.col-sm-push-9{left:75%}.widget.extendedwopts-col.col-sm-push-8{left:66.66666667%}.widget.extendedwopts-col.col-sm-push-7{left:58.33333333%}.widget.extendedwopts-col.col-sm-push-6{left:50%}.widget.extendedwopts-col.col-sm-push-5{left:41.66666667%}.widget.extendedwopts-col.col-sm-push-4{left:33.33333333%}.widget.extendedwopts-col.col-sm-push-3{left:25%}.widget.extendedwopts-col.col-sm-push-2{left:16.66666667%}.widget.extendedwopts-col.col-sm-push-1{left:8.33333333%}.widget.extendedwopts-col.col-sm-push-0{left:auto}.widget.extendedwopts-col.col-sm-offset-12{margin-left:100%}.widget.extendedwopts-col.col-sm-offset-11{margin-left:91.66666667%}.widget.extendedwopts-col.col-sm-offset-10{margin-left:83.33333333%}.widget.extendedwopts-col.col-sm-offset-9{margin-left:75%}.widget.extendedwopts-col.col-sm-offset-8{margin-left:66.66666667%}.widget.extendedwopts-col.col-sm-offset-7{margin-left:58.33333333%}.widget.extendedwopts-col.col-sm-offset-6{margin-left:50%}.widget.extendedwopts-col.col-sm-offset-5{margin-left:41.66666667%}.widget.extendedwopts-col.col-sm-offset-4{margin-left:33.33333333%}.widget.extendedwopts-col.col-sm-offset-3{margin-left:25%}.widget.extendedwopts-col.col-sm-offset-2{margin-left:16.66666667%}.widget.extendedwopts-col.col-sm-offset-1{margin-left:8.33333333%}.widget.extendedwopts-col.col-sm-offset-0{margin-left:0%}}@media (min-width: 769px){.widget.extendedwopts-col.col-md-1,.widget.extendedwopts-col.col-md-2,.widget.extendedwopts-col.col-md-3,.widget.extendedwopts-col.col-md-4,.widget.extendedwopts-col.col-md-5,.widget.extendedwopts-col.col-md-6,.widget.extendedwopts-col.col-md-7,.widget.extendedwopts-col.col-md-8,.widget.extendedwopts-col.col-md-9,.widget.extendedwopts-col.col-md-10,.widget.extendedwopts-col.col-md-11,.widget.extendedwopts-col.col-md-12{float:left}.widget.extendedwopts-col.col-md-12{width:100%}.widget.extendedwopts-col.col-md-11{width:91.66666667%}.widget.extendedwopts-col.col-md-10{width:83.33333333%}.widget.extendedwopts-col.col-md-9{width:75%}.widget.extendedwopts-col.col-md-8{width:66.66666667%}.widget.extendedwopts-col.col-md-7{width:58.33333333%}.widget.extendedwopts-col.col-md-6{width:50%}.widget.extendedwopts-col.col-md-5{width:41.66666667%}.widget.extendedwopts-col.col-md-4{width:33.33333333%}.widget.extendedwopts-col.col-md-3{width:25%}.widget.extendedwopts-col.col-md-2{width:16.66666667%}.widget.extendedwopts-col.col-md-1{width:8.33333333%}.widget.extendedwopts-col.col-md-pull-12{right:100%}.widget.extendedwopts-col.col-md-pull-11{right:91.66666667%}.widget.extendedwopts-col.col-md-pull-10{right:83.33333333%}.widget.extendedwopts-col.col-md-pull-9{right:75%}.widget.extendedwopts-col.col-md-pull-8{right:66.66666667%}.widget.extendedwopts-col.col-md-pull-7{right:58.33333333%}.widget.extendedwopts-col.col-md-pull-6{right:50%}.widget.extendedwopts-col.col-md-pull-5{right:41.66666667%}.widget.extendedwopts-col.col-md-pull-4{right:33.33333333%}.widget.extendedwopts-col.col-md-pull-3{right:25%}.widget.extendedwopts-col.col-md-pull-2{right:16.66666667%}.widget.extendedwopts-col.col-md-pull-1{right:8.33333333%}.widget.extendedwopts-col.col-md-pull-0{right:auto}.widget.extendedwopts-col.col-md-push-12{left:100%}.widget.extendedwopts-col.col-md-push-11{left:91.66666667%}.widget.extendedwopts-col.col-md-push-10{left:83.33333333%}.widget.extendedwopts-col.col-md-push-9{left:75%}.widget.extendedwopts-col.col-md-push-8{left:66.66666667%}.widget.extendedwopts-col.col-md-push-7{left:58.33333333%}.widget.extendedwopts-col.col-md-push-6{left:50%}.widget.extendedwopts-col.col-md-push-5{left:41.66666667%}.widget.extendedwopts-col.col-md-push-4{left:33.33333333%}.widget.extendedwopts-col.col-md-push-3{left:25%}.widget.extendedwopts-col.col-md-push-2{left:16.66666667%}.widget.extendedwopts-col.col-md-push-1{left:8.33333333%}.widget.extendedwopts-col.col-md-push-0{left:auto}.widget.extendedwopts-col.col-md-offset-12{margin-left:100%}.widget.extendedwopts-col.col-md-offset-11{margin-left:91.66666667%}.widget.extendedwopts-col.col-md-offset-10{margin-left:83.33333333%}.widget.extendedwopts-col.col-md-offset-9{margin-left:75%}.widget.extendedwopts-col.col-md-offset-8{margin-left:66.66666667%}.widget.extendedwopts-col.col-md-offset-7{margin-left:58.33333333%}.widget.extendedwopts-col.col-md-offset-6{margin-left:50%}.widget.extendedwopts-col.col-md-offset-5{margin-left:41.66666667%}.widget.extendedwopts-col.col-md-offset-4{margin-left:33.33333333%}.widget.extendedwopts-col.col-md-offset-3{margin-left:25%}.widget.extendedwopts-col.col-md-offset-2{margin-left:16.66666667%}.widget.extendedwopts-col.col-md-offset-1{margin-left:8.33333333%}.widget.extendedwopts-col.col-md-offset-0{margin-left:0%}}
assets/css/extended-widgets.css ADDED
@@ -0,0 +1,570 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .extended-widget-opts-form{
2
+ margin-left: -15px;
3
+ margin-right: -15px;
4
+ padding-top: 5px;
5
+ clear: both;
6
+ }
7
+
8
+ /** SO **/
9
+ .so-content .widgetops-sc-opts{
10
+ display: none;
11
+ }
12
+ .so-content .extended-widget-opts-tab-visibility,
13
+ .so-content .extended-widget-opts-tabcontent-visibility,
14
+ .so-content .widgetopts_id_fld{
15
+ display: none !important;
16
+ }
17
+ .so-content .widgetopts-unlock-features{
18
+ margin-top: 0px;
19
+ padding-top: 20px;
20
+ }
21
+ .so-content .extended-widget-opts-tabs > .ui-tabs-nav{
22
+ padding-left: 15px !important;
23
+ }
24
+
25
+
26
+ .extended-widget-opts-form.extended-widget-opts-form-large .ui-tabs-nav .dashicons{
27
+ display: none;
28
+ }
29
+ .extended-widget-opts-form.extended-widget-opts-form-small .ui-tabs-nav .dashicons{
30
+ display: inline-block;
31
+ }
32
+ .extended-widget-opts-form.extended-widget-opts-form-small .tabtitle{
33
+ display: none;
34
+ }
35
+ .extended-widget-opts-tabs.ui-widget, .extended-widget-opts-inside-tabs.ui-widget{
36
+ border: 0px !important;
37
+ background: transparent !important;
38
+ border-radius: 0px !important;
39
+ font-family: "Open Sans",sans-serif;
40
+ }
41
+ .extended-widget-opts-tabs.ui-tabs{
42
+ padding-left: 0px;
43
+ padding-right: 0px;
44
+ }
45
+ .extended-widget-opts-tabs .ui-tabs-nav{
46
+ border: 0px !important;
47
+ border-bottom: 1px solid #e5e5e5 !important;
48
+ background: transparent !important;
49
+ border-radius: 0px !important;
50
+ padding: 0px !important;
51
+ }
52
+ .extended-widget-opts-tabs .ui-tabs-nav li{
53
+ float: left !important;
54
+ margin-left: 1px !important;
55
+ margin-bottom: 0px !important;
56
+ margin-right: 2px !important;
57
+
58
+ border: 0px !important;
59
+ background: transparent !important;
60
+ border-radius: 0px !important;
61
+ }
62
+ .extended-widget-opts-tabs .ui-tabs-nav li:first-child{
63
+ margin-left: 15px !important;
64
+ }
65
+ .extended-widget-opts-tabs .ui-tabs-nav li:last-child{
66
+ margin-right: 0px !important;
67
+ }
68
+ .extended-widget-opts-tabs .ui-tabs-nav li:last-of-type{
69
+ margin-right: 0px !important;
70
+ }
71
+ .extended-widget-opts-tabs .ui-tabs-nav li.ui-tabs-active{
72
+ margin-bottom: -1px !important;
73
+ }
74
+ .extended-widget-opts-tabs .ui-tabs-nav li a{
75
+ display: block !important;
76
+ padding: 8px 7px 8px !important;
77
+ font-size: 12px !important;
78
+ background: #fafafa !important;
79
+ color: #444 !important;
80
+ text-decoration: none !important;
81
+ border: 1px solid #e5e5e5 !important;
82
+ border-bottom: 0px !important;
83
+ border-top-left-radius: 2px !important;
84
+ border-top-right-radius: 2px !important;
85
+ font-weight: normal !important;
86
+ }
87
+ .extended-widget-opts-form-large .extended-widget-opts-tabs .ui-tabs-nav li a{
88
+ padding: 7px 8px 8px !important;
89
+ }
90
+ .extended-widget-opts-tabs .ui-tabs-nav li.ui-tabs-active a{
91
+ margin-bottom: -1px !important;
92
+ padding-bottom: 9px !important;
93
+ box-shadow: none !important;
94
+ background: #fff !important;
95
+ }
96
+ .extended-widget-opts-tabs .ui-tabs-nav li .dashicons{
97
+ height: 15px !important;
98
+ font-size: 15px !important;
99
+ }
100
+ .extended-widget-opts-tabcontent{
101
+ padding: 0px 15px 15px 15px;
102
+ }
103
+ .extended-widget-opts-form .form-table td{
104
+ padding: 5px;
105
+ /*text-align: center;*/
106
+ }
107
+ .extended-widget-opts-inner-lists, .extended-widget-opts-class-lists, .extended-widget-opts-inner-roles{
108
+ display: block;
109
+ width: 100%;
110
+ height: 230px !important;
111
+ padding: 5px 8px !important;
112
+ overflow: auto;
113
+ border: 1px solid #dfdfdf;
114
+ margin-bottom: 5px;
115
+ box-sizing: border-box;
116
+ }
117
+ .extended-widget-opts-class-lists, .extended-widget-opts-inner-roles{
118
+ height: auto !important;
119
+ max-height: 230px !important;
120
+ }
121
+ .extended-widget-opts-inner-lists h4, .extended-widget-opts-inner-lists h4:hover{
122
+ cursor: pointer;
123
+ }
124
+ .extended-widget-opts-inner-lists small{
125
+ opacity: 0.5;
126
+ font-weight: normal;
127
+ font-size: 11px;
128
+ }
129
+ .extended-widget-opts-clearfix{
130
+ clear: both;
131
+ }
132
+ .extended-widget-opts-tabcontent.extended-widget-opts-inside-tabcontent{
133
+ padding: 10px 15px !important;
134
+ }
135
+ .extended-widget-opts-inside-tabcontent .extended-widget-opts-inner-tabcontent{
136
+ border: 1px solid #dddddd !important;
137
+ border-top: 0px !important;
138
+ padding: 10px !important;
139
+ }
140
+ .extended-widget-opts-inside-tabcontent .extended-widget-opts-styling-tabcontent tr td:last-child{
141
+ min-width: 117px;
142
+ }
143
+ .extended-widget-opts-inside-tabcontent .extended-widget-opts-styling-tabcontent p{
144
+ text-align: center;
145
+ }
146
+ .extended-widget-opts-inner-tabcontent.extended-widget-opts-visibility-tabcontent{
147
+ text-align: left;
148
+ }
149
+ .extended-widget-opts-inside-tabs .ui-tabs-nav li:first-child{
150
+ margin-left: 0px !important;
151
+ }
152
+ .extended-widget-opts-inside-tabs .ui-tabs-nav li a{
153
+ padding: 8px !important;
154
+ }
155
+ .widget-opts-toggle-note{
156
+ display: none;
157
+ }
158
+ .widget-opts-toggler-note{
159
+ font-size: 11px;
160
+ color: #0073aa !important;
161
+ }
162
+ .widget-opts-learnmore{
163
+ text-decoration: none;
164
+ }
165
+
166
+ .extended-widget-opts-tabs .ui-tabs-nav li.ui-tabs-active.extended-widget-gopro-tab-alignment a{
167
+ background-color: #FFF1B8 !important;
168
+ }
169
+ .extended-widget-opts-tabcontent-gopro{
170
+ background-color: #FFF1B8 !important;
171
+ color: #444;
172
+ margin-bottom: 15px;
173
+ }
174
+ .extended-widget-opts-tabcontent-gopro li{
175
+ font-size: 12px;
176
+ line-height: 24px;
177
+ }
178
+ body .extended-widget-opts-tabs .extended-widget-gopro-tab-alignment a{
179
+ font-weight: bold !important;
180
+ padding-left: 9px !important;
181
+ padding-right: 9px !important;
182
+ }
183
+ .widgetopts-unlock-features{
184
+ text-align: center;
185
+ font-size: 16px;
186
+ font-weight: bold;
187
+ }
188
+ .widgetopts-unlock-features .dashicons{
189
+ font-size: 25px;
190
+ margin-right: 4px;
191
+ }
192
+
193
+ /* customizer fix */
194
+ #customize-theme-controls .ui-tabs .ui-tabs-panel.extended-widget-opts-tabcontent{
195
+ min-width: 100%;
196
+ -webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;
197
+ }
198
+ #customize-theme-controls .extended-widget-opts-form .ui-tabs-nav .dashicons{
199
+ display: inline-block;
200
+ }
201
+ #customize-theme-controls .extended-widget-opts-form .tabtitle{
202
+ display: none;
203
+ }
204
+ #customize-theme-controls .extended-widget-opts-form .ui-tabs .ui-tabs-nav li a{
205
+ line-height: 16px !important;
206
+ }
207
+ #customize-theme-controls .extended-widget-opts-form .extended-widget-opts-tabcontent-styling .inputsize5{
208
+ max-width: 50px;
209
+ }
210
+
211
+ /** Settings Page **/
212
+ .widgetopts-settings-desc{
213
+ margin: 20px 200px 20px 0;
214
+ min-height: 50px;
215
+ color: #555d66;
216
+ font-size: 15px;
217
+ line-height: 22px;
218
+ }
219
+ .widgetopts-mascot{
220
+ display: block;
221
+ text-align: center;
222
+ height: 150px;
223
+ width: 150px;
224
+ background: url('../images/logo-mascot.png');
225
+ -webkit-background-size: cover;
226
+ -moz-background-size: cover;
227
+ -o-background-size: cover;
228
+ background-size: cover;
229
+ }
230
+ .widgetopts-badge-settings{
231
+ position: absolute;
232
+ top: 10px;
233
+ right: 10px;
234
+ }
235
+ .opts-classes-setting-table tr strong{
236
+ display: inline-block;
237
+ min-width: 150px;
238
+ }
239
+ .opts-hidden-placeholder{
240
+ display: none;
241
+ }
242
+ .opts-add-class-btn .dashicons{
243
+ text-decoration: none !important;
244
+ line-height: 29px;
245
+ height: 29px;
246
+ }
247
+ .opts-remove-class-btn .dashicons{
248
+ text-decoration: none !important;
249
+ line-height: 18px;
250
+ height: 18px;
251
+ color: #b20820;
252
+ }
253
+ #opts-predefined-classes{
254
+ padding: 0px 10px;
255
+ }
256
+ #opts-predefined-classes .opts-li-value{
257
+ display: inline-block;
258
+ margin-right: 10px;
259
+ }
260
+ .fortyfourwp-banners img {
261
+ max-width: 100%;
262
+ }
263
+ .widgetopts-sidebar-widget .email{
264
+ border: 1px solid #ddd;
265
+ }
266
+ #widgetopts-sidebar-widget-more_plugins table td{
267
+ width: 50%;
268
+ vertical-align: top;
269
+ text-align: center;
270
+ }
271
+ #widgetopts-sidebar-widget-more_plugins .dashicons{
272
+ font-size: 30px;
273
+ height: 30px;
274
+ width: 30px;
275
+ margin-bottom: 5px;
276
+ }
277
+ #widgetopts-sidebar-widget-more_plugins td a{
278
+ text-decoration: none;
279
+ color: #444;
280
+ background: #f3f3f3;
281
+ display: block;
282
+ padding: 8px 5px;
283
+ border-radius: 3px;
284
+ font-size: 13px;
285
+ }
286
+ #widgetopts-sidebar-widget-more_plugins td a:hover{
287
+ background: #ddd;
288
+ }
289
+
290
+ /** Modular Settings Page **/
291
+ .widgetopts-poststuff #post-body #postbox-container-1, .widgetopts-poststuff #post-body #postbox-container-2{
292
+ border-top: 1px solid #ddd;
293
+ padding-top: 20px;
294
+ }
295
+ .widgetopts-poststuff #post-body #postbox-container-2{
296
+ border-right: 1px solid #ddd;
297
+ box-sizing: border-box;
298
+ padding-right: 20px;
299
+ }
300
+ .widgetopts-poststuff #post-body #postbox-container-1{
301
+ box-sizing: border-box;
302
+ margin-right: -300px;
303
+ padding-left: 20px;
304
+ width: 300px;
305
+ }
306
+ .widgetopts-module-section-heading{
307
+ display: block;
308
+ margin: 0 0 1em 0;
309
+ overflow: hidden;
310
+ }
311
+ .widgetopts-settings-view-toggle{
312
+ float: left;
313
+ margin-right: 1em;
314
+ padding: .35em 0;
315
+ }
316
+ .widgetopts-settings-view-toggle a{
317
+ text-decoration: none;
318
+ color: #b4b9be;
319
+ }
320
+ .widgetopts-settings-view-toggle a.widgetopts-selected{
321
+ color: #0073aa;
322
+ }
323
+ .widgetopts-module-cards-container {
324
+ clear: both;
325
+ box-sizing: border-box;
326
+ }
327
+ .widgetopts-module-cards{
328
+ text-align: justify;
329
+ font-size: 0.1px;
330
+ }
331
+ .widgetopts-module-cards:after{
332
+ content: '';
333
+ display: inline-block;
334
+ width: 100%;
335
+ }
336
+ .widgetopts-module-card{
337
+ font-size: 16px;
338
+ display: inline-block;
339
+ width: 100%;
340
+ max-width: 32%;
341
+ text-align: left;
342
+ margin-bottom: 12px;
343
+ vertical-align: top;
344
+ }
345
+ .widgetopts-module-card-content{
346
+ font-size: 16px;
347
+ position: relative;
348
+ background: #fff;
349
+ border: 1px solid #ddd;
350
+ /*box-shadow: 1px 1px 0px rgba(0, 0, 0, .1);*/
351
+ padding: 1em;
352
+ }
353
+ .widgetopts-module-type-enabled .widgetopts-module-card-content{
354
+ background: #f7fcfe;
355
+ border-color: rgba( 0, 115, 179, 0.85 );
356
+ /*box-shadow: 1px 1px 0px rgba(0,0,0,.1);*/
357
+ }
358
+ .widgetopts-module-type-disabled .widgetopts-settings-section,
359
+ .widgetopts-module-type-disabled .widgetopts-module-settings-save,
360
+ .widgetopts-module-card.widgetopts-module-card-no-settings .widgetopts-module-settings-save{
361
+ display: none;
362
+ }
363
+ #poststuff .widgetopts-module-card h2{
364
+ font-size: 16px;
365
+ margin: 0;
366
+ padding: 0;
367
+ }
368
+ .widgetopts-modal-background{
369
+ display: none;
370
+ position: fixed;
371
+ top: 0;
372
+ right: 0;
373
+ bottom: 0;
374
+ left: 0;
375
+ background: rgba(0,0,0,0.2);
376
+ z-index: 500;
377
+ cursor: pointer;
378
+ }
379
+ .grid .widgetopts-module-settings-container{
380
+ display: none;
381
+ position: fixed;
382
+ top: 52px;
383
+ right: 20px;
384
+ bottom: 20px;
385
+ left: 20px;
386
+ margin-left: 160px;
387
+ background: #fff;
388
+ box-shadow: 0 0 20px rgba(0,0,0,0.2);
389
+ z-index: 510;
390
+ }
391
+ .widgetopts-modal-navigation{
392
+ position: absolute;
393
+ top: 0;
394
+ left: 0;
395
+ right: 0;
396
+ height: 40px;
397
+ border-bottom: 1px solid #ddd;
398
+ }
399
+ .widgetopts-modal-navigation button{
400
+ width: 40px;
401
+ height: 40px;
402
+ float: right;
403
+ background: #fff;
404
+ border: none;
405
+ outline: none;
406
+ border-left: 1px solid #ddd;
407
+ font-family: dashicons;
408
+ font-size: 20px;
409
+ }
410
+ .widgetopts-modal-navigation button:hover{
411
+ cursor: pointer;
412
+ background: #eee;
413
+ }
414
+ .widgetopts-modal-navigation button.widgetopts-close-modal:before{
415
+ content: '\f335';
416
+ }
417
+ .widgetopts-modal-content-footer{
418
+ position: absolute;
419
+ bottom: 0;
420
+ left: 0;
421
+ right: 0;
422
+ border-top: 1px solid #ddd;
423
+ padding: 15px;
424
+ background: #efefef;
425
+ box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
426
+ }
427
+ .widgetopts-modal-content-footer .align-right{
428
+ float: right;
429
+ }
430
+ .grid .widgetopts-module-settings-content-container{
431
+ position: absolute;
432
+ top: 40px;
433
+ right: 0;
434
+ bottom: 60px;
435
+ left: 0;
436
+ overflow: auto;
437
+ padding: 25px 50px;
438
+ }
439
+ .widgetopts-module-settings-content{
440
+ width: 100%;
441
+ max-width: 700px;
442
+ margin: 0 auto;
443
+ }
444
+ .widgetopts-settings-section label{
445
+ font-weight: bold;
446
+ }
447
+ p.widgetopts-settings-section{
448
+ font-style: italic;
449
+ color: #999;
450
+ }
451
+ #widgetopts-settings-messages-container {
452
+ position: fixed;
453
+ padding: 2em;
454
+ top: -100px;
455
+ left: 0;
456
+ right: 0;
457
+ max-width: 300px;
458
+ width: 100%;
459
+ margin: auto;
460
+ z-index: 500;
461
+ -webkit-transition: all .3s ease-in-out;
462
+ transition: all .3s ease-in-out;
463
+ opacity: 0;
464
+ border-radius: 3px;
465
+ background: #fff;
466
+ box-shadow: 0px 0px 25px rgba( 0,0,0,0.4 );
467
+ }
468
+ #widgetopts-settings-messages-container div, .widgetopts-module-messages-container div{
469
+ background: #f1f1f1;
470
+ }
471
+ #widgetopts-settings-messages-container.visible:not(.no-module) {
472
+ top: 52px;
473
+ opacity: 1;
474
+ }
475
+ #widgetopts-settings-messages-container div:first-child {
476
+ margin-top: 0;
477
+ }
478
+ #widgetopts-settings-messages-container div:last-child{
479
+ margin-bottom: 0px;
480
+ }
481
+ .widgetopts-dashicons{
482
+ font-size: 180px;
483
+ position: absolute;
484
+ left: -27px;
485
+ top: -45px;
486
+ opacity: 0.1;
487
+ }
488
+ .widgetopts-no-top{
489
+ top: 0px;
490
+ }
491
+ .widgetopts-module-type-pro{
492
+ opacity: .5;
493
+ }
494
+ .widgetopts-pro-upsell{
495
+ display: block;
496
+ height: 100%;
497
+ left: 0;
498
+ position: absolute;
499
+ top: 0;
500
+ width: 100%;
501
+ text-decoration: none;
502
+ }
503
+ .widgetopts-pro-label{
504
+ padding: 2px 4px;
505
+ position: absolute;
506
+ right: 6px;
507
+ top: 5px;
508
+ opacity: 0.6;
509
+
510
+ background: #ffb310;
511
+ /*box-shadow: 1px 1px 1px rgba(0,0,0,0.2);*/
512
+ font-size: 11px;
513
+ color: #5e5018;
514
+ text-transform: uppercase;
515
+ }
516
+ .widgetopts-pro-label .dashicons{
517
+ font-size: 18px;
518
+ }
519
+ .grid .widgetopts-list-content-footer, .grid #widgetopts-save {
520
+ display: none;
521
+ }
522
+
523
+ @media ( max-width: 1400px ) {
524
+ .widgetopts-module-card {
525
+ max-width: 49%;
526
+ }
527
+ }
528
+ @media ( max-width: 782px ) {
529
+ .grid .widgetopts-module-settings-container {
530
+ margin-left: 0px;
531
+ top: 0px;
532
+ left: 0;
533
+ right: 0;
534
+ bottom: 0;
535
+ z-index: 100000; /* to get above wp admin bar */
536
+ }
537
+ .grid .widgetopts-module-settings-content-container {
538
+ padding: 15px 30px;
539
+ }
540
+ .widgetopts-module-settings-content .widgetopts-dashicons{
541
+ display: none;
542
+ }
543
+ }
544
+ @media (max-width: 500px){
545
+ .widgetopts-module-card {
546
+ max-width: 100%;
547
+ padding-right: 0;
548
+ padding-bottom: 10px;
549
+ }
550
+ .widgetopts-settings-desc{
551
+ margin-right: 70px;
552
+ }
553
+ .widgetopts-badge-settings{
554
+ top: 115px;
555
+ }
556
+ .widgetopts-mascot{
557
+ height: 69px;
558
+ width: 69px;
559
+ }
560
+ .widgetopts-poststuff #post-body #postbox-container-2{
561
+ padding-right: 0px;
562
+ border-right: 0px;
563
+ }
564
+ .widgetopts-poststuff #post-body #postbox-container-1{
565
+ padding-left: 0px;
566
+ }
567
+ .grid .widgetopts-module-settings-container{
568
+ margin-left: 0px;
569
+ }
570
+ }
assets/css/jqueryui/1.11.4/themes/ui-lightness/images/ui-icons_ffffff_256x240.png ADDED
Binary file
assets/css/jqueryui/1.11.4/themes/ui-lightness/jquery-ui.css ADDED
@@ -0,0 +1,1031 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
5
+ * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ /* Layout helpers
8
+ ----------------------------------*/
9
+ .ui-helper-hidden {
10
+ display: none;
11
+ }
12
+ .ui-helper-hidden-accessible {
13
+ border: 0;
14
+ clip: rect(0 0 0 0);
15
+ height: 1px;
16
+ margin: -1px;
17
+ overflow: hidden;
18
+ padding: 0;
19
+ position: absolute;
20
+ width: 1px;
21
+ }
22
+ .ui-helper-reset {
23
+ margin: 0;
24
+ padding: 0;
25
+ border: 0;
26
+ outline: 0;
27
+ line-height: 1.3;
28
+ text-decoration: none;
29
+ font-size: 100%;
30
+ list-style: none;
31
+ }
32
+ .ui-helper-clearfix:before,
33
+ .ui-helper-clearfix:after {
34
+ content: "";
35
+ display: table;
36
+ border-collapse: collapse;
37
+ }
38
+ .ui-helper-clearfix:after {
39
+ clear: both;
40
+ }
41
+ .ui-helper-clearfix {
42
+ min-height: 0; /* support: IE7 */
43
+ }
44
+ .ui-helper-zfix {
45
+ width: 100%;
46
+ height: 100%;
47
+ top: 0;
48
+ left: 0;
49
+ position: absolute;
50
+ opacity: 0;
51
+ filter:Alpha(Opacity=0); /* support: IE8 */
52
+ }
53
+
54
+ .ui-front {
55
+ z-index: 100;
56
+ }
57
+
58
+
59
+ /* Interaction Cues
60
+ ----------------------------------*/
61
+ .ui-state-disabled {
62
+ cursor: default !important;
63
+ }
64
+
65
+
66
+ /* Icons
67
+ ----------------------------------*/
68
+
69
+ /* states and images */
70
+ .ui-icon {
71
+ display: block;
72
+ text-indent: -99999px;
73
+ overflow: hidden;
74
+ background-repeat: no-repeat;
75
+ }
76
+
77
+
78
+ /* Misc visuals
79
+ ----------------------------------*/
80
+
81
+ /* Overlays */
82
+ .ui-widget-overlay {
83
+ position: fixed;
84
+ top: 0;
85
+ left: 0;
86
+ width: 100%;
87
+ height: 100%;
88
+ }
89
+ .ui-accordion .ui-accordion-header {
90
+ display: block;
91
+ cursor: pointer;
92
+ position: relative;
93
+ margin: 2px 0 0 0;
94
+ padding: .5em .5em .5em .7em;
95
+ min-height: 0; /* support: IE7 */
96
+ font-size: 100%;
97
+ }
98
+ .ui-accordion .ui-accordion-icons {
99
+ padding-left: 2.2em;
100
+ }
101
+ .ui-accordion .ui-accordion-icons .ui-accordion-icons {
102
+ padding-left: 2.2em;
103
+ }
104
+ .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
105
+ position: absolute;
106
+ left: .5em;
107
+ top: 50%;
108
+ margin-top: -8px;
109
+ }
110
+ .ui-accordion .ui-accordion-content {
111
+ padding: 1em 2.2em;
112
+ border-top: 0;
113
+ overflow: auto;
114
+ }
115
+ .ui-autocomplete {
116
+ position: absolute;
117
+ top: 0;
118
+ left: 0;
119
+ cursor: default;
120
+ }
121
+ .ui-button {
122
+ display: inline-block;
123
+ position: relative;
124
+ padding: 0;
125
+ line-height: normal;
126
+ margin-right: .1em;
127
+ cursor: pointer;
128
+ vertical-align: middle;
129
+ text-align: center;
130
+ overflow: visible; /* removes extra width in IE */
131
+ }
132
+ .ui-button,
133
+ .ui-button:link,
134
+ .ui-button:visited,
135
+ .ui-button:hover,
136
+ .ui-button:active {
137
+ text-decoration: none;
138
+ }
139
+ /* to make room for the icon, a width needs to be set here */
140
+ .ui-button-icon-only {
141
+ width: 2.2em;
142
+ }
143
+ /* button elements seem to need a little more width */
144
+ button.ui-button-icon-only {
145
+ width: 2.4em;
146
+ }
147
+ .ui-button-icons-only {
148
+ width: 3.4em;
149
+ }
150
+ button.ui-button-icons-only {
151
+ width: 3.7em;
152
+ }
153
+
154
+ /* button text element */
155
+ .ui-button .ui-button-text {
156
+ display: block;
157
+ line-height: normal;
158
+ }
159
+ .ui-button-text-only .ui-button-text {
160
+ padding: .4em 1em;
161
+ }
162
+ .ui-button-icon-only .ui-button-text,
163
+ .ui-button-icons-only .ui-button-text {
164
+ padding: .4em;
165
+ text-indent: -9999999px;
166
+ }
167
+ .ui-button-text-icon-primary .ui-button-text,
168
+ .ui-button-text-icons .ui-button-text {
169
+ padding: .4em 1em .4em 2.1em;
170
+ }
171
+ .ui-button-text-icon-secondary .ui-button-text,
172
+ .ui-button-text-icons .ui-button-text {
173
+ padding: .4em 2.1em .4em 1em;
174
+ }
175
+ .ui-button-text-icons .ui-button-text {
176
+ padding-left: 2.1em;
177
+ padding-right: 2.1em;
178
+ }
179
+ /* no icon support for input elements, provide padding by default */
180
+ input.ui-button {
181
+ padding: .4em 1em;
182
+ }
183
+
184
+ /* button icon element(s) */
185
+ .ui-button-icon-only .ui-icon,
186
+ .ui-button-text-icon-primary .ui-icon,
187
+ .ui-button-text-icon-secondary .ui-icon,
188
+ .ui-button-text-icons .ui-icon,
189
+ .ui-button-icons-only .ui-icon {
190
+ position: absolute;
191
+ top: 50%;
192
+ margin-top: -8px;
193
+ }
194
+ .ui-button-icon-only .ui-icon {
195
+ left: 50%;
196
+ margin-left: -8px;
197
+ }
198
+ .ui-button-text-icon-primary .ui-button-icon-primary,
199
+ .ui-button-text-icons .ui-button-icon-primary,
200
+ .ui-button-icons-only .ui-button-icon-primary {
201
+ left: .5em;
202
+ }
203
+ .ui-button-text-icon-secondary .ui-button-icon-secondary,
204
+ .ui-button-text-icons .ui-button-icon-secondary,
205
+ .ui-button-icons-only .ui-button-icon-secondary {
206
+ right: .5em;
207
+ }
208
+
209
+ /* button sets */
210
+ .ui-buttonset {
211
+ margin-right: 7px;
212
+ }
213
+ .ui-buttonset .ui-button {
214
+ margin-left: 0;
215
+ margin-right: -.3em;
216
+ }
217
+
218
+ /* workarounds */
219
+ /* reset extra padding in Firefox, see h5bp.com/l */
220
+ input.ui-button::-moz-focus-inner,
221
+ button.ui-button::-moz-focus-inner {
222
+ border: 0;
223
+ padding: 0;
224
+ }
225
+ .ui-datepicker {
226
+ width: 17em;
227
+ padding: .2em .2em 0;
228
+ display: none;
229
+ }
230
+ .ui-datepicker .ui-datepicker-header {
231
+ position: relative;
232
+ padding: .2em 0;
233
+ }
234
+ .ui-datepicker .ui-datepicker-prev,
235
+ .ui-datepicker .ui-datepicker-next {
236
+ position: absolute;
237
+ top: 2px;
238
+ width: 1.8em;
239
+ height: 1.8em;
240
+ }
241
+ .ui-datepicker .ui-datepicker-prev-hover,
242
+ .ui-datepicker .ui-datepicker-next-hover {
243
+ top: 1px;
244
+ }
245
+ .ui-datepicker .ui-datepicker-prev {
246
+ left: 2px;
247
+ }
248
+ .ui-datepicker .ui-datepicker-next {
249
+ right: 2px;
250
+ }
251
+ .ui-datepicker .ui-datepicker-prev-hover {
252
+ left: 1px;
253
+ }
254
+ .ui-datepicker .ui-datepicker-next-hover {
255
+ right: 1px;
256
+ }
257
+ .ui-datepicker .ui-datepicker-prev span,
258
+ .ui-datepicker .ui-datepicker-next span {
259
+ display: block;
260
+ position: absolute;
261
+ left: 50%;
262
+ margin-left: -8px;
263
+ top: 50%;
264
+ margin-top: -8px;
265
+ }
266
+ .ui-datepicker .ui-datepicker-title {
267
+ margin: 0 2.3em;
268
+ line-height: 1.8em;
269
+ text-align: center;
270
+ }
271
+ .ui-datepicker .ui-datepicker-title select {
272
+ font-size: 1em;
273
+ margin: 1px 0;
274
+ }
275
+ .ui-datepicker select.ui-datepicker-month,
276
+ .ui-datepicker select.ui-datepicker-year {
277
+ width: 45%;
278
+ }
279
+ .ui-datepicker table {
280
+ width: 100%;
281
+ font-size: .9em;
282
+ border-collapse: collapse;
283
+ margin: 0 0 .4em;
284
+ }
285
+ .ui-datepicker th {
286
+ padding: .7em .3em;
287
+ text-align: center;
288
+ font-weight: bold;
289
+ border: 0;
290
+ }
291
+ .ui-datepicker td {
292
+ border: 0;
293
+ padding: 1px;
294
+ }
295
+ .ui-datepicker td span,
296
+ .ui-datepicker td a {
297
+ display: block;
298
+ padding: .2em;
299
+ text-align: right;
300
+ text-decoration: none;
301
+ }
302
+ .ui-datepicker .ui-datepicker-buttonpane {
303
+ background-image: none;
304
+ margin: .7em 0 0 0;
305
+ padding: 0 .2em;
306
+ border-left: 0;
307
+ border-right: 0;
308
+ border-bottom: 0;
309
+ }
310
+ .ui-datepicker .ui-datepicker-buttonpane button {
311
+ float: right;
312
+ margin: .5em .2em .4em;
313
+ cursor: pointer;
314
+ padding: .2em .6em .3em .6em;
315
+ width: auto;
316
+ overflow: visible;
317
+ }
318
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
319
+ float: left;
320
+ }
321
+
322
+ /* with multiple calendars */
323
+ .ui-datepicker.ui-datepicker-multi {
324
+ width: auto;
325
+ }
326
+ .ui-datepicker-multi .ui-datepicker-group {
327
+ float: left;
328
+ }
329
+ .ui-datepicker-multi .ui-datepicker-group table {
330
+ width: 95%;
331
+ margin: 0 auto .4em;
332
+ }
333
+ .ui-datepicker-multi-2 .ui-datepicker-group {
334
+ width: 50%;
335
+ }
336
+ .ui-datepicker-multi-3 .ui-datepicker-group {
337
+ width: 33.3%;
338
+ }
339
+ .ui-datepicker-multi-4 .ui-datepicker-group {
340
+ width: 25%;
341
+ }
342
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
343
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
344
+ border-left-width: 0;
345
+ }
346
+ .ui-datepicker-multi .ui-datepicker-buttonpane {
347
+ clear: left;
348
+ }
349
+ .ui-datepicker-row-break {
350
+ clear: both;
351
+ width: 100%;
352
+ font-size: 0;
353
+ }
354
+
355
+ /* RTL support */
356
+ .ui-datepicker-rtl {
357
+ direction: rtl;
358
+ }
359
+ .ui-datepicker-rtl .ui-datepicker-prev {
360
+ right: 2px;
361
+ left: auto;
362
+ }
363
+ .ui-datepicker-rtl .ui-datepicker-next {
364
+ left: 2px;
365
+ right: auto;
366
+ }
367
+ .ui-datepicker-rtl .ui-datepicker-prev:hover {
368
+ right: 1px;
369
+ left: auto;
370
+ }
371
+ .ui-datepicker-rtl .ui-datepicker-next:hover {
372
+ left: 1px;
373
+ right: auto;
374
+ }
375
+ .ui-datepicker-rtl .ui-datepicker-buttonpane {
376
+ clear: right;
377
+ }
378
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button {
379
+ float: left;
380
+ }
381
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
382
+ .ui-datepicker-rtl .ui-datepicker-group {
383
+ float: right;
384
+ }
385
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
386
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
387
+ border-right-width: 0;
388
+ border-left-width: 1px;
389
+ }
390
+ .ui-dialog {
391
+ overflow: hidden;
392
+ position: absolute;
393
+ top: 0;
394
+ left: 0;
395
+ padding: .2em;
396
+ outline: 0;
397
+ }
398
+ .ui-dialog .ui-dialog-titlebar {
399
+ padding: .4em 1em;
400
+ position: relative;
401
+ }
402
+ .ui-dialog .ui-dialog-title {
403
+ float: left;
404
+ margin: .1em 0;
405
+ white-space: nowrap;
406
+ width: 90%;
407
+ overflow: hidden;
408
+ text-overflow: ellipsis;
409
+ }
410
+ .ui-dialog .ui-dialog-titlebar-close {
411
+ position: absolute;
412
+ right: .3em;
413
+ top: 50%;
414
+ width: 20px;
415
+ margin: -10px 0 0 0;
416
+ padding: 1px;
417
+ height: 20px;
418
+ }
419
+ .ui-dialog .ui-dialog-content {
420
+ position: relative;
421
+ border: 0;
422
+ padding: .5em 1em;
423
+ background: none;
424
+ overflow: auto;
425
+ }
426
+ .ui-dialog .ui-dialog-buttonpane {
427
+ text-align: left;
428
+ border-width: 1px 0 0 0;
429
+ background-image: none;
430
+ margin-top: .5em;
431
+ padding: .3em 1em .5em .4em;
432
+ }
433
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
434
+ float: right;
435
+ }
436
+ .ui-dialog .ui-dialog-buttonpane button {
437
+ margin: .5em .4em .5em 0;
438
+ cursor: pointer;
439
+ }
440
+ .ui-dialog .ui-resizable-se {
441
+ width: 12px;
442
+ height: 12px;
443
+ right: -5px;
444
+ bottom: -5px;
445
+ background-position: 16px 16px;
446
+ }
447
+ .ui-draggable .ui-dialog-titlebar {
448
+ cursor: move;
449
+ }
450
+ .ui-draggable-handle {
451
+ -ms-touch-action: none;
452
+ touch-action: none;
453
+ }
454
+ .ui-menu {
455
+ list-style: none;
456
+ padding: 0;
457
+ margin: 0;
458
+ display: block;
459
+ outline: none;
460
+ }
461
+ .ui-menu .ui-menu {
462
+ position: absolute;
463
+ }
464
+ .ui-menu .ui-menu-item {
465
+ position: relative;
466
+ margin: 0;
467
+ padding: 3px 1em 3px .4em;
468
+ cursor: pointer;
469
+ min-height: 0; /* support: IE7 */
470
+ /* support: IE10, see #8844 */
471
+ }
472
+ .ui-menu .ui-menu-divider {
473
+ margin: 5px 0;
474
+ height: 0;
475
+ font-size: 0;
476
+ line-height: 0;
477
+ border-width: 1px 0 0 0;
478
+ }
479
+ .ui-menu .ui-state-focus,
480
+ .ui-menu .ui-state-active {
481
+ margin: -1px;
482
+ }
483
+
484
+ /* icon support */
485
+ .ui-menu-icons {
486
+ position: relative;
487
+ }
488
+ .ui-menu-icons .ui-menu-item {
489
+ padding-left: 2em;
490
+ }
491
+
492
+ /* left-aligned */
493
+ .ui-menu .ui-icon {
494
+ position: absolute;
495
+ top: 0;
496
+ bottom: 0;
497
+ left: .2em;
498
+ margin: auto 0;
499
+ }
500
+
501
+ /* right-aligned */
502
+ .ui-menu .ui-menu-icon {
503
+ left: auto;
504
+ right: 0;
505
+ }
506
+ .ui-progressbar {
507
+ height: 2em;
508
+ text-align: left;
509
+ overflow: hidden;
510
+ }
511
+ .ui-progressbar .ui-progressbar-value {
512
+ margin: -1px;
513
+ height: 100%;
514
+ }
515
+ .ui-progressbar .ui-progressbar-overlay {
516
+ height: 100%;
517
+ filter: alpha(opacity=25); /* support: IE8 */
518
+ opacity: 0.25;
519
+ }
520
+ .ui-progressbar-indeterminate .ui-progressbar-value {
521
+ background-image: none;
522
+ }
523
+ .ui-resizable {
524
+ position: relative;
525
+ }
526
+ .ui-resizable-handle {
527
+ position: absolute;
528
+ font-size: 0.1px;
529
+ display: block;
530
+ -ms-touch-action: none;
531
+ touch-action: none;
532
+ }
533
+ .ui-resizable-disabled .ui-resizable-handle,
534
+ .ui-resizable-autohide .ui-resizable-handle {
535
+ display: none;
536
+ }
537
+ .ui-resizable-n {
538
+ cursor: n-resize;
539
+ height: 7px;
540
+ width: 100%;
541
+ top: -5px;
542
+ left: 0;
543
+ }
544
+ .ui-resizable-s {
545
+ cursor: s-resize;
546
+ height: 7px;
547
+ width: 100%;
548
+ bottom: -5px;
549
+ left: 0;
550
+ }
551
+ .ui-resizable-e {
552
+ cursor: e-resize;
553
+ width: 7px;
554
+ right: -5px;
555
+ top: 0;
556
+ height: 100%;
557
+ }
558
+ .ui-resizable-w {
559
+ cursor: w-resize;
560
+ width: 7px;
561
+ left: -5px;
562
+ top: 0;
563
+ height: 100%;
564
+ }
565
+ .ui-resizable-se {
566
+ cursor: se-resize;
567
+ width: 12px;
568
+ height: 12px;
569
+ right: 1px;
570
+ bottom: 1px;
571
+ }
572
+ .ui-resizable-sw {
573
+ cursor: sw-resize;
574
+ width: 9px;
575
+ height: 9px;
576
+ left: -5px;
577
+ bottom: -5px;
578
+ }
579
+ .ui-resizable-nw {
580
+ cursor: nw-resize;
581
+ width: 9px;
582
+ height: 9px;
583
+ left: -5px;
584
+ top: -5px;
585
+ }
586
+ .ui-resizable-ne {
587
+ cursor: ne-resize;
588
+ width: 9px;
589
+ height: 9px;
590
+ right: -5px;
591
+ top: -5px;
592
+ }
593
+ .ui-selectable {
594
+ -ms-touch-action: none;
595
+ touch-action: none;
596
+ }
597
+ .ui-selectable-helper {
598
+ position: absolute;
599
+ z-index: 100;
600
+ border: 1px dotted black;
601
+ }
602
+ .ui-selectmenu-menu {
603
+ padding: 0;
604
+ margin: 0;
605
+ position: absolute;
606
+ top: 0;
607
+ left: 0;
608
+ display: none;
609
+ }
610
+ .ui-selectmenu-menu .ui-menu {
611
+ overflow: auto;
612
+ /* Support: IE7 */
613
+ overflow-x: hidden;
614
+ padding-bottom: 1px;
615
+ }
616
+ .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
617
+ font-size: 1em;
618
+ font-weight: bold;
619
+ line-height: 1.5;
620
+ padding: 2px 0.4em;
621
+ margin: 0.5em 0 0 0;
622
+ height: auto;
623
+ border: 0;
624
+ }
625
+ .ui-selectmenu-open {
626
+ display: block;
627
+ }
628
+ .ui-selectmenu-button {
629
+ display: inline-block;
630
+ overflow: hidden;
631
+ position: relative;
632
+ text-decoration: none;
633
+ cursor: pointer;
634
+ }
635
+ .ui-selectmenu-button span.ui-icon {
636
+ right: 0.5em;
637
+ left: auto;
638
+ margin-top: -8px;
639
+ position: absolute;
640
+ top: 50%;
641
+ }
642
+ .ui-selectmenu-button span.ui-selectmenu-text {
643
+ text-align: left;
644
+ padding: 0.4em 2.1em 0.4em 1em;
645
+ display: block;
646
+ line-height: 1.4;
647
+ overflow: hidden;
648
+ text-overflow: ellipsis;
649
+ white-space: nowrap;
650
+ }
651
+ .ui-slider {
652
+ position: relative;
653
+ text-align: left;
654
+ }
655
+ .ui-slider .ui-slider-handle {
656
+ position: absolute;
657
+ z-index: 2;
658
+ width: 1.2em;
659
+ height: 1.2em;
660
+ cursor: default;
661
+ -ms-touch-action: none;
662
+ touch-action: none;
663
+ }
664
+ .ui-slider .ui-slider-range {
665
+ position: absolute;
666
+ z-index: 1;
667
+ font-size: .7em;
668
+ display: block;
669
+ border: 0;
670
+ background-position: 0 0;
671
+ }
672
+
673
+ /* support: IE8 - See #6727 */
674
+ .ui-slider.ui-state-disabled .ui-slider-handle,
675
+ .ui-slider.ui-state-disabled .ui-slider-range {
676
+ filter: inherit;
677
+ }
678
+
679
+ .ui-slider-horizontal {
680
+ height: .8em;
681
+ }
682
+ .ui-slider-horizontal .ui-slider-handle {
683
+ top: -.3em;
684
+ margin-left: -.6em;
685
+ }
686
+ .ui-slider-horizontal .ui-slider-range {
687
+ top: 0;
688
+ height: 100%;
689
+ }
690
+ .ui-slider-horizontal .ui-slider-range-min {
691
+ left: 0;
692
+ }
693
+ .ui-slider-horizontal .ui-slider-range-max {
694
+ right: 0;
695
+ }
696
+
697
+ .ui-slider-vertical {
698
+ width: .8em;
699
+ height: 100px;
700
+ }
701
+ .ui-slider-vertical .ui-slider-handle {
702
+ left: -.3em;
703
+ margin-left: 0;
704
+ margin-bottom: -.6em;
705
+ }
706
+ .ui-slider-vertical .ui-slider-range {
707
+ left: 0;
708
+ width: 100%;
709
+ }
710
+ .ui-slider-vertical .ui-slider-range-min {
711
+ bottom: 0;
712
+ }
713
+ .ui-slider-vertical .ui-slider-range-max {
714
+ top: 0;
715
+ }
716
+ .ui-sortable-handle {
717
+ -ms-touch-action: none;
718
+ touch-action: none;
719
+ }
720
+ .ui-spinner {
721
+ position: relative;
722
+ display: inline-block;
723
+ overflow: hidden;
724
+ padding: 0;
725
+ vertical-align: middle;
726
+ }
727
+ .ui-spinner-input {
728
+ border: none;
729
+ background: none;
730
+ color: inherit;
731
+ padding: 0;
732
+ margin: .2em 0;
733
+ vertical-align: middle;
734
+ margin-left: .4em;
735
+ margin-right: 22px;
736
+ }
737
+ .ui-spinner-button {
738
+ width: 16px;
739
+ height: 50%;
740
+ font-size: .5em;
741
+ padding: 0;
742
+ margin: 0;
743
+ text-align: center;
744
+ position: absolute;
745
+ cursor: default;
746
+ display: block;
747
+ overflow: hidden;
748
+ right: 0;
749
+ }
750
+ /* more specificity required here to override default borders */
751
+ .ui-spinner a.ui-spinner-button {
752
+ border-top: none;
753
+ border-bottom: none;
754
+ border-right: none;
755
+ }
756
+ /* vertically center icon */
757
+ .ui-spinner .ui-icon {
758
+ position: absolute;
759
+ margin-top: -8px;
760
+ top: 50%;
761
+ left: 0;
762
+ }
763
+ .ui-spinner-up {
764
+ top: 0;
765
+ }
766
+ .ui-spinner-down {
767
+ bottom: 0;
768
+ }
769
+
770
+ /* TR overrides */
771
+ .ui-spinner .ui-icon-triangle-1-s {
772
+ /* need to fix icons sprite */
773
+ background-position: -65px -16px;
774
+ }
775
+ .ui-tabs {
776
+ position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
777
+ padding: .2em;
778
+ }
779
+ .ui-tabs .ui-tabs-nav {
780
+ margin: 0;
781
+ padding: .2em .2em 0;
782
+ }
783
+ .ui-tabs .ui-tabs-nav li {
784
+ list-style: none;
785
+ float: left;
786
+ position: relative;
787
+ top: 0;
788
+ margin: 1px .2em 0 0;
789
+ border-bottom-width: 0;
790
+ padding: 0;
791
+ white-space: nowrap;
792
+ }
793
+ .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
794
+ float: left;
795
+ padding: .5em 1em;
796
+ text-decoration: none;
797
+ }
798
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active {
799
+ margin-bottom: -1px;
800
+ padding-bottom: 1px;
801
+ }
802
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
803
+ .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
804
+ .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
805
+ cursor: text;
806
+ }
807
+ .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
808
+ cursor: pointer;
809
+ }
810
+ .ui-tabs .ui-tabs-panel {
811
+ display: block;
812
+ border-width: 0;
813
+ padding: 1em 1.4em;
814
+ background: none;
815
+ }
816
+ .ui-tooltip {
817
+ padding: 8px;
818
+ position: absolute;
819
+ z-index: 9999;
820
+ max-width: 300px;
821
+ -webkit-box-shadow: 0 0 5px #aaa;
822
+ box-shadow: 0 0 5px #aaa;
823
+ }
824
+ body .ui-tooltip {
825
+ border-width: 2px;
826
+ }
827
+
828
+ /* Component containers
829
+ ----------------------------------*/
830
+ .ui-widget {
831
+ font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
832
+ font-size: 1.1em;
833
+ }
834
+ .ui-widget .ui-widget {
835
+ font-size: 1em;
836
+ }
837
+ .ui-widget input,
838
+ .ui-widget select,
839
+ .ui-widget textarea,
840
+ .ui-widget button {
841
+ font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
842
+ font-size: 1em;
843
+ }
844
+ .ui-widget-content {
845
+ border: 1px solid #dddddd;
846
+ background: #eeeeee;
847
+ color: #333333;
848
+ }
849
+ .ui-widget-content a {
850
+ color: #333333;
851
+ }
852
+ .ui-widget-header {
853
+ border: 1px solid #e78f08;
854
+ background: #f6a828;
855
+ color: #ffffff;
856
+ font-weight: bold;
857
+ }
858
+ .ui-widget-header a {
859
+ color: #ffffff;
860
+ }
861
+
862
+ /* Interaction states
863
+ ----------------------------------*/
864
+ .ui-state-default,
865
+ .ui-widget-content .ui-state-default,
866
+ .ui-widget-header .ui-state-default {
867
+ border: 1px solid #cccccc;
868
+ background: #f6f6f6;
869
+ font-weight: bold;
870
+ color: #1c94c4;
871
+ }
872
+ .ui-state-default a,
873
+ .ui-state-default a:link,
874
+ .ui-state-default a:visited {
875
+ color: #1c94c4;
876
+ text-decoration: none;
877
+ }
878
+ .ui-state-hover,
879
+ .ui-widget-content .ui-state-hover,
880
+ .ui-widget-header .ui-state-hover,
881
+ .ui-state-focus,
882
+ .ui-widget-content .ui-state-focus,
883
+ .ui-widget-header .ui-state-focus {
884
+ border: 1px solid #fbcb09;
885
+ background: #fdf5ce;
886
+ font-weight: bold;
887
+ color: #c77405;
888
+ }
889
+ .ui-state-hover a,
890
+ .ui-state-hover a:hover,
891
+ .ui-state-hover a:link,
892
+ .ui-state-hover a:visited,
893
+ .ui-state-focus a,
894
+ .ui-state-focus a:hover,
895
+ .ui-state-focus a:link,
896
+ .ui-state-focus a:visited {
897
+ color: #c77405;
898
+ text-decoration: none;
899
+ }
900
+ .ui-state-active,
901
+ .ui-widget-content .ui-state-active,
902
+ .ui-widget-header .ui-state-active {
903
+ border: 1px solid #fbd850;
904
+ background: #ffffff;
905
+ font-weight: bold;
906
+ color: #eb8f00;
907
+ }
908
+ .ui-state-active a,
909
+ .ui-state-active a:link,
910
+ .ui-state-active a:visited {
911
+ color: #eb8f00;
912
+ text-decoration: none;
913
+ }
914
+
915
+ /* Interaction Cues
916
+ ----------------------------------*/
917
+ .ui-state-highlight,
918
+ .ui-widget-content .ui-state-highlight,
919
+ .ui-widget-header .ui-state-highlight {
920
+ border: 1px solid #fed22f;
921
+ background: #ffe45c;
922
+ color: #363636;
923
+ }
924
+ .ui-state-highlight a,
925
+ .ui-widget-content .ui-state-highlight a,
926
+ .ui-widget-header .ui-state-highlight a {
927
+ color: #363636;
928
+ }
929
+ .ui-state-error,
930
+ .ui-widget-content .ui-state-error,
931
+ .ui-widget-header .ui-state-error {
932
+ border: 1px solid #cd0a0a;
933
+ background: #b81900;
934
+ color: #ffffff;
935
+ }
936
+ .ui-state-error a,
937
+ .ui-widget-content .ui-state-error a,
938
+ .ui-widget-header .ui-state-error a {
939
+ color: #ffffff;
940
+ }
941
+ .ui-state-error-text,
942
+ .ui-widget-content .ui-state-error-text,
943
+ .ui-widget-header .ui-state-error-text {
944
+ color: #ffffff;
945
+ }
946
+ .ui-priority-primary,
947
+ .ui-widget-content .ui-priority-primary,
948
+ .ui-widget-header .ui-priority-primary {
949
+ font-weight: bold;
950
+ }
951
+ .ui-priority-secondary,
952
+ .ui-widget-content .ui-priority-secondary,
953
+ .ui-widget-header .ui-priority-secondary {
954
+ opacity: .7;
955
+ filter:Alpha(Opacity=70); /* support: IE8 */
956
+ font-weight: normal;
957
+ }
958
+ .ui-state-disabled,
959
+ .ui-widget-content .ui-state-disabled,
960
+ .ui-widget-header .ui-state-disabled {
961
+ opacity: .35;
962
+ filter:Alpha(Opacity=35); /* support: IE8 */
963
+ background-image: none;
964
+ }
965
+ .ui-state-disabled .ui-icon {
966
+ filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
967
+ }
968
+
969
+ /* Icons
970
+ ----------------------------------*/
971
+
972
+ /* states and images */
973
+ .ui-icon {
974
+ width: 16px;
975
+ height: 16px;
976
+ }
977
+ .ui-widget-header .ui-icon {
978
+ background-image: url("images/ui-icons_ffffff_256x240.png") !important;
979
+ }
980
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
981
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
982
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
983
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
984
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
985
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
986
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
987
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
988
+
989
+ /* Misc visuals
990
+ ----------------------------------*/
991
+
992
+ /* Corner radius */
993
+ .ui-corner-all,
994
+ .ui-corner-top,
995
+ .ui-corner-left,
996
+ .ui-corner-tl {
997
+ border-top-left-radius: 4px;
998
+ }
999
+ .ui-corner-all,
1000
+ .ui-corner-top,
1001
+ .ui-corner-right,
1002
+ .ui-corner-tr {
1003
+ border-top-right-radius: 4px;
1004
+ }
1005
+ .ui-corner-all,
1006
+ .ui-corner-bottom,
1007
+ .ui-corner-left,
1008
+ .ui-corner-bl {
1009
+ border-bottom-left-radius: 4px;
1010
+ }
1011
+ .ui-corner-all,
1012
+ .ui-corner-bottom,
1013
+ .ui-corner-right,
1014
+ .ui-corner-br {
1015
+ border-bottom-right-radius: 4px;
1016
+ }
1017
+
1018
+ /* Overlays */
1019
+ .ui-widget-overlay {
1020
+ background: #666666;
1021
+ opacity: .5;
1022
+ filter: Alpha(Opacity=50); /* support: IE8 */
1023
+ }
1024
+ .ui-widget-shadow {
1025
+ margin: -5px 0 0 -5px;
1026
+ padding: 5px;
1027
+ background: #000000;
1028
+ opacity: .2;
1029
+ filter: Alpha(Opacity=20); /* support: IE8 */
1030
+ border-radius: 5px;
1031
+ }
assets/css/select2.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .select2-container,.select2-dropdown{z-index:999999 !important;}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
assets/css/welcome.css ADDED
@@ -0,0 +1 @@
 
1
+ .widgetopts-badge{position:absolute;top:0;right:0;color:#999;font-size:21px;text-align:center;margin:5px 0 0;width:150px}.widgetopts-badge .widgetopts-mascot{display:block;text-align:center;height:150px;width:150px;background:url("../images/logo-mascot.png");-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover}.widgetopts-badge .version{line-height:30px}.about-wrap .widgetopts-features-button{font-size:16px;height:auto;padding:8px 25px;margin-top:20px}.widgetopts-about-wrap.about-wrap p{max-width:100%}.about-wrap .widgetopts-features img{-webkit-transition:opacity .15s ease-in-out;-moz-transition:opacity .15s ease-in-out;-o-transition:opacity .15s ease-in-out;transition:opacity .15s ease-in-out;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=88);opacity:.88}.about-wrap .widgetopts-features img:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}
assets/css/widget-options.css ADDED
@@ -0,0 +1 @@
 
1
+ body .extendedwopts-show{display:none}body .widgetopts-hide_title .widget-title{display:none}body .extendedwopts-md-right{text-align:right}body .extendedwopts-md-left{text-align:left}body .extendedwopts-md-center{text-align:center}body .extendedwopts-md-justify{text-align:justify}@media screen and (min-width: 769px){body .extendedwopts-hide.extendedwopts-desktop{display:none}body .extendedwopts-show.extendedwopts-desktop{display:block}body .widget.clearfix-desktop{clear:both}}@media screen and (max-width: 768px) and (min-width: 737px){body .extendedwopts-hide.extendedwopts-tablet{display:none}body .extendedwopts-show.extendedwopts-tablet{display:block}body .widget.clearfix-desktop{clear:none}body .widget.clearfix-tablet{clear:both}}@media screen and (max-width: 736px){body .extendedwopts-hide.extendedwopts-mobile{display:none}body .extendedwopts-show.extendedwopts-mobile{display:block}body .widget.clearfix-desktop,body .widget.clearfix-tablet{clear:none}body .widget.clearfix-mobile{clear:both}}
assets/images/cover-book.jpg ADDED
Binary file
assets/images/logo-mascot.png ADDED
Binary file
assets/images/ui-icons_ffffff_256x240.png ADDED
Binary file
assets/js/admin.js ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $, window, document, undefined ) {
2
+ if( $('.extended-widget-opts-tabs').length > 0 ){
3
+ extended_widget_opts_init( '', 'loaded' );
4
+ }
5
+
6
+ $(document).ready(function(){
7
+ $(".widget-liquid-right .widget, .inactive-sidebar .widget, #accordion-panel-widgets .customize-control-widget_form").each(function (i, widget) {
8
+ extended_widget_opts_init( '', 'loaded' );
9
+ });
10
+ $(document).on('widget-added', function(event, widget) {
11
+ extended_widget_opts_init( widget, 'added' );
12
+
13
+ });
14
+ $(document).on('widget-updated', function(event, widget) {
15
+ extended_widget_opts_init( widget, 'updated' );
16
+ });
17
+ $(document).on( 'click', '.extended-widget-opts-inner-lists h4',function(){
18
+ getid = $(this).attr('id');
19
+ $('.extended-widget-opts-inner-lists .'+ getid).slideToggle(250);
20
+ } );
21
+
22
+ $(document).on( 'click', '.widget-opts-toggler-note',function(e){
23
+ $(this).parent('p').parent('.widget-opts-logic').find('.widget-opts-toggle-note').slideToggle(250);
24
+
25
+ e.preventDefault();
26
+ e.stopPropagation();
27
+ } );
28
+
29
+ //admin settings
30
+ $(document).on( 'click', '.opts-add-class-btn',function(e){
31
+ getVal = $('.opts-add-class-txtfld').val();
32
+ var fname = 'extwopts_class_settings[classlists][]';
33
+ if( $(this).hasClass('widgetopts-add-class-btn') ){
34
+ fname = 'classes[classlists][]';
35
+ }
36
+ if( getVal.length > 0 ){
37
+ $('#opts-predefined-classes ul').append('<li><input type="hidden" name="'+ fname +'" value="'+ getVal +'" /><span class"opts-li-value">'+ getVal +'</span> <a href="#" class="opts-remove-class-btn"><span class="dashicons dashicons-dismiss"></span></a></li>');
38
+ $('.opts-add-class-txtfld').val('');
39
+ }
40
+
41
+ e.preventDefault();
42
+ e.stopPropagation();
43
+ } );
44
+
45
+ $(document).on( 'click', '.opts-remove-class-btn',function(e){
46
+ $(this).parent('li').fadeOut('fast',function(){
47
+ $(this).remove();
48
+ });
49
+ e.preventDefault();
50
+ e.stopPropagation();
51
+ } );
52
+
53
+ if( $('.wp-admin.widgets-php .wrap a.page-title-action').length > 0 ){
54
+ $('.wp-admin.widgets-php .wrap a.page-title-action').after('<a href="'+ widgetopts10n.opts_page +'" class="page-title-action hide-if-no-customize">'+ widgetopts10n.translation.manage_settings +'</a>');
55
+ }
56
+ });
57
+
58
+ function extended_widget_opts_init( widget, action ){
59
+ selected = 0;
60
+ selected_visibility = 0;
61
+ selected_settings = 0;
62
+ if( '' != widget ){
63
+ if( $( '#' + widget.attr('id') ).find('#extended-widget-opts-selectedtab').length > 0 ){
64
+ selected = $( '#' + widget.attr('id') ).find('#extended-widget-opts-selectedtab').val();
65
+ selected = parseInt( selected );
66
+ }
67
+
68
+ if( $( '#' + widget.attr('id') ).find('#extended-widget-opts-visibility-selectedtab').length > 0 ){
69
+ selected_visibility = $( '#' + widget.attr('id') ).find('#extended-widget-opts-visibility-selectedtab').val();
70
+ selected_visibility = parseInt( selected_visibility );
71
+ }
72
+
73
+ if( $( '#' + widget.attr('id') ).find('#extended-widget-opts-settings-selectedtab').length > 0 ){
74
+ selected_settings = $( '#' + widget.attr('id') ).find('#extended-widget-opts-settings-selectedtab').val();
75
+ selected_settings = parseInt( selected_settings );
76
+ }
77
+ }
78
+ if( action == 'added' ){
79
+ selected = 0;
80
+ selected_visibility = 0;
81
+ selected_settings = 0;
82
+ }
83
+
84
+ if( '' != widget ){
85
+ if( $( '#' + widget.attr('id') ).find('.extended-widget-opts-tabs').length > 0 ){
86
+ $( '#' + widget.attr('id') ).find('.extended-widget-opts-tabs').tabs({ active: selected });
87
+ }
88
+ if( $( '#' + widget.attr('id') ).find('.extended-widget-opts-visibility-tabs').length > 0 ){
89
+ $( '#' + widget.attr('id') ).find('.extended-widget-opts-visibility-tabs').tabs({ active: selected_visibility });
90
+ }
91
+ if( $( '#' + widget.attr('id') ).find('.extended-widget-opts-settings-tabs').length > 0 ){
92
+ $( '#' + widget.attr('id') ).find('.extended-widget-opts-settings-tabs').tabs({ active: selected_settings });
93
+ }
94
+
95
+ }else{
96
+ $('.extended-widget-opts-tabs').tabs({ active: selected });
97
+ $('.extended-widget-opts-visibility-tabs').tabs({ active: selected_visibility });
98
+ $('.extended-widget-opts-settings-tabs').tabs({ active: selected_settings });
99
+ }
100
+
101
+ $('.extended-widget-opts-tabs').click('tabsselect', function (event, ui) {
102
+ if( $(this).find('#extended-widget-opts-selectedtab').length > 0 ){
103
+ $(this).find('#extended-widget-opts-selectedtab').val( $(this).tabs('option', 'active') );
104
+ }
105
+ });
106
+
107
+ $('.extended-widget-opts-visibility-tabs').click('tabsselect', function (event, ui) {
108
+ if( $(this).find('#extended-widget-opts-visibility-selectedtab').length > 0 ){
109
+ $(this).find('#extended-widget-opts-visibility-selectedtab').val( $(this).tabs('option', 'active') );
110
+ }
111
+ });
112
+
113
+ $('.extended-widget-opts-settings-tabs').click('tabsselect', function (event, ui) {
114
+ if( $(this).find('#extended-widget-opts-settings-selectedtab').length > 0 ){
115
+ $(this).find('#extended-widget-opts-settings-selectedtab').val( $(this).tabs('option', 'active') );
116
+ }
117
+ });
118
+
119
+ $('.extended-widget-opts-date').datepicker({
120
+ //comment the beforeShow handler if you want to see the ugly overlay
121
+ beforeShow: function() {
122
+ setTimeout(function(){
123
+ $('.ui-datepicker').css('z-index', 99999999999999);
124
+ }, 0);
125
+ }
126
+ });
127
+ }
128
+ })( jQuery, window, document );
assets/js/jquery.liveFilter.js ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery.liveFilter
3
+ *
4
+ * Copyright (c) 2009 Mike Merritt
5
+ *
6
+ * Forked by Lim Chee Aun (cheeaun.com)
7
+ *
8
+ */
9
+
10
+ (function($){
11
+ $.fn.liveFilter = function(inputEl, filterEl, options){
12
+ var defaults = {
13
+ filterChildSelector: null,
14
+ filter: function(el, val){
15
+ return $(el).text().toUpperCase().indexOf(val.toUpperCase()) >= 0;
16
+ },
17
+ before: function(){},
18
+ after: function(){}
19
+ };
20
+ var options = $.extend(defaults, options);
21
+
22
+ var el = $(this).find(filterEl);
23
+ if (options.filterChildSelector) el = el.find(options.filterChildSelector);
24
+
25
+ var filter = options.filter;
26
+ $(inputEl).keyup(function(){
27
+ var val = $(this).val();
28
+ var contains = el.filter(function(){
29
+ return filter(this, val);
30
+ });
31
+ var containsNot = el.not(contains);
32
+ if (options.filterChildSelector){
33
+ contains = contains.parents(filterEl);
34
+ containsNot = containsNot.parents(filterEl).hide();
35
+ }
36
+
37
+ options.before.call(this, contains, containsNot);
38
+
39
+ contains.show();
40
+ containsNot.hide();
41
+
42
+ if (val === '') {
43
+ contains.show();
44
+ containsNot.show();
45
+ }
46
+
47
+ options.after.call(this, contains, containsNot);
48
+ });
49
+ }
50
+ })(jQuery);
assets/js/jquery.liveFilter.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){e.fn.liveFilter=function(t,i,r){var n={filterChildSelector:null,filter:function(t,i){return e(t).text().toUpperCase().indexOf(i.toUpperCase())>=0},before:function(){},after:function(){}},r=e.extend(n,r),l=e(this).find(i);r.filterChildSelector&&(l=l.find(r.filterChildSelector));var f=r.filter;e(t).keyup(function(){var t=e(this).val(),n=l.filter(function(){return f(this,t)}),o=l.not(n);r.filterChildSelector&&(n=n.parents(i),o=o.parents(i).hide()),r.before.call(this,n,o),n.show(),o.hide(),""===t&&(n.show(),o.show()),r.after.call(this,n,o)})}}(jQuery);
assets/js/jquery.widgetopts.beaver.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ var widgetoptsBeaverModule = {
4
+ init: function() {
5
+ var self = this;
6
+ jQuery( '.widgetopts-module-settings-container' ).hide();
7
+
8
+ self.bindEvents();
9
+ },
10
+
11
+ bindEvents: function() {
12
+ var self = this;
13
+ var $body = jQuery( 'body' );
14
+
15
+ $body.on( 'click', '.fl-builder-widgetopts-tab a', self.navClick );
16
+
17
+ },
18
+
19
+ navClick: function( e ) {
20
+ e.preventDefault();
21
+ jQuery( '.widgetopts-s-active' ).removeClass( 'widgetopts-s-active' );
22
+ jQuery( '#fl-builder-settings-tab-widgetopts .fl-builder-settings-section' ).hide();
23
+ jQuery( jQuery( this ).attr('href') ).show();
24
+ jQuery( this ).addClass( 'widgetopts-s-active' );
25
+ }
26
+ }
27
+
28
+ jQuery(document).ready(function() {
29
+ widgetoptsBeaverModule.init();
30
+ });
assets/js/jquery.widgetopts.beaver.min.js ADDED
@@ -0,0 +1 @@
 
1
+ "use strict";var widgetoptsBeaverModule={init:function(){var t=this;jQuery(".widgetopts-module-settings-container").hide(),t.bindEvents()},bindEvents:function(){var t=this;jQuery("body").on("click",".fl-builder-widgetopts-tab a",t.navClick)},navClick:function(t){t.preventDefault(),jQuery(".widgetopts-s-active").removeClass("widgetopts-s-active"),jQuery("#fl-builder-settings-tab-widgetopts .fl-builder-settings-section").hide(),jQuery(jQuery(this).attr("href")).show(),jQuery(this).addClass("widgetopts-s-active")}};jQuery(document).ready(function(){widgetoptsBeaverModule.init()});
assets/js/select2-settings.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+
3
+ WidgetOptsSelect2 = {
4
+ _init: function()
5
+ {
6
+ $('select.widgetopts-select2').each(function() {
7
+ $(this).select2({
8
+ width: '100%',
9
+ allowClear: true,
10
+ placeholder: ' '
11
+ }).on('change', $.proxy(WidgetOptsSelect2._maybePreview, this.context))
12
+ .on('select2:unselecting', function(e) {
13
+ $(this).data('unselecting', true);
14
+ }).on('select2:open', function(e) { // note the open event is important
15
+ if ($(this).data('unselecting')) {
16
+ $(this).removeData('unselecting'); // you need to unset this before close
17
+ $(this).select2('close');
18
+ }
19
+ }).on('select2:unselect', function(e) { // note the open event is important
20
+ if( !$(this).val() ){
21
+ $(this).val("").trigger('change');
22
+ }
23
+ });
24
+
25
+ if($(this).attr('multiple')) {
26
+ var ul = $(this).siblings('.select2-container').first('ul.select2-selection__rendered');
27
+ ul.sortable({
28
+ placeholder : 'ui-state-highlight',
29
+ forcePlaceholderSize: true,
30
+ items : 'li:not(.select2-search__field)',
31
+ tolerance : 'pointer',
32
+ stop: function() {
33
+ $($(ul).find('.select2-selection__choice').get().reverse()).each(function() {
34
+ var id = $(this).data('data').id;
35
+ var option = $(this).find('option[value="' + id + '"]')[0];
36
+ $(this).prepend(option);
37
+ });
38
+ }
39
+ });
40
+ }
41
+ });
42
+ },
43
+
44
+ _maybePreview: function() {
45
+ var e = {
46
+ target: this
47
+ };
48
+
49
+ var field = $(this).closest('.fl-field');
50
+ var previewType = field.data('preview');
51
+
52
+ if ('refresh' == previewType.type) {
53
+ FLBuilder.preview.delayPreview(e);
54
+ }
55
+ }
56
+ }
57
+
58
+ FLBuilder.addHook('settings-form-init', function() {
59
+ WidgetOptsSelect2._init();
60
+ });
61
+
62
+ })(jQuery);
assets/js/select2-settings.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){WidgetOptsSelect2={_init:function(){e("select.widgetopts-select2").each(function(){if(e(this).select2({width:"100%",allowClear:!0,placeholder:" "}).on("change",e.proxy(WidgetOptsSelect2._maybePreview,this.context)).on("select2:unselecting",function(t){e(this).data("unselecting",!0)}).on("select2:open",function(t){e(this).data("unselecting")&&(e(this).removeData("unselecting"),e(this).select2("close"))}).on("select2:unselect",function(t){e(this).val()||e(this).val("").trigger("change")}),e(this).attr("multiple")){var t=e(this).siblings(".select2-container").first("ul.select2-selection__rendered");t.sortable({placeholder:"ui-state-highlight",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){e(e(t).find(".select2-selection__choice").get().reverse()).each(function(){var t=e(this).data("data").id,i=e(this).find('option[value="'+t+'"]')[0];e(this).prepend(i)})}})}})},_maybePreview:function(){var t={target:this};"refresh"==e(this).closest(".fl-field").data("preview").type&&FLBuilder.preview.delayPreview(t)}},FLBuilder.addHook("settings-form-init",function(){WidgetOptsSelect2._init()})}(jQuery);
assets/js/select2.min.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&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."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={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};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<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")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),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(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<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=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var 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","â’¸":"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","Ç„":"DZ","Dz":"Dz","Ç…":"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","â’»":"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","Ⓝ":"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","Ꝏ":"OO","È¢":"OU","â“…":"P","ï¼°":"P","á¹”":"P","á¹–":"P","Ƥ":"P","â±£":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","ï¼±":"Q","Ꝗ":"Q","Ꝙ":"Q","ÉŠ":"Q","Ⓡ":"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","Ⓣ":"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","â“‹":"V","V":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","Ꝟ":"V","É…":"V","ê ":"VY","â“Œ":"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","Ⓩ":"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","â“•":"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","â“ž":"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","â“¢":"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","ꜩ":"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","ꝡ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","ÎŒ":"Ο","ÎŽ":"Î¥","Ϋ":"Î¥","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ÏŠ":"ι","ΐ":"ι","ÏŒ":"ο","ύ":"Ï…","Ï‹":"Ï…","ΰ":"Ï…","ω":"ω","Ï‚":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){
2
+ var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),void 0!==a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=(i.text||"").toUpperCase(),l=(b.term||"").toUpperCase(),m=k===l;if(m||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var n=e.createTag(b);if(null!=n){var o=e.option(n);o.attr("data-select2-tag",!0),e.addOptions([o]),e.insertTag(g,n)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<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=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.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(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.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.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.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."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.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)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.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",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){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==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.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 a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){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==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.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"),
3
+ this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
assets/js/settings.js ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "use strict";
2
+
3
+ var widgetoptsSettingsModule = {
4
+ init: function() {
5
+ var self = this;
6
+ jQuery( '.widgetopts-module-settings-container' ).hide();
7
+
8
+ self.bindEvents();
9
+ },
10
+
11
+ bindEvents: function() {
12
+ var self = this;
13
+ var $wpcontent = jQuery( '#wpcontent' );
14
+
15
+ $wpcontent.on( 'click', '.widgetopts-toggle-settings, .widgetopts-module-settings-cancel', self.openModal );
16
+ $wpcontent.on( 'click', '.widgetopts-close-modal, .widgetopts-modal-background', self.closeModal );
17
+ $wpcontent.on( 'keyup', self.closeModal );
18
+ $wpcontent.on( 'click', '.widgetopts-toggle-activation', self.moduleToggle );
19
+ $wpcontent.on( 'click', '.widgetopts-module-settings-save', self.saveSettings );
20
+ // $wpcontent.on( 'click', '.widgetopts-license-button', self.licenseHandler );
21
+ $wpcontent.on( 'click', '.opts-add-class-btn', self.toggleCustomClass );
22
+ $wpcontent.on( 'click', '.opts-remove-class-btn', self.removeCustomClass );
23
+ $wpcontent.on( 'click', '.widgetopts-delete-cache', self.clearWidgetCache );
24
+ $wpcontent.on( 'click', '.widgetopts-license_deactivate', self.deactivationHandler );
25
+
26
+ },
27
+
28
+ openModal: function( e ) {
29
+ e.preventDefault();
30
+
31
+ var $container = jQuery(this).parents( '.widgetopts-module-card' ).find( '.widgetopts-module-settings-container' ),
32
+ $modalBg = jQuery( '.widgetopts-modal-background' );
33
+
34
+ $modalBg.show();
35
+ $container
36
+ .show();
37
+
38
+ jQuery( 'body' ).addClass( 'widgetopts-modal-open' );
39
+ },
40
+
41
+ closeModal: function( e ) {
42
+ if ( 'undefined' !== typeof e ) {
43
+ e.preventDefault();
44
+
45
+ // For keyup events, only process esc
46
+ if ( 'keyup' === e.type && 27 !== e.which ) {
47
+ return;
48
+ }
49
+ }
50
+
51
+ jQuery( '.widgetopts-modal-background' ).hide();
52
+ jQuery( '.widgetopts-module-settings-container' ).hide();
53
+ jQuery( 'body' ).removeClass( 'widgetopts-modal-open' );
54
+ },
55
+
56
+ moduleToggle: function( e ) {
57
+ e.preventDefault();
58
+ e.stopPropagation();
59
+
60
+ var $button = jQuery(this),
61
+ $card = $button.parents( '.widgetopts-module-card' ),
62
+ $buttons = $card.find( '.widgetopts-toggle-activation' ),
63
+ module = $card.attr( 'data-module-id' );
64
+
65
+ $buttons.prop( 'disabled', true );
66
+
67
+ if ( $button.html() == widgetopts.translation.activate ) {
68
+ var method = 'activate';
69
+ } else {
70
+ var method = 'deactivate';
71
+ }
72
+
73
+ widgetoptsSettingsModule.ajaxRequest( module, method, {}, widgetoptsSettingsModule.moduleCallback );
74
+ },
75
+
76
+ moduleCallback: function( results ) {
77
+ var module = results.module;
78
+ var method = results.method;
79
+
80
+ var $card = jQuery( '#widgetopts-module-card-' + module ),
81
+ $buttons = $card.find( '.widgetopts-toggle-activation' );
82
+
83
+ if ( results.errors.length > 0 ) {
84
+ $buttons
85
+ .html( widgetopts.translations.error )
86
+ .addClass( 'button-secondary' )
87
+ .removeClass( 'button-primary' );
88
+
89
+ setTimeout( function() {
90
+ widgetoptsSettingsModule.isModuleActive( module );
91
+ }, 1000 );
92
+
93
+ return;
94
+ }
95
+
96
+ if ( 'activate' === method ) {
97
+ $buttons
98
+ .html( widgetopts.translation.deactivate )
99
+ .addClass( 'button-secondary' )
100
+ .removeClass( 'button-primary' )
101
+ .prop( 'disabled', false );
102
+
103
+ $card
104
+ .addClass( 'widgetopts-module-type-enabled' )
105
+ .removeClass( 'widgetopts-module-type-disabled' );
106
+
107
+ var newToggleSettingsLabel = widgetopts.translation.show_settings;
108
+ } else {
109
+ $buttons
110
+ .html( widgetopts.translation.activate )
111
+ .addClass( 'button-primary' )
112
+ .removeClass( 'button-secondary' )
113
+ .prop( 'disabled', false );
114
+
115
+ $card
116
+ .addClass( 'widgetopts-module-type-disabled' )
117
+ .removeClass( 'widgetopts-module-type-enabled' );
118
+
119
+ var newToggleSettingsLabel = widgetopts.translation.show_description;
120
+ }
121
+
122
+ // if( !$card.hasClass('widgetopts-module-card-no-settings') ){
123
+ $card.find( '.widgetopts-toggle-settings' ).html( newToggleSettingsLabel );
124
+ // }
125
+ },
126
+
127
+ saveSettings: function( e ) {
128
+ e.preventDefault();
129
+
130
+ var $button = jQuery(this);
131
+
132
+ if ( $button.hasClass( 'widgetopts-module-settings-save' ) ) {
133
+ var module = $button.parents( '.widgetopts-module-card' ).attr( 'data-module-id' );
134
+ } else {
135
+ var module = '';
136
+ }
137
+
138
+ $button.prop( 'disabled', true );
139
+
140
+ var data = {
141
+ '--widgetopts-form-serialized-data': jQuery( '#widgetopts-module-settings-form' ).serialize()
142
+ };
143
+
144
+ widgetoptsSettingsModule.ajaxRequest( module, 'save', data, widgetoptsSettingsModule.savingCallback );
145
+ },
146
+
147
+ savingCallback: function( results ) {
148
+ if ( '' === results.module ) {
149
+ jQuery( '#widgetopts-save' ).prop( 'disabled', false );
150
+ } else {
151
+ jQuery( '#widgetopts-module-card-' + results.module + ' button.widgetopts-module-settings-save' ).prop( 'disabled', false );
152
+ }
153
+
154
+ var $container = jQuery( '.widgetopts-module-cards-container' );
155
+ var view = 'grid';
156
+
157
+ // console.log( results );
158
+ widgetoptsSettingsModule.clearMessages();
159
+ if ( results.errors.length > 0 || ! results.closeModal ) {
160
+ widgetoptsSettingsModule.showMessages( results.messages, results.module, 'open' );
161
+ $container.find( '.widgetopts-module-settings-content-container:visible' ).animate( {'scrollTop': 0}, 'fast' );
162
+
163
+ } else {
164
+ widgetoptsSettingsModule.showMessages( results.messages, results.module, 'closed' );
165
+ $container.find( '.widgetopts-module-settings-content-container:visible' ).scrollTop( 0 );
166
+ widgetoptsSettingsModule.closeModal();
167
+ }
168
+ },
169
+
170
+ clearMessages: function() {
171
+ jQuery( '#widgetopts-settings-messages-container, .widgetopts-module-messages-container' ).empty();
172
+ },
173
+
174
+ showMessages: function( messages, module, containerStatus ) {
175
+ jQuery.each( messages, function( index, message ) {
176
+ widgetoptsSettingsModule.showMessage( message, module, containerStatus );
177
+ } );
178
+ },
179
+
180
+ showMessage: function( message, module, containerStatus ) {
181
+ var view = 'grid';
182
+
183
+ if ( 'closed' !== containerStatus && 'open' !== containerStatus ) {
184
+ containerStatus = 'closed';
185
+ }
186
+
187
+ if ( 'string' !== typeof module ) {
188
+ module = '';
189
+ }
190
+
191
+ if ( 'closed' === containerStatus || '' === module ) {
192
+ var container = jQuery( '#widgetopts-settings-messages-container' );
193
+
194
+ setTimeout( function() {
195
+ container.removeClass( 'visible' );
196
+ setTimeout( function() {
197
+ container.find( 'div' ).remove();
198
+ }, 500 );
199
+ }, 4000 );
200
+ } else {
201
+ var container = jQuery( '#widgetopts-module-card-' + module + ' .widgetopts-module-messages-container' );
202
+ }
203
+
204
+ container.append( '<div class="updated fade"><p><strong>' + message + '</strong></p></div>' ).addClass( 'visible' );
205
+ },
206
+
207
+
208
+ ajaxRequest: function( module, method, data, callback ) {
209
+ var postData = {
210
+ 'action': widgetopts.ajax_action,
211
+ 'nonce': widgetopts.ajax_nonce,
212
+ 'module': module,
213
+ 'method': method,
214
+ 'data': data,
215
+ };
216
+
217
+ jQuery.post( ajaxurl, postData )
218
+ .always(function( a, status, b ) {
219
+ widgetoptsSettingsModule.processAjaxResponse( a, status, b, module, method, data, callback );
220
+ });
221
+ },
222
+
223
+ processAjaxResponse: function( a, status, b, module, method, data, callback ) {
224
+ var results = {
225
+ 'module': module,
226
+ 'method': method,
227
+ 'data': data,
228
+ 'status': status,
229
+ 'license_status': null,
230
+ 'jqxhr': null,
231
+ 'success': false,
232
+ 'response': null,
233
+ 'button': null,
234
+ 'errors': [],
235
+ 'messages': [],
236
+ 'functionCalls': [],
237
+ 'redirect': false,
238
+ 'closeModal': true
239
+ };
240
+ // console.log( a );
241
+
242
+ a = jQuery.parseJSON( a );
243
+
244
+ if ( 'WIDGETOPTS_Response' === a.source && 'undefined' !== a.response ) {
245
+ // Successful response with a valid format.
246
+ results.jqxhr = b;
247
+ results.success = a.success;
248
+ results.response = a.response;
249
+ results.errors = a.errors;
250
+ results.messages = a.messages;
251
+ results.functionCalls = a.functionCalls;
252
+ results.redirect = a.redirect;
253
+ results.closeModal = a.closeModal;
254
+ results.button = a.button;
255
+
256
+ if( typeof results.license_status != 'undefined' ){
257
+ results.license_status = a.license_status;
258
+ }
259
+ }
260
+
261
+ if ( 'function' === typeof callback ) {
262
+ callback( results );
263
+ } else if ( 'function' === typeof console.log ) {
264
+ console.log( 'ERROR: Unable to handle settings AJAX request due to an invalid callback:', callback, {'data': postData, 'results': results} );
265
+ }
266
+
267
+ },
268
+
269
+ toggleCustomClass: function(e){
270
+ var getVal = jQuery('.opts-add-class-txtfld').val();
271
+ var fname = 'extwopts_class_settings[classlists][]';
272
+ if( jQuery(this).hasClass('widgetopts-add-class-btn') ){
273
+ fname = 'classes[classlists][]';
274
+ }
275
+ if( getVal.length > 0 ){
276
+ jQuery('#opts-predefined-classes ul').append('<li><input type="hidden" name="'+ fname +'" value="'+ getVal +'" /><span class"opts-li-value">'+ getVal +'</span> <a href="#" class="opts-remove-class-btn"><span class="dashicons dashicons-dismiss"></span></a></li>');
277
+ jQuery('.opts-add-class-txtfld').val('');
278
+ }
279
+
280
+ e.preventDefault();
281
+ e.stopPropagation();
282
+ },
283
+
284
+ removeCustomClass: function(e){
285
+ jQuery(this).parent('li').fadeOut('fast',function(){
286
+ jQuery(this).remove();
287
+ });
288
+ e.preventDefault();
289
+ e.stopPropagation();
290
+ },
291
+
292
+ clearWidgetCache: function( e ){
293
+ var $button = jQuery(this);
294
+ $button.prop( 'disabled', true );
295
+
296
+ widgetoptsSettingsModule.ajaxRequest( 'clear_cache', 'clear_cache', '', widgetoptsSettingsModule.clearWidgetCacheCallback );
297
+ return false;
298
+ },
299
+ clearWidgetCacheCallback: function( results ){
300
+ if( typeof results.response != 'undefined' ){
301
+ jQuery( '.widgetopts-delete-cache' ).after( '<span class="dashicons dashicons-yes widgetopts-cache-dashicons"></span>' );
302
+ jQuery( '.widgetopts-cache-dashicons' ).delay(2000).fadeOut(400);
303
+ jQuery( '.widgetopts-delete-cache' ).prop( 'disabled', false );
304
+ }
305
+ },
306
+
307
+ deactivationHandler: function(e){
308
+ e.preventDefault();
309
+
310
+ var fld;
311
+ var $button = jQuery(this);
312
+ $button.prop( 'disabled', true );
313
+
314
+ fld = jQuery( '#' + $button.attr('data-target') );
315
+ if( fld.val() != '' ){
316
+ var data = {
317
+ 'license-data': fld.val(),
318
+ 'license-action': 'deactivate',
319
+ 'shortname' : $button.attr('data-shortname'),
320
+ 'button': $button.attr('id')
321
+ };
322
+
323
+ widgetoptsSettingsModule.ajaxRequest( 'license_key', 'deactivate_license', data, widgetoptsSettingsModule.licenseDeactivationCallback );
324
+ }else{
325
+ fld.css({ 'border' : '1px solid red' });
326
+ $button.prop( 'disabled', false );
327
+ }
328
+ },
329
+
330
+ licenseDeactivationCallback: function( results ){
331
+ // console.log( results ); widgetopts-license-extended-response
332
+ if( typeof results.response != 'undefined' && typeof results.messages != 'undefined' && typeof results.button != 'undefined' ){
333
+ var $button = jQuery( '#' + results.button );
334
+
335
+ jQuery( '#' + $button.attr('data-target') ).before( '<span>' + results.messages[0] + '</span>' );
336
+ if( results.success == 'deactivated' ){
337
+ $button.parent('td').parent('tr').fadeOut();
338
+ jQuery( '#' + $button.attr('data-target') ).val('');
339
+ }
340
+ }else{
341
+ // jQuery('.widgetopts-license-key').css({ 'border' : '1px solid red' });
342
+ // jQuery('.widgetopts-license-status').fadeIn();
343
+ }
344
+
345
+ $button.prop( 'disabled', false );
346
+
347
+ }
348
+ }
349
+
350
+ jQuery(document).ready(function() {
351
+ widgetoptsSettingsModule.init();
352
+ });
assets/js/settings.min.js ADDED
@@ -0,0 +1 @@
 
1
+ "use strict";var widgetoptsSettingsModule={init:function(){var e=this;jQuery(".widgetopts-module-settings-container").hide(),e.bindEvents()},bindEvents:function(){var e=this,t=jQuery("#wpcontent");t.on("click",".widgetopts-toggle-settings, .widgetopts-module-settings-cancel",e.openModal),t.on("click",".widgetopts-close-modal, .widgetopts-modal-background",e.closeModal),t.on("keyup",e.closeModal),t.on("click",".widgetopts-toggle-activation",e.moduleToggle),t.on("click",".widgetopts-module-settings-save",e.saveSettings),t.on("click",".opts-add-class-btn",e.toggleCustomClass),t.on("click",".opts-remove-class-btn",e.removeCustomClass),t.on("click",".widgetopts-delete-cache",e.clearWidgetCache),t.on("click",".widgetopts-license_deactivate",e.deactivationHandler)},openModal:function(e){e.preventDefault();var t=jQuery(this).parents(".widgetopts-module-card").find(".widgetopts-module-settings-container");jQuery(".widgetopts-modal-background").show(),t.show(),jQuery("body").addClass("widgetopts-modal-open")},closeModal:function(e){void 0!==e&&(e.preventDefault(),"keyup"===e.type&&27!==e.which)||(jQuery(".widgetopts-modal-background").hide(),jQuery(".widgetopts-module-settings-container").hide(),jQuery("body").removeClass("widgetopts-modal-open"))},moduleToggle:function(e){e.preventDefault(),e.stopPropagation();var t=jQuery(this),s=t.parents(".widgetopts-module-card"),o=s.find(".widgetopts-toggle-activation"),a=s.attr("data-module-id");if(o.prop("disabled",!0),t.html()==widgetopts.translation.activate)var i="activate";else var i="deactivate";widgetoptsSettingsModule.ajaxRequest(a,i,{},widgetoptsSettingsModule.moduleCallback)},moduleCallback:function(e){var t=e.module,s=e.method,o=jQuery("#widgetopts-module-card-"+t),a=o.find(".widgetopts-toggle-activation");if(e.errors.length>0)return a.html(widgetopts.translations.error).addClass("button-secondary").removeClass("button-primary"),void setTimeout(function(){widgetoptsSettingsModule.isModuleActive(t)},1e3);if("activate"===s){a.html(widgetopts.translation.deactivate).addClass("button-secondary").removeClass("button-primary").prop("disabled",!1),o.addClass("widgetopts-module-type-enabled").removeClass("widgetopts-module-type-disabled");var i=widgetopts.translation.show_settings}else{a.html(widgetopts.translation.activate).addClass("button-primary").removeClass("button-secondary").prop("disabled",!1),o.addClass("widgetopts-module-type-disabled").removeClass("widgetopts-module-type-enabled");var i=widgetopts.translation.show_description}o.find(".widgetopts-toggle-settings").html(i)},saveSettings:function(e){e.preventDefault();var t=jQuery(this);if(t.hasClass("widgetopts-module-settings-save"))var s=t.parents(".widgetopts-module-card").attr("data-module-id");else var s="";t.prop("disabled",!0);var o={"--widgetopts-form-serialized-data":jQuery("#widgetopts-module-settings-form").serialize()};widgetoptsSettingsModule.ajaxRequest(s,"save",o,widgetoptsSettingsModule.savingCallback)},savingCallback:function(e){""===e.module?jQuery("#widgetopts-save").prop("disabled",!1):jQuery("#widgetopts-module-card-"+e.module+" button.widgetopts-module-settings-save").prop("disabled",!1);var t=jQuery(".widgetopts-module-cards-container");widgetoptsSettingsModule.clearMessages(),e.errors.length>0||!e.closeModal?(widgetoptsSettingsModule.showMessages(e.messages,e.module,"open"),t.find(".widgetopts-module-settings-content-container:visible").animate({scrollTop:0},"fast")):(widgetoptsSettingsModule.showMessages(e.messages,e.module,"closed"),t.find(".widgetopts-module-settings-content-container:visible").scrollTop(0),widgetoptsSettingsModule.closeModal())},clearMessages:function(){jQuery("#widgetopts-settings-messages-container, .widgetopts-module-messages-container").empty()},showMessages:function(e,t,s){jQuery.each(e,function(e,o){widgetoptsSettingsModule.showMessage(o,t,s)})},showMessage:function(e,t,s){if("closed"!==s&&"open"!==s&&(s="closed"),"string"!=typeof t&&(t=""),"closed"===s||""===t){var o=jQuery("#widgetopts-settings-messages-container");setTimeout(function(){o.removeClass("visible"),setTimeout(function(){o.find("div").remove()},500)},4e3)}else var o=jQuery("#widgetopts-module-card-"+t+" .widgetopts-module-messages-container");o.append('<div class="updated fade"><p><strong>'+e+"</strong></p></div>").addClass("visible")},ajaxRequest:function(e,t,s,o){var a={action:widgetopts.ajax_action,nonce:widgetopts.ajax_nonce,module:e,method:t,data:s};jQuery.post(ajaxurl,a).always(function(a,i,d){widgetoptsSettingsModule.processAjaxResponse(a,i,d,e,t,s,o)})},processAjaxResponse:function(e,t,s,o,a,i,d){var n={module:o,method:a,data:i,status:t,license_status:null,jqxhr:null,success:!1,response:null,button:null,errors:[],messages:[],functionCalls:[],redirect:!1,closeModal:!0};e=jQuery.parseJSON(e),"WIDGETOPTS_Response"===e.source&&"undefined"!==e.response&&(n.jqxhr=s,n.success=e.success,n.response=e.response,n.errors=e.errors,n.messages=e.messages,n.functionCalls=e.functionCalls,n.redirect=e.redirect,n.closeModal=e.closeModal,n.button=e.button,void 0!==n.license_status&&(n.license_status=e.license_status)),"function"==typeof d?d(n):"function"==typeof console.log&&console.log("ERROR: Unable to handle settings AJAX request due to an invalid callback:",d,{data:postData,results:n})},toggleCustomClass:function(e){var t=jQuery(".opts-add-class-txtfld").val(),s="extwopts_class_settings[classlists][]";jQuery(this).hasClass("widgetopts-add-class-btn")&&(s="classes[classlists][]"),t.length>0&&(jQuery("#opts-predefined-classes ul").append('<li><input type="hidden" name="'+s+'" value="'+t+'" /><span class"opts-li-value">'+t+'</span> <a href="#" class="opts-remove-class-btn"><span class="dashicons dashicons-dismiss"></span></a></li>'),jQuery(".opts-add-class-txtfld").val("")),e.preventDefault(),e.stopPropagation()},removeCustomClass:function(e){jQuery(this).parent("li").fadeOut("fast",function(){jQuery(this).remove()}),e.preventDefault(),e.stopPropagation()},clearWidgetCache:function(e){return jQuery(this).prop("disabled",!0),widgetoptsSettingsModule.ajaxRequest("clear_cache","clear_cache","",widgetoptsSettingsModule.clearWidgetCacheCallback),!1},clearWidgetCacheCallback:function(e){void 0!==e.response&&(jQuery(".widgetopts-delete-cache").after('<span class="dashicons dashicons-yes widgetopts-cache-dashicons"></span>'),jQuery(".widgetopts-cache-dashicons").delay(2e3).fadeOut(400),jQuery(".widgetopts-delete-cache").prop("disabled",!1))},deactivationHandler:function(e){e.preventDefault();var t,s=jQuery(this);if(s.prop("disabled",!0),t=jQuery("#"+s.attr("data-target")),""!=t.val()){var o={"license-data":t.val(),"license-action":"deactivate",shortname:s.attr("data-shortname"),button:s.attr("id")};widgetoptsSettingsModule.ajaxRequest("license_key","deactivate_license",o,widgetoptsSettingsModule.licenseDeactivationCallback)}else t.css({border:"1px solid red"}),s.prop("disabled",!1)},licenseDeactivationCallback:function(e){if(void 0!==e.response&&void 0!==e.messages&&void 0!==e.button){var t=jQuery("#"+e.button);jQuery("#"+t.attr("data-target")).before("<span>"+e.messages[0]+"</span>"),"deactivated"==e.success&&(t.parent("td").parent("tr").fadeOut(),jQuery("#"+t.attr("data-target")).val(""))}t.prop("disabled",!1)}};jQuery(document).ready(function(){widgetoptsSettingsModule.init()});
assets/js/widgets.js ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $, window, document, undefined ) {
2
+ if( $('.extended-widget-opts-tabs').length > 0 ){
3
+ extended_widget_opts_init( '', 'loaded' );
4
+ }
5
+
6
+ $(document).ready(function(){
7
+ $(".widget-liquid-right .widget, .inactive-sidebar .widget, #accordion-panel-widgets .customize-control-widget_form").each(function (i, widget) {
8
+ extended_widget_opts_init( '', 'loaded' );
9
+ });
10
+ $(document).on('widget-added', function(event, widget) {
11
+ extended_widget_opts_init( widget, 'added' );
12
+
13
+ // if( $( '.widgets-chooser .widgets-chooser-sidebars' ).length > 0 ){
14
+ // $( '.widgets-chooser .widgets-chooser-sidebars li' ).removeClass( 'widgetopts-is-hidden' );
15
+ // }
16
+ //
17
+ // if( $( '#widgetopts-search-chooser' ).length > 0 ){
18
+ // $( '#widgetopts-search-chooser' ).val('');
19
+ // }
20
+
21
+ });
22
+ $(document).on('widget-updated', function(event, widget) {
23
+ extended_widget_opts_init( widget, 'updated' );
24
+ });
25
+ $(document).on( 'click', '.extended-widget-opts-inner-lists h4',function(){
26
+ getid = $(this).attr('id');
27
+ $('.extended-widget-opts-inner-lists .'+ getid).slideToggle(250);
28
+ } );
29
+ $(document).on( 'click', '.widget-opts-toggler-note',function(e){
30
+ $(this).parent('p').parent('.widget-opts-logic').find('.widget-opts-toggle-note').slideToggle(250);
31
+
32
+ e.preventDefault();
33
+ e.stopPropagation();
34
+ } );
35
+
36
+ //admin settings
37
+ $(document).on( 'click', '.opts-add-class-btn',function(e){
38
+ getVal = $('.opts-add-class-txtfld').val();
39
+ var fname = 'extwopts_class_settings[classlists][]';
40
+ if( $(this).hasClass('widgetopts-add-class-btn') ){
41
+ fname = 'classes[classlists][]';
42
+ }
43
+ if( getVal.length > 0 ){
44
+ $('#opts-predefined-classes ul').append('<li><input type="hidden" name="'+ fname +'" value="'+ getVal +'" /><span class"opts-li-value">'+ getVal +'</span> <a href="#" class="opts-remove-class-btn"><span class="dashicons dashicons-dismiss"></span></a></li>');
45
+ $('.opts-add-class-txtfld').val('');
46
+ }
47
+
48
+ e.preventDefault();
49
+ e.stopPropagation();
50
+ } );
51
+ $(document).on( 'click', '.opts-remove-class-btn',function(e){
52
+ $(this).parent('li').fadeOut('fast',function(){
53
+ $(this).remove();
54
+ });
55
+ e.preventDefault();
56
+ e.stopPropagation();
57
+ } );
58
+
59
+ if( $('.wp-admin.widgets-php .wrap a.page-title-action').length > 0 ){
60
+ $('.wp-admin.widgets-php .wrap a.page-title-action').after('<a href="'+ widgetopts10n.opts_page +'" class="page-title-action hide-if-no-customize">'+ widgetopts10n.translation.manage_settings +'</a>');
61
+ }
62
+
63
+ //add live filter
64
+ if ( typeof $.fn.liveFilter !== 'undefined' && $.isFunction( $.fn.liveFilter ) && $( '#widgetopts-widgets-search' ).length > 0 ) {
65
+ // Add separator to distinguish between visible and hidden widgets
66
+ $('.widget:last-of-type').after('<div class="widgetopts-separator" />');
67
+
68
+ // Add data attribute for order to each widget
69
+ $('#widgets-left .widget').each(function() {
70
+ var index = $(this).index() + 1;
71
+ $(this).attr( 'data-widget-index', index );
72
+ });
73
+
74
+ // Add liveFilter : credits to https://wordpress.org/plugins/widget-search-filter/ plugin
75
+ $('#widgets-left').liveFilter('#widgetopts-widgets-search', '.widget', {
76
+ filterChildSelector: '.widget-title h4, .widget-title h3',
77
+ after: function(contains, containsNot) {
78
+
79
+ // Move all hidden widgets to end.
80
+ containsNot.each(function() {
81
+ $(this).insertAfter($(this).parent().find('.widgetopts-separator'));
82
+ });
83
+
84
+ // Sort all visible widgets by original index
85
+ contains.sort(function(a,b) {
86
+ return a.getAttribute('data-widget-index') - b.getAttribute('data-widget-index');
87
+ });
88
+
89
+ // Move all visible back
90
+ contains.each(function() {
91
+ $(this).insertBefore($(this).parent().find('.widgetopts-separator'));
92
+ });
93
+
94
+ }
95
+ });
96
+
97
+ //add clear search
98
+ $( '#wpbody-content' ).on( 'keyup', '.widgetopts-widgets-search', function(e){
99
+ p = $(this).parent().find( '.widgetopts-clear-results' );
100
+ if ( '' !== $(this).val() ) {
101
+ p.addClass( 'widgetopts-is-visible' );
102
+ }else{
103
+ p.removeClass( 'widgetopts-is-visible' );
104
+ }
105
+ } );
106
+
107
+ $( '#wpbody-content' ).on( 'click', '.widgetopts-clear-results', function(e){
108
+ s = $(this).parent().find( '.widgetopts-widgets-search' );
109
+ s.val( '' ).focus().trigger( 'keyup' );
110
+
111
+ if( s.attr( 'id' ) == 'widgetopts-search-chooser' ){
112
+ $( '.widgets-chooser-sidebars li:not(:first)' ).removeClass( 'widgets-chooser-selected' );
113
+ }
114
+
115
+ e.preventDefault();
116
+ e.stopPropagation();
117
+ return false;
118
+ } );
119
+
120
+ //add sidebar chooser search field
121
+ $('.widgets-chooser').prepend( widgetopts10n.search_form );
122
+ //live filter
123
+ $('.widgets-chooser').liveFilter('#widgetopts-search-chooser', '.widgets-chooser-sidebars li', {
124
+ // filterChildSelector: 'li',
125
+ after: function( contains, containsNot ) {
126
+ //hide
127
+ containsNot.each(function() {
128
+ $(this).addClass( 'widgetopts-is-hidden' ).removeClass( 'widgets-chooser-selected' );
129
+ });
130
+ contains.each(function() {
131
+ $(this).removeClass( 'widgetopts-is-hidden' ).removeClass( 'widgets-chooser-selected' );
132
+ });
133
+ if( contains.length > 0 ){
134
+ $( contains[0] ).addClass( 'widgets-chooser-selected' );
135
+ }
136
+
137
+ }
138
+ });
139
+
140
+ // if( $( '.widgets-chooser-cancel' ).length > 0 ){
141
+ // $('.widgets-chooser').on( 'click', '.widgets-chooser-cancel', function(e){
142
+ // if( $( '.widgets-chooser .widgets-chooser-sidebars' ).length > 0 ){
143
+ // $( '.widgets-chooser .widgets-chooser-sidebars li' ).removeClass( 'widgetopts-is-hidden' );
144
+ // }
145
+ //
146
+ // if( $( '#widgetopts-search-chooser' ).length > 0 ){
147
+ // $( '#widgetopts-search-chooser' ).val('');
148
+ // }
149
+ // });
150
+ // }
151
+
152
+ }
153
+
154
+ });
155
+
156
+ function extended_widget_opts_init( widget, action ){
157
+ selected = 0;
158
+ selected_visibility = 0;
159
+ selected_settings = 0;
160
+ in_customizer = false;
161
+ // check for wp.customize return boolean
162
+ if ( typeof wp !== 'undefined' ) {
163
+ in_customizer = typeof wp.customize !== 'undefined' ? true : false;
164
+ }
165
+ if( '' != widget ){
166
+ if( $( '#' + widget.attr('id') ).find('#extended-widget-opts-selectedtab').length > 0 ){
167
+ selected = $( '#' + widget.attr('id') ).find('#extended-widget-opts-selectedtab').val();
168
+ selected = parseInt( selected );
169
+ }
170
+
171
+ if( $( '#' + widget.attr('id') ).find('#extended-widget-opts-visibility-selectedtab').length > 0 ){
172
+ selected_visibility = $( '#' + widget.attr('id') ).find('#extended-widget-opts-visibility-selectedtab').val();
173
+ selected_visibility = parseInt( selected_visibility );
174
+ }
175
+
176
+ if( $( '#' + widget.attr('id') ).find('#extended-widget-opts-visibility-selectedtab').length > 0 ){
177
+ selected_settings = $( '#' + widget.attr('id') ).find('#extended-widget-opts-settings-selectedtab').val();
178
+ selected_settings = parseInt( selected_settings );
179
+ }
180
+ // console.log( in_customizer );
181
+ }
182
+ if( action == 'added' ){
183
+ selected = 0;
184
+ selected_visibility = 0;
185
+ selected_settings = 0;
186
+ }
187
+
188
+ if( '' != widget ){
189
+ if( $( '#' + widget.attr('id') ).find('.extended-widget-opts-tabs').length > 0 ){
190
+ $( '#' + widget.attr('id') ).find('.extended-widget-opts-tabs').tabs({ active: selected });
191
+ }
192
+ if( $( '#' + widget.attr('id') ).find('.extended-widget-opts-visibility-tabs').length > 0 ){
193
+ $( '#' + widget.attr('id') ).find('.extended-widget-opts-visibility-tabs').tabs({ active: selected_visibility });
194
+ }
195
+ if( $( '#' + widget.attr('id') ).find('.extended-widget-opts-settings-tabs').length > 0 ){
196
+ $( '#' + widget.attr('id') ).find('.extended-widget-opts-settings-tabs').tabs({ active: selected_settings });
197
+ }
198
+ }else{
199
+ $('.extended-widget-opts-tabs').tabs({ active: selected });
200
+ $('.extended-widget-opts-visibility-tabs').tabs({ active: selected_visibility });
201
+ $('.extended-widget-opts-settings-tabs').tabs({ active: selected_settings });
202
+ }
203
+
204
+ $('.extended-widget-opts-tabs').click('tabsselect', function (event, ui) {
205
+ if( $(this).find('#extended-widget-opts-selectedtab').length > 0 ){
206
+ $(this).find('#extended-widget-opts-selectedtab').val( $(this).tabs('option', 'active') );
207
+ }
208
+ });
209
+
210
+ $('.extended-widget-opts-visibility-tabs').click('tabsselect', function (event, ui) {
211
+ if( $(this).find('#extended-widget-opts-visibility-selectedtab').length > 0 ){
212
+ $(this).find('#extended-widget-opts-visibility-selectedtab').val( $(this).tabs('option', 'active') );
213
+ }
214
+ });
215
+
216
+ $('.extended-widget-opts-settings-tabs').click('tabsselect', function (event, ui) {
217
+ if( $(this).find('#extended-widget-opts-settings-selectedtab').length > 0 ){
218
+ $(this).find('#extended-widget-opts-settings-selectedtab').val( $(this).tabs('option', 'active') );
219
+ }
220
+ });
221
+ }
222
+ })( jQuery, window, document );
assets/js/widgets.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t,e,i,d){function n(e,i){selected=0,selected_visibility=0,selected_settings=0,in_customizer=!1,"undefined"!=typeof wp&&(in_customizer=void 0!==wp.customize),""!=e&&(t("#"+e.attr("id")).find("#extended-widget-opts-selectedtab").length>0&&(selected=t("#"+e.attr("id")).find("#extended-widget-opts-selectedtab").val(),selected=parseInt(selected)),t("#"+e.attr("id")).find("#extended-widget-opts-visibility-selectedtab").length>0&&(selected_visibility=t("#"+e.attr("id")).find("#extended-widget-opts-visibility-selectedtab").val(),selected_visibility=parseInt(selected_visibility)),t("#"+e.attr("id")).find("#extended-widget-opts-visibility-selectedtab").length>0&&(selected_settings=t("#"+e.attr("id")).find("#extended-widget-opts-settings-selectedtab").val(),selected_settings=parseInt(selected_settings))),"added"==i&&(selected=0,selected_visibility=0,selected_settings=0),""!=e?(t("#"+e.attr("id")).find(".extended-widget-opts-tabs").length>0&&t("#"+e.attr("id")).find(".extended-widget-opts-tabs").tabs({active:selected}),t("#"+e.attr("id")).find(".extended-widget-opts-visibility-tabs").length>0&&t("#"+e.attr("id")).find(".extended-widget-opts-visibility-tabs").tabs({active:selected_visibility}),t("#"+e.attr("id")).find(".extended-widget-opts-settings-tabs").length>0&&t("#"+e.attr("id")).find(".extended-widget-opts-settings-tabs").tabs({active:selected_settings})):(t(".extended-widget-opts-tabs").tabs({active:selected}),t(".extended-widget-opts-visibility-tabs").tabs({active:selected_visibility}),t(".extended-widget-opts-settings-tabs").tabs({active:selected_settings})),t(".extended-widget-opts-tabs").click("tabsselect",function(e,i){t(this).find("#extended-widget-opts-selectedtab").length>0&&t(this).find("#extended-widget-opts-selectedtab").val(t(this).tabs("option","active"))}),t(".extended-widget-opts-visibility-tabs").click("tabsselect",function(e,i){t(this).find("#extended-widget-opts-visibility-selectedtab").length>0&&t(this).find("#extended-widget-opts-visibility-selectedtab").val(t(this).tabs("option","active"))}),t(".extended-widget-opts-settings-tabs").click("tabsselect",function(e,i){t(this).find("#extended-widget-opts-settings-selectedtab").length>0&&t(this).find("#extended-widget-opts-settings-selectedtab").val(t(this).tabs("option","active"))})}t(".extended-widget-opts-tabs").length>0&&n("","loaded"),t(i).ready(function(){t(".widget-liquid-right .widget, .inactive-sidebar .widget, #accordion-panel-widgets .customize-control-widget_form").each(function(t,e){n("","loaded")}),t(i).on("widget-added",function(t,e){n(e,"added")}),t(i).on("widget-updated",function(t,e){n(e,"updated")}),t(i).on("click",".extended-widget-opts-inner-lists h4",function(){getid=t(this).attr("id"),t(".extended-widget-opts-inner-lists ."+getid).slideToggle(250)}),t(i).on("click",".widget-opts-toggler-note",function(e){t(this).parent("p").parent(".widget-opts-logic").find(".widget-opts-toggle-note").slideToggle(250),e.preventDefault(),e.stopPropagation()}),t(i).on("click",".opts-add-class-btn",function(e){getVal=t(".opts-add-class-txtfld").val();var i="extwopts_class_settings[classlists][]";t(this).hasClass("widgetopts-add-class-btn")&&(i="classes[classlists][]"),getVal.length>0&&(t("#opts-predefined-classes ul").append('<li><input type="hidden" name="'+i+'" value="'+getVal+'" /><span class"opts-li-value">'+getVal+'</span> <a href="#" class="opts-remove-class-btn"><span class="dashicons dashicons-dismiss"></span></a></li>'),t(".opts-add-class-txtfld").val("")),e.preventDefault(),e.stopPropagation()}),t(i).on("click",".opts-remove-class-btn",function(e){t(this).parent("li").fadeOut("fast",function(){t(this).remove()}),e.preventDefault(),e.stopPropagation()}),t(".wp-admin.widgets-php .wrap a.page-title-action").length>0&&t(".wp-admin.widgets-php .wrap a.page-title-action").after('<a href="'+widgetopts10n.opts_page+'" class="page-title-action hide-if-no-customize">'+widgetopts10n.translation.manage_settings+"</a>"),void 0!==t.fn.liveFilter&&t.isFunction(t.fn.liveFilter)&&t("#widgetopts-widgets-search").length>0&&(t(".widget:last-of-type").after('<div class="widgetopts-separator" />'),t("#widgets-left .widget").each(function(){var e=t(this).index()+1;t(this).attr("data-widget-index",e)}),t("#widgets-left").liveFilter("#widgetopts-widgets-search",".widget",{filterChildSelector:".widget-title h4, .widget-title h3",after:function(e,i){i.each(function(){t(this).insertAfter(t(this).parent().find(".widgetopts-separator"))}),e.sort(function(t,e){return t.getAttribute("data-widget-index")-e.getAttribute("data-widget-index")}),e.each(function(){t(this).insertBefore(t(this).parent().find(".widgetopts-separator"))})}}),t("#wpbody-content").on("keyup",".widgetopts-widgets-search",function(e){p=t(this).parent().find(".widgetopts-clear-results"),""!==t(this).val()?p.addClass("widgetopts-is-visible"):p.removeClass("widgetopts-is-visible")}),t("#wpbody-content").on("click",".widgetopts-clear-results",function(e){return s=t(this).parent().find(".widgetopts-widgets-search"),s.val("").focus().trigger("keyup"),"widgetopts-search-chooser"==s.attr("id")&&t(".widgets-chooser-sidebars li:not(:first)").removeClass("widgets-chooser-selected"),e.preventDefault(),e.stopPropagation(),!1}),t(".widgets-chooser").prepend(widgetopts10n.search_form),t(".widgets-chooser").liveFilter("#widgetopts-search-chooser",".widgets-chooser-sidebars li",{after:function(e,i){i.each(function(){t(this).addClass("widgetopts-is-hidden").removeClass("widgets-chooser-selected")}),e.each(function(){t(this).removeClass("widgetopts-is-hidden").removeClass("widgets-chooser-selected")}),e.length>0&&t(e[0]).addClass("widgets-chooser-selected")}}))})}(jQuery,window,document);
assets/js/wpWidgetOpts.js ADDED
@@ -0,0 +1,420 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global ajaxurl, isRtl */
2
+ var wpWidgetOpts;
3
+ (function($) {
4
+ var $document = $( document );
5
+
6
+ wpWidgetOpts = {
7
+ /**
8
+ * A closed Sidebar that gets a Widget dragged over it.
9
+ *
10
+ * @var element|null
11
+ */
12
+ hoveredSidebar: null,
13
+
14
+ init : function() {
15
+ var self = this,
16
+ title = $( '.wp-admin.widgets-php .wrap a.page-title-action' ),
17
+ tabs = $( '.extended-widget-opts-tabs' ),
18
+ chooser = $( '.widgetsopts-chooser' ),
19
+ selectSidebar = chooser.find( '.widgetopts-chooser-sidebars' );
20
+ // ta = chooser.find('.widgets-chooser-sidebars'),
21
+ // sidebars = $('div.widgets-sortables'),
22
+ // isRTL = !! ( 'undefined' !== typeof isRtl && isRtl );
23
+
24
+ if( tabs.length > 0 ){
25
+ self.loaded( '', 'loaded' );
26
+ }
27
+
28
+ //runs on customizer
29
+ $( '.widget-liquid-right .widget, .inactive-sidebar .widget, #accordion-panel-widgets .customize-control-widget_form' ).each(function (i, widget) {
30
+ self.loaded( '', 'loaded' );
31
+ });
32
+
33
+ //fires when widget added
34
+ $document.on( 'widget-added', function( event, widget ) {
35
+ self.loaded( widget, 'added' );
36
+ });
37
+
38
+ //fires when widget updated
39
+ $document.on( 'widget-updated', function( event, widget ) {
40
+ self.loaded( widget, 'updated' );
41
+ });
42
+
43
+ //toggle accordions
44
+ $document.on( 'click', '.extended-widget-opts-inner-lists h4',function(){
45
+ var getid = $(this).attr('id');
46
+ $( '.extended-widget-opts-inner-lists .'+ getid ).slideToggle(250);
47
+ } );
48
+
49
+ //toggle widget logic notice
50
+ $document.on( 'click', '.widget-opts-toggler-note',function(e){
51
+ $( this ).parent( 'p' ).parent( '.widget-opts-logic' ).find( '.widget-opts-toggle-note' ).slideToggle( 250 );
52
+ e.preventDefault();
53
+ e.stopPropagation();
54
+ } );
55
+
56
+ //add link to settings page on title
57
+ if( title.length > 0 ){
58
+ title.after('<a href="'+ widgetopts10n.opts_page +'" class="page-title-action hide-if-no-customize">'+ widgetopts10n.translation.manage_settings +'</a>');
59
+ }
60
+
61
+ //live search filter
62
+ self.live_search();
63
+
64
+ //append move and clone button to .widget-control-actions
65
+ $( '.widget-control-actions .alignleft .widget-control-remove' ).after( widgetopts10n.controls );
66
+
67
+ //chooser for move and clone action
68
+ self.do_chooser( chooser, selectSidebar );
69
+
70
+ //add sidebar options
71
+ self.sidebarOptions();
72
+ self.removeSidebarWidgets();
73
+
74
+ },
75
+ loaded : function( widget, action ){
76
+ var widget_id,
77
+ selected = 0,
78
+ selected_styling = 0,
79
+ selected_main = 0,
80
+ selected_visibility = 0,
81
+ selected_settings = 0,
82
+ in_customizer = false,
83
+ tabs = '.extended-widget-opts-tabs',
84
+ styling_tabs = '.extended-widget-opts-styling-tabs',
85
+ visibility_main = '.extended-widget-opts-visibility-m-tabs',
86
+ visibility_tabs = '.extended-widget-opts-visibility-tabs',
87
+ settings_tabs = '.extended-widget-opts-settings-tabs',
88
+ selectedtab = '#extended-widget-opts-selectedtab',
89
+ selectedstyling = '#extended-widget-opts-styling-selectedtab',
90
+ selectedmain = '#extended-widget-opts-visibility-m-selectedtab',
91
+ selectedvisibility = '#extended-widget-opts-visibility-selectedtab',
92
+ selectedsettings = '#extended-widget-opts-settings-selectedtab';
93
+
94
+ // check for wp.customize return boolean
95
+ if ( typeof wp !== 'undefined' ) {
96
+ in_customizer = typeof wp.customize !== 'undefined' ? true : false;
97
+ }
98
+ if( '' != widget ){
99
+ widget_id = '#' + widget.attr('id');
100
+
101
+ if( $( widget_id ).find( selectedtab ).length > 0 ){
102
+ selected = $( '#' + widget.attr('id') ).find( selectedtab ).val();
103
+ selected = parseInt( selected );
104
+ }
105
+
106
+ if( $( widget_id ).find( selectedvisibility ).length > 0 ){
107
+ selected_visibility = $( '#' + widget.attr('id') ).find( selectedvisibility ).val();
108
+ selected_visibility = parseInt( selected_visibility );
109
+ }
110
+
111
+ if( $( widget_id ).find( selectedmain ).length > 0 ){
112
+ selected_main = $( '#' + widget.attr('id') ).find( selectedmain ).val();
113
+ selected_main = parseInt( selected_main );
114
+ }
115
+
116
+ if( $( widget_id ).find( selectedsettings ).length > 0 ){
117
+ selected_settings = $( '#' + widget.attr('id') ).find( selectedsettings ).val();
118
+ selected_settings = parseInt( selected_settings );
119
+ }
120
+ // console.log( in_customizer );
121
+ }
122
+ if( action == 'added' ){
123
+ selected = 0;
124
+ selected_main = 0,
125
+ selected_visibility = 0;
126
+ selected_settings = 0;
127
+ }
128
+
129
+ if( '' != widget ){
130
+ if( $( widget_id ).find( tabs ).length > 0 ){
131
+ $( widget_id ).find( tabs ).tabs({ active: selected });
132
+ }
133
+ if( $( widget_id ).find( visibility_main ).length > 0 ){
134
+ $( widget_id ).find( visibility_main ).tabs({ active: selected_main });
135
+ }
136
+ if( $( widget_id ).find( visibility_tabs ).length > 0 ){
137
+ $( widget_id ).find( visibility_tabs ).tabs({ active: selected_visibility });
138
+ }
139
+ if( $( widget_id ).find( settings_tabs ).length > 0 ){
140
+ $( widget_id ).find( settings_tabs ).tabs({ active: selected_settings });
141
+ }
142
+ }else{
143
+ $( tabs ).tabs({ active: selected });
144
+ $( styling_tabs ).tabs({ active: selected_styling });
145
+ $( visibility_main ).tabs({ active: selected_main });
146
+ $( visibility_tabs ).tabs({ active: selected_visibility });
147
+ $( settings_tabs ).tabs({ active: selected_settings });
148
+ }
149
+
150
+ $( tabs ).click('tabsselect', function (event, ui) {
151
+ if( $(this).find( selectedtab ).length > 0 ){
152
+ $(this).find( selectedtab ).val( $(this).tabs('option', 'active') );
153
+ }
154
+ });
155
+
156
+ $( visibility_tabs ).click('tabsselect', function (event, ui) {
157
+ if( $(this).find( selectedvisibility ).length > 0 ){
158
+ $(this).find( selectedvisibility ).val( $(this).tabs('option', 'active') );
159
+ }
160
+ });
161
+
162
+ $( visibility_main ).click('tabsselect', function (event, ui) {
163
+ if( $(this).find( selectedmain ).length > 0 ){
164
+ $(this).find( selectedmain ).val( $(this).tabs('option', 'active') );
165
+ }
166
+ });
167
+
168
+ $( settings_tabs ).click('tabsselect', function (event, ui) {
169
+ if( $(this).find( selectedsettings ).length > 0 ){
170
+ $(this).find( selectedsettings ).val( $(this).tabs('option', 'active') );
171
+ }
172
+ });
173
+ },
174
+ live_search : function(){
175
+ if ( typeof $.fn.liveFilter !== 'undefined' && $.isFunction( $.fn.liveFilter ) && $( '#widgetopts-widgets-search' ).length > 0 ) {
176
+ // Add separator to distinguish between visible and hidden widgets
177
+ $('.widget:last-of-type').after('<div class="widgetopts-separator" />');
178
+
179
+ // Add data attribute for order to each widget
180
+ $('#widgets-left .widget').each(function() {
181
+ var index = $(this).index() + 1;
182
+ $(this).attr( 'data-widget-index', index );
183
+ });
184
+
185
+ // Add liveFilter : credits to https://wordpress.org/plugins/widget-search-filter/ plugin
186
+ $('#widgets-left').liveFilter('#widgetopts-widgets-search', '.widget', {
187
+ filterChildSelector: '.widget-title h4, .widget-title h3',
188
+ after: function(contains, containsNot) {
189
+
190
+ // Move all hidden widgets to end.
191
+ containsNot.each(function() {
192
+ $(this).insertAfter($(this).parent().find('.widgetopts-separator'));
193
+ });
194
+
195
+ // Sort all visible widgets by original index
196
+ contains.sort(function(a,b) {
197
+ return a.getAttribute('data-widget-index') - b.getAttribute('data-widget-index');
198
+ });
199
+
200
+ // Move all visible back
201
+ contains.each(function() {
202
+ $(this).insertBefore($(this).parent().find('.widgetopts-separator'));
203
+ });
204
+
205
+ }
206
+ });
207
+
208
+ //add clear search
209
+ $( '#wpbody-content' ).on( 'keyup', '.widgetopts-widgets-search', function(e){
210
+ p = $(this).parent().find( '.widgetopts-clear-results' );
211
+ if ( '' !== $(this).val() ) {
212
+ p.addClass( 'widgetopts-is-visible' );
213
+ }else{
214
+ p.removeClass( 'widgetopts-is-visible' );
215
+ }
216
+ } );
217
+
218
+ $( '#wpbody-content' ).on( 'click', '.widgetopts-clear-results', function(e){
219
+ s = $(this).parent().find( '.widgetopts-widgets-search' );
220
+ s.val( '' ).focus().trigger( 'keyup' );
221
+
222
+ if( s.attr( 'id' ) == 'widgetopts-search-chooser' ){
223
+ $( '.widgets-chooser-sidebars li:not(:first)' ).removeClass( 'widgets-chooser-selected' );
224
+ }else if( s.hasClass('widgetsopts-widgets-search') ){
225
+ $( '.widgetopts-chooser-sidebars li:not(:first)' ).removeClass( 'widgetopts-chooser-selected' );
226
+ }
227
+
228
+ e.preventDefault();
229
+ e.stopPropagation();
230
+ return false;
231
+ } );
232
+
233
+ //add sidebar chooser search field
234
+ $('.widgets-chooser').prepend( widgetopts10n.search_form );
235
+ //live filter
236
+ $('.widgets-chooser').liveFilter('#widgetopts-search-chooser', '.widgets-chooser-sidebars li', {
237
+ // filterChildSelector: 'li',
238
+ after: function( contains, containsNot ) {
239
+ //hide
240
+ containsNot.each(function() {
241
+ $(this).addClass( 'widgetopts-is-hidden' ).removeClass( 'widgets-chooser-selected' );
242
+ });
243
+ contains.each(function() {
244
+ $(this).removeClass( 'widgetopts-is-hidden' ).removeClass( 'widgets-chooser-selected' );
245
+ });
246
+ if( contains.length > 0 ){
247
+ $( contains[0] ).addClass( 'widgets-chooser-selected' );
248
+ }
249
+
250
+ }
251
+ });
252
+
253
+ }
254
+ },
255
+ do_chooser : function( chooser, selectSidebar ){
256
+ var self = this;
257
+
258
+ //add sidebar lists on chooser
259
+ $( '#widgets-right .widgets-holder-wrap' ).each( function( index, element ) {
260
+ var $element = $( element ),
261
+ name = $element.find( '.sidebar-name h2' ).text(),
262
+ id = $element.find( '.widgets-sortables' ).attr( 'id' ),
263
+ li = $('<li tabindex="0">').text( $.trim( name ) );
264
+
265
+ if ( index === 0 ) {
266
+ li.addClass( 'widgetopts-chooser-selected' );
267
+ }
268
+
269
+ selectSidebar.append( li );
270
+ li.attr( 'data-sidebarId', id );
271
+ });
272
+
273
+ //do click
274
+ $document.on( 'click', '.widgetopts-control', function(e){
275
+ var lbl = $(this).text(),
276
+ action = $( this ).attr( 'data-action' );
277
+
278
+ if( $(this).hasClass( 'widgetopts-control-open' ) ){
279
+ self.closeChooser();
280
+ $( '.widgetopts-control-open' ).removeClass( 'widgetopts-control-open' );
281
+ }else{
282
+
283
+ chooser.find( '.widgetopts-chooser-action span' ).text( lbl );
284
+ chooser.find( '.widgetopts-chooser-action' ).attr( 'data-action', action );
285
+ $(this).parents('.widget-control-actions').find('.clear').after( chooser );
286
+
287
+ chooser.slideDown( 300, function() {
288
+ selectSidebar.find('.widgets-chooser-selected').focus();
289
+ });
290
+ $( '.widgetopts-control-open' ).removeClass( 'widgetopts-control-open' );
291
+ $(this).addClass( 'widgetopts-control-open' );
292
+
293
+ self.chooserSearch();
294
+ }
295
+
296
+ e.preventDefault();
297
+ } );
298
+
299
+ //add selected on click
300
+ $document.on( 'click', '.widgetopts-chooser-sidebars li', function(e){
301
+ selectSidebar.find('.widgetopts-chooser-selected').removeClass( 'widgetopts-chooser-selected' );
302
+ $(this).addClass( 'widgetopts-chooser-selected' );
303
+ } );
304
+
305
+ //do action
306
+ $document.on( 'click', '.widgetsopts-chooser .widgetopts-chooser-action', function(e){
307
+ var $container = $( 'html,body' ),
308
+ $action = $( this ).attr( 'data-action' ),
309
+ parentSidebar = $( this ).parents('.widgets-sortables').attr('id'),
310
+ widgetID = $( this ).parents('.widget').attr('id'),
311
+ $widget = $( '#'+ widgetID );
312
+ sidebarID = $( '.widgetopts-chooser-selected' ).attr('data-sidebarId');
313
+ // console.log( $action + ' ' + parentSidebar +' ' + widgetID + ' ' + sidebarID);
314
+ //remove chooser
315
+ $( '#'+ widgetID + ' .widgetsopts-chooser' ).remove();
316
+ $widget.find(' .widgetopts-control-open' ).removeClass( 'widgetopts-control-open' );
317
+
318
+ switch ( $action ) {
319
+ case 'move':
320
+ $( '#' + parentSidebar ).find( '#' + widgetID ).appendTo( '#' + sidebarID );
321
+
322
+ $('#' + sidebarID).sortable('refresh');
323
+ $widget.addClass( 'widgetopts-move-ds' );
324
+ $( '#' + sidebarID ).parent('.widgets-holder-wrap').removeClass( 'closed' );
325
+ wpWidgets.save( $( '#' + widgetID ), 0, 0, 1 );
326
+ break;
327
+ default:
328
+ break;
329
+
330
+ }
331
+
332
+ var $scrollTo = $( '.widgetopts-move-ds' );
333
+
334
+ $container.animate({ scrollTop: $scrollTo.offset().top - ( $container.offset().top + $container.scrollTop() + 60 ) }, 200 );
335
+ $( '.widgetopts-move-ds' ).removeClass( '.widgetopts-move-ds' );
336
+ e.preventDefault();
337
+ } );
338
+
339
+ //cancel chooser
340
+ $document.on( 'click', '.widgetsopts-chooser .widgetsopts-chooser-cancel', function(e){
341
+ self.closeChooser( chooser );
342
+ e.preventDefault();
343
+ } );
344
+ },
345
+ closeChooser : function( chooser ) {
346
+ var self = this;
347
+
348
+ $( '.widgetsopts-chooser' ).slideUp( 200, function() {
349
+ $( '.widgetopts-control' ).removeClass( 'widgetopts-control-open' );
350
+ $( '#wpbody-content' ).append( this );
351
+ });
352
+ },
353
+ chooserSearch : function(){
354
+ //add livefilter
355
+ if( $( '#widgetsopts-widgets-search' ).length > 0 ){
356
+ $('.widgetsopts-chooser').liveFilter('#widgetsopts-widgets-search', '.widgetopts-chooser-sidebars li', {
357
+ // filterChildSelector: 'li',
358
+ after: function( contains, containsNot ) {
359
+ //hide
360
+ containsNot.each(function() {
361
+ $(this).addClass( 'widgetopts-is-hidden' ).removeClass( 'widgetopts-chooser-selected' );
362
+ });
363
+ contains.each(function() {
364
+ $(this).removeClass( 'widgetopts-is-hidden' ).removeClass( 'widgetopts-chooser-selected' );
365
+ });
366
+ if( contains.length > 0 ){
367
+ $( contains[0] ).addClass( 'widgetopts-chooser-selected' );
368
+ }
369
+
370
+ }
371
+ });
372
+ }
373
+ },
374
+ sidebarOptions : function(){
375
+ var self = this;
376
+ if( widgetopts10n.sidebaropts.length > 0 ){
377
+ $( '#widgets-right .widgets-holder-wrap' ).each( function( index, element ) {
378
+ dl_link = widgetopts10n.sidebaropts.replace( '__sidebaropts__', $(this).find('.widgets-sortables').attr('id') );
379
+ dl_link = dl_link.replace( '__sidebar_opts__', $.trim( $(this).find('.widgets-sortables h2').text() ) );
380
+ $(this).append( dl_link );
381
+ });
382
+ }
383
+ },
384
+ removeSidebarWidgets : function(){
385
+ var self = this;
386
+ var $container = $( 'html,body' );
387
+ $document.on( 'click', '.sidebaropts-clear', function(e){
388
+ //show confirmation
389
+ $(this).parent().find( '.sidebaropts-confirm' ).addClass( 'sidebaropts-confirmed' );
390
+ $(this).parent().find( '.sidebaropts-confirm' ).slideToggle(250);
391
+
392
+ e.preventDefault();
393
+ });
394
+
395
+ $document.on( 'click', '.sidebaropts-confirmed .button', function(e){
396
+ sidebar_id = $(this).parent().parent().parent().find('.widgets-sortables');
397
+
398
+ if( $(this).hasClass( 'button-primary' ) ){
399
+ var $scrollTo = sidebar_id;
400
+
401
+ $(this).parent().slideToggle(50);
402
+ $container.animate({ scrollTop: $scrollTo.offset().top - 50 }, 200 );
403
+
404
+ sidebar_id.find( '.widget' ).each( function( index, element ) {
405
+ $( element ).fadeOut();
406
+ wpWidgets.save( $( element ), 1, 1, 0 );
407
+ });
408
+
409
+ }else{
410
+ $(this).parent().slideToggle(250);
411
+ }
412
+
413
+ e.preventDefault();
414
+ });
415
+ }
416
+ };
417
+
418
+ $document.ready( function(){ wpWidgetOpts.init(); } );
419
+
420
+ })(jQuery);
assets/js/wpWidgetOpts.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var wpWidgetOpts;!function(t){var e=t(document);wpWidgetOpts={hoveredSidebar:null,init:function(){var i=this,s=t(".wp-admin.widgets-php .wrap a.page-title-action"),o=t(".extended-widget-opts-tabs"),d=t(".widgetsopts-chooser"),n=d.find(".widgetopts-chooser-sidebars");o.length>0&&i.loaded("","loaded"),t(".widget-liquid-right .widget, .inactive-sidebar .widget, #accordion-panel-widgets .customize-control-widget_form").each(function(t,e){i.loaded("","loaded")}),e.on("widget-added",function(t,e){i.loaded(e,"added")}),e.on("widget-updated",function(t,e){i.loaded(e,"updated")}),e.on("click",".extended-widget-opts-inner-lists h4",function(){var e=t(this).attr("id");t(".extended-widget-opts-inner-lists ."+e).slideToggle(250)}),e.on("click",".widget-opts-toggler-note",function(e){t(this).parent("p").parent(".widget-opts-logic").find(".widget-opts-toggle-note").slideToggle(250),e.preventDefault(),e.stopPropagation()}),s.length>0&&s.after('<a href="'+widgetopts10n.opts_page+'" class="page-title-action hide-if-no-customize">'+widgetopts10n.translation.manage_settings+"</a>"),i.live_search(),t(".widget-control-actions .alignleft .widget-control-remove").after(widgetopts10n.controls),i.do_chooser(d,n),i.sidebarOptions(),i.removeSidebarWidgets()},loaded:function(e,i){var s,o=0,d=0,n=0,a=0,r=".extended-widget-opts-tabs",c=".extended-widget-opts-visibility-m-tabs",l=".extended-widget-opts-visibility-tabs",p=".extended-widget-opts-settings-tabs",g="#extended-widget-opts-selectedtab",h="#extended-widget-opts-visibility-m-selectedtab",w="#extended-widget-opts-visibility-selectedtab",f="#extended-widget-opts-settings-selectedtab";"undefined"!=typeof wp&&wp.customize,""!=e&&(s="#"+e.attr("id"),t(s).find(g).length>0&&(o=t("#"+e.attr("id")).find(g).val(),o=parseInt(o)),t(s).find(w).length>0&&(n=t("#"+e.attr("id")).find(w).val(),n=parseInt(n)),t(s).find(h).length>0&&(d=t("#"+e.attr("id")).find(h).val(),d=parseInt(d)),t(s).find(f).length>0&&(a=t("#"+e.attr("id")).find(f).val(),a=parseInt(a))),"added"==i&&(o=0,d=0,n=0,a=0),""!=e?(t(s).find(r).length>0&&t(s).find(r).tabs({active:o}),t(s).find(c).length>0&&t(s).find(c).tabs({active:d}),t(s).find(l).length>0&&t(s).find(l).tabs({active:n}),t(s).find(p).length>0&&t(s).find(p).tabs({active:a})):(t(r).tabs({active:o}),t(".extended-widget-opts-styling-tabs").tabs({active:0}),t(c).tabs({active:d}),t(l).tabs({active:n}),t(p).tabs({active:a})),t(r).click("tabsselect",function(e,i){t(this).find(g).length>0&&t(this).find(g).val(t(this).tabs("option","active"))}),t(l).click("tabsselect",function(e,i){t(this).find(w).length>0&&t(this).find(w).val(t(this).tabs("option","active"))}),t(c).click("tabsselect",function(e,i){t(this).find(h).length>0&&t(this).find(h).val(t(this).tabs("option","active"))}),t(p).click("tabsselect",function(e,i){t(this).find(f).length>0&&t(this).find(f).val(t(this).tabs("option","active"))})},live_search:function(){void 0!==t.fn.liveFilter&&t.isFunction(t.fn.liveFilter)&&t("#widgetopts-widgets-search").length>0&&(t(".widget:last-of-type").after('<div class="widgetopts-separator" />'),t("#widgets-left .widget").each(function(){var e=t(this).index()+1;t(this).attr("data-widget-index",e)}),t("#widgets-left").liveFilter("#widgetopts-widgets-search",".widget",{filterChildSelector:".widget-title h4, .widget-title h3",after:function(e,i){i.each(function(){t(this).insertAfter(t(this).parent().find(".widgetopts-separator"))}),e.sort(function(t,e){return t.getAttribute("data-widget-index")-e.getAttribute("data-widget-index")}),e.each(function(){t(this).insertBefore(t(this).parent().find(".widgetopts-separator"))})}}),t("#wpbody-content").on("keyup",".widgetopts-widgets-search",function(e){p=t(this).parent().find(".widgetopts-clear-results"),""!==t(this).val()?p.addClass("widgetopts-is-visible"):p.removeClass("widgetopts-is-visible")}),t("#wpbody-content").on("click",".widgetopts-clear-results",function(e){return s=t(this).parent().find(".widgetopts-widgets-search"),s.val("").focus().trigger("keyup"),"widgetopts-search-chooser"==s.attr("id")?t(".widgets-chooser-sidebars li:not(:first)").removeClass("widgets-chooser-selected"):s.hasClass("widgetsopts-widgets-search")&&t(".widgetopts-chooser-sidebars li:not(:first)").removeClass("widgetopts-chooser-selected"),e.preventDefault(),e.stopPropagation(),!1}),t(".widgets-chooser").prepend(widgetopts10n.search_form),t(".widgets-chooser").liveFilter("#widgetopts-search-chooser",".widgets-chooser-sidebars li",{after:function(e,i){i.each(function(){t(this).addClass("widgetopts-is-hidden").removeClass("widgets-chooser-selected")}),e.each(function(){t(this).removeClass("widgetopts-is-hidden").removeClass("widgets-chooser-selected")}),e.length>0&&t(e[0]).addClass("widgets-chooser-selected")}}))},do_chooser:function(i,s){var o=this;t("#widgets-right .widgets-holder-wrap").each(function(e,i){var o=t(i),d=o.find(".sidebar-name h2").text(),n=o.find(".widgets-sortables").attr("id"),a=t('<li tabindex="0">').text(t.trim(d));0===e&&a.addClass("widgetopts-chooser-selected"),s.append(a),a.attr("data-sidebarId",n)}),e.on("click",".widgetopts-control",function(e){var d=t(this).text(),n=t(this).attr("data-action");t(this).hasClass("widgetopts-control-open")?(o.closeChooser(),t(".widgetopts-control-open").removeClass("widgetopts-control-open")):(i.find(".widgetopts-chooser-action span").text(d),i.find(".widgetopts-chooser-action").attr("data-action",n),t(this).parents(".widget-control-actions").find(".clear").after(i),i.slideDown(300,function(){s.find(".widgets-chooser-selected").focus()}),t(".widgetopts-control-open").removeClass("widgetopts-control-open"),t(this).addClass("widgetopts-control-open"),o.chooserSearch()),e.preventDefault()}),e.on("click",".widgetopts-chooser-sidebars li",function(e){s.find(".widgetopts-chooser-selected").removeClass("widgetopts-chooser-selected"),t(this).addClass("widgetopts-chooser-selected")}),e.on("click",".widgetsopts-chooser .widgetopts-chooser-action",function(e){var i=t("html,body"),s=t(this).attr("data-action"),o=t(this).parents(".widgets-sortables").attr("id"),d=t(this).parents(".widget").attr("id"),n=t("#"+d);switch(sidebarID=t(".widgetopts-chooser-selected").attr("data-sidebarId"),t("#"+d+" .widgetsopts-chooser").remove(),n.find(" .widgetopts-control-open").removeClass("widgetopts-control-open"),s){case"move":t("#"+o).find("#"+d).appendTo("#"+sidebarID),t("#"+sidebarID).sortable("refresh"),n.addClass("widgetopts-move-ds"),t("#"+sidebarID).parent(".widgets-holder-wrap").removeClass("closed"),wpWidgets.save(t("#"+d),0,0,1)}var a=t(".widgetopts-move-ds");i.animate({scrollTop:a.offset().top-(i.offset().top+i.scrollTop()+60)},200),t(".widgetopts-move-ds").removeClass(".widgetopts-move-ds"),e.preventDefault()}),e.on("click",".widgetsopts-chooser .widgetsopts-chooser-cancel",function(t){o.closeChooser(i),t.preventDefault()})},closeChooser:function(e){t(".widgetsopts-chooser").slideUp(200,function(){t(".widgetopts-control").removeClass("widgetopts-control-open"),t("#wpbody-content").append(this)})},chooserSearch:function(){t("#widgetsopts-widgets-search").length>0&&t(".widgetsopts-chooser").liveFilter("#widgetsopts-widgets-search",".widgetopts-chooser-sidebars li",{after:function(e,i){i.each(function(){t(this).addClass("widgetopts-is-hidden").removeClass("widgetopts-chooser-selected")}),e.each(function(){t(this).removeClass("widgetopts-is-hidden").removeClass("widgetopts-chooser-selected")}),e.length>0&&t(e[0]).addClass("widgetopts-chooser-selected")}})},sidebarOptions:function(){widgetopts10n.sidebaropts.length>0&&t("#widgets-right .widgets-holder-wrap").each(function(e,i){dl_link=widgetopts10n.sidebaropts.replace("__sidebaropts__",t(this).find(".widgets-sortables").attr("id")),dl_link=dl_link.replace("__sidebar_opts__",t.trim(t(this).find(".widgets-sortables h2").text())),t(this).append(dl_link)})},removeSidebarWidgets:function(){var i=t("html,body");e.on("click",".sidebaropts-clear",function(e){t(this).parent().find(".sidebaropts-confirm").addClass("sidebaropts-confirmed"),t(this).parent().find(".sidebaropts-confirm").slideToggle(250),e.preventDefault()}),e.on("click",".sidebaropts-confirmed .button",function(e){if(sidebar_id=t(this).parent().parent().parent().find(".widgets-sortables"),t(this).hasClass("button-primary")){var s=sidebar_id;t(this).parent().slideToggle(50),i.animate({scrollTop:s.offset().top-50},200),sidebar_id.find(".widget").each(function(e,i){t(i).fadeOut(),wpWidgets.save(t(i),1,1,0)})}else t(this).parent().slideToggle(250);e.preventDefault()})}},e.ready(function(){wpWidgetOpts.init()})}(jQuery);
assets/scss/extended-widget-options.scss ADDED
@@ -0,0 +1,553 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import 'compass';
2
+ $desktop : 769px;
3
+ $tablet : 768px;
4
+ $mobile : 480px;
5
+ body{
6
+ .extendedwopts-show{
7
+ display: none;
8
+ }
9
+ .extendedwopts-md-right{
10
+ text-align: right;
11
+ }
12
+ .extendedwopts-md-left{
13
+ text-align: left;
14
+ }
15
+ .extendedwopts-md-center{
16
+ text-align: center;
17
+ }
18
+ .extendedwopts-md-justify{
19
+ text-align: justify;
20
+ }
21
+ .widgetopts-hide_title{
22
+ .widget-title{
23
+ display: none;
24
+ }
25
+ }
26
+ @media screen and (min-width: $desktop) {
27
+ .extendedwopts-hide.extendedwopts-desktop{
28
+ display: none;
29
+ }
30
+ .extendedwopts-show.extendedwopts-desktop{
31
+ display: block;
32
+ }
33
+ .widget.clearfix-desktop{
34
+ clear: both;
35
+ }
36
+ }
37
+ @media screen and (max-width: $tablet)
38
+ and (min-width: $mobile + 1) {
39
+ .extendedwopts-hide.extendedwopts-tablet{
40
+ display: none;
41
+ }
42
+ .extendedwopts-show.extendedwopts-tablet{
43
+ display: block;
44
+ }
45
+ .widget.clearfix-desktop{
46
+ clear: none;
47
+ }
48
+ .widget.clearfix-tablet{
49
+ clear: both;
50
+ }
51
+
52
+ }
53
+ @media screen and (max-width: $mobile) {
54
+ .extendedwopts-hide.extendedwopts-mobile{
55
+ display: none;
56
+ }
57
+ .extendedwopts-show.extendedwopts-mobile{
58
+ display: block;
59
+ }
60
+ .widget.clearfix-desktop, .widget.clearfix-tablet{
61
+ clear: none;
62
+ }
63
+ .widget.clearfix-mobile{
64
+ clear: both;
65
+ }
66
+
67
+ }
68
+ }
69
+
70
+ //grid system
71
+ .widget.extendedwopts-col{
72
+ @include box-sizing( border-box );
73
+ margin-bottom: 15px;
74
+ &.col-xs-1, &.col-sm-1, &.col-md-1, &.col-lg-1, &.col-xs-2, &.col-sm-2, &.col-md-2, &.col-lg-2, &.col-xs-3, &.col-sm-3, &.col-md-3, &.col-lg-3, &.col-xs-4, &.col-sm-4, &.col-md-4, &.col-lg-4, &.col-xs-5, &.col-sm-5, &.col-md-5, &.col-lg-5, &.col-xs-6, &.col-sm-6, &.col-md-6, &.col-lg-6, &.col-xs-7, &.col-sm-7, &.col-md-7, &.col-lg-7, &.col-xs-8, &.col-sm-8, &.col-md-8, &.col-lg-8, &.col-xs-9, &.col-sm-9, &.col-md-9, &.col-lg-9, &.col-xs-10, &.col-sm-10, &.col-md-10, &.col-lg-10, &.col-xs-11, &.col-sm-11, &.col-md-11, &.col-lg-11, &.col-xs-12, &.col-sm-12, &.col-md-12, &.col-lg-12 {
75
+ position: relative;
76
+ min-height: 1px;
77
+ // padding-left: 15px;
78
+ // padding-right: 15px;
79
+ }
80
+ &.col-xs-1, &.col-xs-2, &.col-xs-3, &.col-xs-4, &.col-xs-5, &.col-xs-6, &.col-xs-7, &.col-xs-8, &.col-xs-9, &.col-xs-10, &.col-xs-11, &.col-xs-12 {
81
+ float: left;
82
+ }
83
+ &.col-xs-12 {
84
+ width: 100%;
85
+ }
86
+ &.col-xs-11 {
87
+ width: 91.66666667%;
88
+ }
89
+ &.col-xs-10 {
90
+ width: 83.33333333%;
91
+ }
92
+ &.col-xs-9 {
93
+ width: 75%;
94
+ }
95
+ &.col-xs-8 {
96
+ width: 66.66666667%;
97
+ }
98
+ &.col-xs-7 {
99
+ width: 58.33333333%;
100
+ }
101
+ &.col-xs-6 {
102
+ width: 50%;
103
+ }
104
+ &.col-xs-5 {
105
+ width: 41.66666667%;
106
+ }
107
+ &.col-xs-4 {
108
+ width: 33.33333333%;
109
+ }
110
+ &.col-xs-3 {
111
+ width: 25%;
112
+ }
113
+ &.col-xs-2 {
114
+ width: 16.66666667%;
115
+ }
116
+ &.col-xs-1 {
117
+ width: 8.33333333%;
118
+ }
119
+ &.col-xs-pull-12 {
120
+ right: 100%;
121
+ }
122
+ &.col-xs-pull-11 {
123
+ right: 91.66666667%;
124
+ }
125
+ &.col-xs-pull-10 {
126
+ right: 83.33333333%;
127
+ }
128
+ &.col-xs-pull-9 {
129
+ right: 75%;
130
+ }
131
+ &.col-xs-pull-8 {
132
+ right: 66.66666667%;
133
+ }
134
+ &.col-xs-pull-7 {
135
+ right: 58.33333333%;
136
+ }
137
+ &.col-xs-pull-6 {
138
+ right: 50%;
139
+ }
140
+ &.col-xs-pull-5 {
141
+ right: 41.66666667%;
142
+ }
143
+ &.col-xs-pull-4 {
144
+ right: 33.33333333%;
145
+ }
146
+ &.col-xs-pull-3 {
147
+ right: 25%;
148
+ }
149
+ &.col-xs-pull-2 {
150
+ right: 16.66666667%;
151
+ }
152
+ &.col-xs-pull-1 {
153
+ right: 8.33333333%;
154
+ }
155
+ &.col-xs-pull-0 {
156
+ right: auto;
157
+ }
158
+ &.col-xs-push-12 {
159
+ left: 100%;
160
+ }
161
+ &.col-xs-push-11 {
162
+ left: 91.66666667%;
163
+ }
164
+ &.col-xs-push-10 {
165
+ left: 83.33333333%;
166
+ }
167
+ &.col-xs-push-9 {
168
+ left: 75%;
169
+ }
170
+ &.col-xs-push-8 {
171
+ left: 66.66666667%;
172
+ }
173
+ &.col-xs-push-7 {
174
+ left: 58.33333333%;
175
+ }
176
+ &.col-xs-push-6 {
177
+ left: 50%;
178
+ }
179
+ &.col-xs-push-5 {
180
+ left: 41.66666667%;
181
+ }
182
+ &.col-xs-push-4 {
183
+ left: 33.33333333%;
184
+ }
185
+ &.col-xs-push-3 {
186
+ left: 25%;
187
+ }
188
+ &.col-xs-push-2 {
189
+ left: 16.66666667%;
190
+ }
191
+ &.col-xs-push-1 {
192
+ left: 8.33333333%;
193
+ }
194
+ &.col-xs-push-0 {
195
+ left: auto;
196
+ }
197
+ &.col-xs-offset-12 {
198
+ margin-left: 100%;
199
+ }
200
+ &.col-xs-offset-11 {
201
+ margin-left: 91.66666667%;
202
+ }
203
+ &.col-xs-offset-10 {
204
+ margin-left: 83.33333333%;
205
+ }
206
+ &.col-xs-offset-9 {
207
+ margin-left: 75%;
208
+ }
209
+ &.col-xs-offset-8 {
210
+ margin-left: 66.66666667%;
211
+ }
212
+ &.col-xs-offset-7 {
213
+ margin-left: 58.33333333%;
214
+ }
215
+ &.col-xs-offset-6 {
216
+ margin-left: 50%;
217
+ }
218
+ &.col-xs-offset-5 {
219
+ margin-left: 41.66666667%;
220
+ }
221
+ &.col-xs-offset-4 {
222
+ margin-left: 33.33333333%;
223
+ }
224
+ &.col-xs-offset-3 {
225
+ margin-left: 25%;
226
+ }
227
+ &.col-xs-offset-2 {
228
+ margin-left: 16.66666667%;
229
+ }
230
+ &.col-xs-offset-1 {
231
+ margin-left: 8.33333333%;
232
+ }
233
+ &.col-xs-offset-0 {
234
+ margin-left: 0%;
235
+ }
236
+ @media screen and (max-width: $tablet)
237
+ and (min-width: $mobile + 1) {
238
+ &.col-sm-1, &.col-sm-2, &.col-sm-3, &.col-sm-4, &.col-sm-5, &.col-sm-6, &.col-sm-7, &.col-sm-8, &.col-sm-9, &.col-sm-10, &.col-sm-11, &.col-sm-12 {
239
+ float: left;
240
+ }
241
+ &.col-sm-12 {
242
+ width: 100%;
243
+ }
244
+ &.col-sm-11 {
245
+ width: 91.66666667%;
246
+ }
247
+ &.col-sm-10 {
248
+ width: 83.33333333%;
249
+ }
250
+ &.col-sm-9 {
251
+ width: 75%;
252
+ }
253
+ &.col-sm-8 {
254
+ width: 66.66666667%;
255
+ }
256
+ &.col-sm-7 {
257
+ width: 58.33333333%;
258
+ }
259
+ &.col-sm-6 {
260
+ width: 50%;
261
+ }
262
+ &.col-sm-5 {
263
+ width: 41.66666667%;
264
+ }
265
+ &.col-sm-4 {
266
+ width: 33.33333333%;
267
+ }
268
+ &.col-sm-3 {
269
+ width: 25%;
270
+ }
271
+ &.col-sm-2 {
272
+ width: 16.66666667%;
273
+ }
274
+ &.col-sm-1 {
275
+ width: 8.33333333%;
276
+ }
277
+ &.col-sm-pull-12 {
278
+ right: 100%;
279
+ }
280
+ &.col-sm-pull-11 {
281
+ right: 91.66666667%;
282
+ }
283
+ &.col-sm-pull-10 {
284
+ right: 83.33333333%;
285
+ }
286
+ &.col-sm-pull-9 {
287
+ right: 75%;
288
+ }
289
+ &.col-sm-pull-8 {
290
+ right: 66.66666667%;
291
+ }
292
+ &.col-sm-pull-7 {
293
+ right: 58.33333333%;
294
+ }
295
+ &.col-sm-pull-6 {
296
+ right: 50%;
297
+ }
298
+ &.col-sm-pull-5 {
299
+ right: 41.66666667%;
300
+ }
301
+ &.col-sm-pull-4 {
302
+ right: 33.33333333%;
303
+ }
304
+ &.col-sm-pull-3 {
305
+ right: 25%;
306
+ }
307
+ &.col-sm-pull-2 {
308
+ right: 16.66666667%;
309
+ }
310
+ &.col-sm-pull-1 {
311
+ right: 8.33333333%;
312
+ }
313
+ &.col-sm-pull-0 {
314
+ right: auto;
315
+ }
316
+ &.col-sm-push-12 {
317
+ left: 100%;
318
+ }
319
+ &.col-sm-push-11 {
320
+ left: 91.66666667%;
321
+ }
322
+ &.col-sm-push-10 {
323
+ left: 83.33333333%;
324
+ }
325
+ &.col-sm-push-9 {
326
+ left: 75%;
327
+ }
328
+ &.col-sm-push-8 {
329
+ left: 66.66666667%;
330
+ }
331
+ &.col-sm-push-7 {
332
+ left: 58.33333333%;
333
+ }
334
+ &.col-sm-push-6 {
335
+ left: 50%;
336
+ }
337
+ &.col-sm-push-5 {
338
+ left: 41.66666667%;
339
+ }
340
+ &.col-sm-push-4 {
341
+ left: 33.33333333%;
342
+ }
343
+ &.col-sm-push-3 {
344
+ left: 25%;
345
+ }
346
+ &.col-sm-push-2 {
347
+ left: 16.66666667%;
348
+ }
349
+ &.col-sm-push-1 {
350
+ left: 8.33333333%;
351
+ }
352
+ &.col-sm-push-0 {
353
+ left: auto;
354
+ }
355
+ &.col-sm-offset-12 {
356
+ margin-left: 100%;
357
+ }
358
+ &.col-sm-offset-11 {
359
+ margin-left: 91.66666667%;
360
+ }
361
+ &.col-sm-offset-10 {
362
+ margin-left: 83.33333333%;
363
+ }
364
+ &.col-sm-offset-9 {
365
+ margin-left: 75%;
366
+ }
367
+ &.col-sm-offset-8 {
368
+ margin-left: 66.66666667%;
369
+ }
370
+ &.col-sm-offset-7 {
371
+ margin-left: 58.33333333%;
372
+ }
373
+ &.col-sm-offset-6 {
374
+ margin-left: 50%;
375
+ }
376
+ &.col-sm-offset-5 {
377
+ margin-left: 41.66666667%;
378
+ }
379
+ &.col-sm-offset-4 {
380
+ margin-left: 33.33333333%;
381
+ }
382
+ &.col-sm-offset-3 {
383
+ margin-left: 25%;
384
+ }
385
+ &.col-sm-offset-2 {
386
+ margin-left: 16.66666667%;
387
+ }
388
+ &.col-sm-offset-1 {
389
+ margin-left: 8.33333333%;
390
+ }
391
+ &.col-sm-offset-0 {
392
+ margin-left: 0%;
393
+ }
394
+ }
395
+ @media (min-width: $desktop) {
396
+ &.col-md-1, &.col-md-2, &.col-md-3, &.col-md-4, &.col-md-5, &.col-md-6, &.col-md-7, &.col-md-8, &.col-md-9, &.col-md-10, &.col-md-11, &.col-md-12 {
397
+ float: left;
398
+ }
399
+ &.col-md-12 {
400
+ width: 100%;
401
+ }
402
+ &.col-md-11 {
403
+ width: 91.66666667%;
404
+ }
405
+ &.col-md-10 {
406
+ width: 83.33333333%;
407
+ }
408
+ &.col-md-9 {
409
+ width: 75%;
410
+ }
411
+ &.col-md-8 {
412
+ width: 66.66666667%;
413
+ }
414
+ &.col-md-7 {
415
+ width: 58.33333333%;
416
+ }
417
+ &.col-md-6 {
418
+ width: 50%;
419
+ }
420
+ &.col-md-5 {
421
+ width: 41.66666667%;
422
+ }
423
+ &.col-md-4 {
424
+ width: 33.33333333%;
425
+ }
426
+ &.col-md-3 {
427
+ width: 25%;
428
+ }
429
+ &.col-md-2 {
430
+ width: 16.66666667%;
431
+ }
432
+ &.col-md-1 {
433
+ width: 8.33333333%;
434
+ }
435
+ &.col-md-pull-12 {
436
+ right: 100%;
437
+ }
438
+ &.col-md-pull-11 {
439
+ right: 91.66666667%;
440
+ }
441
+ &.col-md-pull-10 {
442
+ right: 83.33333333%;
443
+ }
444
+ &.col-md-pull-9 {
445
+ right: 75%;
446
+ }
447
+ &.col-md-pull-8 {
448
+ right: 66.66666667%;
449
+ }
450
+ &.col-md-pull-7 {
451
+ right: 58.33333333%;
452
+ }
453
+ &.col-md-pull-6 {
454
+ right: 50%;
455
+ }
456
+ &.col-md-pull-5 {
457
+ right: 41.66666667%;
458
+ }
459
+ &.col-md-pull-4 {
460
+ right: 33.33333333%;
461
+ }
462
+ &.col-md-pull-3 {
463
+ right: 25%;
464
+ }
465
+ &.col-md-pull-2 {
466
+ right: 16.66666667%;
467
+ }
468
+ &.col-md-pull-1 {
469
+ right: 8.33333333%;
470
+ }
471
+ &.col-md-pull-0 {
472
+ right: auto;
473
+ }
474
+ &.col-md-push-12 {
475
+ left: 100%;
476
+ }
477
+ &.col-md-push-11 {
478
+ left: 91.66666667%;
479
+ }
480
+ &.col-md-push-10 {
481
+ left: 83.33333333%;
482
+ }
483
+ &.col-md-push-9 {
484
+ left: 75%;
485
+ }
486
+ &.col-md-push-8 {
487
+ left: 66.66666667%;
488
+ }
489
+ &.col-md-push-7 {
490
+ left: 58.33333333%;
491
+ }
492
+ &.col-md-push-6 {
493
+ left: 50%;
494
+ }
495
+ &.col-md-push-5 {
496
+ left: 41.66666667%;
497
+ }
498
+ &.col-md-push-4 {
499
+ left: 33.33333333%;
500
+ }
501
+ &.col-md-push-3 {
502
+ left: 25%;
503
+ }
504
+ &.col-md-push-2 {
505
+ left: 16.66666667%;
506
+ }
507
+ &.col-md-push-1 {
508
+ left: 8.33333333%;
509
+ }
510
+ &.col-md-push-0 {
511
+ left: auto;
512
+ }
513
+ &.col-md-offset-12 {
514
+ margin-left: 100%;
515
+ }
516
+ &.col-md-offset-11 {
517
+ margin-left: 91.66666667%;
518
+ }
519
+ &.col-md-offset-10 {
520
+ margin-left: 83.33333333%;
521
+ }
522
+ &.col-md-offset-9 {
523
+ margin-left: 75%;
524
+ }
525
+ &.col-md-offset-8 {
526
+ margin-left: 66.66666667%;
527
+ }
528
+ &.col-md-offset-7 {
529
+ margin-left: 58.33333333%;
530
+ }
531
+ &.col-md-offset-6 {
532
+ margin-left: 50%;
533
+ }
534
+ &.col-md-offset-5 {
535
+ margin-left: 41.66666667%;
536
+ }
537
+ &.col-md-offset-4 {
538
+ margin-left: 33.33333333%;
539
+ }
540
+ &.col-md-offset-3 {
541
+ margin-left: 25%;
542
+ }
543
+ &.col-md-offset-2 {
544
+ margin-left: 16.66666667%;
545
+ }
546
+ &.col-md-offset-1 {
547
+ margin-left: 8.33333333%;
548
+ }
549
+ &.col-md-offset-0 {
550
+ margin-left: 0%;
551
+ }
552
+ }
553
+ }
assets/scss/welcome.scss ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "compass";
2
+
3
+ .widgetopts-badge{
4
+ position: absolute;
5
+ top: 0;
6
+ right: 0;
7
+ color: #999;
8
+ font-size: 21px;
9
+ text-align: center;
10
+ margin: 5px 0 0;
11
+ width: 150px;
12
+ .widgetopts-mascot{
13
+ display: block;
14
+ text-align: center;
15
+ height: 150px;
16
+ width: 150px;
17
+ background: url('../images/logo-mascot.png');
18
+ @include background-size(cover);
19
+ }
20
+ .version{
21
+ line-height: 30px;
22
+ }
23
+ }
24
+ .about-wrap .widgetopts-features-button{
25
+ font-size: 16px;
26
+ height: auto;
27
+ padding: 8px 25px;
28
+ margin-top: 20px;
29
+ }
30
+ .widgetopts-about-wrap.about-wrap p{
31
+ max-width: 100%;
32
+ }
33
+
34
+ .about-wrap .widgetopts-features{
35
+ img{
36
+ @include transition( opacity .15s ease-in-out );
37
+ @include opacity( 0.88 );
38
+ &:hover{
39
+ @include opacity( 1 );
40
+ }
41
+ }
42
+ }
assets/scss/widget-options.scss ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import 'compass';
2
+ $desktop : 769px;
3
+ $tablet : 768px;
4
+ $mobile : 736px;
5
+ body{
6
+ .extendedwopts-show{
7
+ display: none;
8
+ }
9
+ .widgetopts-hide_title{
10
+ .widget-title{
11
+ display: none;
12
+ }
13
+ }
14
+
15
+ //alignment
16
+ .extendedwopts-md-right{
17
+ text-align: right;
18
+ }
19
+ .extendedwopts-md-left{
20
+ text-align: left;
21
+ }
22
+ .extendedwopts-md-center{
23
+ text-align: center;
24
+ }
25
+ .extendedwopts-md-justify{
26
+ text-align: justify;
27
+ }
28
+ @media screen and (min-width: $desktop) {
29
+ .extendedwopts-hide.extendedwopts-desktop{
30
+ display: none;
31
+ }
32
+ .extendedwopts-show.extendedwopts-desktop{
33
+ display: block;
34
+ }
35
+ .widget.clearfix-desktop{
36
+ clear: both;
37
+ }
38
+ }
39
+ @media screen and (max-width: $tablet)
40
+ and (min-width: $mobile + 1) {
41
+ .extendedwopts-hide.extendedwopts-tablet{
42
+ display: none;
43
+ }
44
+ .extendedwopts-show.extendedwopts-tablet{
45
+ display: block;
46
+ }
47
+ .widget.clearfix-desktop{
48
+ clear: none;
49
+ }
50
+ .widget.clearfix-tablet{
51
+ clear: both;
52
+ }
53
+ }
54
+ @media screen and (max-width: $mobile) {
55
+ .extendedwopts-hide.extendedwopts-mobile{
56
+ display: none;
57
+ }
58
+ .extendedwopts-show.extendedwopts-mobile{
59
+ display: block;
60
+ }
61
+ .widget.clearfix-desktop, .widget.clearfix-tablet{
62
+ clear: none;
63
+ }
64
+ .widget.clearfix-mobile{
65
+ clear: both;
66
+ }
67
+ }
68
+ }
includes/admin/globals.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Add values to global variables
4
+ *
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 3.3.1
8
+ */
9
+
10
+ if( !function_exists( 'widgetopts_register_globals' ) ){
11
+ add_action( 'init', 'widgetopts_register_globals', 90 );
12
+ function widgetopts_register_globals(){
13
+ global $widgetopts_taxonomies, $widgetopts_types, $widgetopts_categories;
14
+
15
+ $widgetopts_taxonomies = widgetopts_global_taxonomies();
16
+ $widgetopts_types = widgetopts_global_types();
17
+ $widgetopts_categories = widgetopts_global_categories();
18
+
19
+ }
20
+ }
21
+ ?>
includes/admin/import-export.php ADDED
@@ -0,0 +1,686 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widget Options Importer
4
+ *
5
+ * @category Widgets
6
+ * @author Jeffrey Carandang
7
+ * @version 1.0
8
+ */
9
+ // Exit if accessed directly.
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+ if ( ! class_exists( 'WP_Widget_Options_Importer' ) ) :
12
+
13
+ /**
14
+ * Main WP_Widget_Options_Importer Class.
15
+ *
16
+ * @since 1.0
17
+ */
18
+ class WP_Widget_Options_Importer {
19
+
20
+ protected $imported = array();
21
+
22
+ function __construct(){
23
+ global $widget_options;
24
+ if( ( isset( $widget_options['import_export'] ) && 'activate' == $widget_options['import_export'] ) ||
25
+ ( isset( $widget_options['widget_area'] ) && 'activate' == $widget_options['widget_area'] )
26
+ ){
27
+ add_action( 'admin_menu', array( &$this, 'options_page' ), 10 );
28
+ add_action( 'wp_ajax_widgetopts_migrator', array( &$this, 'ajax_migration' ) );
29
+ add_action( 'load-tools_page_widgetopts_migrator_settings', array( &$this, 'export_json_file' ) );
30
+ add_action( 'load-tools_page_widgetopts_migrator_settings', array( &$this, 'import_json_file' ) );
31
+
32
+ if( !isset( $widget_options['import_export'] ) || ( isset( $widget_options['import_export'] ) && 'activate' != $widget_options['import_export'] ) ){
33
+ add_action( 'admin_footer', array( &$this, 'admin_footer' ), 10 );
34
+ }
35
+
36
+ }
37
+ }
38
+
39
+ function options_page() {
40
+ add_management_page(
41
+ __( 'Import / Export Widgets', 'widget-options' ),
42
+ __( 'Import / Export Widgets', 'widget-options' ),
43
+ 'manage_options',
44
+ 'widgetopts_migrator_settings',
45
+ array( &$this, 'settings_page' )
46
+ );
47
+ }
48
+
49
+ function settings_page(){ ?>
50
+ <div class="wrap">
51
+ <h1>
52
+ <?php _e( 'Import or Export Widgets', 'widget-options' ); ?>
53
+ <a href="<?php echo esc_url( admin_url( 'options-general.php?page=widgetopts_plugin_settings' ) );?>" class="page-title-action"><?php _e( 'Manage Widget Options', 'widget-options' );?></a>
54
+ <a href="<?php echo esc_url( apply_filters( 'widget_options_upgrade_url', 'http://widget-options.com/?utm_source=wordpressadmin&utm_medium=importexport&utm_campaign=titlelink' ) ); ?>" target="_blank" class="page-title-action"><?php _e( 'Upgrade', 'widget-options' ); ?></a>
55
+ </h1>
56
+ <div class="widgetopts-imex">
57
+ <?php if( !empty( $this->imported ) ){
58
+ global $wp_registered_sidebars;
59
+
60
+ //move inactive widgets to bottom
61
+ if( isset( $this->imported['wp_inactive_widgets'] ) ){
62
+ $inactive = $this->imported['wp_inactive_widgets'];
63
+ unset( $this->imported['wp_inactive_widgets'] );
64
+ $this->imported['wp_inactive_widgets'] = $inactive;
65
+ } ?>
66
+ <div class="widgetopts-imex-imported-widgets widgetopts-imex-col">
67
+ <h3><?php _e( 'Widget Import Results', 'widget-options' ); ?></h3>
68
+ <p><?php
69
+ printf(
70
+ wp_kses(
71
+ __( 'Imported widgets displayed in their respective widget areas. Please take note that whenever the widget area is not available, the widget will be assigned automatically to Inactive Sidebar & Widgets for you to be able to still use them. To check and manage imported widgets go to <a href="%1$s">Appearance > Widgets</a>.', 'widget-options' ),
72
+ array(
73
+ 'a' => array(
74
+ 'href' => array(),
75
+ ),
76
+ )
77
+ ),
78
+ esc_url( admin_url( 'widgets.php' ) )
79
+ ); ?></p>
80
+ <?php foreach ( $this->imported as $sidebar_id => $sidebar ) {
81
+ if( $sidebar_id == 'sidebars' ) continue;
82
+ if ( !isset( $wp_registered_sidebars[ $sidebar_id ] ) && $sidebar_id != 'wp_inactive_widgets' ){
83
+ continue;
84
+ }
85
+ if( isset( $sidebar['name'] ) ){
86
+ echo '<h4>'. $sidebar['name'] .'</h4>';
87
+ }
88
+ if( isset( $sidebar['widgets'] ) && !empty( $sidebar['widgets'] ) ){
89
+ echo '<ul>';
90
+ foreach ( $sidebar['widgets'] as $widget_id => $widget ) {
91
+
92
+ ?>
93
+
94
+ <li class="widgetopts-imex-imported-<?php echo $widget['message_type'];?>">
95
+ <span class="dashicons dashicons-<?php echo $widget['message_type'];?>"></span>
96
+ <span class="widgetopts-imex-imported">
97
+ <?php echo ( isset( $widget['title'] ) ) ? $widget['title'] : '';?>
98
+ <span class="widgetopts-imex-wid"><?php echo $widget_id;?></span>
99
+ <span class="widgetopts-imex-msg"><?php echo $widget['message'];?></span>
100
+ </span>
101
+ </li>
102
+
103
+ <?php }
104
+ echo '</ul>';
105
+ }
106
+ } ?>
107
+
108
+ </div>
109
+ <?php } ?>
110
+
111
+ <div class="widgetopts-imex-col widgetopts-imex-col-1">
112
+ <h3><?php _e( 'Export Widgets', 'widget-options' ); ?></h3>
113
+ <p><?php _e( 'Click the button below to export all your website\'s widgets.', 'widget-options' ); ?></p>
114
+ <form action="<?php echo esc_url( admin_url( basename( $_SERVER['PHP_SELF'] ) ) ); ?>" method="GET">
115
+ <input type="hidden" name="page" value="<?php echo ( isset( $_GET['page'] ) ) ? sanitize_text_field( $_GET['page'] ) : 'widgetopts_migrator_settings';?>" />
116
+ <input type="hidden" name="action" value="export" />
117
+ <?php wp_nonce_field( 'widgeopts_export', 'widgeopts_nonce_export' ); ?>
118
+ <p>
119
+ <input type="checkbox" value="1" name="inactive" id="widgetopts-imex-ex" />
120
+ <label for="widgetopts-imex-ex"><?php _e( 'Check this option if you wish to include inactive widgets', 'widget-options' ); ?></label>
121
+ </p>
122
+ <input type="submit" class="button button-primary" value="<?php _e( 'Export Widgets', 'widget-options' ); ?>" />
123
+ </form>
124
+
125
+ </div>
126
+
127
+
128
+ <div class="widgetopts-imex-col">
129
+ <h3><?php _e( 'Import Widgets', 'widget-options' ); ?></h3>
130
+ <p><?php _e( 'Upload <strong>.json</strong> file that\'s generated by this plugin. Then manage the widgets to be imported.', 'widget-options' ); ?></p>
131
+
132
+ <form method="POST" enctype="multipart/form-data">
133
+ <input type="hidden" name="page" value="<?php echo ( isset( $_GET['page'] ) ) ? sanitize_text_field( $_GET['page'] ) : 'widgetopts_migrator_settings';?>" />
134
+ <input type="hidden" name="action" value="import" />
135
+ <?php wp_nonce_field( 'widgeopts_import', 'widgeopts_nonce_import' ); ?>
136
+ <p>
137
+ <input type="file" name="widgeopts_file" id="widgetopts-imex-file"/>
138
+ </p>
139
+ <input type="submit" class="button button-primary" value="<?php _e( 'Upload', 'widget-options' ); ?>" />
140
+ </form>
141
+ </div>
142
+
143
+ </div>
144
+
145
+ </div>
146
+ <style type="text/css">
147
+ .widgetopts-imex-col{
148
+ float: left;
149
+ width: 48%;
150
+ background: #fff;
151
+ border: 1px solid #e5e5e5;
152
+ padding: 25px;
153
+ box-sizing: border-box;
154
+ margin-top: 30px;
155
+ min-height: 250px;
156
+ }
157
+ .widgetopts-imex-col-1{
158
+ margin-right: 1.5%;
159
+ }
160
+ .widgetopts-imex-col.widgetopts-imex-imported-widgets{
161
+ width: 97.5%;
162
+ position: relative;
163
+ }
164
+ .widgetopts-imex-col h3{
165
+ margin-top: 0px;
166
+ }
167
+ .widgetopts-imex-col p{
168
+ margin-bottom: 25px;
169
+ }
170
+ .widgetopts-imex-col .button{
171
+ font-size: 14px;
172
+ padding: 5px 20px 30px;
173
+ }
174
+ .widgetopts-imex-imported-widgets li{
175
+ padding-bottom: 10px;
176
+ }
177
+ .widgetopts-imex-imported-widgets li .dashicons{
178
+ float: left;
179
+ font-size: 26px;
180
+ line-height: 40px;
181
+ height: 50px;
182
+ width: 31px;
183
+ }
184
+ .widgetopts-imex-imported-widgets .dashicons-no-alt{
185
+ color: #a53e3e;
186
+ }
187
+ .widgetopts-imex-imported-widgets .dashicons-warning{
188
+ color: #ec6c3b;
189
+ }
190
+ .widgetopts-imex-imported-widgets .dashicons-yes{
191
+ color: #46b450;
192
+ }
193
+ .widgetopts-imex-imported-widgets li .widgetopts-imex-wid,
194
+ .widgetopts-imex-imported-widgets li .widgetopts-imex-msg{
195
+ /* padding-left: 8px; */
196
+ font-size: 12px;
197
+ color: #999;
198
+ }
199
+ .widgetopts-imex-imported-widgets li.widgetopts-imex-imported-yes .widgetopts-imex-msg{
200
+ color: #46b450;
201
+ }
202
+ .widgetopts-imex-imported-widgets li .widgetopts-imex-msg{
203
+ display: block;
204
+ color: #a53e3e;
205
+ }
206
+ .widgetopts-imex-imported-widgets li label{
207
+ vertical-align: unset;
208
+ }
209
+ </style>
210
+ <?php }
211
+
212
+ function admin_footer(){ ?>
213
+ <script type="text/javascript">
214
+ jQuery( document ).ready( function(){
215
+ jQuery( '#adminmenu .menu-icon-tools a[href="tools.php?page=widgetopts_migrator_settings"]' ).hide();
216
+ } );
217
+ </script>
218
+ <?php }
219
+
220
+ /**
221
+ * Generate export data
222
+ *
223
+ * @since 1.0
224
+ * @return string Export file contents
225
+ */
226
+ function generate_export_data( $inactive = false , $single_sidebar = false ) {
227
+
228
+ global $wp_registered_widgets;
229
+ $checked = array();
230
+ $sidebars_dummy = array();
231
+
232
+ // Store all widgets in array
233
+ $widget_instances = $this->get_widget_instances();
234
+
235
+ // print_r( $this->get_available_widgets() );
236
+
237
+ // get all sidebar widgets
238
+ $sidebars_widgets = get_option( 'sidebars_widgets' );
239
+ $sidebars_widget_instances = array();
240
+
241
+ if( $single_sidebar && isset( $sidebars_widgets[ $single_sidebar ] ) ){
242
+ $sidebars_dummy[ $single_sidebar ] = $sidebars_widgets[ $single_sidebar ];
243
+
244
+ //switch to single sidebar
245
+ $sidebars_widgets = $sidebars_dummy;
246
+ }
247
+
248
+ foreach ( $sidebars_widgets as $sidebar_id => $widgetids ) {
249
+
250
+ // Skip inactive widgets.
251
+ if ( !$inactive && 'wp_inactive_widgets' === $sidebar_id ) {
252
+ continue;
253
+ }
254
+
255
+ // Skip not array or empty data
256
+ if ( ! is_array( $widgetids ) || empty( $widgetids ) ) {
257
+ continue;
258
+ }
259
+
260
+ // Loop widget IDs for this sidebar.
261
+ foreach ( $widgetids as $widgetid ) {
262
+
263
+ // Is there an instance for this widget ID?
264
+ if ( isset( $widget_instances[ $widgetid ] ) ) {
265
+
266
+ // Add to array.
267
+ $sidebars_widget_instances[ $sidebar_id ][ $widgetid ] = $widget_instances[ $widgetid ];
268
+
269
+ }
270
+
271
+ }
272
+
273
+ }
274
+
275
+ $sidebars_widget_instances['widgetopts_exported'] = true;
276
+
277
+ $data = apply_filters( 'widgetopts_unencoded_export_data', $sidebars_widget_instances );
278
+ $encoded = wp_json_encode( $data );
279
+
280
+ return apply_filters( 'widgetopts_exported_data', $encoded );
281
+ }
282
+
283
+ /**
284
+ * Export .json file with widgets data
285
+ */
286
+ function export_json_file() {
287
+
288
+ // Export requested.
289
+ if ( isset( $_GET['action'] ) && 'export' == sanitize_text_field( $_GET['action'] ) ) {
290
+
291
+ // Check referer before doing anything else.
292
+ check_admin_referer( 'widgeopts_export', 'widgeopts_nonce_export' );
293
+
294
+ $inactive = false;
295
+ $single_sidebar = false;
296
+
297
+ if( isset( $_GET['inactive'] ) && !empty( $_GET['inactive'] ) ){
298
+ $inactive = true;
299
+ }
300
+
301
+ if ( isset( $_GET['single_sidebar'] ) && !empty( $_GET['single_sidebar'] ) ) {
302
+ $single_sidebar = sanitize_text_field( $_GET['single_sidebar'] );
303
+ }
304
+
305
+ // Build filename similar with Widget Importer & Exporter Plugin but on json extension
306
+ // Single Site: yoursite.com-widgets.json
307
+ // Multisite: site.multisite.com-widgets.json or multisite.com-site-widgets.json.
308
+ $site_url = site_url( '', 'http' );
309
+ $site_url = trim( $site_url, '/\\' ); // Remove trailing slash.
310
+ $filename = str_replace( 'http://', '', $site_url ); // Remove http://.
311
+ $filename = str_replace( array( '/', '\\' ), '-', $filename ); // Replace slashes with - .
312
+
313
+ if( $single_sidebar ){
314
+ $filename .= '-' . $single_sidebar;
315
+ }
316
+
317
+ $filename .= '-widgets.json'; // Append.
318
+ $filename = apply_filters( 'widgetopts_exported_file', $filename );
319
+
320
+
321
+ $file_contents = $this->generate_export_data( $inactive, $single_sidebar );
322
+ $filesize = strlen( $file_contents );
323
+
324
+ // Headers to prompt "Save As".
325
+ header( 'Content-Type: application/octet-stream' );
326
+ header( 'Content-Disposition: attachment; filename=' . $filename );
327
+ header( 'Expires: 0' );
328
+ header( 'Cache-Control: must-revalidate' );
329
+ header( 'Pragma: public' );
330
+ header( 'Content-Length: ' . $filesize );
331
+
332
+ // Clear buffering just in case.
333
+ // @codingStandardsIgnoreLine
334
+ @ob_end_clean();
335
+ flush();
336
+
337
+ // Output file contents.
338
+ echo $file_contents;
339
+
340
+ // Stop execution.
341
+ exit;
342
+
343
+ }
344
+
345
+ }
346
+
347
+ /**
348
+ * Import .json file with widgets data
349
+ */
350
+ function import_json_file() {
351
+ // Export requested.
352
+ if ( !empty( $_POST ) && isset( $_POST['action'] ) && 'import' == sanitize_text_field( $_POST['action'] ) && check_admin_referer( 'widgeopts_import', 'widgeopts_nonce_import' ) ) {
353
+
354
+ //allow .json upload
355
+ add_filter( 'upload_mimes', array( &$this, 'add_mime_types' ) );
356
+
357
+ $uploaded_file = $_FILES['widgeopts_file'];
358
+ $wp_filetype = wp_check_filetype_and_ext( $uploaded_file['tmp_name'], $uploaded_file['name'], false );
359
+
360
+ if ( 'json' !== $wp_filetype['ext'] && ! wp_match_mime_types( 'json', $wp_filetype['type'] ) ) {
361
+
362
+ wp_die(
363
+ wp_kses(
364
+ __( 'Invalid File! Please upload Widget Options exported data.' . $wp_filetype['ext'], 'widget-options' ),
365
+ array(
366
+ 'b' => array(),
367
+ )
368
+ ),
369
+ '',
370
+ array(
371
+ 'back_link' => true,
372
+ )
373
+ );
374
+
375
+ }
376
+
377
+ // Check and move file to uploads directory
378
+ $file_data = wp_handle_upload( $uploaded_file, array(
379
+ 'test_form' => false,
380
+ ) );
381
+
382
+ if ( isset( $file_data['error'] ) ) {
383
+ wp_die(
384
+ esc_html( $file_data['error'] ),
385
+ '',
386
+ array(
387
+ 'back_link' => true,
388
+ )
389
+ );
390
+ }
391
+
392
+ // Check if file exists?
393
+ if ( ! file_exists( $file_data['file'] ) ) {
394
+ wp_die(
395
+ esc_html__( 'Import file could not be found. Please try again.', 'widget-options' ),
396
+ '',
397
+ array(
398
+ 'back_link' => true,
399
+ )
400
+ );
401
+ }
402
+
403
+ // Get file contents and decode.
404
+ $data = implode( '', file( $file_data['file'] ) );
405
+ $data = json_decode( $data, true );
406
+
407
+ // Delete import file.
408
+ unlink( $file_data['file'] );
409
+
410
+ if ( !is_array( $data ) || !isset( $data['widgetopts_exported'] ) ) {
411
+ wp_die(
412
+ esc_html__( 'Imported file invalid and not generated by Widget Options Plugin.', 'widget-options' ),
413
+ '',
414
+ array(
415
+ 'back_link' => true,
416
+ )
417
+ );
418
+ }
419
+
420
+ //assign to variable to be able to used on frontend
421
+ $this->imported = $this->organized_imported_data( $data );
422
+ }
423
+ }
424
+
425
+ /**
426
+ *
427
+ * Parse imported data and compares to existing widgets
428
+ *
429
+ */
430
+ function organized_imported_data( $data ){
431
+ global $wp_registered_sidebars, $wp_registered_widgets;
432
+
433
+ //variables
434
+ $checked = array();
435
+ $inactive = false;
436
+ $supported_widgets = $this->supported_widgets();
437
+
438
+ //Add Inactive Widgets
439
+ $wpregistered_sidebars = $wp_registered_sidebars;
440
+ $wpregistered_sidebars['wp_inactive_widgets'] = array( 'name' => __( 'Inactive Sidebars & Widgets', 'widget-options' ), 'id' => 'wp_inactive_widgets' );
441
+
442
+ // Hook before import.
443
+ do_action( 'widgetopts_before_render_import' );
444
+
445
+ //create filter for developers
446
+ $data = apply_filters( 'widgetopts_imported_data', $data );
447
+
448
+ if( isset( $data['wp_inactive_widgets'] ) && !empty( $data['wp_inactive_widgets'] ) ){
449
+ $inactive = true;
450
+ }
451
+
452
+ $widget_instances = json_decode( $this->generate_export_data( $inactive ), true );
453
+
454
+ //remove placeholder
455
+ unset( $data['widgetopts_exported'] );
456
+
457
+ // Begin results.
458
+ $results = array();
459
+
460
+ // Loop imported data's sidebars.
461
+ foreach ( $data as $sidebar => $widgets ) {
462
+
463
+ // Check if sidebar is available on this site.
464
+ if ( isset( $wpregistered_sidebars[ $sidebar ] ) ) {
465
+ $is_sidebar_available = true;
466
+ $sidebar_id = $sidebar;
467
+ $sidebar_message_type = 'yes';
468
+ $sidebar_message = '';
469
+ } else {
470
+ //add to inactive if sidebar not available
471
+ $is_sidebar_available = false;
472
+ $sidebar_id = 'wp_inactive_widgets'; // Add to inactive if sidebar does not exist in theme.
473
+ $sidebar_message_type = 'error';
474
+ $sidebar_message = esc_html__( 'Widget area does not exist in theme (using Inactive)', 'widget-options' );
475
+ }
476
+
477
+ // Result for sidebar
478
+ // Sidebar name if theme supports it; otherwise ID.
479
+ $results[ $sidebar ]['name'] = ! empty( $wpregistered_sidebars[ $sidebar ]['name'] ) ? $wpregistered_sidebars[ $sidebar ]['name'] : $sidebar;
480
+ $results[ $sidebar ]['message_type'] = $sidebar_message_type;
481
+ $results[ $sidebar ]['message'] = $sidebar_message;
482
+ $results[ $sidebar ]['widgets'] = array();
483
+ $results['sidebars'][ $sidebar ] = $results[ $sidebar ]['name'];
484
+
485
+ //Loop assigned widgets
486
+ foreach ( $widgets as $widget_id => $widget ) {
487
+ $fail = false;
488
+
489
+ // Get id_base (remove -# from end) and instance ID number.
490
+ $id_base = preg_replace( '/-[0-9]+$/', '', $widget_id );
491
+ $instance_id_number = str_replace( $id_base . '-', '', $widget_id );
492
+
493
+ // Does site support this widget?
494
+ if ( ! $fail && ! isset( $supported_widgets[ $id_base ] ) ) {
495
+ $fail = true;
496
+ $widget_message_type = 'error';
497
+ $widget_message = esc_html__( 'Widget Type not available.', 'widget-options' ); // Explain why widget not imported.
498
+ }
499
+
500
+ //check if same widget already available
501
+ if ( ! $fail && isset( $widget_instances[ $sidebar ][ $widget_id ] ) ) {
502
+ //compare if same sidebar and widget id have same contents too
503
+ if( $widget === $widget_instances[ $sidebar ][ $widget_id ] ){
504
+ $fail = true;
505
+ $widget_message_type = 'no-alt';
506
+ $widget_message = esc_html__( 'Widget already exists', 'widget-options' );
507
+ }
508
+ }
509
+
510
+ //double check if values exists with different widget keys
511
+ if ( ! $fail && isset( $widget_instances[ $sidebar ] ) && is_array( $widget_instances[ $sidebar ] ) && in_array( $widget, $widget_instances[ $sidebar ] ) ) {
512
+ $in_array_key = array_search( $widget, $widget_instances[ $sidebar ] );
513
+ $in_array_id_base = preg_replace( '/-[0-9]+$/', '', $in_array_key );
514
+
515
+ if( $id_base == $in_array_id_base ){
516
+ $fail = true;
517
+ $widget_message_type = 'no-alt';
518
+ $widget_message = esc_html__( 'Widget already exists', 'widget-options' );
519
+ }
520
+ }
521
+
522
+ // No failure.
523
+ if ( ! $fail ) {
524
+ $get_widget_instances = get_option( 'widget_' . $id_base );
525
+ $get_widget_instances = ! empty( $get_widget_instances ) ? $get_widget_instances : array(
526
+ '_multiwidget' => 1,
527
+ );
528
+
529
+ // add widget values to instances - to update later
530
+ $get_widget_instances[] = $widget;
531
+
532
+ // Get the given key
533
+ end( $get_widget_instances );
534
+ $new_instance_number = key( $get_widget_instances );
535
+
536
+ // Change number to 1 when it's 0 to avoid issues
537
+ if ( '0' === strval( $new_instance_number ) ) {
538
+ $new_instance_number = 1;
539
+ $get_widget_instances[ $new_instance_number ] = $get_widget_instances[0];
540
+ unset( $get_widget_instances[0] );
541
+ }
542
+
543
+ // Change widget options key to the given id_base and number to work perfectly
544
+ if( isset( $get_widget_instances[ $new_instance_number ] ) && isset( $get_widget_instances[ $new_instance_number ]['extended_widget_opts'] ) ){
545
+ $get_widget_instances[ $new_instance_number ]['extended_widget_opts-' . $id_base . '-' . $new_instance_number] = $get_widget_instances[ $new_instance_number ]['extended_widget_opts'];
546
+ unset( $get_widget_instances[ $new_instance_number ]['extended_widget_opts'] );
547
+ }
548
+
549
+ // Move _multiwidget to the end
550
+ if ( isset( $get_widget_instances['_multiwidget'] ) ) {
551
+ $multiwidget = $get_widget_instances['_multiwidget'];
552
+ unset( $get_widget_instances['_multiwidget'] );
553
+ $get_widget_instances['_multiwidget'] = $multiwidget;
554
+ }
555
+
556
+ // Update option with new widget.
557
+ update_option( 'widget_' . $id_base, $get_widget_instances );
558
+
559
+ // Get sidebar widgets
560
+ $sidebars_widgets = get_option( 'sidebars_widgets' );
561
+
562
+ // Avoid error when empty
563
+ if ( ! $sidebars_widgets ) {
564
+ $sidebars_widgets = array();
565
+ }
566
+
567
+ // Use ID number from new widget instance.
568
+ $new_instance_id = $id_base . '-' . $new_instance_number;
569
+
570
+ // Add new instance to sidebar.
571
+ $sidebars_widgets[ $sidebar ][] = $new_instance_id;
572
+
573
+ // Save new sidebar widgets options
574
+ update_option( 'sidebars_widgets', $sidebars_widgets );
575
+
576
+ // Success message.
577
+ if ( $is_sidebar_available ) {
578
+ $widget_message_type = 'yes';
579
+ $widget_message = esc_html__( 'Successfully Imported', 'widget-options' );
580
+ } else {
581
+ $widget_message_type = 'warning';
582
+ $widget_message = esc_html__( 'Sidebar Widget Area Not Available', 'widget-options' );
583
+ }
584
+ }
585
+
586
+ // Result for widget instance
587
+ $results[ $sidebar_id ]['widgets'][ $widget_id ]['name'] = isset( $available_widgets[ $id_base ]['name'] ) ? $available_widgets[ $id_base ]['name'] : $id_base;
588
+ $results[ $sidebar_id ]['widgets'][ $widget_id ]['title'] = ! empty( $widget['title'] ) ? $widget['title'] : esc_html__( 'No Title', 'widget-options' );
589
+ $results[ $sidebar_id ]['widgets'][ $widget_id ]['message_type'] = $widget_message_type;
590
+ $results[ $sidebar_id ]['widgets'][ $widget_id ]['message'] = $widget_message;
591
+
592
+ }
593
+
594
+ } //endforeach
595
+
596
+ // Hook after import.
597
+ do_action( 'widgetopts_after_render_import' );
598
+
599
+ // Return results.
600
+ return $this->imported = apply_filters( 'widgetopts_imported_results', $results );
601
+
602
+ }
603
+
604
+ function get_widget_instances(){
605
+ global $wp_registered_widgets;
606
+ $checked = array();
607
+
608
+ // Store all widgets in array
609
+ $widget_instances = array();
610
+
611
+ foreach ( $wp_registered_widgets as $widget ) {
612
+ $id_base = is_array( $widget['callback'] ) ? $widget['callback'][0]->id_base : '';
613
+ $opts = array();
614
+ if( !empty( $id_base ) ){
615
+ $instance = get_option( 'widget_' . $id_base );
616
+ }
617
+
618
+ $number = $widget['params'][0]['number'];
619
+ if ( ! isset( $instance[ $number ] ) ) {
620
+ continue;
621
+ }
622
+
623
+ $widget_id = $id_base . '-' . $number;
624
+
625
+ //bypass if widget id already checked
626
+ if ( isset( $checked[ $widget_id ] ) ) {
627
+ continue;
628
+ }
629
+ $checked[ $widget_id ] = '1';
630
+ $k = 'extended_widget_opts-'. $widget_id;
631
+ if( isset( $instance[ $number ][ $k ] ) ){
632
+
633
+ //unset id_base
634
+ if( isset( $instance[ $number ][ $k ]['id_base'] ) ){
635
+ unset( $instance[ $number ][ $k ]['id_base'] );
636
+ }
637
+
638
+ $instance[ $number ]['extended_widget_opts'] = $instance[ $number ][ $k ];
639
+ unset( $instance[ $number ][ $k ] );
640
+ }
641
+ $widget_instances[ $widget_id ] = $instance[ $number ];
642
+ }
643
+
644
+ return apply_filters( 'widgetopts_widget_instances', $widget_instances );
645
+ }
646
+
647
+ function supported_widgets() {
648
+
649
+ global $wp_registered_widget_controls;
650
+
651
+ $widget_controls = $wp_registered_widget_controls;
652
+
653
+ $available_widgets = array();
654
+
655
+ foreach ( $widget_controls as $widget ) {
656
+
657
+ // No duplicates.
658
+ if ( ! empty( $widget['id_base'] ) && ! isset( $available_widgets[ $widget['id_base'] ] ) ) {
659
+ $available_widgets[ $widget['id_base'] ]['id_base'] = $widget['id_base'];
660
+ $available_widgets[ $widget['id_base'] ]['name'] = $widget['name'];
661
+ }
662
+
663
+ }
664
+
665
+ return apply_filters( 'widgetopts_supported_widgets', $available_widgets );
666
+
667
+ }
668
+
669
+ /**
670
+ * Add mime type for upload
671
+ *
672
+ * Make sure the WordPress install will accept .json uploads.
673
+ *
674
+ */
675
+ function add_mime_types( $mime_types ) {
676
+
677
+ $mime_types['json'] = 'application/json';
678
+
679
+ return $mime_types;
680
+
681
+ }
682
+ }
683
+
684
+ new WP_Widget_Options_Importer();
685
+
686
+ endif;
includes/admin/notices.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Handles additional widget tab options
4
+ * run on __construct function
5
+ */
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) exit;
9
+
10
+
11
+ /**
12
+ * Admin Messages
13
+ * @return void
14
+ */
15
+ if( !function_exists( 'widgetopts_admin_notices' ) ):
16
+ function widgetopts_admin_notices() {
17
+ if( !current_user_can( 'update_plugins' ) )
18
+ return;
19
+
20
+ //show rating notice to page that matters most
21
+ global $pagenow;
22
+ if( !in_array( $pagenow, array( 'widgets.php', 'options-general.php' ) ) ){
23
+ return;
24
+ }
25
+
26
+ if( $pagenow == 'options-general.php' && function_exists( 'get_current_screen' ) ){
27
+ $screen = get_current_screen();
28
+ if( isset( $screen->base ) && $screen->base != 'settings_page_widgetopts_plugin_settings' ){
29
+ return;
30
+ }
31
+ }
32
+
33
+ $install_date = get_option( 'widgetopts_installDate' );
34
+ $saved = get_option( 'widgetopts_RatingDiv' );
35
+ $display_date = date( 'Y-m-d h:i:s' );
36
+ $datetime1 = new DateTime( $install_date );
37
+ $datetime2 = new DateTime( $display_date );
38
+ $diff_intrval = round( ($datetime2->format( 'U' ) - $datetime1->format( 'U' ) ) / (60*60*24));
39
+ if( 'yes' != $saved && $diff_intrval >= 7 ){
40
+ echo '<div class="widgetopts_notice updated" style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);">
41
+ <p>Awesome, you\'ve been using <strong>Widget Options</strong> for more than 1 week. <br> May i ask you to give it a <strong>5-star rating</strong> on WordPress? </br>
42
+ This will help to spread its popularity and to make this plugin a better one.
43
+ <br><br>Your help is much appreciated. Thank you very much,<br> ~ Jeffrey Carandang <em>(phpbits)</em>
44
+ <ul>
45
+ <li><a href="https://wordpress.org/support/view/plugin-reviews/widget-options" class="thankyou" target="_blank" title="Ok, you deserved it" style="font-weight:bold;">'. __( 'Ok, you deserved it', 'widget-options' ) .'</a></li>
46
+ <li><a href="javascript:void(0);" class="widgetopts_bHideRating" title="I already did" style="font-weight:bold;">'. __( 'I already did', 'widget-options' ) .'</a></li>
47
+ <li><a href="javascript:void(0);" class="widgetopts_bHideRating" title="No, not good enough" style="font-weight:bold;">'. __( 'No, not good enough, i do not like to rate it!', 'widget-options' ) .'</a></li>
48
+ </ul>
49
+ </div>
50
+ <script>
51
+ jQuery( document ).ready(function( $ ) {
52
+
53
+ jQuery(\'.widgetopts_bHideRating\').click(function(){
54
+ var data={\'action\':\'widgetopts_hideRating\'}
55
+ jQuery.ajax({
56
+
57
+ url: "'. admin_url( 'admin-ajax.php' ) .'",
58
+ type: "post",
59
+ data: data,
60
+ dataType: "json",
61
+ async: !0,
62
+ success: function(e) {
63
+ if (e=="success") {
64
+ jQuery(\'.widgetopts_notice\').slideUp(\'slow\');
65
+
66
+ }
67
+ }
68
+ });
69
+ })
70
+
71
+ });
72
+ </script>
73
+ ';
74
+ }
75
+ }
76
+ add_action( 'admin_notices', 'widgetopts_admin_notices' );
77
+ endif;
78
+ ?>
includes/admin/settings/display-settings.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin Options Page
4
+ * Settings > Widget Options
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 4.1
8
+ */
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ /**
13
+ * Creates the admin submenu pages under the Settings menu and assigns their
14
+ *
15
+ * @since 1.0
16
+ * @return void
17
+ */
18
+ if( !function_exists( 'widgetopts_add_options_link' ) ):
19
+ function widgetopts_add_options_link() {
20
+ add_options_page(
21
+ __( 'Widget Options', 'widget-options' ),
22
+ __( 'Widget Options', 'widget-options' ),
23
+ 'manage_options',
24
+ 'widgetopts_plugin_settings',
25
+ 'widgetopts_options_page'
26
+ );
27
+ }
28
+ add_action( 'admin_menu', 'widgetopts_add_options_link', 10 );
29
+ endif;
30
+
31
+ /**
32
+ * Options Page
33
+ *
34
+ * Renders the options page contents.
35
+ *
36
+ * @since 1.0
37
+ * @return void
38
+ */
39
+ if( !function_exists( 'widgetopts_options_page' ) ):
40
+ function widgetopts_options_page(){
41
+ $view = 'grid'; //define so that we can add more views later on
42
+ ?>
43
+ <div class="wrap">
44
+ <h1>
45
+ <?php _e( 'Widget Options', 'widget-options' ); ?>
46
+ <a href="<?php echo esc_url( apply_filters( 'widget_options_support_url', 'https://wordpress.org/support/plugin/widget-options/' ) ); ?>" target="_blank" class="page-title-action"><?php _e( 'Support', 'widget-options' ); ?></a>
47
+ <a href="<?php echo esc_url( apply_filters( 'widget_options_upgrade_url', 'http://widget-options.com/?utm_source=wordpressadmin&utm_medium=widget&utm_campaign=widgetoptsproupgrade' ) ); ?>" target="_blank" class="page-title-action"><?php _e( 'Upgrade', 'widget-options' ); ?></a>
48
+ </h1>
49
+
50
+ <div id="widgetopts-settings-messages-container"></div>
51
+ <div class="widgetopts-settings-desc">
52
+ <?php _e( 'Enable or disable any widget options tabs using this option. Some features has settings configuration that you can take advantage of to get the most out of Extended Widget Options on fully managing your widgets.', 'widget-options' );?>
53
+ </div>
54
+ <div class="widgetopts-badge widgetopts-badge-settings">
55
+ <span class="widgetopts-mascot"></span>
56
+ </div>
57
+
58
+ <div id="poststuff" class="widgetopts-poststuff">
59
+ <div id="post-body" class="metabox-holder columns-2 hide-if-no-js">
60
+ <div id="postbox-container-2" class="postbox-container">
61
+
62
+ <div class="widgetopts-module-cards-container <?php echo $view; ?> hide-if-no-js">
63
+ <form enctype="multipart/form-data" method="post" action="/wp-admin/admin.php?page=widgetopts_plugin_settings" id="widgetopts-module-settings-form">
64
+ <ul class="widgetopts-module-cards">
65
+ <?php echo do_action( 'widgetopts_module_cards' );?>
66
+ </ul>
67
+ </form>
68
+ </div>
69
+ <div class="widgetopts-modal-background"></div>
70
+ </div>
71
+
72
+ <div id="postbox-container-1" class="postbox-container">
73
+ <?php echo do_action( 'widgetopts_module_sidebar' );?>
74
+ </div>
75
+
76
+ </div>
77
+ </div>
78
+ </div>
79
+ <?php
80
+ }
81
+ endif;
82
+
83
+ /**
84
+ * Modal Wrapper
85
+ *
86
+ * Create callable modal wrappers to avoid writing same code again
87
+ *
88
+ * @since 4.0
89
+ * @return void
90
+ */
91
+ if( !function_exists( 'widgetopts_modal_start' ) ):
92
+ function widgetopts_modal_start( $option = null ){ ?>
93
+ <div class="widgetopts-module-settings-container">
94
+ <div class="widgetopts-modal-navigation">
95
+ <button class="dashicons widgetopts-close-modal"></button>
96
+ </div>
97
+ <div class="widgetopts-module-settings-content-container">
98
+ <div class="widgetopts-module-settings-content">
99
+ <?php }
100
+ endif;
101
+
102
+ if( !function_exists( 'widgetopts_modal_end' ) ):
103
+ function widgetopts_modal_end( $option = null ){ ?>
104
+ </div>
105
+ </div>
106
+ <div class="widgetopts-list-content-footer hide-if-no-js">
107
+ <button class="button button-primary align-left widgetopts-module-settings-save"><?php _e( 'Save Settings', 'widget-options' );?></button>
108
+ <button class="button button-secondary align-left widgetopts-module-settings-cancel"><?php _e( 'Cancel', 'widget-options' );?></button>
109
+ </div>
110
+ <div class="widgetopts-modal-content-footer">
111
+ <?php if( $option == 'activate' ){ ?>
112
+ <button class="button button-secondary align-right widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
113
+ <?php }else{ ?>
114
+ <button class="button button-primary align-right widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
115
+ <?php } ?>
116
+ <button class="button button-primary align-left widgetopts-module-settings-save"><?php _e( 'Save Settings', 'widget-options' );?></button>
117
+ </div>
118
+ </div>
119
+ <?php }
120
+ endif; ?>
includes/admin/settings/modules/acf.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Elementor Settings Module
4
+ * Settings > Widget Options :: ACF Support
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 4.3
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Elementor Pagebuilder Support
15
+ *
16
+ * @since 4.3
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+
21
+ if( !class_exists( 'widgetopts_settings_acf' ) ){
22
+ function widgetopts_settings_acf(){
23
+ global $widget_options;
24
+ //avoid issue after update
25
+ if( !isset( $widget_options['acf'] ) ){
26
+ $widget_options['acf'] = '';
27
+ }
28
+ ?>
29
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['acf'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-acf" data-module-id="acf">
30
+ <div class="widgetopts-module-card-content">
31
+ <h2><?php _e( 'Advanced Custom Fields Support', 'widget-options' );?></h2>
32
+ <div class="widgetopts-pro-label" style="background: transparent;color: #777;"><?php _e( 'BETA', 'widget-options' );?></div>
33
+ <p class="widgetopts-module-desc">
34
+ <?php _e( 'Extends widget options visibility using Advanced Custom Fields Plugin.', 'widget-options' );?>
35
+ </p>
36
+
37
+ <div class="widgetopts-module-actions hide-if-no-js">
38
+ <?php if( $widget_options['acf'] == 'activate' ){ ?>
39
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
40
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
41
+ <?php }else{ ?>
42
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
43
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
44
+ <?php } ?>
45
+
46
+ </div>
47
+ </div>
48
+
49
+ <?php widgetopts_modal_start( $widget_options['acf'] ); ?>
50
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-editor-textcolor"></span>
51
+ <h3 class="widgetopts-modal-header"><?php _e( 'Advanced Custom Fields Support', 'widget-options' );?></h3>
52
+ <p>
53
+ <?php _e( 'Enabling this feature will give you more visibility options for each widget and assign condition using ACF field.', 'widget-options' );?>
54
+ </p>
55
+ <p class="widgetopts-settings-section">
56
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
57
+ </p>
58
+ <?php widgetopts_modal_end( $widget_options['acf'] ); ?>
59
+
60
+ </li>
61
+ <?php
62
+ }
63
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_acf', 67 );
64
+ }
65
+ ?>
includes/admin/settings/modules/alignment.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Alignment Settings Module
4
+ * Settings > Widget Options :: Custom Alignment
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Custom Alignment Options
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_alignment' ) ):
21
+ function widgetopts_settings_alignment(){
22
+ global $widget_options; ?>
23
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['alignment'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-alignment" data-module-id="alignment">
24
+ <div class="widgetopts-module-card-content">
25
+ <h2><?php _e( 'Custom Alignment', 'widget-options' );?></h2>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Easily assign custom alignments on each widgets which will be relected on all devices.', 'widget-options' );?>
28
+ </p>
29
+
30
+ <div class="widgetopts-module-actions hide-if-no-js">
31
+ <?php if( $widget_options['alignment'] == 'activate' ){ ?>
32
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
33
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
34
+ <?php }else{ ?>
35
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
36
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
37
+ <?php } ?>
38
+
39
+ </div>
40
+ </div>
41
+
42
+ <?php widgetopts_modal_start( $widget_options['alignment'] ); ?>
43
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-editor-aligncenter"></span>
44
+ <h3 class="widgetopts-modal-header"><?php _e( 'Custom Alignment', 'widget-options' );?></h3>
45
+ <p>
46
+ <?php _e( 'Custom alignment widget options will allow you to assign different content alignments for each widgets. You can choose whether you want them to be left, right, justify or centered aligned.', 'widget-options' );?>
47
+ </p>
48
+ <p class="widgetopts-settings-section">
49
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
50
+ </p>
51
+ <?php widgetopts_modal_end( $widget_options['alignment'] ); ?>
52
+
53
+ </li>
54
+ <?php
55
+ }
56
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_alignment', 30 );
57
+ endif;
58
+ ?>
includes/admin/settings/modules/animation.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Animations Settings Module
4
+ * Settings > Widget Options :: Animation
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Animation Options
15
+ *
16
+ * @since 3.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_animation' ) ):
20
+ function widgetopts_settings_animation(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="animation">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="http://widget-options.com/features/wordpress-widget-animations/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Animation', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Add CSS animation effect to your widgets on page load or page scroll.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_animation', 130 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/beaver_builder.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Beaver Builder Settings Module
4
+ * Settings > Widget Options :: Beaver Builder Pagebuilder Support
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 4.5
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Beaver Builder Pagebuilder Support
15
+ *
16
+ * @since 4.5
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+
21
+ if( !class_exists( 'widgetopts_settings_beaver' ) ){
22
+ function widgetopts_settings_beaver(){
23
+ global $widget_options;
24
+ //avoid issue after update
25
+ if( !isset( $widget_options['beaver'] ) ){
26
+ $widget_options['beaver'] = '';
27
+ }
28
+ ?>
29
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['beaver'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-beaver" data-module-id="beaver">
30
+ <div class="widgetopts-module-card-content">
31
+ <h2><?php _e( 'Beaver Builder Support', 'widget-options' );?></h2>
32
+ <div class="widgetopts-pro-label" style="background: transparent;color: #777;"><?php _e( 'BETA', 'widget-options' );?></div>
33
+ <p class="widgetopts-module-desc">
34
+ <?php _e( 'Manage module visibility & styling using Widget Options integration.', 'widget-options' );?>
35
+ </p>
36
+
37
+ <div class="widgetopts-module-actions hide-if-no-js">
38
+ <?php if( $widget_options['beaver'] == 'activate' ){ ?>
39
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
40
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
41
+ <?php }else{ ?>
42
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
43
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
44
+ <?php } ?>
45
+
46
+ </div>
47
+ </div>
48
+
49
+ <?php widgetopts_modal_start( $widget_options['beaver'] ); ?>
50
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-editor-kitchensink"></span>
51
+ <h3 class="widgetopts-modal-header"><?php _e( 'Beaver Builder Support', 'widget-options' );?></h3>
52
+ <p>
53
+ <?php _e( 'This feature will unlock <strong>Widget Options</strong> section on every <a href="https://www.wpbeaverbuilder.com/?utm_source=widget_options_plugin" target="_blank">Beaver Builder</a> modules that will extend functionalities and will let you control each widgets even more.', 'widget-options' );?>
54
+ </p>
55
+ <h4><?php _e( 'Limitations', 'widget-options' );?></h4>
56
+ <p><?php _e( 'Widget Options feature that is already available on Beaver Builder settings will not be applied since this will be a redundant option. Thanks!', 'widget-options' );?></p>
57
+ <div class="widgetopts-settings-section">
58
+ <p class="widgetopts-settings-section"><?php _e( 'No additional settings available.', 'widget-options' );?></p>
59
+ </div>
60
+ <?php widgetopts_modal_end( $widget_options['beaver'] ); ?>
61
+
62
+ </li>
63
+ <?php
64
+ }
65
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_beaver', 67 );
66
+ }
67
+ ?>
includes/admin/settings/modules/cache.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widget Caching Settings Module
4
+ * Settings > Widget Options :: Cache
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 3.2
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Fixed Widget Options
15
+ *
16
+ * @since 3.2
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_cache' ) ):
20
+ function widgetopts_settings_cache(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="cache">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="https://widget-options.com/features/wordpress-widget-cache/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Widget Cache', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Improve loading and performance by caching widget output using Transient API.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_cache', 175 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/classes.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widget Classes Settings Module
4
+ * Settings > Widget Options :: Classes & ID
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Widget Classes Options
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_classes' ) ):
21
+ function widgetopts_settings_classes(){
22
+ global $widget_options;
23
+ $classes = ( isset( $widget_options['settings']['classes'] ) ) ? $widget_options['settings']['classes'] : array();
24
+ $classlists = ( isset( $classes['classlists'] ) && is_array( $classes['classlists'] ) ) ? $classes['classlists'] : array();?>
25
+ <li class="widgetopts-module-card <?php echo ( $widget_options['classes'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-classes" data-module-id="classes">
26
+ <div class="widgetopts-module-card-content">
27
+ <h2><?php _e( 'Classes & ID', 'widget-options' );?></h2>
28
+ <p class="widgetopts-module-desc">
29
+ <?php _e( 'Assign custom css classes and ID on each widgets for element targeting.', 'widget-options' );?>
30
+ </p>
31
+
32
+ <div class="widgetopts-module-actions hide-if-no-js">
33
+ <?php if( $widget_options['classes'] == 'activate' ){ ?>
34
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
35
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
36
+ <?php }else{ ?>
37
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
38
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
39
+ <?php } ?>
40
+
41
+ </div>
42
+
43
+ </div>
44
+
45
+ <?php widgetopts_modal_start( $widget_options['classes'] ); ?>
46
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-admin-generic"></span>
47
+ <h3 class="widgetopts-modal-header"><?php _e( 'Classes & ID', 'widget-options' );?></h3>
48
+ <p>
49
+ <?php _e( 'Custom alignment widget options will allow you to assign different content alignments for each widgets on specific devices. You can choose whether you want them to be left, right, justify or centered aligned on desktop, tablet or mobile devices.', 'widget-options' );?>
50
+ </p>
51
+ <table class="form-table widgetopts-settings-section">
52
+ <tr>
53
+ <th scope="row">
54
+ <label for="widgetopts-classes-id"><?php _e( 'Show ID Field', 'widget-options' );?></label>
55
+ </th>
56
+ <td>
57
+ <input type="checkbox" id="widgetopts-classes-id" name="classes[id]" <?php echo widgetopts_is_checked( $classes, 'id' ) ?> value="1" />
58
+ <label for="widgetopts-classes-id"><?php _e( 'Enable ID Field', 'widget-options' );?></label>
59
+ <p class="description">
60
+ <?php _e( 'Allow user to add custom ID on each widgets. ', 'widget-options' );?>
61
+ </p>
62
+ </td>
63
+ </tr>
64
+ <tr>
65
+ <th scope="row">
66
+ <label><?php _e( 'Classes Field Type', 'widget-options' );?></label>
67
+ </th>
68
+ <td>
69
+ <label for="widgetopts-classes-class-text">
70
+ <input type="radio" value="text" id="widgetopts-classes-class-text" name="classes[type]" <?php if( isset( $classes['type'] ) && 'text' == $classes['type'] ){ echo 'checked="checked"'; }?> /><?php _e( 'Text Field', 'widget-options' );?>
71
+ </label>&nbsp;&nbsp;
72
+
73
+ <label for="widgetopts-classes-class-predefined">
74
+ <input type="radio" value="predefined" id="widgetopts-classes-class-predefined" name="classes[type]" <?php if( isset( $classes['type'] ) && 'predefined' == $classes['type'] ){ echo 'checked="checked"'; }?> /><?php _e( 'Predefined Class Checkboxes', 'widget-options' );?>
75
+ </label>&nbsp;&nbsp;
76
+
77
+ <label for="widgetopts-classes-class-both">
78
+ <input type="radio" value="both" id="widgetopts-classes-class-both" name="classes[type]" <?php if( isset( $classes['type'] ) && 'both' == $classes['type'] ){ echo 'checked="checked"'; }?> /><?php _e( 'Both', 'widget-options' );?>
79
+ </label>&nbsp;&nbsp;
80
+
81
+ <label for="widgetopts-classes-class-hide">
82
+ <input type="radio" value="hide" id="widgetopts-classes-class-hide" name="classes[type]" <?php if( isset( $classes['type'] ) && 'hide' == $classes['type'] ){ echo 'checked="checked"'; }?> /><?php _e( 'Hide', 'widget-options' );?>
83
+ </label>
84
+ <p class="description">
85
+ <?php _e( 'Select which field type you want to manage each widget classes option.', 'widget-options' );?>
86
+ </p>
87
+ </td>
88
+ </tr>
89
+ <tr>
90
+ <th scope="row">
91
+ <label for="widgetopts-classes-auto"><?php _e( 'Remove .widget Class', 'widget-options' );?></label>
92
+ </th>
93
+ <td>
94
+ <input type="checkbox" id="widgetopts-classes-auto" name="classes[auto]" <?php echo widgetopts_is_checked( $classes, 'auto' ) ?> value="1" />
95
+ <label for="widgetopts-classes-auto"><?php _e( 'Disable Additional Class', 'widget-options' );?></label>
96
+ <p class="description">
97
+ <?php _e( 'Check this box if you want to disable the automatic addition of .widget class', 'widget-options' );?>
98
+ </p>
99
+ </td>
100
+ </tr>
101
+ </table>
102
+ <div class="widgetopts-settings-section">
103
+ <h4><?php _e( 'Predefined Classes', 'widget-options' );?></h4>
104
+ <p><?php _e( 'Set a class lists that you want to be available as pre-choices on the Class/ID Widget Options tab.', 'widget-options' );?></p>
105
+
106
+ <div id="opts-predefined-classes">
107
+ <ul>
108
+ <li class="opts-hidden-placeholder"></li>
109
+ <?php
110
+ if( !empty( $classlists ) && is_array( $classlists ) ){
111
+ $classlists = array_unique( $classlists );
112
+ foreach ($classlists as $key => $value) {
113
+ echo '<li><input type="hidden" name="classes[classlists][]" value="'. $value .'" /><span class"opts-li-value">'. $value .'</span> <a href="#" class="opts-remove-class-btn"><span class="dashicons dashicons-dismiss"></span></a></li>';
114
+ }
115
+ }
116
+ ?>
117
+ </ul>
118
+ </div>
119
+
120
+ <table class="form-table">
121
+ <tbody>
122
+ <tr valign="top">
123
+ <td scope="row" valign="middle">
124
+ <input type="text" class="regular-text code opts-add-class-txtfld" />
125
+ <a href="#" class="opts-add-class-btn widgetopts-add-class-btn"><span class="dashicons dashicons-plus-alt"></span></a><br />
126
+ <small><em><?php _e( 'Note: Click the Plus icon to add the class.', 'widget-options' );?></em></small>
127
+ </td>
128
+ </tr>
129
+ </tbody>
130
+ </table>
131
+ </div>
132
+ <?php widgetopts_modal_end( $widget_options['classes'] ); ?>
133
+
134
+ </li>
135
+ <?php
136
+ }
137
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_classes', 50 );
138
+ endif;
139
+ ?>
includes/admin/settings/modules/clone.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Clone Widgets Settings Module
4
+ * Settings > Widget Options :: Clone Widget
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 3.4
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Clone Widgets
15
+ *
16
+ * @since 3.4
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_clone' ) ):
20
+ function widgetopts_settings_clone(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="clone">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="https://widget-options.com/features/clone-wordpress-widgets/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Clone Widget', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Clone any widgets easily and assign them to your selected sidebar widget areas.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_clone', 69 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/columns.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Columns Settings Module
4
+ * Settings > Widget Options :: Column Display
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Column Display Options
15
+ *
16
+ * @since 3.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_columns' ) ):
20
+ function widgetopts_settings_columns(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="columns">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="http://widget-options.com/features/responsive-wordpress-widget-columns/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Column Display', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Manage your widgets display as columns, set different columns for specific devices.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_columns', 90 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/dates.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Days & Date Range Settings Module
4
+ * Settings > Widget Options :: Days & Date Range
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Days & Date Range Options
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_dates' ) ):
21
+ function widgetopts_settings_dates(){ ?>
22
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="dates">
23
+ <div class="widgetopts-module-card-content">
24
+ <a href="http://widget-options.com/features/restrict-wordpress-widgets-per-days-date-range/" target="_blank" class="widgetopts-pro-upsell"></a>
25
+ <h2><?php _e( 'Days & Date Range', 'widget-options' );?></h2>
26
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
27
+ <p class="widgetopts-module-desc">
28
+ <?php _e( 'Restrict widget visibility in any day of the week and/or specific date range.', 'widget-options' );?>
29
+ </p>
30
+ </div>
31
+ </li>
32
+ <?php
33
+ }
34
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_dates', 110 );
35
+ endif;
36
+ ?>
includes/admin/settings/modules/devices.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Devices Settings Module
4
+ * Settings > Widget Options :: Devices Restriction
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Devices Visibility Options
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_devices' ) ):
21
+ function widgetopts_settings_devices(){
22
+ global $widget_options; ?>
23
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['devices'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-devices" data-module-id="devices">
24
+ <div class="widgetopts-module-card-content">
25
+ <h2><?php _e( 'Devices Restriction', 'widget-options' );?></h2>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Show or hide specific WordPress widgets on desktop, tablet and/or mobile screen sizes.', 'widget-options' );?>
28
+ </p>
29
+
30
+ <div class="widgetopts-module-actions hide-if-no-js">
31
+ <?php if( $widget_options['devices'] == 'activate' ){ ?>
32
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
33
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
34
+ <?php }else{ ?>
35
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
36
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
37
+ <?php } ?>
38
+
39
+ </div>
40
+ </div>
41
+
42
+ <?php widgetopts_modal_start( $widget_options['devices'] ); ?>
43
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-smartphone"></span>
44
+ <h3 class="widgetopts-modal-header"><?php _e( 'Devices Restriction', 'widget-options' );?></h3>
45
+ <p>
46
+ <?php _e( 'This feature will allow you to display different sidebar widgets for each devices. You can restrict visibility on desktop, tablet and/or mobile device screen sizes at ease via checkboxes.', 'widget-options' );?>
47
+ </p>
48
+ <p class="widgetopts-settings-section">
49
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
50
+ </p>
51
+ <?php widgetopts_modal_end( $widget_options['devices'] ); ?>
52
+
53
+ </li>
54
+ <?php
55
+ }
56
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_devices', 20 );
57
+ endif;
58
+ ?>
includes/admin/settings/modules/disable_widgets.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Disable Widgets Settings Module
4
+ * Settings > Widget Options :: Disable Widgets
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Disable Widgets Options
15
+ *
16
+ * @since 3.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_disable_widgets' ) ):
20
+ function widgetopts_settings_disable_widgets(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="disable_widgets">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="https://widget-options.com/features/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Disable Widgets', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Disable several widgets that you won\'t be using to lessen widget dashboard space.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_disable_widgets', 150 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/elementor.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Elementor Settings Module
4
+ * Settings > Widget Options :: Elementor Pagebuilder Support
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 4.3
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Elementor Pagebuilder Support
15
+ *
16
+ * @since 4.3
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+
21
+ if( !class_exists( 'widgetopts_settings_elementor' ) ){
22
+ function widgetopts_settings_elementor(){
23
+ global $widget_options;
24
+ //avoid issue after update
25
+ if( !isset( $widget_options['elementor'] ) ){
26
+ $widget_options['elementor'] = '';
27
+ }
28
+ ?>
29
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['elementor'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-elementor" data-module-id="elementor">
30
+ <div class="widgetopts-module-card-content">
31
+ <h2><?php _e( 'Elementor Pagebuilder Support', 'widget-options' );?></h2>
32
+ <div class="widgetopts-pro-label" style="background: transparent;color: #777;"><?php _e( 'BETA', 'widget-options' );?></div>
33
+ <p class="widgetopts-module-desc">
34
+ <?php _e( 'Extends widget options functionality to Elementor Pagebuilder Plugin.', 'widget-options' );?>
35
+ </p>
36
+
37
+ <div class="widgetopts-module-actions hide-if-no-js">
38
+ <?php if( $widget_options['elementor'] == 'activate' ){ ?>
39
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
40
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
41
+ <?php }else{ ?>
42
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
43
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
44
+ <?php } ?>
45
+
46
+ </div>
47
+ </div>
48
+
49
+ <?php widgetopts_modal_start( $widget_options['elementor'] ); ?>
50
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-editor-kitchensink"></span>
51
+ <h3 class="widgetopts-modal-header"><?php _e( 'Elementor Pagebuilder Support', 'widget-options' );?></h3>
52
+ <p>
53
+ <?php _e( 'This feature will unlock <strong>Widget Options</strong> section on every Elementor widgets that will extend functionalities and will let you control each widgets even more.', 'widget-options' );?>
54
+ </p>
55
+ <h4><?php _e( 'Limitations', 'widget-options' );?></h4>
56
+ <p><?php _e( 'Widget Options feature that is already available on Elementor settings will not be applied since this will be a redundant option. Thanks!', 'widget-options' );?></p>
57
+ <p class="widgetopts-settings-section">
58
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
59
+ </p>
60
+ <?php widgetopts_modal_end( $widget_options['elementor'] ); ?>
61
+
62
+ </li>
63
+ <?php
64
+ }
65
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_elementor', 67 );
66
+ }
67
+ ?>
includes/admin/settings/modules/fixed.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fixed Widget Settings Module
4
+ * Settings > Widget Options :: Fixed Widget
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Fixed Widget Options
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_fixed' ) ):
21
+ function widgetopts_settings_fixed(){ ?>
22
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="fixed">
23
+ <div class="widgetopts-module-card-content">
24
+ <a href="https://widget-options.com/features/sticky-fixed-wordpress-widgets/" target="_blank" class="widgetopts-pro-upsell"></a>
25
+ <h2><?php _e( 'Fixed Widget', 'widget-options' );?></h2>
26
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
27
+ <p class="widgetopts-module-desc">
28
+ <?php _e( 'Add fixed positioning to each widget when the page is scrolled.', 'widget-options' );?>
29
+ </p>
30
+ </div>
31
+ </li>
32
+ <?php
33
+ }
34
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_fixed', 68 );
35
+ endif;
36
+ ?>
includes/admin/settings/modules/import-export.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Import & Export Settings Module
4
+ * Settings > Widget Options :: Import & Export
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 4.4
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Import & Export
15
+ *
16
+ * @since 4.4
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+
21
+ function widgetopts_settings_import_export(){
22
+ global $widget_options;
23
+ //avoid issue after update
24
+ if( !isset( $widget_options['import_export'] ) ){
25
+ $widget_options['import_export'] = '';
26
+ }
27
+ ?>
28
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['import_export'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-import_export" data-module-id="import_export">
29
+ <div class="widgetopts-module-card-content">
30
+ <h2><?php _e( 'Import & Export Widgets', 'widget-options' );?></h2>
31
+ <p class="widgetopts-module-desc">
32
+ <?php _e( 'Import or Export all your widgets with associated sidebar widget area easily.', 'widget-options' );?>
33
+ </p>
34
+
35
+ <div class="widgetopts-module-actions hide-if-no-js">
36
+ <?php if( $widget_options['import_export'] == 'activate' ){ ?>
37
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
38
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
39
+ <?php }else{ ?>
40
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
41
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
42
+ <?php } ?>
43
+
44
+ </div>
45
+
46
+ </div>
47
+
48
+ <?php widgetopts_modal_start( $widget_options['import_export'] ); ?>
49
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-download"></span>
50
+ <h3 class="widgetopts-modal-header"><?php _e( 'Import & Export Widgets', 'widget-options' );?></h3>
51
+ <p>
52
+ <?php _e( 'Enabling this feature will give you additional menu under <a href="'. esc_url( admin_url( 'tools.php?page=widgetopts_migrator_settings' ) ) .'"><strong>Tools > Import/Export Widgets</strong></a>. This will give you the easiest option to export and import your widgets. Creating backup and restore of your widgets can be done really simple!', 'widget-options' );?>
53
+ </p>
54
+ <p class="widgetopts-settings-section">
55
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
56
+ </p>
57
+ <?php widgetopts_modal_end( $widget_options['import_export'] ); ?>
58
+
59
+ </li>
60
+ <?php
61
+ }
62
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_import_export', 64 );
63
+ ?>
includes/admin/settings/modules/links.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Links Settings Module
4
+ * Settings > Widget Options :: Link Widget
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Custom Links Options
15
+ *
16
+ * @since 3.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_links' ) ):
20
+ function widgetopts_settings_links(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="links">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="https://widget-options.com/features/link-wordpress-widgets/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Link Widget', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Add custom links to any widgets to redirect users on click action.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_links', 70 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/logic.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widget Logic Settings Module
4
+ * Settings > Widget Options :: Display Logic
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Display Logic Options
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_logic' ) ):
21
+ function widgetopts_settings_logic(){
22
+ global $widget_options; ?>
23
+ <li class="widgetopts-module-card <?php echo ( isset( $widget_options['logic'] ) && $widget_options['logic'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-logic" data-module-id="logic">
24
+ <div class="widgetopts-module-card-content">
25
+ <h2><?php _e( 'Display Logic', 'widget-options' );?></h2>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Use WordPress PHP conditional tags to assign each widgets visibility.', 'widget-options' );?>
28
+ </p>
29
+
30
+ <div class="widgetopts-module-actions hide-if-no-js">
31
+ <?php if( $widget_options['logic'] == 'activate' ){ ?>
32
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
33
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
34
+ <?php }else{ ?>
35
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
36
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
37
+ <?php } ?>
38
+
39
+ </div>
40
+
41
+ </div>
42
+
43
+ <?php widgetopts_modal_start( $widget_options['logic'] ); ?>
44
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-admin-generic"></span>
45
+ <h3 class="widgetopts-modal-header"><?php _e( 'Display Logic', 'widget-options' );?></h3>
46
+ <p>
47
+ <?php _e( 'Display Widget Logic will let you control where you want the widgets to appear using WordPress conditional tags.', 'widget-options' );?>
48
+ </p>
49
+ <p>
50
+ <?php _e( "<strong>Please note</strong> that the display logic you introduce is EVAL'd directly. Anyone who has access to edit widget appearance will have the right to add any code, including malicious and possibly destructive functions. There is an optional filter <code>widget_options_logic_override</code> which you can use to bypass the EVAL with your own code if needed.", 'widget-options' )?>
51
+ </p>
52
+ <table class="form-table widgetopts-settings-section">
53
+ <tr>
54
+ <th scope="row">
55
+ <label for="widgetopts-logic-notice"><?php _e( 'Hide Notice', 'widget-options' );?></label>
56
+ </th>
57
+ <td>
58
+ <input type="checkbox" id="widgetopts-logic-notice" name="logic[notice]" <?php echo ( isset( $widget_options['settings']['logic'] ) ) ? widgetopts_is_checked( $widget_options['settings']['logic'], 'notice' ) : ''; ?> value="1" />
59
+ <label for="widgetopts-logic-notice"><?php _e( 'Disable Notice Toggler', 'widget-options' );?></label>
60
+ <p class="description">
61
+ <?php _e( 'Hide similar filter notice above on each widget display logic feature.', 'widget-options' );?>
62
+ </p>
63
+ </td>
64
+ </tr>
65
+ </table>
66
+ <?php widgetopts_modal_end( $widget_options['logic'] ); ?>
67
+
68
+ </li>
69
+ <?php
70
+ }
71
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_logic', 60 );
72
+ endif;
73
+ ?>
includes/admin/settings/modules/move.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Move Widgets Module
4
+ * Settings > Widget Options :: Move Widget
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 3.4
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Move Widget Feature
15
+ *
16
+ * @since 3.4
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+
21
+ if( !function_exists( 'widgetopts_settings_move' ) ):
22
+ function widgetopts_settings_move(){
23
+ global $widget_options;
24
+
25
+ //avoid issue after update
26
+ if( !isset( $widget_options['move'] ) ){
27
+ $widget_options['move'] = '';
28
+ }
29
+ ?>
30
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['move'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-move" data-module-id="move">
31
+ <div class="widgetopts-module-card-content">
32
+ <h2><?php _e( 'Move Widget', 'widget-options' );?></h2>
33
+ <p class="widgetopts-module-desc">
34
+ <?php _e( 'Easily move widgets to any sidebar widget area without drag and drop.', 'widget-options' );?>
35
+ </p>
36
+
37
+ <div class="widgetopts-module-actions hide-if-no-js">
38
+ <?php if( $widget_options['move'] == 'activate' ){ ?>
39
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
40
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
41
+ <?php }else{ ?>
42
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
43
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
44
+ <?php } ?>
45
+
46
+ </div>
47
+
48
+ </div>
49
+
50
+ <?php widgetopts_modal_start( $widget_options['move'] ); ?>
51
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-image-rotate-right"></span>
52
+ <h3 class="widgetopts-modal-header"><?php _e( 'Move Widget', 'widget-options' );?></h3>
53
+ <p>
54
+ <?php _e( 'Move Widget feature will automatically add <strong>Move</strong> button that will let you easily move any widgets to any sidebar widget areas without dragging them. This will definitely increase your productivity and widget management specially on smaller screen devices such as mobile phones. You can check how this feature works on this <a href="https://vimeo.com/229112330" target="_blank">video</a>. Thanks!', 'widget-options' );?>
55
+ </p>
56
+ <p class="widgetopts-settings-section">
57
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
58
+ </p>
59
+ <?php widgetopts_modal_end( $widget_options['move'] ); ?>
60
+
61
+ </li>
62
+ <?php
63
+ }
64
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_move', 64 );
65
+ endif;
66
+ ?>
includes/admin/settings/modules/permission.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Alignment Settings Module
4
+ * Settings > Widget Options :: Custom Alignment
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Custom Alignment Options
15
+ *
16
+ * @since 3.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_permissions' ) ):
20
+ function widgetopts_settings_permissions(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="permission">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="https://widget-options.com/features/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Permission', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Hide widget options tabs below each widgets to selected user roles.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+
32
+ <?php
33
+ }
34
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_permissions', 160 );
35
+ endif;
36
+ ?>
includes/admin/settings/modules/roles.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Roles Settings Module
4
+ * Settings > Widget Options :: User Roles Restriction
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for User Roles Restriction
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_roles' ) ):
21
+ function widgetopts_settings_roles(){ ?>
22
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="roles">
23
+ <div class="widgetopts-module-card-content">
24
+ <a href="https://widget-options.com/features/restrict-wordpress-widgets-per-user-roles/" target="_blank" class="widgetopts-pro-upsell"></a>
25
+ <h2><?php _e( 'User Roles Restriction', 'widget-options' );?></h2>
26
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
27
+ <p class="widgetopts-module-desc">
28
+ <?php _e( 'Restrict each widgets visibility for each user roles at ease via checkboxes.', 'widget-options' );?>
29
+ </p>
30
+ </div>
31
+ </li>
32
+ <?php
33
+ }
34
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_roles', 100 );
35
+ endif;
36
+ ?>
includes/admin/settings/modules/search.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Live Search Settings Module
4
+ * Settings > Widget Options :: Live Widget Search
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 3.3
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Live Widget Search
15
+ *
16
+ * @since 3.3
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_search' ) ):
21
+ function widgetopts_settings_search(){
22
+ global $widget_options;
23
+ //prevent undefined index error on upgrade
24
+ if( !isset( $widget_options['search'] ) ){
25
+ $widget_options['search'] = '';
26
+ }
27
+ ?>
28
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['search'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-search" data-module-id="search">
29
+ <div class="widgetopts-module-card-content">
30
+ <h2><?php _e( 'Live Widget Search', 'widget-options' );?></h2>
31
+ <p class="widgetopts-module-desc">
32
+ <?php _e( 'Add live widget and sidebar search option on widgets.php admin dashboard.', 'widget-options' );?>
33
+ </p>
34
+
35
+ <div class="widgetopts-module-actions hide-if-no-js">
36
+ <?php if( $widget_options['search'] == 'activate' ){ ?>
37
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
38
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
39
+ <?php }else{ ?>
40
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
41
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
42
+ <?php } ?>
43
+
44
+ </div>
45
+ </div>
46
+
47
+ <?php widgetopts_modal_start( $widget_options['search'] ); ?>
48
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-search"></span>
49
+ <h3 class="widgetopts-modal-header"><?php _e( 'Live Widget & Sidebar Search', 'widget-options' );?></h3>
50
+ <p>
51
+ <?php _e( 'This feature will add search box before available widgets area that will let you filter the widgets for better widget handling. This will also add search box above the sidebar chooser when you click each widgets for you to assign them easily.', 'widget-options' );?>
52
+ </p>
53
+ <p class="widgetopts-settings-section">
54
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
55
+ </p>
56
+ <?php widgetopts_modal_end( $widget_options['search'] ); ?>
57
+
58
+ </li>
59
+ <?php
60
+ }
61
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_search', 64 );
62
+ endif;
63
+ ?>
includes/admin/settings/modules/shortcodes.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Shortcodes Settings Module
4
+ * Settings > Widget Options :: Shortcodes
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Shortcodes Options
15
+ *
16
+ * @since 3.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_shortcodes' ) ):
20
+ function widgetopts_settings_shortcodes(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="shortcodes">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="https://widget-options.com/features/sidebar-widgets-shortcodes/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Shortcodes', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Display any sidebars and widgets anywhere using shortcodes.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_shortcodes', 170 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/sidebar-more_plugins.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Support Sidebar Metabox
4
+ * Settings > Widget Options
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 4.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Metabox for Support
15
+ *
16
+ * @since 4.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_more_plugins' ) ):
20
+ function widgetopts_settings_more_plugins(){ ?>
21
+ <div id="widgetopts-sidebar-widget-more_plugins" class="postbox widgetopts-sidebar-widget">
22
+ <h3 class="hndle ui-sortable-handle"><span><?php _e( 'Ready for Gutenberg?', 'widget-options' );?></span></h3>
23
+ <div class="inside">
24
+ <p><?php _e( 'Get the same controls for your Gutenberg blocks using our brand new plugin Block Options for Gutenberg. Also available for free on plugin repository.', 'widget-options' );?></p>
25
+ <p>
26
+ <a class="button-secondary" href="https://wordpress.org/plugins/block-options/" target="_blank"><?php _e( 'Download Block Options', 'widget-options' );?></a>
27
+ </p>
28
+ </div>
29
+ </div>
30
+
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_sidebar', 'widgetopts_settings_more_plugins', 25 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/sidebar-opt_in.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Support Sidebar Metabox
4
+ * Settings > Widget Options
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 4.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Metabox for Support
15
+ *
16
+ * @since 4.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_sidebar_opt_in' ) ):
20
+ function widgetopts_settings_sidebar_opt_in(){ ?>
21
+ <div id="widgetopts-sidebar-widget-optin" class="postbox widgetopts-sidebar-widget">
22
+ <h3 class="hndle ui-sortable-handle"><span><?php _e( 'Download our Ultimate Guide: Optimizing WordPress Sidebars and Widgets for Better Traffic and Conversions', 'widget-options' );?></span></h3>
23
+ <div class="inside">
24
+ <p style="text-align: center;"><img src="<?php echo WIDGETOPTS_PLUGIN_URL . '/assets/images/cover-book.jpg'?>" width="180"></p>
25
+ <form action="https://phpbits.us12.list-manage.com/subscribe/post?u=5597485458f20da5305e44c55&amp;id=6729a2bb96" method="post" class="validate widgetopts-ebook-form" target="_blank" novalidate>
26
+ <p>
27
+ <?php _e( 'Get detailed insights based on our research on 70+ popular websites that will help you optimize your WordPress sidebars and widgets.', 'widget-options' );?>
28
+ </p>
29
+ <p>
30
+ <?php _e( 'Email Address:', 'widget-options' );?><br />
31
+ <input name="EMAIL" class="required email widefat" placeholder="<?php _e( 'email@domain.com', 'widget-options' );?>" />
32
+
33
+ <input type="hidden" name="MMERGE3" value="Freebies" />
34
+ <input type="hidden" name="MMERGE4" value="Plugin Campaign" />
35
+ <input type="hidden" name="MMERGE5" value="Introducing Ultimate Guide: Optimizing WordPress Sidebars and Widgets for Better Traffic and Conversions" />
36
+ </p>
37
+ <p>
38
+ <button class="button-secondary"><?php _e( 'Subscribe & Download', 'widget-options' );?></button>
39
+ </p>
40
+ </form>
41
+ </div>
42
+ </div>
43
+ <script type="text/javascript">
44
+ jQuery( document ).ready( function(){
45
+ jQuery( '.widgetopts-ebook-form' ).on( 'submit', function(e){
46
+ if( jQuery( this ).find( '.required' ).val() == '' ){
47
+ jQuery( this ).find( '.required' ).css({ 'border' : '1px solid red' });
48
+ return false;
49
+ }else{
50
+ jQuery( this ).find( '.required' ).removeAttr('style');
51
+ }
52
+ } );
53
+ } );
54
+ </script>
55
+
56
+ <?php
57
+ }
58
+ add_action( 'widgetopts_module_sidebar', 'widgetopts_settings_sidebar_opt_in', 20 );
59
+ endif;
60
+ ?>
includes/admin/settings/modules/sidebar-support_box.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Support Sidebar Metabox
4
+ * Settings > Widget Options
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 4.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Metabox for Support
15
+ *
16
+ * @since 4.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_support_box' ) ):
20
+ function widgetopts_settings_support_box(){ ?>
21
+ <div id="widgetopts-sidebar-widget-support" class="postbox widgetopts-sidebar-widget">
22
+ <h3 class="hndle ui-sortable-handle"><span><?php _e( 'Need Help on Managing Widgets?', 'widget-options' );?></span></h3>
23
+ <div class="inside">
24
+ <p>
25
+ <?php _e( 'Since you are using the free version, you can get the free support on WordPress.org community forums. Thanks!', 'widget-options' );?>
26
+ </p>
27
+ <p>
28
+ <a class="button-secondary" href="https://wordpress.org/support/plugin/widget-options/" target="_blank"><?php _e( 'Get Free Support', 'widget-options' );?></a>
29
+ </p>
30
+ <p>
31
+ <?php _e( 'Manage your widgets better and get fast professional support by upgrading to Extended Widget Options.', 'widget-options' );?>
32
+ </p>
33
+ <p>
34
+ <a class="button-secondary" href="http://widget-options.com/?utm_source=wordpressadmin&amp;utm_medium=widget&amp;utm_campaign=widgetoptsprocta" target="_blank"><?php _e( 'Get Extended Widget Options', 'widget-options' );?></a>
35
+ </p>
36
+ <p>
37
+ <?php _e( 'You can also join our community via Facebook Group.', 'widget-options' );?>
38
+ </p>
39
+ <p>
40
+ <a class="button-secondary" href="https://www.facebook.com/groups/WPwidgets/" target="_blank"><?php _e( 'Join Facebook Group', 'widget-options' );?></a>
41
+ </p>
42
+ </div>
43
+ </div>
44
+
45
+ <?php
46
+ }
47
+ add_action( 'widgetopts_module_sidebar', 'widgetopts_settings_support_box', 30 );
48
+ endif;
49
+ ?>
includes/admin/settings/modules/sidebar-upsell_pro.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Purchase Key Validation Sidebar Metabox
4
+ * Settings > Widget Options
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 4.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Metabox for Purchase Validation
15
+ *
16
+ * @since 4.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_upgrade_pro' ) ):
20
+ function widgetopts_settings_upgrade_pro(){ ?>
21
+ <div id="widgetopts-sidebar-widget-support" class="postbox widgetopts-sidebar-widget" style="border-color: #ffb310; border-width: 3px;">
22
+ <h3 class="hndle ui-sortable-handle"><span><?php _e( 'Get Extended Widget Options', 'widget-options' );?></span></h3>
23
+ <div class="inside">
24
+ <p>
25
+ <?php _e( '<strong>Unlock all features!</strong> Get the world\'s most complete widget management and get best out of your widgets with <a href="http://widget-options.com/" target="_blank">Extended Widget Options</a> including: ', 'widget-options' );?>
26
+ </p>
27
+ <ul style="list-style: outside; padding-left: 15px;">
28
+ <li>
29
+ <?php _e( 'Custom Styling', 'widget-options' );?>
30
+ </li>
31
+ <li>
32
+ <?php _e( 'Widget Animations', 'widget-options' );?>
33
+ </li>
34
+ <li>
35
+ <?php _e( 'Custom Columns Display', 'widget-options' );?>
36
+ </li>
37
+ <li>
38
+ <?php _e( 'Shortcodes', 'widget-options' );?>
39
+ </li>
40
+ <li>
41
+ <?php _e( 'Taxonomies and Custom Post Types Support', 'widget-options' );?>
42
+ </li>
43
+ <li>
44
+ <?php _e( 'Fixed Sticky Widgets', 'widget-options' );?>
45
+ </li>
46
+ <li>
47
+ <?php _e( 'Widget Caching', 'widget-options' );?>
48
+ </li>
49
+ <li>
50
+ <?php _e( 'Clone Widgets', 'widget-options' );?>
51
+ </li>
52
+ <li>
53
+ <?php _e( 'and more pro-only features', 'widget-options' );?>
54
+ </li>
55
+ </ul>
56
+ <p>
57
+ <a class="button-primary" href="http://widget-options.com/?utm_source=wordpressadmin&amp;utm_medium=widget&amp;utm_campaign=widgetoptsprocta" target="_blank"><?php _e( 'Get Extended Widget Options', 'widget-options' );?></a>
58
+ </p>
59
+ </div>
60
+ </div>
61
+ <?php
62
+ }
63
+ add_action( 'widgetopts_module_sidebar', 'widgetopts_settings_upgrade_pro', 10 );
64
+ endif;
65
+
66
+ ?>
includes/admin/settings/modules/siteorigin.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * SiteOrigin Settings Module
4
+ * Settings > Widget Options :: SiteOrigin Pagebuilder Support
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for SiteOrigin Pagebuilder Support
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_siteorigin' ) ):
21
+ function widgetopts_settings_siteorigin(){
22
+ global $widget_options; ?>
23
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['siteorigin'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-siteorigin" data-module-id="siteorigin">
24
+ <div class="widgetopts-module-card-content">
25
+ <h2><?php _e( 'SiteOrigin Pagebuilder Support', 'widget-options' );?></h2>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Extends widget options functionality to SiteOrigin Pagebuilder Plugin.', 'widget-options' );?>
28
+ </p>
29
+
30
+ <div class="widgetopts-module-actions hide-if-no-js">
31
+ <?php if( $widget_options['siteorigin'] == 'activate' ){ ?>
32
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
33
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
34
+ <?php }else{ ?>
35
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
36
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
37
+ <?php } ?>
38
+
39
+ </div>
40
+ </div>
41
+
42
+ <?php widgetopts_modal_start( $widget_options['siteorigin'] ); ?>
43
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-editor-kitchensink"></span>
44
+ <h3 class="widgetopts-modal-header"><?php _e( 'SiteOrigin Pagebuilder Support', 'widget-options' );?></h3>
45
+ <p>
46
+ <?php _e( 'This feature will enable the widget options to your widgets when you are using <a href="https://wordpress.org/plugins/siteorigin-panels/" target="_blank">Pagebuilder by SiteOrigin</a>. Easily manage and extends widget functionalities and visibility using tabbed options provided for each widgets.', 'widget-options' );?>
47
+ </p>
48
+ <h4><?php _e( 'Limitations', 'widget-options' );?></h4>
49
+ <p><?php _e( ' - Visibility options tab option is not available since you are using pagebuilder.', 'widget-options' );?></p>
50
+ <p><?php _e( ' - Custom widget ID on pagebuilder widget was removed to avoid conflicts.', 'widget-options' );?></p>
51
+ <p>
52
+ <?php _e( 'That\'s all! Other options will work smoothly and integrated perfectly on the plugin.', 'widget-options' );?>
53
+ </p>
54
+ <p class="widgetopts-settings-section">
55
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
56
+ </p>
57
+ <?php widgetopts_modal_end( $widget_options['siteorigin'] ); ?>
58
+
59
+ </li>
60
+ <?php
61
+ }
62
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_siteorigin', 65 );
63
+ endif;
64
+ ?>
includes/admin/settings/modules/sliding.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widgets on Menu Settings Module
4
+ * Settings > Widget Options :: Widgets on Menu
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 1.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Widgets on Menu Options
15
+ *
16
+ * @since 1.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_sliding_addon' ) ):
20
+ function widgetopts_settings_sliding_addon(){
21
+
22
+ if( !is_plugin_active( 'sliding-widget-options/plugin.php' ) ){ ?>
23
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="sliding">
24
+ <div class="widgetopts-module-card-content" style="border-color: #ffb310;">
25
+ <a href="https://widget-options.com/modal-pop-up-and-sliding-widget-options/?utm_source=wordpressadmin&utm_campaign=modulecard" target="_blank" class="widgetopts-pro-upsell"></a>
26
+ <h2><?php _e( 'Sliding Widgets Add-on', 'widget-options' );?></h2>
27
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-admin-plugins"></span></div>
28
+ <p class="widgetopts-module-desc">
29
+ <?php
30
+ _e( 'Premium add-on to transform any widgets into Modal Pop-up, Slide-ins and Sliding Panels.', 'widget-options' );
31
+ if( defined( 'ELEMENTOR_VERSION' ) ){
32
+ _e( '<br /><span class="dashicons dashicons-yes" style="color: #ffb310;"></span> Elementor Compatible', 'widget-options' );
33
+ }
34
+ ?>
35
+ </p>
36
+ </div>
37
+ </li>
38
+ <?php
39
+ }
40
+ }
41
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_sliding_addon', 220 );
42
+ endif;
43
+ ?>
includes/admin/settings/modules/state.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * User Login State Settings Module
4
+ * Settings > Widget Options :: User Login State
5
+ *
6
+ * @copyright Copyright (c) 2018, Jeffrey Carandang
7
+ * @since 3.7
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for User Login State
15
+ *
16
+ * @since 3.7
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+
21
+ if( !class_exists( 'widgetopts_settings_state' ) ){
22
+ function widgetopts_settings_state(){
23
+ global $widget_options;
24
+ //avoid issue after update
25
+ if( !isset( $widget_options['state'] ) ){
26
+ $widget_options['state'] = '';
27
+ }
28
+ ?>
29
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['state'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-state" data-module-id="state">
30
+ <div class="widgetopts-module-card-content">
31
+ <h2><?php _e( 'User Login State', 'widget-options' );?></h2>
32
+ <p class="widgetopts-module-desc">
33
+ <?php _e( 'Show widgets only for logged-in or logged-out users easily instead of display logic feature.', 'widget-options' );?>
34
+ </p>
35
+
36
+ <div class="widgetopts-module-actions hide-if-no-js">
37
+ <?php if( $widget_options['state'] == 'activate' ){ ?>
38
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
39
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
40
+ <?php }else{ ?>
41
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
42
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
43
+ <?php } ?>
44
+
45
+ </div>
46
+ </div>
47
+
48
+ <?php widgetopts_modal_start( $widget_options['state'] ); ?>
49
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-admin-users"></span>
50
+ <h3 class="widgetopts-modal-header"><?php _e( 'Logged-in or Logged-out Users Restriction', 'widget-options' );?></h3>
51
+ <p>
52
+ <?php _e( 'This feature will give you easier option to show specific widgets only for logged-in or logged-out users rather than using the Display Logic feature.', 'widget-options' );?>
53
+ </p>
54
+ <p class="widgetopts-settings-section">
55
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
56
+ </p>
57
+ <?php widgetopts_modal_end( $widget_options['state'] ); ?>
58
+
59
+ </li>
60
+ <?php
61
+ }
62
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_state', 59 );
63
+ }
64
+ ?>
includes/admin/settings/modules/styling.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Styling Settings Module
4
+ * Settings > Widget Options :: Custom Styling
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Custom Styling Options
15
+ *
16
+ * @since 3.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_styling' ) ):
20
+ function widgetopts_settings_styling(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="styling">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="https://widget-options.com/features/wordpress-widgets-styling/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Custom Styling', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Set custom widget colors and styling to make your widget stand-out more.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_styling', 120 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/taxonomies.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extended Taxonomy Terms Settings Module
4
+ * Settings > Widget Options :: Extended Taxonomy Terms
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Extended Taxonomy Terms Options
15
+ *
16
+ * @since 3.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_taxonomies' ) ):
20
+ function widgetopts_settings_taxonomies(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="taxonomies">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="http://widget-options.com/features/post-types-taxonomies-widget-visibility/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'Extended Taxonomy Terms', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Extend each widget visibility for custom post types taxonomies and terms.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_taxonomies', 140 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/title.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widget Title Settings Module
4
+ * Settings > Widget Options :: Hide Title
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Hide Widget Title
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_title' ) ):
21
+ function widgetopts_settings_title(){
22
+ global $widget_options; ?>
23
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['hide_title'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-hide_title" data-module-id="hide_title">
24
+ <div class="widgetopts-module-card-content">
25
+ <h2><?php _e( 'Hide Title', 'widget-options' );?></h2>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Allows you to hide widget title on the front-end but keep them on the backend.', 'widget-options' );?>
28
+ </p>
29
+
30
+ <div class="widgetopts-module-actions hide-if-no-js">
31
+ <?php if( $widget_options['hide_title'] == 'activate' ){ ?>
32
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
33
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
34
+ <?php }else{ ?>
35
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
36
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
37
+ <?php } ?>
38
+
39
+ </div>
40
+ </div>
41
+
42
+ <?php widgetopts_modal_start( $widget_options['hide_title'] ); ?>
43
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-admin-generic"></span>
44
+ <h3 class="widgetopts-modal-header"><?php _e( 'Hide Title', 'widget-options' );?></h3>
45
+ <p>
46
+ <?php _e( 'Easily hide each widget title via checkbox. No need for PHP snippet to hide them per widgets.', 'widget-options' );?>
47
+ </p>
48
+ <p class="widgetopts-settings-section">
49
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
50
+ </p>
51
+ <?php widgetopts_modal_end( $widget_options['hide_title'] ); ?>
52
+
53
+ </li>
54
+ <?php
55
+ }
56
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_title', 40 );
57
+ endif;
58
+ ?>
includes/admin/settings/modules/urls.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Links Settings Module
4
+ * Settings > Widget Options :: Link Widget
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Custom Links Options
15
+ *
16
+ * @since 3.0
17
+ * @return void
18
+ */
19
+ if( !function_exists( 'widgetopts_settings_urls' ) ):
20
+ function widgetopts_settings_urls(){ ?>
21
+ <li class="widgetopts-module-card widgetopts-module-type-pro" data-module-id="urls">
22
+ <div class="widgetopts-module-card-content">
23
+ <a href="https://widget-options.com/features/target-url-wildcards/" target="_blank" class="widgetopts-pro-upsell"></a>
24
+ <h2><?php _e( 'URL & Wildcards Restrictions', 'widget-options' );?></h2>
25
+ <div class="widgetopts-pro-label"><span class="dashicons dashicons-lock"></span></div>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Show or hide widgets by URL and/or use <code>*</code> to create a URL wildcard restrictions.', 'widget-options' );?>
28
+ </p>
29
+ </div>
30
+ </li>
31
+ <?php
32
+ }
33
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_urls', 190 );
34
+ endif;
35
+ ?>
includes/admin/settings/modules/visibility.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Visibility Settings Module
4
+ * Settings > Widget Options :: Pages Visibility
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Pages Visibility Options
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_visibility' ) ):
21
+ function widgetopts_settings_visibility(){
22
+ global $widget_options; ?>
23
+ <li class="widgetopts-module-card <?php echo ( $widget_options['visibility'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-visibility" data-module-id="visibility">
24
+ <div class="widgetopts-module-card-content">
25
+ <h2><?php _e( 'Pages Visibility', 'widget-options' );?></h2>
26
+ <p class="widgetopts-module-desc">
27
+ <?php _e( 'Easily restrict any widgets visibility on specific WordPress pages.', 'widget-options' );?>
28
+ </p>
29
+ <div class="widgetopts-module-actions hide-if-no-js">
30
+ <?php if( $widget_options['visibility'] == 'activate' ){ ?>
31
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
32
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
33
+ <?php }else{ ?>
34
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
35
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
36
+ <?php } ?>
37
+
38
+ </div>
39
+ </div>
40
+
41
+ <?php widgetopts_modal_start( $widget_options['visibility'] ); ?>
42
+ <span class="dashicons widgetopts-dashicons dashicons-visibility"></span>
43
+ <h3 class="widgetopts-modal-header"><?php _e( 'Pages Visibility', 'widget-options' );?></h3>
44
+ <p>
45
+ <?php _e( 'Visibility tab allows you to completely control each widgets visibility and restrict them on any WordPress pages. You can turn on/off the underlying tabs for post types, taxonomies and miscellanous options using the options below when this feature is enabled.', 'widget-options' );?>
46
+ </p>
47
+ <table class="form-table widgetopts-settings-section">
48
+ <tr>
49
+ <th scope="row">
50
+ <label for="widgetopts-visibility-post_types"><?php _e( 'Post Types Tab', 'widget-options' );?></label>
51
+ </th>
52
+ <td>
53
+ <input type="checkbox" id="widgetopts-visibility-post_types" name="visibility[post_type]" <?php echo ( isset( $widget_options['settings']['visibility'] ) ) ? widgetopts_is_checked( $widget_options['settings']['visibility'], 'post_type' ) : ''; ?> value="1" />
54
+ <label for="widgetopts-visibility-post_types"><?php _e( 'Enable Post Types Restriction', 'widget-options' );?></label>
55
+ <p class="description">
56
+ <?php _e( 'This feature will allow visibility restriction of every widgets per post types and per pages.', 'widget-options' );?>
57
+ </p>
58
+ </td>
59
+ </tr>
60
+ <tr>
61
+ <th scope="row">
62
+ <label for="widgetopts-visibility-taxonomies"><?php _e( 'Taxonomies Tab', 'widget-options' );?></label>
63
+ </th>
64
+ <td>
65
+ <input type="checkbox" id="widgetopts-visibility-taxonomies" name="visibility[taxonomies]" <?php echo ( isset( $widget_options['settings']['visibility'] ) ) ? widgetopts_is_checked( $widget_options['settings']['visibility'], 'taxonomies' ) : ''; ?> value="1" />
66
+ <label for="widgetopts-visibility-taxonomies"><?php _e( 'Enable Taxonomies Restriction', 'widget-options' );?></label>
67
+ <p class="description">
68
+ <?php _e( 'This tab option will allow you to control visibility via taxonomy and terms archive pages.', 'widget-options' );?>
69
+ </p>
70
+ </td>
71
+ </tr>
72
+ <tr>
73
+ <th scope="row">
74
+ <label for="widgetopts-visibility-misc"><?php _e( 'Miscellaneous Tab', 'widget-options' );?></label>
75
+ </th>
76
+ <td>
77
+ <input type="checkbox" id="widgetopts-visibility-misc" name="visibility[misc]" <?php echo ( isset( $widget_options['settings']['visibility'] ) ) ? widgetopts_is_checked( $widget_options['settings']['visibility'], 'misc' ) : ''; ?> value="1" />
78
+ <label for="widgetopts-visibility-misc"><?php _e( 'Enable Miscellaneous Options', 'widget-options' );?></label>
79
+ <p class="description">
80
+ <?php _e( 'Restrict widgets visibility on WordPress miscellanous pages such as home page, blog page, 404, search, etc.', 'widget-options' );?>
81
+ </p>
82
+ </td>
83
+ </tr>
84
+ </table>
85
+ <?php widgetopts_modal_end( $widget_options['visibility'] ); ?>
86
+ </li>
87
+ <?php
88
+ }
89
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_visibility', 10 );
90
+ endif;
91
+ ?>
includes/admin/settings/modules/widget-area.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widget Area Options Settings Module
4
+ * Settings > Widget Options :: Widget Area Options
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 3.5
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Widget Area Options
15
+ *
16
+ * @since 3.5
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_widget_area' ) ):
21
+ function widgetopts_settings_widget_area(){
22
+ global $widget_options;
23
+ //avoid issue after update
24
+ if( !isset( $widget_options['widget_area'] ) ){
25
+ $widget_options['widget_area'] = '';
26
+ }
27
+
28
+ $widget_area = ( isset( $widget_options['settings']['widget_area'] ) ) ? $widget_options['settings']['widget_area'] : array();?>
29
+ <li class="widgetopts-module-card <?php echo ( $widget_options['widget_area'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-widget_area" data-module-id="widget_area">
30
+ <div class="widgetopts-module-card-content">
31
+ <h2><?php _e( 'Widget Area Options', 'widget-options' );?></h2>
32
+ <p class="widgetopts-module-desc">
33
+ <?php _e( 'Extra helpful management options below each sidebar widget areas.', 'widget-options' );?>
34
+ </p>
35
+
36
+ <div class="widgetopts-module-actions hide-if-no-js">
37
+ <?php if( $widget_options['widget_area'] == 'activate' ){ ?>
38
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
39
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
40
+ <?php }else{ ?>
41
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
42
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
43
+ <?php } ?>
44
+
45
+ </div>
46
+ </div>
47
+
48
+ <?php widgetopts_modal_start( $widget_options['widget_area'] ); ?>
49
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-art"></span>
50
+ <h3 class="widgetopts-modal-header"><?php _e( 'Widget Area Options', 'widget-options' );?></h3>
51
+ <p>
52
+ <?php _e( 'Enable <strong>Remove All Widgets</strong> and/or <strong>Download Backup</strong> link options below each sidebar widget areas. This will help you manage your widgets better as always.', 'widget-options' );?>
53
+ </p>
54
+
55
+ <table class="form-table widgetopts-settings-section">
56
+ <tr>
57
+ <th scope="row">
58
+ <label for="widgetopts-widget-area-remove"><?php _e( 'Remove Widgets Link', 'widget-options' );?></label>
59
+ </th>
60
+ <td>
61
+ <input type="checkbox" id="widgetopts-widget-area-remove" name="widget_area[remove]" <?php echo widgetopts_is_checked( $widget_area, 'remove' ) ?> value="1" />
62
+ <label for="widgetopts-widget-area-remove"><?php _e( 'Remove Widgets Link', 'widget-options' );?></label>
63
+ <p class="description">
64
+ <?php _e( 'Show "Remove All Widgets" link below each widget areas.', 'widget-options' );?>
65
+ </p>
66
+ </td>
67
+ </tr>
68
+ <tr>
69
+ <th scope="row">
70
+ <label for="widgetopts-widget-area-backup"><?php _e( 'Download Backup', 'widget-options' );?></label>
71
+ </th>
72
+ <td>
73
+ <input type="checkbox" id="widgetopts-widget-area-backup" name="widget_area[backup]" <?php echo widgetopts_is_checked( $widget_area, 'backup' ) ?> value="1" />
74
+ <label for="widgetopts-widget-area-backup"><?php _e( 'Enable Download Backup', 'widget-options' );?></label>
75
+ <p class="description">
76
+ <?php _e( 'Show "Download Backup" link below each sidebar widget area.', 'widget-options' );?>
77
+ </p>
78
+ </td>
79
+ </tr>
80
+ </table>
81
+ <?php widgetopts_modal_end( $widget_options['widget_area'] ); ?>
82
+
83
+ </li>
84
+ <?php
85
+ }
86
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_widget_area', 64 );
87
+ endif;
88
+ ?>
includes/admin/settings/register-settings.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Register Settings
4
+ * @since 4.1
5
+ */
6
+
7
+ // Exit if accessed directly
8
+ if ( !defined( 'ABSPATH' ) ) exit;
9
+
10
+ /**
11
+ * Get an option
12
+ *
13
+ * Looks to see if the specified setting exists, returns default if not
14
+ *
15
+ * @since 4.1
16
+ * @global $widget_options Array of all the Widget Options
17
+ * @return mixed
18
+ */
19
+ if( !function_exists( 'widgetopts_get_option' ) ):
20
+ function widgetopts_get_option( $key = '', $default = false ) {
21
+ global $widget_options;
22
+
23
+ $value = ! empty( $widget_options[ $key ] ) ? $widget_options[ $key ] : $default;
24
+ $value = apply_filters( 'widgetopts_get_option', $value, $key, $default );
25
+
26
+ return apply_filters( 'widgetopts_get_option_' . $key, $value, $key, $default );
27
+ }
28
+ endif;
29
+
30
+ /**
31
+ * Update an option
32
+ *
33
+ * Updates an widgetopts setting value in both the db and the global variable.
34
+ * Warning: Passing in an empty, false or null string value will remove
35
+ * the key from the widget_options array.
36
+ *
37
+ * @since 4.1
38
+ * @param string $key The Key to update
39
+ * @param string|bool|int $value The value to set the key to
40
+ * @global $widget_options Array of all the Widget Options
41
+ * @return boolean True if updated, false if not.
42
+ */
43
+ if( !function_exists( 'widgetopts_update_option' ) ):
44
+ function widgetopts_update_option( $key = '', $value = false ) {
45
+
46
+ // If no key, exit
47
+ if ( empty( $key ) ){
48
+ return false;
49
+ }
50
+
51
+ if ( empty( $value ) ) {
52
+ $remove_option = widgetopts_delete_option( $key );
53
+ return $remove_option;
54
+ }
55
+
56
+ // First let's grab the current settings
57
+ $options = get_option( 'widgetopts_settings' );
58
+
59
+ // Let's let devs alter that value coming in
60
+ $value = apply_filters( 'widgetopts_update_option', $value, $key );
61
+
62
+ // Next let's try to update the value
63
+ $options[ $key ] = $value;
64
+
65
+ $did_update = update_option( 'widgetopts_settings', $options );
66
+ // If it updated, let's update the global variable
67
+ if ( $did_update ){
68
+ global $widget_options;
69
+ $widget_options[ $key ] = $value;
70
+ }
71
+ return $did_update;
72
+ }
73
+ endif;
74
+
75
+ /**
76
+ * Remove an option
77
+ *
78
+ * Removes widget options setting value in both the db and the global variable.
79
+ *
80
+ * @since 4.1
81
+ * @param string $key The Key to delete
82
+ * @global $widget_options Array of all the Widget Options
83
+ * @return boolean True if removed, false if not.
84
+ */
85
+ if( !function_exists( 'widgetopts_delete_option' ) ):
86
+ function widgetopts_delete_option( $key = '' ) {
87
+ // If no key, exit
88
+ if ( empty( $key ) ){
89
+ return false;
90
+ }
91
+ // First let's grab the current settings
92
+ $options = get_option( 'widgetopts_settings' );
93
+
94
+ // Next let's try to update the value
95
+ if( isset( $options[ $key ] ) ) {
96
+ unset( $options[ $key ] );
97
+ }
98
+ $did_update = update_option( 'widgetopts_settings', $options );
99
+
100
+ // If it updated, let's update the global variable
101
+ if ( $did_update ){
102
+ global $edd_options;
103
+ $edd_options = $options;
104
+ }
105
+ return $did_update;
106
+ }
107
+ endif;
108
+
109
+ /**
110
+ * Get Settings
111
+ *
112
+ * Retrieves all plugin settings
113
+ *
114
+ * @since 4.1
115
+ * @return array WIDGETOPTS settings
116
+ */
117
+ if( !function_exists( 'widgetopts_get_settings' ) ):
118
+ function widgetopts_get_settings() {
119
+ $settings = get_option( 'widgetopts_settings' );
120
+
121
+ if( empty( $settings ) ) {
122
+
123
+ $opts_settings = get_option( 'widgetopts_tabmodule-settings' );
124
+ //fallback to prevent error
125
+ if( is_serialized( $opts_settings ) ){
126
+ $opts_settings = maybe_unserialize( $opts_settings );
127
+ }
128
+
129
+ // Update old settings with new single option
130
+ $settings = !empty( $opts_settings ) ? $opts_settings : array();
131
+ $visibility = array( 'visibility' => get_option( 'widgetopts_tabmodule-visibility' ) );
132
+ $devices = array( 'devices' => get_option( 'widgetopts_tabmodule-devices' ) );
133
+ $alignment = array( 'alignment' => get_option( 'widgetopts_tabmodule-alignment' ) );
134
+ $hide_title = array( 'hide_title' => get_option( 'widgetopts_tabmodule-hide_title' ) );
135
+ $classes = array( 'classes' => get_option( 'widgetopts_tabmodule-classes' ) );
136
+ $logic = array( 'logic' => get_option( 'widgetopts_tabmodule-logic' ) );
137
+ $siteorigin = array( 'siteorigin' => get_option( 'widgetopts_tabmodule-siteorigin' ) );
138
+ $search = array( 'search' => get_option( 'widgetopts_tabmodule-search' ) );
139
+ $move = array( 'move' => get_option( 'widgetopts_tabmodule-move' ) );
140
+ $elementor = array( 'elementor' => get_option( 'widgetopts_tabmodule-elementor' ) );
141
+ $widget_area = array( 'widget_area' => get_option( 'widgetopts_tabmodule-widget_area' ) );
142
+ $import_export = array( 'import_export' => get_option( 'widgetopts_tabmodule-import_export' ) );
143
+ $beaver = array( 'beaver' => get_option( 'widgetopts_tabmodule-beaver' ) );
144
+ $acf = array( 'acf' => get_option( 'widgetopts_tabmodule-acf' ) );
145
+ $state = array( 'state' => get_option( 'widgetopts_tabmodule-state' ) );
146
+
147
+ /*
148
+ * Available only on Extended version
149
+ */
150
+ // $columns = array( 'columns' => get_option( 'widgetopts_tabmodule-columns' ) );
151
+ // $dates = array( 'dates' => get_option( 'widgetopts_tabmodule-dates' ) );
152
+ // $styling = array( 'styling' => get_option( 'widgetopts_tabmodule-styling' ) );
153
+ // $roles = array( 'roles' => get_option( 'widgetopts_tabmodule-roles' ) );
154
+ // $links = array( 'links' => get_option( 'widgetopts_tabmodule-links' ) );
155
+ // $fixed = array( 'fixed' => get_option( 'widgetopts_tabmodule-fixed' ) );
156
+ // $taxonomies = array( 'taxonomies' => get_option( 'widgetopts_tabmodule-taxonomies' ) );
157
+ // $animation = array( 'animation' => get_option( 'widgetopts_tabmodule-animation' ) );
158
+ // $shortcodes = array( 'shortcodes' => get_option( 'widgetopts_tabmodule-shortcodes' ) );
159
+ // $cache = array( 'cache' => get_option( 'widgetopts_tabmodule-cache' ) );
160
+ // $disable_widgets = array( 'disable_widgets' => get_option( 'widgetopts_tabmodule-disable_widgets' ) );
161
+ // $permission = array( 'permission' => get_option( 'widgetopts_tabmodule-permission' ) );
162
+
163
+ $settings = array_merge( array( 'settings' => $settings ), $visibility, $devices, $alignment, $hide_title, $classes, $logic, $siteorigin, $search, $move, $elementor, $widget_area, $import_export, $beaver, $acf, $state );
164
+
165
+ // Let's let devs alter that value coming in
166
+ $value = apply_filters( 'widgetopts_update_settings', $settings );
167
+
168
+ update_option( 'widgetopts_settings', $settings );
169
+ }
170
+
171
+ return apply_filters( 'widgetopts_get_settings', $settings );
172
+ }
173
+ endif;
174
+ ?>
includes/admin/welcome.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Welcome Page Class
4
+ *
5
+ * @copyright Copyright (c) 2015, Jeffrey Carandang
6
+ * @since 1.0
7
+ */
8
+ // Exit if accessed directly
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+ /**
11
+ * WIDGETOPS_Welcome Class
12
+ *
13
+ * A general class for About and Credits page.
14
+ *
15
+ * @since 1.0
16
+ */
17
+
18
+ if( !class_exists( 'WIDGETOPS_Welcome' ) ){
19
+ class WIDGETOPS_Welcome{
20
+ public function __construct() {
21
+ add_action( 'admin_enqueue_scripts', array($this, 'enqueue') );
22
+ add_action( 'admin_menu', array($this, 'screen_page') );
23
+ add_action( 'activated_plugin', array($this, 'redirect' ) );
24
+ add_action( 'admin_head', array($this, 'remove_menu' ) );
25
+ }
26
+
27
+ function enqueue(){
28
+ if ( !isset( $_GET['page'] ) || 'widget-opts-getting-started' != $_GET['page'] )
29
+ return;
30
+
31
+ wp_enqueue_style( 'extended-widget-opts-welcome', plugins_url( '../assets/css/welcome.css' , dirname(__FILE__) ) , array(), null );
32
+ }
33
+
34
+ function screen_page(){
35
+ add_dashboard_page(
36
+ __( 'Getting started with Widget Options', 'widget-options' ),
37
+ __( 'Getting started with Widget Options', 'widget-options' ),
38
+ apply_filters( 'widgetopts_welcome_cap', 'manage_options' ),
39
+ 'widget-opts-getting-started',
40
+ array( $this, 'welcome_content' )
41
+ );
42
+ }
43
+
44
+ function welcome_head(){
45
+ $selected = isset( $_GET['page'] ) ? $_GET['page'] : 'widget-opts-getting-started';
46
+ ?>
47
+ <h1><?php _e( 'Welcome to Widget Options', 'widget-options' ); ?></h1>
48
+ <div class="about-text">
49
+ <?php _e( 'Congratulations! You\'ve just unlocked features on managing your widgets better.', 'widget-options' ); ?>
50
+ </div>
51
+ <div class="widgetopts-badge">
52
+ <span class="widgetopts-mascot"></span>
53
+ <span class="version"><?php _e( 'Version', 'widget-options' );?> <?php echo WIDGETOPTS_VERSION; ?></span>
54
+ </div>
55
+ <h2 class="nav-tab-wrapper">
56
+ <a class="nav-tab <?php echo $selected == 'widget-opts-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'widget-opts-getting-started' ), 'index.php' ) ) ); ?>">
57
+ <?php _e( 'Getting Started', 'widget-options' ); ?>
58
+ </a>
59
+ </h2>
60
+ <?php
61
+ }
62
+
63
+ function welcome_content(){ ?>
64
+ <div class="wrap about-wrap widgetopts-about-wrap">
65
+ <?php $this->welcome_head(); ?>
66
+ <p class="about-description">
67
+ <?php _e( 'Use the tips and instructions below to get started, then you will be up and running in no time. ', 'widget-options' ); ?>
68
+ </p>
69
+
70
+ <div class="feature-section two-col">
71
+ <div class="col">
72
+ <h3><?php _e( 'Take full control over your widgets!' , 'widget-options' ); ?></h3>
73
+ <p><?php printf( __( 'Widget Options is your all-in-on plugin to take over your widgets like it was built as WordPress core functionality. You can follow the tutorial on the right to see how the plugin works but in reality it\'s so easy and integrated elegantly on each widgets. <a href="%s" target="_blank">Expand your widgets here to view Widget Options</a>.', 'widget-options' ), esc_url( admin_url('widgets.php') ) ); ?>
74
+ </div>
75
+ <div class="col">
76
+ <div class="feature-video">
77
+ <iframe width="495" height="278" src="https://player.vimeo.com/video/190057410" frameborder="0" allowfullscreen></iframe>
78
+ </div>
79
+ </div>
80
+ </div>
81
+
82
+ <div class="feature-section two-col">
83
+ <h3><?php _e( 'Extend Plugin Features', 'widget-options' ); ?></h3>
84
+ <p><?php _e( 'Unlock more features by upgrading to Extended Widget Options to get the full plugin functionalities! We have tons of helpful features that will let you fully manage your widgets and extend functionalities.', 'widget-options' ); ?></p>
85
+ <p><a href="http://widget-options.com/features/" target="_blank" class="widgetopts-features-button button button-primary"><?php _e( 'See all Features', 'widget-options' ); ?></a></p>
86
+ </div>
87
+ </div>
88
+ <?php }
89
+
90
+ function redirect($plugin){
91
+ if( $plugin=='widget-options/plugin.php' && !isset( $_GET['activate-multi'] ) ) {
92
+ wp_redirect(admin_url('index.php?page=widget-opts-getting-started'));
93
+ die();
94
+ }
95
+ }
96
+ function remove_menu(){
97
+ remove_submenu_page( 'index.php', 'widget-opts-getting-started' );
98
+ }
99
+ }
100
+ new WIDGETOPS_Welcome();
101
+ }
102
+
103
+ ?>
includes/ajax-functions.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * AJAX Functions
4
+ *
5
+ * Process AJAX actions.
6
+ *
7
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
8
+ * @since 4.0
9
+ */
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Save Options
15
+ *
16
+ * @since 1.0
17
+ * @return void
18
+ */
19
+ function widgetopts_ajax_save_settings(){
20
+ $response = array( 'errors' => array() );
21
+
22
+ if( !isset( $_POST['method'] ) ) return;
23
+ if( !isset( $_POST['nonce'] ) ) return;
24
+
25
+ if ( ! wp_verify_nonce( $_POST['nonce'], 'widgetopts-settings-nonce' ) ) {
26
+ return;
27
+ }
28
+
29
+ switch ( $_POST['method'] ) {
30
+ case 'activate':
31
+ case 'deactivate':
32
+ if( !isset( $_POST['module'] ) ) return;
33
+
34
+ //update options
35
+ update_option( 'widgetopts_tabmodule-' . sanitize_text_field( $_POST['module'] ), sanitize_text_field( $_POST['method'] ) );
36
+
37
+ //update global variable
38
+ widgetopts_update_option( sanitize_text_field( $_POST['module'] ), sanitize_text_field( $_POST['method'] ) );
39
+ break;
40
+
41
+ case 'save':
42
+ $response['messages'] = array( __( 'Settings saved successfully.', 'widget-options' ) );
43
+ if( !isset( $_POST['data'] ) ) return;
44
+ parse_str( $_POST['data']['--widgetopts-form-serialized-data'], $params );
45
+ $sanitized = widgetopts_sanitize_array( $params );
46
+ update_option( 'widgetopts_tabmodule-settings', maybe_serialize( $sanitized ) );
47
+
48
+ //reset options
49
+ widgetopts_update_option( 'settings', $sanitized );
50
+ break;
51
+
52
+ case 'deactivate_license':
53
+ global $extended_license;
54
+ $license = sanitize_text_field( $_POST['data']['license-data'] );
55
+ if( !empty( $license ) ){
56
+
57
+ if( isset( $_POST['data']['shortname'] ) ){
58
+ $item_shortname = sanitize_text_field( $_POST['data']['shortname'] );
59
+ }else{
60
+ $item_shortname = 'widgetopts_' . preg_replace( '/[^a-zA-Z0-9_\s]/', '', str_replace( ' ', '_', strtolower( WIDGETOPTS_PLUGIN_NAME ) ) );
61
+ }
62
+ switch ( $item_shortname ) {
63
+ case 'widgetopts_sliding_widget_options':
64
+ global $widgetopts_sliding_license;
65
+ $data = $widgetopts_sliding_license->deactivate_license( $license );
66
+ break;
67
+
68
+ default:
69
+ $data = $extended_license->deactivate_license( $license );
70
+ break;
71
+ }
72
+
73
+ $response['button'] = sanitize_text_field( $_POST['data']['button'] );
74
+ if( $data == 'deactivated' ){
75
+
76
+ $optiondata = get_option( 'widgetopts_license_keys' );
77
+ $name = str_replace( 'widgetopts-license-btn-', '', sanitize_text_field( $_POST['data']['button'] ) );
78
+ $optiondata[ $name ] = '';
79
+ update_option( 'widgetopts_license_keys', $optiondata );
80
+
81
+ //remove license key on option
82
+ delete_option( $item_shortname . '_license_key' );
83
+
84
+ $response['messages'] = array( __( 'Successfully Deactivated.', 'widget-options' ) );
85
+ }else{
86
+ $response['messages'] = array( __( 'Deactivation Failed.', 'widget-options' ) );
87
+ }
88
+ $response['success'] = $data;
89
+ }
90
+
91
+ break;
92
+
93
+ default:
94
+ # code...
95
+ break;
96
+ }
97
+ $response['source'] = 'WIDGETOPTS_Response';
98
+ $response['response'] = 'success';
99
+ $response['closeModal'] = true;
100
+ $response = (object) $response;
101
+
102
+ //let devs do there action
103
+ do_action( 'widget_options_before_ajax_print', sanitize_text_field( $_POST['method'] ) );
104
+
105
+ echo json_encode( $response );
106
+ die();
107
+ }
108
+ add_action( 'wp_ajax_widgetopts_ajax_settings', 'widgetopts_ajax_save_settings' );
109
+
110
+ /* Hide the rating div
111
+ * @return json string
112
+ *
113
+ */
114
+ if( !function_exists( 'widgetopts_ajax_hide_rating' ) ):
115
+ function widgetopts_ajax_hide_rating(){
116
+ update_option('widgetopts_RatingDiv','yes');
117
+ echo json_encode(array("success")); exit;
118
+ }
119
+ add_action( 'wp_ajax_widgetopts_hideRating', 'widgetopts_ajax_hide_rating' );
120
+ endif;
121
+ ?>
includes/extras.php ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extra Functions
4
+ *
5
+ * Collections of extra functions to avoid repeatition
6
+ *
7
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
8
+ * @since 4.0
9
+ */
10
+
11
+ function widgetopts_sanitize_array( &$array ) {
12
+ foreach ($array as &$value) {
13
+ if( !is_array($value) ) {
14
+ // sanitize if value is not an array
15
+ $value = sanitize_text_field( $value );
16
+ }else{
17
+ // go inside this function again
18
+ widgetopts_sanitize_array($value);
19
+ }
20
+ }
21
+
22
+ return $array;
23
+ }
24
+
25
+ function widgetopts_is_checked( $array, $key ){
26
+ return ( isset( $array[$key] ) && '1' == $array[$key] ) ? 'checked="checked"' : '';
27
+ }
28
+
29
+ /*
30
+ * Check if http or https available on link
31
+ */
32
+ function widgetopts_addhttp($url) {
33
+ if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
34
+ $url = "http://" . $url;
35
+ }
36
+ return $url;
37
+ }
38
+
39
+
40
+ /**
41
+ * Register Global Variables for easier access
42
+ *
43
+ *
44
+ * @since 5.0
45
+ * @return array
46
+ */
47
+ function widgetopts_global_taxonomies() {
48
+ $taxonomies = get_option( 'widgetopts_global_taxonomies' );
49
+
50
+ if( empty( $taxonomies ) ) {
51
+
52
+ $tax_args = array(
53
+ 'public' => true
54
+ );
55
+ $tax_output = 'objects'; // or objects
56
+ $tax_operator = 'and'; // 'and' or 'or'
57
+ $taxonomies = get_taxonomies( $tax_args, $tax_output, $tax_operator );
58
+ unset( $taxonomies['post_format'] );
59
+
60
+ // Let's let devs alter that value coming in
61
+ $taxonomies = apply_filters( 'widgetopts_update_global_taxonomies', $taxonomies );
62
+ update_option( 'widgetopts_global_taxonomies', $taxonomies );
63
+
64
+ }
65
+
66
+ return apply_filters( 'widgetopts_get_global_taxonomies', $taxonomies );
67
+ }
68
+
69
+ function widgetopts_global_types() {
70
+ $types = get_option( 'widgetopts_global_types' );
71
+
72
+ if( empty( $types ) ) {
73
+
74
+ $types = get_post_types( array(
75
+ 'public' => true,
76
+ ), 'object' );
77
+
78
+ // Let's let devs alter that value coming in
79
+ $types = apply_filters( 'widgetopts_update_global_types', $types );
80
+ update_option( 'widgetopts_global_types', $types );
81
+
82
+ }
83
+
84
+ return apply_filters( 'widgetopts_get_global_types', $types );
85
+ }
86
+
87
+ function widgetopts_global_pages() {
88
+ $pages = get_option( 'widgetopts_global_all_pages' );
89
+
90
+ //old pages object
91
+ // if( empty( $pages ) ) {
92
+ // $pages = get_posts( array(
93
+ // 'post_type' => 'page',
94
+ // 'post_status' => 'publish',
95
+ // 'numberposts' => -1,
96
+ // 'orderby' => 'title',
97
+ // 'order' => 'ASC',
98
+ // 'fields' => array('ID', 'name')
99
+ // ));
100
+ //
101
+ // // Let's let devs alter that value coming in
102
+ // $pages = apply_filters( 'widgetopts_update_global_pages', $pages );
103
+ // update_option( 'widgetopts_global_pages', $pages );
104
+ // }
105
+
106
+ //create new pages object
107
+ if( empty( $pages ) ) {
108
+ global $wpdb;
109
+
110
+ $pages = $wpdb->get_results("SELECT ID, post_title, post_parent FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'publish' ORDER BY post_title ASC ");
111
+
112
+ // Let's let devs alter that value coming in
113
+ $pages = apply_filters( 'widgetopts_update_global_pages', $pages );
114
+ update_option( 'widgetopts_global_all_pages', $pages );
115
+ }
116
+
117
+ return apply_filters( 'widgetopts_get_global_pages', $pages );
118
+ }
119
+
120
+ function widgetopts_global_categories(){
121
+ $categories = get_option( 'widgetopts_global_categories' );
122
+
123
+ if( empty( $categories ) ) {
124
+ $categories = get_categories( array(
125
+ 'hide_empty' => false
126
+ ) );
127
+
128
+ // Let's let devs alter that value coming in
129
+ $categories = apply_filters( 'widgetopts_update_global_categories', $categories );
130
+ update_option( 'widgetopts_global_categories', $categories );
131
+ }
132
+
133
+ return apply_filters( 'widgetopts_global_categories', $categories );
134
+ }
135
+
136
+ /*
137
+ Page Walker Class
138
+ */
139
+ if( !class_exists( 'WidgetOpts_Pages_Checkboxes' ) ):
140
+ class WidgetOpts_Pages_Checkboxes extends Walker_Page {
141
+
142
+ function start_lvl( &$output, $depth = 0, $args = array() ) {
143
+ $output .= "\n<div class='widgetopts-chldrn'>\n";
144
+ }
145
+
146
+ function end_lvl( &$output, $depth = 0, $args = array() ) {
147
+ $output .= "</div>\n";
148
+ }
149
+
150
+ function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) {
151
+ if ( $depth ){
152
+ $indent = str_repeat( '&mdash; ', $depth );
153
+ }else{
154
+ $indent = '';
155
+ }
156
+
157
+
158
+
159
+ if ( '' === $page->post_title ) {
160
+ $page->post_title = sprintf( __( '#%d (no title)', 'widget-options' ), $page->ID );
161
+ }
162
+
163
+ $pages_values = array();
164
+ if( isset( $args['params']['visibility']['pages'] ) ){
165
+ $pages_values = $args['params']['visibility']['pages'];
166
+ }
167
+
168
+ if( isset( $pages_values[ $page->ID ] ) && $pages_values[ $page->ID ] == '1' ){
169
+ $checked = 'checked="checked"';
170
+ }else{
171
+ $checked = '';
172
+ }
173
+
174
+ $output .= '<p>' . $indent;
175
+
176
+ $output .= '<input type="checkbox" name="'. $args['namespace'] .'[extended_widget_opts][visibility][pages]['. $page->ID .']" id="'. $args['id'] .'-opts-pages-'. $page->ID .'" value="1" '. $checked .'/>';
177
+
178
+ $output .= '<label for="'. $args['id'] .'-opts-pages-'. $page->ID .'">'. $page->post_title .'</label>';
179
+ }
180
+
181
+ function end_el( &$output, $page, $depth = 0, $args = array() ) {
182
+ $output .= "</p>\n";
183
+ }
184
+
185
+ }
186
+ endif;
187
+ ?>
includes/install.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Install Function
4
+ *
5
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
6
+ * @since 3.0
7
+ */
8
+ // Exit if accessed directly
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+
11
+ //check if free version is activated
12
+ if( !function_exists( 'widgetopts_upgraded' ) ){
13
+ add_action( 'admin_notices', 'widgetopts_upgraded' );
14
+ function widgetopts_upgraded(){
15
+ if( is_plugin_active( 'widget-options/plugin.php' ) && is_plugin_active( 'extended-widget-options/plugin.php' ) ){ ?>
16
+ <div class="widgetopts_activated_notice notice-error notice" style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);">
17
+ <p>
18
+ <?php _e( 'Please deactivate <strong>Widget Options</strong> Plugin, it may cause issue with the extended plugin version. Thanks!', 'widget-options' );?>
19
+ </p>
20
+ </div>
21
+ <?php }
22
+ }
23
+ }
24
+
25
+ //add settings link on plugin page
26
+ if( !function_exists( 'widgetopts_filter_plugin_actions' ) ){
27
+ add_action( 'plugin_action_links_' . plugin_basename( WIDGETOPTS_PLUGIN_FILE ) , 'widgetopts_filter_plugin_actions' );
28
+ function widgetopts_filter_plugin_actions($links){
29
+ $links[] = '<a href="'. esc_url( admin_url( 'options-general.php?page=widgetopts_plugin_settings' ) ) .'">' . __( 'Settings', 'widget-options' ) . '</a>';
30
+ $links[] = '<a href="'. esc_url( 'https://widget-options.com/pricing/?utm_source=upgradebtn&utm_medium=plugins&utm_campaign=widgetoptspluginlink' ) .'" target="_blank" style="color: #3db634">' . __( 'Upgrade', 'widget-options' ) . '</a>';
31
+ return $links;
32
+ }
33
+ }
34
+
35
+ //register default values
36
+ if( !function_exists( 'widgetopts_register_defaults' ) ){
37
+ register_activation_hook( WIDGETOPTS_PLUGIN_FILE, 'widgetopts_register_defaults' );
38
+ add_action( 'plugins_loaded', 'widgetopts_register_defaults' );
39
+ function widgetopts_register_defaults(){
40
+ if( is_admin() ){
41
+
42
+ if( !get_option( 'widgetopts_installDate' ) ){
43
+ add_option( 'widgetopts_installDate', date( 'Y-m-d h:i:s' ) );
44
+ }
45
+
46
+ if( !get_option( '_widgetopts_default_registered_' ) ){
47
+ //activate free version modules
48
+ add_option( 'widgetopts_tabmodule-visibility', 'activate' );
49
+ add_option( 'widgetopts_tabmodule-devices', 'activate' );
50
+ add_option( 'widgetopts_tabmodule-alignment', 'activate' );
51
+ add_option( 'widgetopts_tabmodule-hide_title', 'activate' );
52
+ add_option( 'widgetopts_tabmodule-classes', 'activate' );
53
+ add_option( 'widgetopts_tabmodule-logic', 'activate' );
54
+ add_option( 'widgetopts_tabmodule-state', 'activate' );
55
+ //add free version settings
56
+ $defaults = array(
57
+ 'visibility' => array(
58
+ 'post_type' => '1',
59
+ 'taxonomies' => '1',
60
+ 'misc' => '1'
61
+ ),
62
+ 'classes' => array(
63
+ 'id' => '1',
64
+ 'type' => 'both'
65
+ ),
66
+ );
67
+ //upgraded settings from previous version
68
+ $options = get_option('extwopts_class_settings');
69
+ if( isset( $options['class_field'] ) ){
70
+ $defaults['classes']['type'] = $options['class_field'];
71
+ }
72
+ if( isset( $options['classlists'] ) ){
73
+ $defaults['classes']['classlists'] = $options['classlists'];
74
+ }
75
+ add_option( 'widgetopts_tabmodule-settings', serialize( $defaults ) );
76
+ add_option( '_widgetopts_default_registered_', '1' );
77
+ delete_transient( 'widgetopts_tabs_transient' ); //remove transient for settings
78
+ delete_option( 'widgetopts_settings' );
79
+ }
80
+
81
+ //make sure to delete previous pages cache
82
+ if( !get_option( 'widgetopts_removed_global_pages' ) ){
83
+ delete_option( 'widgetopts_global_pages' );
84
+ add_option( 'widgetopts_removed_global_pages', 1 );
85
+ }
86
+
87
+ }
88
+ }
89
+ }
90
+
91
+ ?>
includes/pagebuilders/beaver/beaver.php ADDED
@@ -0,0 +1,829 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Widget Options for Beaver Builder
4
+ * Plugin URI: https://widget-options.com/
5
+ * Description: <strong>Requires <a href="https://wordpress.org/plugins/widget-options/" target="_blank">Widget Options Plugin</a></strong>! Extend functionalities to Beaver Builder for more visibility restriction options.
6
+ * Version: 1.0
7
+ * Author: Phpbits Creative Studio
8
+ * Author URI: https://phpbits.net/
9
+ * Text Domain: widget-options
10
+ * Domain Path: languages
11
+ *
12
+ * @category Widgets
13
+ * @author Jeffrey Carandang
14
+ * @version 1.0
15
+ */
16
+ // Exit if accessed directly.
17
+ if ( ! defined( 'ABSPATH' ) ) exit;
18
+ if ( ! class_exists( 'WP_Widget_Options_Beaver' ) ) :
19
+
20
+ /**
21
+ * Main WP_Widget_Options_Beaver Class.
22
+ *
23
+ * @since 1.0
24
+ */
25
+ class WP_Widget_Options_Beaver {
26
+
27
+ public static function init() {
28
+ $class = __CLASS__;
29
+ new $class;
30
+ }
31
+
32
+ function __construct(){
33
+ global $widget_options;
34
+
35
+ add_filter( 'fl_builder_register_settings_form', array( &$this, 'widgetopts_beaver_settings' ), 10, 2 );
36
+ add_action( 'fl_builder_control_widgetopts-beaver-tabnav', array( &$this, 'fl_widgetopts_beaver_tabnav' ), 1, 4 );
37
+ add_action( 'wp_enqueue_scripts', array( &$this, 'fl_widgetopts_beaver_scripts' ));
38
+ add_action( 'fl_builder_control_widgetopts-select2', array( &$this, 'fl_widgetopts_beaver_select2' ), 1, 4 );
39
+ add_action( 'fl_builder_control_widgetopts-upgrade', array( &$this, 'fl_widgetopts_upgrade' ), 1, 4 );
40
+ // add_action( 'admin_notices', array( &$this, 'widgetopts_plugin_check' ) );
41
+
42
+ add_filter( 'fl_builder_is_node_visible', array( &$this, 'widgetopts_beaver_is_node_visible' ), 10, 2 );
43
+ }
44
+
45
+ function widgetopts_beaver_settings( $form, $id ){
46
+ if( !isset( $form['widgetopts'] ) && !is_admin() ){
47
+ //fix not registering global values
48
+ if( !function_exists( 'widgetopts_register_globals' ) ){
49
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/globals.php';
50
+ widgetopts_register_globals();
51
+ }
52
+
53
+ global $widget_options, $widgetopts_taxonomies, $widgetopts_types, $widgetopts_categories;
54
+ $widgetopts_pages = widgetopts_global_pages();
55
+
56
+
57
+ $sections = array();
58
+ $pages = ( !empty( $widgetopts_pages ) ) ? $widgetopts_pages : array();
59
+ $taxonomies = ( !empty( $widgetopts_taxonomies ) ) ? $widgetopts_taxonomies : array();
60
+ $types = ( !empty( $widgetopts_types ) ) ? $widgetopts_types : array();
61
+ $categories = ( !empty( $widgetopts_categories ) ) ? $widgetopts_categories : array();
62
+
63
+ $get_terms = array();
64
+ if( !empty( $widget_options['settings']['taxonomies'] ) && is_array( $widget_options['settings']['taxonomies'] ) ){
65
+ foreach ( $widget_options['settings']['taxonomies'] as $tax_opt => $vall ) {
66
+ $tax_name = 'widgetopts_taxonomy_'. str_replace( '-', '__', $tax_opt );
67
+ // global $$tax_name;
68
+ if( isset( $GLOBALS[ $tax_name ] ) ){
69
+ $get_terms[ $tax_opt ] = $GLOBALS[ $tax_name ];
70
+ }
71
+ }
72
+ }
73
+
74
+ // print_r( $pages ); die();
75
+
76
+ $sections[ 'widgetopts-fields' ] = array(
77
+ 'fields' => array(
78
+ 'widgetopts-tabnav' => array(
79
+ 'type' => 'widgetopts-beaver-tabnav',
80
+ )
81
+ )
82
+ );
83
+
84
+ if( isset( $widget_options['visibility'] ) && 'activate' == $widget_options['visibility'] ){
85
+ $visibility_fld = array();
86
+
87
+ $visibility_fld['widgetopts_visibility_show'] = array(
88
+ 'type' => 'select',
89
+ 'label' => __( 'Show or Hide', 'widget-options' ),
90
+ 'options' => array(
91
+ 'hide' => __( 'Hide on Selected Pages', 'widget-options' ),
92
+ 'show' => __( 'Show on Selected Pages', 'widget-options' )
93
+ )
94
+ );
95
+
96
+ if( isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['post_type'] ) && '1' == $widget_options['settings']['visibility']['post_type'] ){
97
+
98
+ if( !empty( $pages ) ){
99
+ $pages_array = array();
100
+ foreach ( $pages as $page ) {
101
+ $pages_array[ $page->ID ] = $page->post_title;
102
+ }
103
+
104
+ $visibility_fld['widgetopts_visibility_pages'] = array(
105
+ 'type' => 'widgetopts-select2',
106
+ 'label' => __( 'Pages', 'widget-options' ),
107
+ 'options' => $pages_array,
108
+ 'multi-select' => true,
109
+ 'description' => __( 'Click to search or select', 'widget-options' ),
110
+ );
111
+ }
112
+
113
+ if( !empty( $types ) ){
114
+ $types_array = array();
115
+ foreach ( $types as $ptype => $type ) {
116
+ $types_array[ $ptype ] = $type->labels->name;
117
+ }
118
+
119
+ $visibility_fld['widgetopts_visibility_types'] = array(
120
+ 'type' => 'widgetopts-select2',
121
+ 'label' => __( 'Post Types', 'widget-options' ),
122
+ 'options' => $types_array,
123
+ 'multi-select' => true,
124
+ 'description' => __( 'Click to search or select', 'widget-options' )
125
+ );
126
+ }
127
+ }
128
+
129
+ if( isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['taxonomies'] ) && '1' == $widget_options['settings']['visibility']['taxonomies'] ){
130
+ // if( !empty( $widget_options['settings']['taxonomies'] ) && is_array( $widget_options['settings']['taxonomies'] ) ){
131
+ // foreach ( $widget_options['settings']['taxonomies'] as $tax_opt => $vallue ) {
132
+ // $term_array = array();
133
+ // // if( !empty( $get_terms ) ){
134
+ // foreach ( $get_terms[ $tax_opt ] as $get_term ) {
135
+ // $term_array[ $get_term->term_id ] = $get_term->name;
136
+ // }
137
+
138
+ // $visibility_fld['widgetopts_visibility_tax_'. $tax_opt] = array(
139
+ // 'type' => 'widgetopts-select2',
140
+ // 'label' => $taxonomies[ $tax_opt ]->label,
141
+ // 'options' => $term_array,
142
+ // 'multi-select' => true,
143
+ // 'description' => __( 'Click to search or select', 'widget-options' )
144
+ // );
145
+ // // }
146
+ // }
147
+ // }
148
+
149
+ if( !empty( $categories ) ){
150
+ $cat_array = array();
151
+ foreach ( $categories as $cat ) {
152
+ $cat_array[ $cat->cat_ID ] = $cat->cat_name;
153
+ }
154
+
155
+ $visibility_fld['widgetopts_visibility_tax_category'] = array(
156
+ 'type' => 'widgetopts-select2',
157
+ 'label' => __( 'Categories', 'widget-options' ),
158
+ 'options' => $cat_array,
159
+ 'multi-select' => true,
160
+ 'description' => __( 'Click to search or select', 'widget-options' )
161
+ );
162
+
163
+ }
164
+
165
+ if( !empty( $taxonomies ) ){
166
+ $tax_array = array();
167
+ foreach ( $taxonomies as $taxonomy ) {
168
+ $tax_array[ $taxonomy->name ] = $taxonomy->label;
169
+ }
170
+
171
+ $visibility_fld['widgetopts_visibility_taxonomies'] = array(
172
+ 'type' => 'widgetopts-select2',
173
+ 'label' => __( 'Taxonomies', 'widget-options' ),
174
+ 'options' => $tax_array,
175
+ 'multi-select' => true,
176
+ 'description' => __( 'Click to search or select', 'widget-options' )
177
+ );
178
+ }
179
+ }
180
+
181
+ if( isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['misc'] ) && '1' == $widget_options['settings']['visibility']['misc'] ){
182
+ $visibility_fld['widgetopts_visibility_misc'] = array(
183
+ 'type' => 'widgetopts-select2',
184
+ 'label' => __( 'Miscellaneous', 'widget-options' ),
185
+ 'options' => array(
186
+ 'home' => __( 'Home/Front', 'widget-options' ),
187
+ 'blog' => __( 'Blog', 'widget-options' ),
188
+ 'archives' => __( 'Archives', 'widget-options' ),
189
+ '404' => __( '404', 'widget-options' ),
190
+ 'search' => __( 'Search', 'widget-options' )
191
+ ),
192
+ 'multi-select' => true,
193
+ 'description' => __( 'Click to search or select', 'widget-options' )
194
+ );
195
+ }
196
+
197
+ $sections[ 'widgetopts-visibility' ] = array(
198
+ 'fields' => $visibility_fld
199
+ );
200
+ }
201
+
202
+ if( isset( $widget_options['logic'] ) && 'activate' == $widget_options['logic'] ||
203
+ isset( $widget_options['acf'] ) && 'activate' == $widget_options['acf'] ){
204
+ $settings_fld = array();
205
+
206
+ if( isset( $widget_options['logic'] ) && 'activate' == $widget_options['logic'] ){
207
+ $settings_fld['widgetopts_settings_logic'] = array(
208
+ 'type' => 'textarea',
209
+ 'label' => __( 'Display Logic', 'widget-options' ),
210
+ 'description' => __( '<small>PLEASE NOTE that the display logic you introduce is EVAL\'d directly. Anyone who has access to edit widget appearance will have the right to add any code, including malicious and possibly destructive functions. There is an optional filter "widget_options_logic_override" which you can use to bypass the EVAL with your own code if needed.</small>', 'widget-options' )
211
+ );
212
+ }
213
+
214
+ //ACF
215
+ if( isset( $widget_options['acf'] ) && 'activate' == $widget_options['acf'] ){
216
+ $fields = array( '' => __( 'Select Field', 'widget-options' ) );
217
+
218
+ if ( function_exists( 'acf_get_field_groups' ) ) {
219
+ $groups = acf_get_field_groups();
220
+ if ( is_array( $groups ) ) {
221
+ foreach ( $groups as $group ) {
222
+ $fields_group = acf_get_fields( $group );
223
+ if( !empty( $fields_group ) ){
224
+ foreach ( $fields_group as $k => $fg ) {
225
+ $fields[ $fg['key'] ] = $fg['label'];
226
+ }
227
+ }
228
+ }
229
+ }
230
+ }else{
231
+ $groups = apply_filters( 'acf/get_field_groups', array() );
232
+ if ( is_array( $groups ) ) {
233
+ foreach ( $groups as $group ) {
234
+ $fields_group = apply_filters( 'acf/field_group/get_fields', array(), $group['id'] );
235
+ if( !empty( $fields_group ) ){
236
+ foreach ( $fields_group as $k => $fg ) {
237
+ $fields[ $fg['key'] ] = $fg['label'];
238
+ }
239
+ }
240
+ }
241
+ }
242
+ }
243
+
244
+ $settings_fld['widgetopts_acf_visibility'] = array(
245
+ 'type' => 'select',
246
+ 'label' => __( 'Show or Hide based on Advanced Custom Field', 'widget-options' ),
247
+ 'options' => array(
248
+ 'hide' => __( 'Hide when Condition\'s Met', 'widget-options' ),
249
+ 'show' => __( 'Show when Condition\'s Met', 'widget-options' )
250
+ )
251
+ );
252
+
253
+ $settings_fld['widgetopts_acf_field'] = array(
254
+ 'type' => 'select',
255
+ 'label' => __( 'Select ACF Field', 'widget-options' ),
256
+ 'options' => $fields
257
+ );
258
+
259
+ $settings_fld['widgetopts_acf_condition'] = array(
260
+ 'type' => 'select',
261
+ 'label' => __( 'Select Condition', 'widget-options' ),
262
+ 'options' => array(
263
+ '' => __( 'Select Condition', 'widget-options' ),
264
+ 'equal' => __( 'Is Equal To', 'widget-options' ),
265
+ 'not_equal' => __( 'Is Not Equal To', 'widget-options' ),
266
+ 'contains' => __( 'Contains', 'widget-options' ),
267
+ 'not_contains' => __( 'Does Not Contain', 'widget-options' ),
268
+ 'empty' => __( 'Is Empty', 'widget-options' ),
269
+ 'not_empty' => __( 'Is Not Empty', 'widget-options' )
270
+ )
271
+ );
272
+ $settings_fld['widgetopts_acf_value'] = array(
273
+ 'type' => 'textarea',
274
+ 'label' => __( 'Conditional Value', 'widget-options' ),
275
+ 'description' => __( 'Add your Conditional Value here if you selected Equal to, Not Equal To or Contains on the selection above.', 'widget-options' )
276
+ );
277
+ }
278
+
279
+ $sections[ 'widgetopts-settings' ] = array(
280
+ 'fields' => $settings_fld
281
+ );
282
+ }
283
+
284
+ $upgrade_fld = array();
285
+ $upgrade_fld['widgetopts_upgrade_section'] = array(
286
+ 'type' => 'widgetopts-upgrade'
287
+ );
288
+
289
+ $sections[ 'widgetopts-upgrade' ] = array(
290
+ 'fields' => $upgrade_fld
291
+ );
292
+
293
+ $form['widgetopts'] = array(
294
+ 'title' => __( 'Widget Options', 'widget-options' ),
295
+ 'sections' => $sections
296
+ );
297
+ }
298
+
299
+ return $form;
300
+ }
301
+
302
+ function fl_widgetopts_beaver_tabnav($name, $value, $field, $settings) {
303
+ global $widget_options;
304
+ ?>
305
+ <div class="fl-builder-widgetopts-tab">
306
+ <?php if( isset( $widget_options['visibility'] ) && 'activate' == $widget_options['visibility'] ){ ?>
307
+ <a href="#fl-builder-settings-section-widgetopts-visibility" class="widgetopts-s-active"><span class="dashicons dashicons-visibility"></span><?php _e( 'Visibility', 'widget-options' );?></a>
308
+ <?php } ?>
309
+ <?php if( isset( $widget_options['logic'] ) && 'activate' == $widget_options['logic'] ){ ?>
310
+ <a href="#fl-builder-settings-section-widgetopts-settings" class="<?php echo ( isset( $widget_options['visibility'] ) && 'activate' == $widget_options['visibility'] ) ? '' : 'widgetopts-s-active';?>"><span class="dashicons dashicons-admin-generic"></span><?php _e( 'Settings', 'widget-options' );?></a>
311
+ <?php } ?>
312
+ <a href="#fl-builder-settings-section-widgetopts-upgrade"><span class="dashicons dashicons-plus"></span><?php _e( 'More', 'widget-options' );?></a>
313
+ </div>
314
+ <?php }
315
+
316
+ function fl_widgetopts_beaver_scripts(){
317
+ if ( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_active() ) {
318
+ $js_dir = WIDGETOPTS_PLUGIN_URL . 'assets/js/';
319
+ $css_dir = WIDGETOPTS_PLUGIN_URL . 'assets/css/';
320
+
321
+ // Use minified libraries if SCRIPT_DEBUG is turned off
322
+ $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
323
+
324
+ wp_enqueue_style( 'widgetopts-beaver-css', $css_dir . 'beaver-widgetopts.css' , array(), null );
325
+ wp_enqueue_style( 'widgetopts-beaver-select2-css', $css_dir . 'select2.min.css' , array(), null );
326
+
327
+ wp_enqueue_script(
328
+ 'beaver-widgetopts',
329
+ $js_dir .'jquery.widgetopts.beaver'. $suffix .'.js',
330
+ array( 'jquery' ),
331
+ '',
332
+ true
333
+ );
334
+ wp_enqueue_script(
335
+ 'beaver-widgetopts-select2',
336
+ $js_dir .'select2.min.js',
337
+ array( 'jquery', 'beaver-widgetopts' ),
338
+ '',
339
+ true
340
+ );
341
+ wp_enqueue_script(
342
+ 'beaver-widgetopts-s2',
343
+ $js_dir .'select2-settings'. $suffix .'.js',
344
+ array( 'jquery', 'beaver-widgetopts' ),
345
+ '',
346
+ true
347
+ );
348
+ }
349
+ }
350
+
351
+ function fl_widgetopts_beaver_get_fld_options($settings, $field, $options = array()) {
352
+ if(!is_object($settings) && !is_array($settings)) return $options;
353
+
354
+ foreach($settings as $key=>$val) {
355
+ if($key === $field) {
356
+ if(is_array($val)) {
357
+ foreach($val as $v) {
358
+ $options[$v] = $v;
359
+ }
360
+ } else {
361
+ $options[$val] = $val;
362
+ }
363
+ }else{
364
+ if(is_array($val) || is_object($val)){
365
+ $options = $this->fl_widgetopts_beaver_get_fld_options($val, $field, $options);
366
+ }
367
+ }
368
+ }
369
+
370
+ return array_unique($options);
371
+ }
372
+
373
+ function fl_widgetopts_beaver_select2( $name, $value, $field, $settings ) {
374
+ $options = ( $field['options'] ) ? $field['options'] : array();
375
+
376
+ if( isset( $field['options_from_field'] ) ) {
377
+ $options_field = $field['options_from_field'];
378
+ $post_data = FLBuilderModel::get_post_data();
379
+ $parent_settings = $post_data['node_settings'];
380
+
381
+ $options = $this->fl_widgetopts_beaver_get_fld_options($parent_settings, $options_field, $options);
382
+ }
383
+
384
+ // Create attributes
385
+ $attributes = '';
386
+ if( isset( $field['attributes'] ) && is_array( $field['attributes'] ) ) {
387
+ foreach($field['attributes'] as $key=>$val) {
388
+ $attributes .= $key .'="'. $val .'" ';
389
+ }
390
+ }
391
+
392
+ if(!empty($options) && $value) {
393
+ uksort($options, function($key1, $key2) use ($value) {
394
+ return (array_search($key1, $value) > array_search($key2, $value));
395
+ });
396
+ }
397
+ if( !isset( $field['class'] ) ){
398
+ $field['class'] = '';
399
+ }
400
+
401
+ // Show the select field
402
+ ?>
403
+ <select name="<?php echo $name; if( isset( $field['multi-select'] ) ) echo '[]'; ?>" class="widgetopts-select2 <?php echo $field['class']; ?>" <?php if( isset( $field['multi-select'] ) ) echo 'multiple '; echo $attributes; ?> placeholder="<?php _e( 'Click to search or select', 'widget-options' );?>" >
404
+ <option></option>
405
+ <?php
406
+ foreach ( $options as $option_key => $option_val ) :
407
+
408
+ if ( is_array( $option_val ) && isset( $option_val['premium' ] ) && $option_val['premium'] && true === FL_BUILDER_LITE ) {
409
+ continue;
410
+ }
411
+
412
+ $label = is_array( $option_val ) ? $option_val['label'] : $option_val;
413
+
414
+ if ( is_array( $value ) && in_array( $option_key, $value ) ) {
415
+ $selected = ' selected="selected"';
416
+ }else if ( ! is_array( $value ) && selected( $value, $option_key, true ) ) {
417
+ $selected = ' selected="selected"';
418
+ } else {
419
+ $selected = '';
420
+ }
421
+
422
+ ?>
423
+ <option value="<?php echo $option_key; ?>" <?php echo $selected; ?>><?php echo $label; ?></option>
424
+ <?php endforeach; ?>
425
+ </select>
426
+ <?php }
427
+
428
+ function fl_widgetopts_upgrade( $name, $value, $field, $settings ) { ?>
429
+ <div class="extended-widget-opts-tabcontent extended-widget-opts-tabcontent-gopro">
430
+ <p class="widgetopts-unlock-features">
431
+ <span class="dashicons dashicons-lock"></span><?php _e( 'Unlock all Options', 'widget-options' );?>
432
+ </p>
433
+ <p>
434
+ <?php _e( 'Get the world\'s most complete widget management now with Beaver Builder integration! Upgrade to extended version to get:', 'widget-options' );?>
435
+ </p>
436
+ <ul>
437
+ <li>
438
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Animation Options', 'widget-options' );?>
439
+ </li>
440
+ <li>
441
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Custom Styling Options', 'widget-options' );?>
442
+ </li>
443
+ <li>
444
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Set Alignment per Devices', 'widget-options' );?>
445
+ </li>
446
+ <li>
447
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'User Roles Visibility Restriction', 'widget-options' );?>
448
+ </li>
449
+ <li>
450
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Fixed/Sticky Widget Options', 'widget-options' );?>
451
+ </li>
452
+ <li>
453
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Days and Date Range Restriction', 'widget-options' );?>
454
+ </li>
455
+ <li>
456
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Link Module Block Options', 'widget-options' );?>
457
+ </li>
458
+ <li>
459
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Extended Taxonomy and Post Types Support', 'widget-options' );?>
460
+ </li>
461
+ <li>
462
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Target URLs and Wildcard Restrictions', 'widget-options' );?>
463
+ </li>
464
+ <li>
465
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Beaver Builder Support', 'widget-options' );?>
466
+ </li>
467
+ </ul>
468
+ <p><strong><a href="http://widget-options.com/?utm_source=beaverbuilder&utm_medium=learnmore&utm_campaign=widgetoptsprotab" class="button-primary" target="_blank"><?php _e( 'Learn More', 'widget-options' );?></a></strong></p>
469
+ </div>
470
+ <?php }
471
+
472
+ function widgetopts_beaver_is_node_visible( $is_visible, $node ){
473
+
474
+ //return if editing
475
+ if ( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_active() ) {
476
+ return $is_visible;
477
+ }
478
+
479
+ global $widget_options;
480
+
481
+ $settings = $node->settings;
482
+ $hidden = false;
483
+ $visibility_opts = isset( $settings->widgetopts_visibility_show ) ? $settings->widgetopts_visibility_show : 'hide';
484
+
485
+ $tax_opts = ( isset( $widget_options['settings'] ) && isset( $widget_options['settings']['taxonomies_keys'] ) ) ? $widget_options['settings']['taxonomies_keys'] : array();
486
+ $is_misc = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['misc'] ) ) ? true : false;
487
+ $is_types = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['post_type'] ) ) ? true : false;
488
+ $is_tax = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['taxonomies'] ) ) ? true : false;
489
+ $is_inherit = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['inherit'] ) ) ? true : false;
490
+
491
+ // echo '<pre>';
492
+ // print_r( $settings );
493
+ // echo '</pre>';
494
+
495
+ //pages
496
+ if ( $is_misc && ( ( is_home() && is_front_page() ) || is_front_page() ) ) {
497
+ if( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && in_array( 'home', $settings->widgetopts_visibility_misc ) && $visibility_opts == 'hide' ){
498
+ $hidden = true; //hide if checked on hidden pages
499
+ }elseif( ( !isset( $settings->widgetopts_visibility_misc ) || ( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && !in_array( 'home', $settings->widgetopts_visibility_misc ) ) ) && $visibility_opts == 'show' ){
500
+ $hidden = true; //hide if not checked on visible pages
501
+ }
502
+
503
+ //do return to bypass other conditions
504
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_home', $hidden );
505
+ if( $hidden ){
506
+ return false;
507
+ }
508
+ }elseif ( $is_misc && is_home() ) {
509
+ //NOT CHECKED YET
510
+ if( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && in_array( 'blog', $settings->widgetopts_visibility_misc ) && $visibility_opts == 'hide' ){
511
+ $hidden = true; //hide if checked on hidden pages
512
+ }elseif( ( !isset( $settings->widgetopts_visibility_misc ) || ( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && !in_array( 'blog', $settings->widgetopts_visibility_misc ) ) ) && $visibility_opts == 'show' ){
513
+ $hidden = true; //hide if not checked on visible pages
514
+ }
515
+
516
+ //do return to bypass other conditions
517
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_blog', $hidden );
518
+ if( $hidden ){
519
+ return false;
520
+ }
521
+ }elseif ( $is_tax && is_tag() ) {
522
+
523
+ if( !isset( $settings->widgetopts_visibility_taxonomies ) || ( isset( $settings->widgetopts_visibility_taxonomies ) && !is_array( $settings->widgetopts_visibility_taxonomies ) ) ){
524
+ $settings->widgetopts_visibility_taxonomies = array();
525
+ }
526
+
527
+ if( in_array( 'post_tag', $settings->widgetopts_visibility_taxonomies ) && $visibility_opts == 'hide' ){
528
+ $hidden = true; //hide to all tags
529
+ }elseif( in_array( 'post_tag', $settings->widgetopts_visibility_taxonomies ) && $visibility_opts == 'show' ){
530
+ $hidden = false; //hide to all tags
531
+ }
532
+ //
533
+ // //do return to bypass other conditions
534
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_tags', $hidden );
535
+ if( $hidden ){
536
+ return false;
537
+ }
538
+ }elseif ( $is_tax && is_tax() ) {
539
+ $term = get_queried_object();
540
+ //taxonomies page
541
+ if( !isset( $settings->widgetopts_visibility_taxonomies ) || ( isset( $settings->widgetopts_visibility_taxonomies ) && !is_array( $settings->widgetopts_visibility_taxonomies ) ) ){
542
+ $settings->widgetopts_visibility_taxonomies = array();
543
+ }
544
+ // print_r( $term_lists );
545
+ if( in_array( $term->taxonomy, $settings->widgetopts_visibility_taxonomies ) && $visibility_opts == 'hide' ){
546
+ $hidden = true; //hide to all tags
547
+ }elseif( !in_array( $term->taxonomy, $settings->widgetopts_visibility_taxonomies ) && $visibility_opts == 'show' ){
548
+ $hidden = true; //hide to all tags
549
+ }
550
+
551
+ //do return to bypass other conditions
552
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_taxonomies', $hidden );
553
+ if( $hidden ){
554
+ return false;
555
+ }
556
+ }elseif ( $is_misc && is_archive() ) {
557
+ //archives page
558
+ if( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && in_array( 'archives', $settings->widgetopts_visibility_misc ) && $visibility_opts == 'hide' ){
559
+ $hidden = true; //hide if checked on hidden pages
560
+ }elseif( ( !isset( $settings->widgetopts_visibility_misc ) || ( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && !in_array( 'archives', $settings->widgetopts_visibility_misc ) ) ) && $visibility_opts == 'show' ){
561
+ $hidden = true; //hide if not checked on visible pages
562
+ }
563
+
564
+ //do return to bypass other conditions
565
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_archives', $hidden );
566
+ if( $hidden ){
567
+ return false;
568
+ }
569
+ }elseif ( $is_misc && is_404() ) {
570
+ //404 page
571
+ if( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && in_array( '404', $settings->widgetopts_visibility_misc ) && $visibility_opts == 'hide' ){
572
+ $hidden = true; //hide if checked on hidden pages
573
+ }elseif( ( !isset( $settings->widgetopts_visibility_misc ) || ( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && !in_array( '404', $settings->widgetopts_visibility_misc ) ) ) && $visibility_opts == 'show' ){
574
+ $hidden = true; //hide if not checked on visible pages
575
+ }
576
+
577
+ //do return to bypass other conditions
578
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_404', $hidden );
579
+ if( $hidden ){
580
+ return false;
581
+ }
582
+ }elseif ( $is_misc && is_search() ) {
583
+ if( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && in_array( 'search', $settings->widgetopts_visibility_misc ) && $visibility_opts == 'hide' ){
584
+ $hidden = true; //hide if checked on hidden pages
585
+ }elseif( ( !isset( $settings->widgetopts_visibility_misc ) || ( isset( $settings->widgetopts_visibility_misc ) && is_array( $settings->widgetopts_visibility_misc ) && !in_array( 'search', $settings->widgetopts_visibility_misc ) ) ) && $visibility_opts == 'show' ){
586
+ $hidden = true;
587
+ }
588
+
589
+ //do return to bypass other conditions
590
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_search', $hidden );
591
+ if( $hidden ){
592
+ return false;
593
+ }
594
+ }elseif ( is_single() && !is_page() ) {
595
+ global $wp_query;
596
+ $post = $wp_query->post;
597
+
598
+ if( !isset( $settings->widgetopts_visibility_types ) || ( $is_types && !isset( $settings->widgetopts_visibility_types ) ) || !is_array( $settings->widgetopts_visibility_types ) ){
599
+ $settings->widgetopts_visibility_types = array();
600
+ }
601
+
602
+ if( $visibility_opts == 'hide' && in_array( $post->post_type , $settings->widgetopts_visibility_types ) ){
603
+ $hidden = true; //hide if exists on hidden pages
604
+ }elseif( $visibility_opts == 'show' && !in_array( $post->post_type , $settings->widgetopts_visibility_types ) ){
605
+ $hidden = true; //hide if doesn't exists on visible pages
606
+ }
607
+
608
+ // do return to bypass other conditions
609
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_single', $hidden );
610
+
611
+
612
+ // $taxonomy_names = get_post_taxonomies( $post->ID );
613
+ // $array_intersect = array_intersect( $tax_opts, $taxonomy_names );
614
+
615
+ if( !isset( $settings->widgetopts_visibility_tax_category ) ){
616
+ $settings->widgetopts_visibility_tax_category = array();
617
+ }
618
+
619
+ if( isset( $settings->widgetopts_visibility_tax_category ) && !empty( $settings->widgetopts_visibility_tax_category ) ){
620
+ $cats = wp_get_post_categories( $post->ID );
621
+
622
+ if( is_array( $cats ) && !empty( $cats ) ){
623
+ $checked_cats = $settings->widgetopts_visibility_tax_category;
624
+ $intersect = array_intersect( $cats , $checked_cats );
625
+ if( !empty( $intersect ) && $visibility_opts == 'hide' ){
626
+ $hidden = true;
627
+ }elseif( !empty( $intersect ) && $visibility_opts == 'show' ){
628
+ $hidden = false;
629
+ }
630
+
631
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_single_category', $hidden );
632
+ }
633
+ }
634
+
635
+ if( $hidden ){
636
+ return false;
637
+ }
638
+ }elseif ( $is_types && is_page() ) {
639
+ global $wp_query;
640
+
641
+ $post = $wp_query->post;
642
+
643
+ //do post type condition first
644
+ if( isset( $settings->widgetopts_visibility_types ) && is_array( $settings->widgetopts_visibility_types ) && in_array( 'page', $settings->widgetopts_visibility_types ) ){
645
+
646
+ if( !is_array( $settings->widgetopts_visibility_types ) ){
647
+ $settings->widgetopts_visibility_types = array();
648
+ }
649
+
650
+ if( $visibility_opts == 'hide' && in_array( 'page', $settings->widgetopts_visibility_types ) ){
651
+ $hidden = true; //hide if exists on hidden pages
652
+ }elseif( $visibility_opts == 'show' && !in_array( 'page', $settings->widgetopts_visibility_types ) ){
653
+ $hidden = true; //hide if doesn't exists on visible pages
654
+ }
655
+ }else{
656
+ // print_r( $settings['widgetopts_pages'] );
657
+ //do per pages condition
658
+ if( !isset( $settings->widgetopts_visibility_pages ) || ( isset( $settings->widgetopts_visibility_pages ) && !is_array( $settings->widgetopts_visibility_pages ) ) ){
659
+ $settings->widgetopts_visibility_pages = array();
660
+ }
661
+
662
+ if( $visibility_opts == 'hide' && in_array( $post->ID , $settings->widgetopts_visibility_pages ) ){
663
+ $hidden = true; //hide if exists on hidden pages
664
+ }elseif( $visibility_opts == 'show' && !in_array( $post->ID , $settings->widgetopts_visibility_pages ) ){
665
+ $hidden = true; //hide if doesn't exists on visible pages
666
+ }
667
+ }
668
+
669
+ // //do return to bypass other conditions
670
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_page', $hidden );
671
+ if( $hidden ){
672
+ return false;
673
+ }
674
+ }
675
+
676
+ //ACF
677
+ if( isset( $widget_options['acf'] ) && 'activate' == $widget_options['acf'] ){
678
+ if( isset( $settings->widgetopts_acf_field ) && !empty( $settings->widgetopts_acf_field ) ){
679
+ $acf = get_field_object( $settings->widgetopts_acf_field );
680
+ if( $acf && is_array( $acf ) ){
681
+ $acf_visibility = isset( $settings->widgetopts_acf_visibility ) ? $settings->widgetopts_acf_visibility : 'hide';
682
+
683
+ //handle repeater fields
684
+ if( isset( $acf['value'] ) ){
685
+ if( is_array( $acf['value'] ) ){
686
+ $acf['value'] = implode(', ', array_map(function ( $acf_array_value ) {
687
+ $acf_implode = '';
688
+ if( is_array( $acf_array_value ) ){
689
+ $acf_implode = implode( ',', array_filter($acf_array_value) );
690
+ }
691
+ return $acf_implode;
692
+ }, $acf['value']));
693
+ }
694
+ }
695
+
696
+ switch ( $settings->widgetopts_acf_condition ) {
697
+ case 'equal':
698
+ if( isset( $acf['value'] ) ){
699
+ if( 'show' == $acf_visibility && $acf['value'] == $settings->widgetopts_acf_value ){
700
+ $hidden = false;
701
+ }else if( 'show' == $acf_visibility && $acf['value'] != $settings->widgetopts_acf_value ){
702
+ $hidden = true;
703
+ }else if( 'hide' == $acf_visibility && $acf['value'] == $settings->widgetopts_acf_value ){
704
+ $hidden = true;
705
+ }else if( 'hide' == $acf_visibility && $acf['value'] != $settings->widgetopts_acf_value ){
706
+ $hidden = false;
707
+ }
708
+ }
709
+ break;
710
+
711
+ case 'not_equal':
712
+ if( isset( $acf['value'] ) ){
713
+ if( 'show' == $acf_visibility && $acf['value'] == $settings->widgetopts_acf_value ){
714
+ $hidden = true;
715
+ }else if( 'show' == $acf_visibility && $acf['value'] != $settings->widgetopts_acf_value ){
716
+ $hidden = false;
717
+ }else if( 'hide' == $acf_visibility && $acf['value'] == $settings->widgetopts_acf_value ){
718
+ $hidden = false;
719
+ }else if( 'hide' == $acf_visibility && $acf['value'] != $settings->widgetopts_acf_value ){
720
+ $hidden = true;
721
+ }
722
+ }
723
+ break;
724
+
725
+ case 'contains':
726
+ if( isset( $acf['value'] ) ){
727
+ if( 'show' == $acf_visibility && strpos( $acf['value'], $settings->widgetopts_acf_value ) !== false ){
728
+ $hidden = false;
729
+ }else if( 'show' == $acf_visibility && strpos( $acf['value'], $settings->widgetopts_acf_value ) === false ){
730
+ $hidden = true;
731
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $settings->widgetopts_acf_value ) !== false ){
732
+ $hidden = true;
733
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $settings->widgetopts_acf_value ) === false ){
734
+ $hidden = false;
735
+ }
736
+ }
737
+ break;
738
+
739
+ case 'not_contains':
740
+ if( isset( $acf['value'] ) ){
741
+ if( 'show' == $acf_visibility && strpos( $acf['value'], $settings->widgetopts_acf_value ) !== false ){
742
+ $hidden = true;
743
+ }else if( 'show' == $acf_visibility && strpos( $acf['value'], $settings->widgetopts_acf_value ) === false ){
744
+ $hidden = false;
745
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $settings->widgetopts_acf_value ) !== false ){
746
+ $hidden = false;
747
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $settings->widgetopts_acf_value ) === false ){
748
+ $hidden = true;
749
+ }
750
+ }
751
+ break;
752
+
753
+ case 'empty':
754
+ if( 'show' == $acf_visibility && empty( $acf['value'] ) ){
755
+ $hidden = false;
756
+ }else if( 'show' == $acf_visibility && !empty( $acf['value'] ) ){
757
+ $hidden = true;
758
+ }elseif( 'hide' == $acf_visibility && empty( $acf['value'] ) ){
759
+ $hidden = true;
760
+ }else if( 'hide' == $acf_visibility && !empty( $acf['value'] ) ){
761
+ $hidden = false;
762
+ }
763
+ break;
764
+
765
+ case 'not_empty':
766
+ if( 'show' == $acf_visibility && empty( $acf['value'] ) ){
767
+ $hidden = true;
768
+ }else if( 'show' == $acf_visibility && !empty( $acf['value'] ) ){
769
+ $hidden = false;
770
+ }elseif( 'hide' == $acf_visibility && empty( $acf['value'] ) ){
771
+ $hidden = false;
772
+ }else if( 'hide' == $acf_visibility && !empty( $acf['value'] ) ){
773
+ $hidden = true;
774
+ }
775
+ break;
776
+
777
+ default:
778
+ # code...
779
+ break;
780
+ }
781
+
782
+ // //do return to bypass other conditions
783
+ $hidden = apply_filters( 'widgetopts_beaver_visibility_acf', $hidden );
784
+ if( $hidden ){
785
+ return false;
786
+ }
787
+ }
788
+ }
789
+ }
790
+
791
+ //widget logic
792
+ if( isset( $widget_options['logic'] ) && 'activate' == $widget_options['logic'] ){
793
+ if( isset( $settings->widgetopts_settings_logic ) && !empty( $settings->widgetopts_settings_logic ) ){
794
+ //do widget logic
795
+ $display_logic = stripslashes( trim( $settings->widgetopts_settings_logic ) );
796
+ $display_logic = apply_filters( 'widget_options_logic_override', $display_logic );
797
+ $display_logic = apply_filters( 'extended_widget_options_logic_override', $display_logic );
798
+ if ( $display_logic === false ){
799
+ return false;
800
+ }
801
+ if ( $display_logic === true ){
802
+ return $content;
803
+ }
804
+ if ( stristr($display_logic,"return")===false ){
805
+ $display_logic="return (" . $display_logic . ");";
806
+ }
807
+ if ( !eval( $display_logic ) ){
808
+ return false;
809
+ }
810
+ }
811
+ }
812
+
813
+ return $is_visible;
814
+ }
815
+ function widgetopts_plugin_check(){
816
+ if ( ! defined( 'WIDGETOPTS_PLUGIN_NAME' ) ) { ?>
817
+ <div class="widgetopts_activated_notice notice-error notice" style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);">
818
+ <p>
819
+ <?php _e( '<strong>Widget Options Plugin</strong> is required for the <em>Widget Options for Beaver Builder</em> to work properly. Please get the plugin <a href="https://wordpress.org/plugins/widget-options/" target="_blank">here</a>. Thanks!', 'widget-options' );?>
820
+ </p>
821
+ </div>
822
+ <?php }
823
+ }
824
+ }
825
+
826
+ add_action( 'plugins_loaded', array( 'WP_Widget_Options_Beaver', 'init' ));
827
+ // new WP_Widget_Options_Beaver();
828
+
829
+ endif;
includes/pagebuilders/elementor/elementor.php ADDED
@@ -0,0 +1,501 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extends funtionality to Elementor Pagebuilder
4
+ *
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 4.3
8
+ */
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ if( !function_exists( 'widgetopts_elementor_section' ) ){
13
+ //Add "Widget Options" section to every Elementor Widgets
14
+ add_action( 'elementor/element/after_section_end', 'widgetopts_elementor_section', 10, 3 );
15
+ function widgetopts_elementor_section( $element, $section_id, $args ){
16
+ if ( Elementor\Plugin::$instance->editor->is_edit_mode() ) {
17
+ global $widget_options;
18
+
19
+ //filter the elements first to avoid conflicts that can cause pagebuilder not to load
20
+ if ( !in_array( $element->get_name(), array( 'global-settings', 'section', 'page-settings', 'oew-blog-grid' ) ) ) {
21
+
22
+ //create array of section_id to set Widget Options Section to single section to avoid issues
23
+ $widgetopts_elementor_section_id = apply_filters( 'widgetopts_elementor_section_id', array(
24
+ 'section_image',
25
+ 'section_advanced',
26
+ 'section_title',
27
+ 'section_editor',
28
+ 'section_video',
29
+ 'section_button',
30
+ 'section_divider',
31
+ 'section_spacer',
32
+ 'section_map',
33
+ 'section_icon',
34
+ 'section_gallery',
35
+ 'section_image_carousel',
36
+ 'section_icon_list',
37
+ 'section_counter',
38
+ 'section_testimonial',
39
+ 'section_tabs',
40
+ 'section_toggle',
41
+ 'section_social_icon',
42
+ 'section_alert',
43
+ 'section_audio',
44
+ 'section_shortcode',
45
+ 'section_anchor',
46
+ 'section_sidebar',
47
+ 'section_layout',
48
+ 'section_slides',
49
+ 'section_form_fields',
50
+ 'section_list',
51
+ 'section_header',
52
+ 'section_pricing',
53
+ 'section_countdown',
54
+ 'section_buttons_content',
55
+ 'section_blockquote_content',
56
+ 'section_content',
57
+ 'section_login_content',
58
+ 'text_elements',
59
+ 'section_side_a_content',
60
+ 'section_side_b_content',
61
+ '_section_style'
62
+ )
63
+ );
64
+
65
+ //filter by the section_ids above
66
+ if( in_array( $section_id, $widgetopts_elementor_section_id ) ){
67
+ $element->start_controls_section(
68
+ 'widgetopts_section',
69
+ [
70
+ 'tab' => Elementor\Controls_Manager::TAB_ADVANCED,
71
+ 'label' => __( 'Widget Options', 'widget-options' ),
72
+ ],
73
+ [
74
+ 'overwrite' => true
75
+ ]
76
+ );
77
+
78
+ $element->start_controls_tabs( 'widgetopts_content_tabs',[
79
+ 'overwrite' => true
80
+ ] );
81
+
82
+ if( isset( $widget_options['visibility'] ) && 'activate' == $widget_options['visibility'] ){
83
+ widgetopts_elementor_tab_visibility( $element, $section_id, $args );
84
+ }
85
+
86
+ if( isset( $widget_options['state'] ) && 'activate' == $widget_options['state'] ){
87
+ widgetopts_elementor_tab_state( $element, $section_id, $args );
88
+ }
89
+
90
+ if( 'activate' == $widget_options['logic'] || ( isset( $widget_options['sliding'] ) && 'activate' == $widget_options['sliding'] && in_array( $element->get_name(), array( 'button', 'button_plus', 'eael-creative-button', 'cta' ) ) ) ){
91
+ widgetopts_elementor_tab_settings( $element, $section_id, $args );
92
+ }
93
+
94
+ //upsell pro
95
+ if( !is_plugin_active( 'extended-widget-options/plugin.php' ) ){
96
+ $element->start_controls_tab(
97
+ 'widgetopts_tab_upsell',
98
+ [
99
+ 'label' => __( '<i class="fa fa-plus"></i>', 'widget-options' )
100
+ ],
101
+ [
102
+ 'overwrite' => true
103
+ ]
104
+ );
105
+ $element->add_control(
106
+ 'widgetopts_pro',
107
+ [
108
+ 'type' => Elementor\Controls_Manager::RAW_HTML,
109
+ 'raw' => '<div class="elementor-panel-nerd-box">
110
+ <i class="elementor-panel-nerd-box-icon fa fa-lock"></i>
111
+ <div class="elementor-panel-nerd-box-title">' .
112
+ __( 'Unlock All Widget Options', 'widget-options' ) .
113
+ '</div>
114
+ <div class="elementor-panel-nerd-box-message">' .
115
+ __( 'Upgrade to Extended Widget Options to unlock all options to easily control and manage each Elementor widget.', 'widget-options' ) .
116
+ '</div>
117
+ <a href="http://widget-options.com/?utm_source=elementor&utm_medium=upgrade&utm_campaign=upgradebtn" class="elementor-panel-nerd-box-link elementor-button elementor-button-default elementor-go-pro" target="_blank">' .
118
+ __( 'Upgrade Now!', 'widget-options' ) .
119
+ '</a>
120
+ </div>',
121
+ ],
122
+ [
123
+ 'overwrite' => true
124
+ ]
125
+ );
126
+ $element->end_controls_tab();
127
+ }
128
+ $element->end_controls_tabs();
129
+
130
+ $element->end_controls_section();
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+
137
+ if( !function_exists( 'widgetopts_elementor_tab_visibility' ) ){
138
+ function widgetopts_elementor_tab_visibility( $element, $section_id, $args ){
139
+ global $widget_options, $widgetopts_taxonomies, $widgetopts_pages, $widgetopts_types, $widgetopts_categories;
140
+
141
+ $pages = ( !empty( $widgetopts_pages ) ) ? $widgetopts_pages : array();
142
+ $taxonomies = ( !empty( $widgetopts_taxonomies ) ) ? $widgetopts_taxonomies : array();
143
+ $types = ( !empty( $widgetopts_types ) ) ? $widgetopts_types : array();
144
+ $categories = ( !empty( $widgetopts_categories ) ) ? $widgetopts_categories : array();
145
+
146
+ // print_r( $get_terms['community-category'] );
147
+
148
+ $element->start_controls_tab(
149
+ 'widgetopts_tab_visibility',
150
+ [
151
+ 'label' => __( '<i class="fa fa-eye"></i>', 'widget-options' )
152
+ ],
153
+ [
154
+ 'overwrite' => true
155
+ ]
156
+ );
157
+
158
+ $element->add_control(
159
+ 'widgetopts_visibility',
160
+ [
161
+ 'label' => __( 'Show/Hide', 'widget-options' ),
162
+ 'type' => Elementor\Controls_Manager::SELECT,
163
+ 'default' => 'hide',
164
+ 'options' => [
165
+ 'show' => __( 'Show on Selected Pages' ),
166
+ 'hide' => __( 'Hide on Selected Pages' )
167
+ ],
168
+ // 'separator' => 'none'
169
+ ],
170
+ [
171
+ 'overwrite' => true
172
+ ]
173
+ );
174
+
175
+ if( isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['post_type'] ) && '1' == $widget_options['settings']['visibility']['post_type'] ){
176
+ $pages_array = array();
177
+ if( !empty( $pages ) ){
178
+ foreach ( $pages as $page ) {
179
+ $pages_array[ $page->ID ] = $page->post_title;
180
+ }
181
+
182
+ $element->add_control(
183
+ 'widgetopts_pages',
184
+ [
185
+ 'label' => __( 'Pages', 'widget-options' ),
186
+ 'type' => Elementor\Controls_Manager::SELECT2,
187
+ 'multiple' => true,
188
+ 'label_block' => true,
189
+ 'separator' => 'before',
190
+ 'options' => $pages_array,
191
+ 'render_type' => 'none',
192
+ 'description' => __( 'Click on the field to search and select pages', 'widget-options' )
193
+ ],
194
+ [
195
+ 'overwrite' => true
196
+ ]
197
+ );
198
+ }
199
+
200
+ if( !empty( $types ) ){
201
+ $types_array = array();
202
+ foreach ( $types as $ptype => $type ) {
203
+ $types_array[ $ptype ] = $type->labels->name;
204
+ }
205
+
206
+ $element->add_control(
207
+ 'widgetopts_types',
208
+ [
209
+ 'label' => __( 'Post Types', 'widget-options' ),
210
+ 'type' => Elementor\Controls_Manager::SELECT2,
211
+ 'multiple' => true,
212
+ 'label_block' => true,
213
+ 'separator' => 'before',
214
+ 'options' => $types_array,
215
+ 'render_type' => 'none',
216
+ 'description' => __( 'Click on the field to search and select custom post types', 'widget-options' )
217
+ ],
218
+ [
219
+ 'overwrite' => true
220
+ ]
221
+ );
222
+ }
223
+ }
224
+
225
+ if( isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['taxonomies'] ) && '1' == $widget_options['settings']['visibility']['taxonomies'] ){
226
+
227
+ if( !empty( $categories ) ){
228
+ $cat_array = array();
229
+ foreach ( $categories as $cat ) {
230
+ $cat_array[ $cat->cat_ID ] = $cat->cat_name;
231
+ }
232
+
233
+ $element->add_control(
234
+ 'widgetopts_tax_category',
235
+ [
236
+ 'label' => __( 'Categories', 'widget-options' ),
237
+ 'type' => Elementor\Controls_Manager::SELECT2,
238
+ 'multiple' => true,
239
+ 'label_block' => true,
240
+ 'separator' => 'before',
241
+ 'options' => $cat_array,
242
+ 'render_type' => 'none',
243
+ 'description' => __( 'Click on the field to search and select categories', 'widget-options' )
244
+ ],
245
+ [
246
+ 'overwrite' => true
247
+ ]
248
+ );
249
+ }
250
+
251
+ if( !empty( $taxonomies ) ){
252
+ $tax_array = array();
253
+ foreach ( $taxonomies as $taxonomy ) {
254
+ $tax_array[ $taxonomy->name ] = $taxonomy->label;
255
+ }
256
+
257
+ $element->add_control(
258
+ 'widgetopts_taxonomies',
259
+ [
260
+ 'label' => __( 'Taxonomies', 'widget-options' ),
261
+ 'type' => Elementor\Controls_Manager::SELECT2,
262
+ 'multiple' => true,
263
+ 'label_block' => true,
264
+ 'separator' => 'before',
265
+ 'options' => $tax_array,
266
+ 'render_type' => 'none',
267
+ 'description' => __( 'Click on the field to search and select taxonomies', 'widget-options' )
268
+ ],
269
+ [
270
+ 'overwrite' => true
271
+ ]
272
+ );
273
+ }
274
+ }
275
+
276
+ if( isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['misc'] ) && '1' == $widget_options['settings']['visibility']['misc'] ){
277
+ $element->add_control(
278
+ 'widgetopts_misc',
279
+ [
280
+ 'label' => __( 'Miscellaneous', 'widget-options' ),
281
+ 'type' => Elementor\Controls_Manager::SELECT2,
282
+ 'multiple' => true,
283
+ 'label_block' => true,
284
+ 'separator' => 'before',
285
+ 'options' => [
286
+ 'home' => __( 'Home/Front', 'widget-options' ),
287
+ 'blog' => __( 'Blog', 'widget-options' ),
288
+ 'archives' => __( 'Archives', 'widget-options' ),
289
+ '404' => __( '404', 'widget-options' ),
290
+ 'search' => __( 'Search', 'widget-options' )
291
+ ],
292
+ 'render_type' => 'none',
293
+ 'description' => __( 'Click on the field to search and select miscellaneous pages', 'widget-options' )
294
+ ],
295
+ [
296
+ 'overwrite' => true
297
+ ]
298
+ );
299
+ }
300
+ $element->end_controls_tab();
301
+ }
302
+ }
303
+
304
+ if( !function_exists( 'widgetopts_elementor_tab_state' ) ){
305
+ function widgetopts_elementor_tab_state( $element, $section_id, $args ){
306
+ global $widget_options;
307
+
308
+ $element->start_controls_tab(
309
+ 'widgetopts_tab_state',
310
+ [
311
+ 'label' => __( '<i class="fa fa-user"></i>', 'widget-options' )
312
+ ],
313
+ [
314
+ 'overwrite' => true
315
+ ]
316
+ );
317
+
318
+ $element->add_control(
319
+ 'widgetopts_roles_state',
320
+ [
321
+ 'label' => __( 'User Login State', 'widget-options' ),
322
+ 'type' => Elementor\Controls_Manager::SELECT,
323
+ 'default' => 'hide',
324
+ 'options' => [
325
+ '' => __( 'Select Visibility Option' ),
326
+ 'in' => __( 'Show only for Logged-in Users' ),
327
+ 'out' => __( 'Show only for Logged-out Users' )
328
+ ],
329
+ 'description' => __( 'Restrict widget visibility for logged-in and logged-out users.', 'widget-options' )
330
+ ],
331
+ [
332
+ 'overwrite' => true
333
+ ]
334
+ );
335
+
336
+ $element->end_controls_tab();
337
+ }
338
+ }
339
+
340
+ if( !function_exists( 'widgetopts_elementor_tab_settings' ) ){
341
+ function widgetopts_elementor_tab_settings( $element, $section_id, $args ){
342
+ global $widget_options;
343
+
344
+ $element->start_controls_tab(
345
+ 'widgetopts_tab_settings',
346
+ [
347
+ 'label' => __( '<i class="fa fa-gear"></i>', 'widget-options' )
348
+ ],
349
+ [
350
+ 'overwrite' => true
351
+ ]
352
+ );
353
+
354
+ if( is_plugin_active( 'sliding-widget-options/plugin.php' ) && 'activate' == $widget_options['sliding'] && in_array( $element->get_name(), array( 'button', 'button_plus', 'eael-creative-button', 'cta' ) ) ){
355
+ $element->add_control(
356
+ 'widgetopts_open_sliding',
357
+ [
358
+ 'label' => __( 'Open Pop-up or Sliding Widgets', 'widget-options' ),
359
+ 'type' => Elementor\Controls_Manager::SWITCHER,
360
+ 'return_value' => 'on',
361
+ 'default' => '',
362
+ 'separator' => 'none'
363
+ ],
364
+ [
365
+ 'overwrite' => true
366
+ ]
367
+ );
368
+ }
369
+
370
+ if( 'activate' == $widget_options['logic'] ){
371
+
372
+ $element->add_control(
373
+ 'widgetopts_logic',
374
+ [
375
+ 'type' => Elementor\Controls_Manager::TEXTAREA,
376
+ 'label' => __( 'Display Widget Logic', 'widget-options' ),
377
+ 'description' => __( 'Add your PHP Conditional Tags. Please note that this will be EVAL\'d directly.', 'widget-options' ),
378
+ // 'separator' => 'none',
379
+ ],
380
+ [
381
+ 'overwrite' => true
382
+ ]
383
+ );
384
+ }
385
+
386
+
387
+ if( isset( $widget_options['acf'] ) && 'activate' == $widget_options['acf'] ){
388
+ $fields = array();
389
+
390
+ if ( function_exists( 'acf_get_field_groups' ) ) {
391
+ $groups = acf_get_field_groups();
392
+ if ( is_array( $groups ) ) {
393
+ foreach ( $groups as $group ) {
394
+ $fields_group = acf_get_fields( $group );
395
+ if( !empty( $fields_group ) ){
396
+ foreach ( $fields_group as $k => $fg ) {
397
+ $fields[ $fg['key'] ] = $fg['label'];
398
+ }
399
+ }
400
+ }
401
+ }
402
+ }else{
403
+ $groups = apply_filters( 'acf/get_field_groups', array() );
404
+ if ( is_array( $groups ) ) {
405
+ foreach ( $groups as $group ) {
406
+ $fields_group = apply_filters( 'acf/field_group/get_fields', array(), $group['id'] );
407
+ if( !empty( $fields_group ) ){
408
+ foreach ( $fields_group as $k => $fg ) {
409
+ $fields[ $fg['key'] ] = $fg['label'];
410
+ }
411
+ }
412
+ }
413
+ }
414
+ }
415
+
416
+ $element->add_control(
417
+ 'widgetopts_acf_title',
418
+ [
419
+ 'type' => Elementor\Controls_Manager::RAW_HTML,
420
+ 'separator' => 'before',
421
+ 'raw' => '<h3>'. __( 'Advanced Custom Fields', 'widget-options' ) .'</h3>',
422
+ ],
423
+ [
424
+ 'overwrite' => true
425
+ ]
426
+ );
427
+
428
+ $element->add_control(
429
+ 'widgetopts_acf_visibility',
430
+ [
431
+ 'label' => __( 'Show/Hide', 'widget-options' ),
432
+ 'type' => Elementor\Controls_Manager::SELECT,
433
+ 'default' => 'hide',
434
+ 'options' => [
435
+ 'show' => __( 'Show when Condition\'s Met' ),
436
+ 'hide' => __( 'Hide when Condition\'s Met' )
437
+ ],
438
+ 'separator' => 'before',
439
+ ],
440
+ [
441
+ 'overwrite' => true
442
+ ]
443
+ );
444
+
445
+ $element->add_control(
446
+ 'widgetopts_acf_field',
447
+ [
448
+ 'label' => __( 'Select ACF Field', 'widget-options' ),
449
+ 'type' => Elementor\Controls_Manager::SELECT2,
450
+ 'multiple' => false,
451
+ 'label_block' => true,
452
+ 'options' => $fields,
453
+ 'render_type' => 'none',
454
+ 'description' => __( 'Select ACF field.', 'widget-options' )
455
+ ],
456
+ [
457
+ 'overwrite' => true
458
+ ]
459
+ );
460
+
461
+ $element->add_control(
462
+ 'widgetopts_acf_condition',
463
+ [
464
+ 'label' => __( 'Condition', 'widget-options' ),
465
+ 'type' => Elementor\Controls_Manager::SELECT2,
466
+ 'multiple' => false,
467
+ 'label_block' => true,
468
+ 'options' => [
469
+ 'equal' => __( 'Is Equal To', 'widget-options' ),
470
+ 'not_equal' => __( 'Is Not Equal To', 'widget-options' ),
471
+ 'contains' => __( 'Contains', 'widget-options' ),
472
+ 'not_contains' => __( 'Does Not Contain', 'widget-options' ),
473
+ 'empty' => __( 'Is Empty', 'widget-options' ),
474
+ 'not_empty' => __( 'Is Not Empty', 'widget-options' )
475
+ ],
476
+ 'render_type' => 'none',
477
+ 'description' => __( 'Select your condition for this widget visibility.', 'widget-options' )
478
+ ],
479
+ [
480
+ 'overwrite' => true
481
+ ]
482
+ );
483
+ $element->add_control(
484
+ 'widgetopts_acf',
485
+ [
486
+ 'type' => Elementor\Controls_Manager::TEXTAREA,
487
+ 'label' => __( 'Conditional Value', 'widget-options' ),
488
+ 'description' => __( 'Add your Conditional Value here if you selected Equal to, Not Equal To or Contains on the selection above.', 'widget-options' ),
489
+ // 'separator' => 'none',
490
+ ],
491
+ [
492
+ 'overwrite' => true
493
+ ]
494
+ );
495
+ }
496
+
497
+ $element->end_controls_tab();
498
+ }
499
+ }
500
+
501
+ ?>
includes/pagebuilders/elementor/render.php ADDED
@@ -0,0 +1,443 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extends funtionality to Elementor Pagebuilder
4
+ *
5
+ *
6
+ * @copyright Copyright (c) 2017, Jeffrey Carandang
7
+ * @since 4.3
8
+ */
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ if( !function_exists( 'widgetopts_elementor_render' ) ){
13
+ add_action( 'elementor/widget/render_content', 'widgetopts_elementor_render', 10, 2 );
14
+ function widgetopts_elementor_render( $content, $widget ){
15
+ if ( !Elementor\Plugin::$instance->editor->is_edit_mode() ) {
16
+ global $widget_options;
17
+ $settings = $widget->get_settings();
18
+
19
+ $hidden = false;
20
+ $placeholder = '<div class="widgetopts-placeholder-e"></div>';
21
+ $visibility_opts = isset( $settings['widgetopts_visibility'] ) ? $settings['widgetopts_visibility'] : 'hide';
22
+
23
+ $tax_opts = ( isset( $widget_options['settings'] ) && isset( $widget_options['settings']['taxonomies_keys'] ) ) ? $widget_options['settings']['taxonomies_keys'] : array();
24
+ $is_misc = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['misc'] ) ) ? true : false;
25
+ $is_types = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['post_type'] ) ) ? true : false;
26
+ $is_tax = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['taxonomies'] ) ) ? true : false;
27
+
28
+ //pages
29
+ if ( $is_misc && ( ( is_home() && is_front_page() ) || is_front_page() ) ) {
30
+ if( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && in_array( 'home', $settings['widgetopts_misc'] ) && $visibility_opts == 'hide' ){
31
+ $hidden = true; //hide if checked on hidden pages
32
+ }elseif( ( !isset( $settings['widgetopts_misc'] ) || ( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && !in_array( 'home', $settings['widgetopts_misc'] ) ) ) && $visibility_opts == 'show' ){
33
+ $hidden = true; //hide if not checked on visible pages
34
+ }
35
+
36
+ //do return to bypass other conditions
37
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_home', $hidden );
38
+ if( $hidden ){
39
+ return $placeholder;
40
+ }
41
+ }elseif ( $is_misc && is_home() ) {
42
+ if( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && in_array( 'blog', $settings['widgetopts_misc'] ) && $visibility_opts == 'hide' ){
43
+ $hidden = true; //hide if checked on hidden pages
44
+ }elseif( ( !isset( $settings['widgetopts_misc'] ) || ( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && !in_array( 'blog', $settings['widgetopts_misc'] ) ) ) && $visibility_opts == 'show' ){
45
+ $hidden = true; //hide if not checked on visible pages
46
+ }
47
+
48
+ //do return to bypass other conditions
49
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_blog', $hidden );
50
+ if( $hidden ){
51
+ return $placeholder;
52
+ }
53
+ }elseif ( $is_tax && is_category() ) {
54
+ //category page
55
+ if( !isset( $settings['widgetopts_tax_category'] ) ){
56
+ $settings['widgetopts_tax_category'] = array();
57
+ }
58
+ if( !isset( $settings['widgetopts_taxonomies'] ) ){
59
+ $settings['widgetopts_taxonomies'] = array();
60
+ }
61
+
62
+ $cat_lists = $settings['widgetopts_tax_category'];
63
+ if( !in_array( 'category', $settings['widgetopts_taxonomies'] ) && $visibility_opts == 'hide' && in_array( get_query_var('cat') , $cat_lists ) ){
64
+ $hidden = true; //hide if exists on hidden pages
65
+ }elseif( !in_array( 'category', $settings['widgetopts_taxonomies'] ) && $visibility_opts == 'show' && !in_array( get_query_var('cat') , $cat_lists ) ){
66
+ $hidden = true; //hide if doesn't exists on visible pages
67
+ }elseif( in_array( 'category', $settings['widgetopts_taxonomies'] ) && $visibility_opts == 'hide' ){
68
+ $hidden = true; //hide to all categories
69
+ }elseif( in_array( 'category', $settings['widgetopts_taxonomies'] ) && $visibility_opts == 'show' ){
70
+ $hidden = false; //hide to all categories
71
+ }
72
+ //
73
+ // //do return to bypass other conditions
74
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_categories', $hidden );
75
+ if( $hidden ){
76
+ return $placeholder;
77
+ }
78
+ }elseif ( $is_tax && is_tag() ) {
79
+ if( !isset( $settings['widgetopts_tax_post_tag'] ) ){
80
+ $settings['widgetopts_tax_post_tag'] = array();
81
+ }
82
+ if( !isset( $settings['widgetopts_taxonomies'] ) ){
83
+ $settings['widgetopts_taxonomies'] = array();
84
+ }
85
+
86
+ if( in_array( 'post_tag', $settings['widgetopts_taxonomies'] ) && $visibility_opts == 'hide' ){
87
+ $hidden = true; //hide to all tags
88
+ }elseif( in_array( 'post_tag', $settings['widgetopts_taxonomies'] ) && $visibility_opts == 'show' ){
89
+ $hidden = false; //hide to all tags
90
+ }
91
+ //
92
+ // //do return to bypass other conditions
93
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_tags', $hidden );
94
+ if( $hidden ){
95
+ return $placeholder;
96
+ }
97
+ }elseif ( $is_tax && is_tax() ) {
98
+ $term = get_queried_object();
99
+
100
+ //taxonomies page
101
+ if( !isset( $settings['widgetopts_taxonomies'] ) ){
102
+ $settings['widgetopts_taxonomies'] = array();
103
+ }
104
+ // print_r( $term_lists );
105
+ if( in_array( $term->taxonomy, $settings['widgetopts_taxonomies'] ) && $visibility_opts == 'hide' ){
106
+ $hidden = true; //hide to all tags
107
+ }elseif( !in_array( $term->taxonomy, $settings['widgetopts_taxonomies'] ) && $visibility_opts == 'show' ){
108
+ $hidden = true; //hide to all tags
109
+ }
110
+
111
+ //do return to bypass other conditions
112
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_taxonomies', $hidden );
113
+ if( $hidden ){
114
+ return $placeholder;
115
+ }
116
+ }elseif ( $is_misc && is_archive() ) {
117
+ //archives page
118
+ if( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && in_array( 'archives', $settings['widgetopts_misc'] ) && $visibility_opts == 'hide' ){
119
+ $hidden = true; //hide if checked on hidden pages
120
+ }elseif( ( !isset( $settings['widgetopts_misc'] ) || ( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && !in_array( 'archives', $settings['widgetopts_misc'] ) ) ) && $visibility_opts == 'show' ){
121
+ $hidden = true; //hide if not checked on visible pages
122
+ }
123
+
124
+ //do return to bypass other conditions
125
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_archives', $hidden );
126
+ if( $hidden ){
127
+ return $placeholder;
128
+ }
129
+ }elseif ( $is_misc && is_404() ) {
130
+ //404 page
131
+ if( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && in_array( '404', $settings['widgetopts_misc'] ) && $visibility_opts == 'hide' ){
132
+ $hidden = true; //hide if checked on hidden pages
133
+ }elseif( ( !isset( $settings['widgetopts_misc'] ) || ( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && !in_array( '404', $settings['widgetopts_misc'] ) ) ) && $visibility_opts == 'show' ){
134
+ $hidden = true; //hide if not checked on visible pages
135
+ }
136
+
137
+ //do return to bypass other conditions
138
+ $hidden = apply_filters( 'widget_options_visibility_404', $hidden );
139
+ if( $hidden ){
140
+ return $placeholder;
141
+ }
142
+ }elseif ( $is_misc && is_search() ) {
143
+ if( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && in_array( 'search', $settings['widgetopts_misc'] ) && $visibility_opts == 'hide' ){
144
+ $hidden = true; //hide if checked on hidden pages
145
+ }elseif( ( !isset( $settings['widgetopts_misc'] ) || ( isset( $settings['widgetopts_misc'] ) && is_array( $settings['widgetopts_misc'] ) && !in_array( 'search', $settings['widgetopts_misc'] ) ) ) && $visibility_opts == 'show' ){
146
+ $hidden = true;
147
+ }
148
+
149
+ //do return to bypass other conditions
150
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_search', $hidden );
151
+ if( $hidden ){
152
+ return $placeholder;
153
+ }
154
+ }elseif ( is_single() && !is_page() ) {
155
+ global $wp_query;
156
+ $post = $wp_query->post;
157
+
158
+ if( !isset( $settings['widgetopts_types'] ) || ( $is_types && !isset( $settings['widgetopts_types'] ) ) ){
159
+ $settings['widgetopts_types'] = array();
160
+ }
161
+
162
+ if( $visibility_opts == 'hide' && in_array( $post->post_type , $settings['widgetopts_types']) ){
163
+ $hidden = true; //hide if exists on hidden pages
164
+ }elseif( $visibility_opts == 'show' && !in_array( $post->post_type , $settings['widgetopts_types']) ){
165
+ $hidden = true; //hide if doesn't exists on visible pages
166
+ }
167
+
168
+ // do return to bypass other conditions
169
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_single', $hidden );
170
+
171
+
172
+ // $taxonomy_names = get_post_taxonomies( $post->ID );
173
+ // $array_intersect = array_intersect( $tax_opts, $taxonomy_names );
174
+
175
+ if( !isset( $settings['widgetopts_tax_category'] ) ){
176
+ $settings['widgetopts_tax_category'] = array();
177
+ }
178
+
179
+ if( isset( $settings['widgetopts_tax_category'] ) && !empty( $settings['widgetopts_tax_category'] ) ){
180
+ $cats = wp_get_post_categories( $post->ID );
181
+
182
+ if( is_array( $cats ) && !empty( $cats ) ){
183
+ $checked_cats = $settings['widgetopts_tax_category'];
184
+ $intersect = array_intersect( $cats , $checked_cats );
185
+ if( !empty( $intersect ) && $visibility_opts == 'hide' ){
186
+ $hidden = true;
187
+ }elseif( !empty( $intersect ) && $visibility_opts == 'show' ){
188
+ $hidden = false;
189
+ }
190
+
191
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_single_category', $hidden );
192
+ }
193
+ }
194
+
195
+ if( $hidden ){
196
+ return $placeholder;
197
+ }
198
+ }elseif ( $is_types && is_page() ) {
199
+ global $wp_query;
200
+
201
+ $post = $wp_query->post;
202
+
203
+ //do post type condition first
204
+ if( isset( $settings['widgetopts_types'] ) ){
205
+ if( $visibility_opts == 'hide' && in_array( 'page', $settings['widgetopts_types'] ) ){
206
+ $hidden = true; //hide if exists on hidden pages
207
+ }elseif( $visibility_opts == 'show' && !in_array( 'page', $settings['widgetopts_types'] ) ){
208
+ $hidden = true; //hide if doesn't exists on visible pages
209
+ }
210
+ }else{
211
+ // print_r( $settings['widgetopts_pages'] );
212
+ //do per pages condition
213
+ if( !isset( $settings['widgetopts_pages'] ) ){
214
+ $settings['widgetopts_pages'] = array();
215
+ }
216
+
217
+ if( $visibility_opts == 'hide' && in_array( $post->ID , $settings['widgetopts_pages'] ) ){
218
+ $hidden = true; //hide if exists on hidden pages
219
+ }elseif( $visibility_opts == 'show' && !in_array( $post->ID , $settings['widgetopts_pages'] ) ){
220
+ $hidden = true; //hide if doesn't exists on visible pages
221
+ }
222
+ }
223
+
224
+ // //do return to bypass other conditions
225
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_page', $hidden );
226
+ if( $hidden ){
227
+ return $placeholder;
228
+ }
229
+ }
230
+
231
+ //ACF
232
+ if( isset( $widget_options['acf'] ) && 'activate' == $widget_options['acf'] ){
233
+ if( isset( $settings['widgetopts_acf_field'] ) && !empty( $settings['widgetopts_acf_field'] ) ){
234
+ $acf = get_field_object( $settings['widgetopts_acf_field'] );
235
+ if( $acf && is_array( $acf ) ){
236
+ $acf_visibility = isset( $settings['widgetopts_acf_visibility'] ) ? $settings['widgetopts_acf_visibility'] : 'hide';
237
+
238
+ //handle repeater fields
239
+ if( isset( $acf['value'] ) ){
240
+ if( is_array( $acf['value'] ) ){
241
+ $acf['value'] = implode(', ', array_map(function ( $acf_array_value ) {
242
+ $acf_implode = '';
243
+ if( is_array( $acf_array_value ) ){
244
+ $acf_implode = implode( ',', array_filter($acf_array_value) );
245
+ }
246
+ return $acf_implode;
247
+ }, $acf['value']));
248
+ }
249
+ }
250
+ switch ( $settings['widgetopts_acf_condition'] ) {
251
+ case 'equal':
252
+ if( isset( $acf['value'] ) ){
253
+ if( 'show' == $acf_visibility && $acf['value'] == $settings['widgetopts_acf'] ){
254
+ $hidden = false;
255
+ }else if( 'show' == $acf_visibility && $acf['value'] != $settings['widgetopts_acf'] ){
256
+ $hidden = true;
257
+ }else if( 'hide' == $acf_visibility && $acf['value'] == $settings['widgetopts_acf'] ){
258
+ $hidden = true;
259
+ }else if( 'hide' == $acf_visibility && $acf['value'] != $settings['widgetopts_acf'] ){
260
+ $hidden = false;
261
+ }
262
+ }
263
+ break;
264
+
265
+ case 'not_equal':
266
+ if( isset( $acf['value'] ) ){
267
+ if( 'show' == $acf_visibility && $acf['value'] == $settings['widgetopts_acf'] ){
268
+ $hidden = true;
269
+ }else if( 'show' == $acf_visibility && $acf['value'] != $settings['widgetopts_acf'] ){
270
+ $hidden = false;
271
+ }else if( 'hide' == $acf_visibility && $acf['value'] == $settings['widgetopts_acf'] ){
272
+ $hidden = false;
273
+ }else if( 'hide' == $acf_visibility && $acf['value'] != $settings['widgetopts_acf'] ){
274
+ $hidden = true;
275
+ }
276
+ }
277
+ break;
278
+
279
+ case 'contains':
280
+ if( isset( $acf['value'] ) ){
281
+ if( 'show' == $acf_visibility && strpos( $acf['value'], $settings['widgetopts_acf'] ) !== false ){
282
+ $hidden = false;
283
+ }else if( 'show' == $acf_visibility && strpos( $acf['value'], $settings['widgetopts_acf'] ) === false ){
284
+ $hidden = true;
285
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $settings['widgetopts_acf'] ) !== false ){
286
+ $hidden = true;
287
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $settings['widgetopts_acf'] ) === false ){
288
+ $hidden = false;
289
+ }
290
+ }
291
+ break;
292
+
293
+ case 'not_contains':
294
+ if( isset( $acf['value'] ) ){
295
+ if( 'show' == $acf_visibility && strpos( $acf['value'], $settings['widgetopts_acf'] ) !== false ){
296
+ $hidden = true;
297
+ }else if( 'show' == $acf_visibility && strpos( $acf['value'], $settings['widgetopts_acf'] ) === false ){
298
+ $hidden = false;
299
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $settings['widgetopts_acf'] ) !== false ){
300
+ $hidden = false;
301
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $settings['widgetopts_acf'] ) === false ){
302
+ $hidden = true;
303
+ }
304
+ }
305
+ break;
306
+
307
+ case 'empty':
308
+ if( 'show' == $acf_visibility && empty( $acf['value'] ) ){
309
+ $hidden = false;
310
+ }else if( 'show' == $acf_visibility && !empty( $acf['value'] ) ){
311
+ $hidden = true;
312
+ }elseif( 'hide' == $acf_visibility && empty( $acf['value'] ) ){
313
+ $hidden = true;
314
+ }else if( 'hide' == $acf_visibility && !empty( $acf['value'] ) ){
315
+ $hidden = false;
316
+ }
317
+ break;
318
+
319
+ case 'not_empty':
320
+ if( 'show' == $acf_visibility && empty( $acf['value'] ) ){
321
+ $hidden = true;
322
+ }else if( 'show' == $acf_visibility && !empty( $acf['value'] ) ){
323
+ $hidden = false;
324
+ }elseif( 'hide' == $acf_visibility && empty( $acf['value'] ) ){
325
+ $hidden = false;
326
+ }else if( 'hide' == $acf_visibility && !empty( $acf['value'] ) ){
327
+ $hidden = true;
328
+ }
329
+ break;
330
+
331
+ default:
332
+ # code...
333
+ break;
334
+ }
335
+
336
+ // //do return to bypass other conditions
337
+ $hidden = apply_filters( 'widgetopts_elementor_visibility_acf', $hidden );
338
+ if( $hidden ){
339
+ return $placeholder;
340
+ }
341
+ }
342
+ }
343
+ }
344
+
345
+ //widget logic
346
+ if( isset( $widget_options['state'] ) && 'activate' == $widget_options['state'] ){
347
+ if( isset( $settings['widgetopts_roles_state'] ) && !empty( $settings['widgetopts_roles_state'] ) ){
348
+ //do state action here
349
+ if( $settings['widgetopts_roles_state'] == 'out' && is_user_logged_in() ){
350
+ return $placeholder;
351
+ }else if( $settings['widgetopts_roles_state'] == 'in' && !is_user_logged_in() ){
352
+ return $placeholder;
353
+ }
354
+ }
355
+ }
356
+
357
+ //widget logic
358
+ if( 'activate' == $widget_options['logic'] ){
359
+ if( isset( $settings['widgetopts_logic'] ) && !empty( $settings['widgetopts_logic'] ) ){
360
+ //do widget logic
361
+ $display_logic = stripslashes( trim( $settings['widgetopts_logic'] ) );
362
+ $display_logic = apply_filters( 'widget_options_logic_override', $display_logic );
363
+ $display_logic = apply_filters( 'extended_widget_options_logic_override', $display_logic );
364
+ if ( $display_logic === false ){
365
+ return $placeholder;
366
+ }
367
+ if ( $display_logic === true ){
368
+ return $content;
369
+ }
370
+ if ( stristr($display_logic,"return")===false ){
371
+ $display_logic="return (" . $display_logic . ");";
372
+ }
373
+ if ( !eval( $display_logic ) ){
374
+ return $placeholder;
375
+ }
376
+ }
377
+ }
378
+ }
379
+
380
+ return $content;
381
+ }
382
+ }
383
+
384
+ if( !function_exists( 'widgetopts_elementor_before_render' ) ){
385
+ add_action( 'elementor/frontend/widget/before_render', 'widgetopts_elementor_before_render', 10, 2 );
386
+ function widgetopts_elementor_before_render( $element ){
387
+ $enabled = array( 'button', 'button_plus', 'eael-creative-button', 'cta' );
388
+ if ( in_array( $element->get_name(), $enabled ) ) {
389
+ global $widget_options;
390
+ if( 'activate' == $widget_options['sliding'] ){
391
+ $settings = $element->get_settings();
392
+ if( isset( $settings['widgetopts_open_sliding'] ) && 'on' == $settings['widgetopts_open_sliding'] ){
393
+ $element->add_render_attribute( 'button', 'class', 'sl-widgetopts-open' );
394
+ }
395
+ }
396
+ }
397
+ }
398
+ }
399
+
400
+ if( !function_exists( 'widgetopts_elementor_extra_js' ) ){
401
+ add_action( 'wp_footer', 'widgetopts_elementor_extra_js' );
402
+ function widgetopts_elementor_extra_js(){ ?>
403
+ <script type="text/javascript">
404
+ (function( $, window, document, undefined ) {
405
+ if( jQuery('.widgetopts-placeholder-e').length > 0 ){
406
+ // jQuery('.elementor-column-wrap:has(.widgetopts-placeholder-e)').hide();
407
+
408
+ jQuery('.elementor-section:has(.widgetopts-placeholder-e)').each( function(){
409
+ var pTop = jQuery( this ).find('.elementor-element-populated').css('padding-top');
410
+ var pBot = jQuery( this ).find('.elementor-element-populated').css('padding-bottom');
411
+ var pHeight = jQuery( this ).find('.elementor-element-populated').innerHeight();
412
+ var vert = pHeight - ( parseFloat( pTop ) + parseFloat( pBot ) );
413
+
414
+ if( typeof vert !== 'undefined' && vert < 5 ){
415
+ jQuery( this ).hide();
416
+ }else{
417
+ jQuery( this ).find( '.widgetopts-placeholder-e' ).each(function(){
418
+ jQuery( this ).closest( '.elementor-element' ).hide();
419
+
420
+ var countEl = jQuery( this ).closest( '.elementor-column' ).find('.elementor-element').length;
421
+ var countHolder = jQuery( this ).closest( '.elementor-column' ).find('.widgetopts-placeholder-e').length;
422
+ if( countEl == countHolder ){
423
+ jQuery( this ).closest( '.elementor-column' ).hide();
424
+ }
425
+ }).promise().done( function(){
426
+ var sTop = jQuery( this ).closest('.elementor-section').css('padding-top');
427
+ var sBot = jQuery( this ).closest('.elementor-section').css('padding-bottom');
428
+ var sHeight = jQuery( this ).closest('.elementor-section').innerHeight();
429
+ var svert = sHeight - ( parseFloat( sTop ) + parseFloat( sBot ) );
430
+
431
+ if( typeof svert !== 'undefined' && svert < 5 ){
432
+ jQuery( this ).closest('.elementor-section').hide();
433
+ }
434
+ });
435
+ }
436
+
437
+ } );
438
+ }
439
+ })( jQuery, window, document );
440
+ </script>
441
+ <?php }
442
+ }
443
+ ?>
includes/pagebuilders/siteorigin.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Handle compatibility with Pagebuilder by SiteOrigin Plugin
4
+ *
5
+ * Process AJAX actions.
6
+ *
7
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
8
+ * @since 3.0
9
+ */
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ if( !function_exists( 'widgetopts_siteorigin_panels_data' ) ){
14
+ add_filter( 'siteorigin_panels_data', 'widgetopts_siteorigin_panels_data', 10, 4 );
15
+ function widgetopts_siteorigin_panels_data( $panels_data, $post_id ){
16
+ global $widget_options;
17
+ if( !is_admin() ){
18
+ if( isset( $panels_data['widgets'] ) && !empty( $panels_data['widgets'] ) && is_array( $panels_data['widgets'] ) ){
19
+
20
+ global $current_user;
21
+
22
+ foreach ( $panels_data['widgets'] as $key => $widgets ) {
23
+ if( isset( $widgets['extended_widget_opts'] ) && !empty( $widgets['extended_widget_opts'] ) ){
24
+
25
+ if( isset( $panels_data['widgets'][$key] ) && 'activate' == $widget_options['logic'] ){
26
+ // display widget logic
27
+ if( isset( $widgets['extended_widget_opts']['class'] ) && isset( $widgets['extended_widget_opts']['class']['logic'] ) && !empty( $widgets['extended_widget_opts']['class']['logic'] ) ){
28
+ $display_logic = stripslashes( trim( $widgets['extended_widget_opts']['class']['logic'] ) );
29
+ $display_logic = apply_filters( 'widget_options_logic_override', $display_logic );
30
+ if ( $display_logic === false ){
31
+ unset( $panels_data['widgets'][$key]);
32
+ }
33
+ if ( $display_logic === true ){
34
+ // return true;
35
+ }
36
+ if ( stristr($display_logic,"return")===false ){
37
+ $display_logic="return (" . $display_logic . ");";
38
+ }
39
+ if ( !eval( $display_logic ) ){
40
+ unset( $panels_data['widgets'][$key]);
41
+ }
42
+ }
43
+ }
44
+
45
+ }
46
+ }
47
+ }
48
+ }
49
+ return $panels_data;
50
+
51
+ }
52
+ }
53
+
54
+ if( !function_exists( 'widgetopts_siteorigin_panels_widget_classes' ) ){
55
+ add_filter( 'siteorigin_panels_widget_classes', 'widgetopts_siteorigin_panels_widget_classes', 10, 4 );
56
+ function widgetopts_siteorigin_panels_widget_classes( $classes, $widget, $instance, $widget_info ){
57
+ if( isset( $instance['extended_widget_opts'] ) ){
58
+ global $widget_options;
59
+
60
+ $get_classes = widgetopts_classes_generator( $instance['extended_widget_opts'], $widget_options, $widget_options['settings'], true );
61
+ $get_classes[] = 'widgetopts-SO';
62
+
63
+ $classes = apply_filters( 'widgetopts_siteorigin_panels_widget_classes', array_merge( $classes, $get_classes ), $widget_info );
64
+ }
65
+
66
+ return $classes;
67
+ }
68
+ }
69
+
70
+ ?>
includes/scripts.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Scripts
4
+ *
5
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
6
+ * @since 3.0
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ /**
13
+ * Load Scripts
14
+ *
15
+ * Enqueues the required scripts.
16
+ *
17
+ * @since 3.0
18
+ * @return void
19
+ */
20
+
21
+ function widgetopts_load_scripts(){
22
+ $css_dir = WIDGETOPTS_PLUGIN_URL . 'assets/css/';
23
+ wp_enqueue_style( 'widgetopts-styles', $css_dir . 'widget-options.css' , array(), null );
24
+ }
25
+ add_action( 'wp_enqueue_scripts', 'widgetopts_load_scripts' );
26
+ add_action( 'customize_controls_enqueue_scripts', 'widgetopts_load_scripts' );
27
+
28
+ /**
29
+ * Load Admin Scripts
30
+ *
31
+ * Enqueues the required admin scripts.
32
+ *
33
+ * @since 3.0
34
+ * @global $widget_options
35
+ * @param string $hook Page hook
36
+ * @return void
37
+ */
38
+ if( !function_exists( 'widgetopts_load_admin_scripts' ) ):
39
+ function widgetopts_load_admin_scripts( $hook ) {
40
+ global $widget_options;
41
+
42
+ $js_dir = WIDGETOPTS_PLUGIN_URL . 'assets/js/';
43
+ $css_dir = WIDGETOPTS_PLUGIN_URL . 'assets/css/';
44
+
45
+ // Use minified libraries if SCRIPT_DEBUG is turned off
46
+ $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
47
+
48
+ wp_enqueue_style( 'widgetopts-admin-styles', $css_dir . 'admin.css' , array(), null );
49
+
50
+ if( !in_array( $hook, apply_filters( 'widgetopts_exclude_jqueryui', array( 'toplevel_page_et_divi_options', 'toplevel_page_wpcf7', 'edit.php' ) ) ) ){
51
+ wp_enqueue_style( 'widgetopts-jquery-ui', $css_dir . 'jqueryui/1.11.4/themes/ui-lightness/jquery-ui.css' , array(), null );
52
+ wp_enqueue_style( 'jquery-ui' );
53
+ }
54
+
55
+ if( in_array( $hook, apply_filters( 'widgetopts_load_liveFilter_scripts', array( 'widgets.php' ) ) ) ){
56
+ wp_enqueue_script(
57
+ 'jquery-liveFilter',
58
+ plugins_url( 'assets/js/jquery.liveFilter.js' , dirname(__FILE__) ),
59
+ array( 'jquery' ),
60
+ '',
61
+ true
62
+ );
63
+ }
64
+
65
+ wp_enqueue_script(
66
+ 'jquery-widgetopts-option-tabs',
67
+ plugins_url( 'assets/js/wpWidgetOpts.js' , dirname(__FILE__) ),
68
+ array( 'jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-datepicker'),
69
+ '',
70
+ true
71
+ );
72
+
73
+ $form = '<div id="widgetopts-widgets-chooser">
74
+ <label class="screen-reader-text" for="widgetopts-search-chooser">'. __( 'Search Sidebar', 'widget-options' ) .'</label>
75
+ <input type="text" id="widgetopts-search-chooser" class="widgetopts-widgets-search" placeholder="'. __( 'Search sidebar&hellip;', 'widget-options' ) .'" />
76
+ <div class="widgetopts-search-icon" aria-hidden="true"></div>
77
+ <button type="button" class="widgetopts-clear-results"><span class="screen-reader-text">'. __( 'Clear Results', 'widget-options' ) .'</span></button>
78
+ <p class="screen-reader-text" id="widgetopts-chooser-desc">'. __( 'The search results will be updated as you type.', 'widget-options' ) .'</p>
79
+ </div>';
80
+
81
+ $btn_controls = '';
82
+ if( isset( $widget_options['move'] ) && 'activate' == $widget_options['move'] ){
83
+ $btn_controls .= ' | <button type="button" class="button-link widgetopts-control" data-action="move">'. __( 'Move', 'widget-options' ) .'</button>';
84
+ }
85
+
86
+ $sidebaropts = '';
87
+ if( isset( $widget_options['widget_area'] ) && 'activate' == $widget_options['widget_area'] ){
88
+ $sidebaropts = '<div class="widgetopts-sidebaropts">';
89
+ if( isset( $widget_options['settings']['widget_area'] ) && isset( $widget_options['settings']['widget_area']['remove'] ) && '1' == $widget_options['settings']['widget_area']['remove'] ){
90
+ $sidebaropts .= '<a href="#" class="sidebaropts-clear">
91
+ <span class="dashicons dashicons-warning"></span> '. __( 'Remove All Widgets', 'widget-options' ) .'
92
+ </a>';
93
+ }
94
+ if( isset( $widget_options['settings']['widget_area'] ) && isset( $widget_options['settings']['widget_area']['backup'] ) && '1' == $widget_options['settings']['widget_area']['backup'] ){
95
+ $sidebaropts .= '<a href="'. esc_url( wp_nonce_url( admin_url('tools.php?page=widgetopts_migrator_settings&action=export&single_sidebar=__sidebaropts__'), 'widgeopts_export', 'widgeopts_nonce_export') ) .'">
96
+ <span class="dashicons dashicons-download"></span> '. __( 'Download Backup', 'widget-options' ) .'
97
+ </a>';
98
+ }
99
+
100
+ if( isset( $widget_options['settings']['widget_area'] ) && isset( $widget_options['settings']['widget_area']['remove'] ) && '1' == $widget_options['settings']['widget_area']['remove'] ){
101
+ $sidebaropts .= '<div class="sidebaropts-confirm"><p>
102
+ '. __( 'Are you sure you want to DELETE ALL widgets associated to __sidebar_opts__?', 'widget-options' ) .'
103
+ </p>
104
+ <button class="button">'. __( 'No', 'widget-options' ) .'</button>
105
+ <button class="button button-primary">'. __( 'Yes', 'widget-options' ) .'</button>
106
+ </div>';
107
+ }
108
+
109
+ $sidebaropts .= '</div>';
110
+ }
111
+
112
+ wp_localize_script( 'jquery-widgetopts-option-tabs', 'widgetopts10n', array( 'opts_page' => esc_url( admin_url( 'options-general.php?page=widgetopts_plugin_settings' ) ), 'search_form' => $form, 'sidebaropts' => $sidebaropts, 'controls' => $btn_controls, 'translation' => array( 'manage_settings' => __( 'Manage Widget Options', 'widget-options' ), 'search_chooser' => __( 'Search sidebar&hellip;', 'widget-options' ) )) );
113
+
114
+ if( in_array( $hook, apply_filters( 'widgetopts_load_settings_scripts', array( 'settings_page_widgetopts_plugin_settings' ) ) ) ){
115
+ wp_register_script(
116
+ 'jquery-widgetopts-settings',
117
+ $js_dir .'settings'. $suffix .'.js',
118
+ array( 'jquery' ),
119
+ '',
120
+ true
121
+ );
122
+
123
+ $translation = array(
124
+ 'save_settings' => __( 'Save Settings', 'widget-options' ),
125
+ 'close_settings' => __( 'Close', 'widget-options' ),
126
+ 'show_settings' => __( 'Configure Settings', 'widget-options' ),
127
+ 'hide_settings' => __( 'Hide Settings', 'widget-options' ),
128
+ 'show_description' => __( 'Learn More', 'widget-options' ),
129
+ 'hide_description' => __( 'Hide Details', 'widget-options' ),
130
+ 'show_information' => __( 'Show Details', 'widget-options' ),
131
+ 'activate' => __( 'Enable', 'widget-options' ),
132
+ 'deactivate' => __( 'Disable', 'widget-options' ),
133
+ 'successful_save' => __( 'Settings saved successfully for %1$s.', 'widget-options' ),
134
+ 'deactivate_btn' => __( 'Deactivate License', 'widget-options' ),
135
+ 'activate_btn' => __( 'Activate License', 'widget-options' ),
136
+ 'status_valid' => __( 'Valid', 'widget-options' ),
137
+ 'status_invalid' => __( 'Invalid', 'widget-options' ),
138
+ );
139
+
140
+ wp_enqueue_script( 'jquery-widgetopts-settings' );
141
+ wp_localize_script( 'jquery-widgetopts-settings', 'widgetopts', array( 'translation' => $translation, 'ajax_action' => 'widgetopts_ajax_settings', 'ajax_nonce' => wp_create_nonce( 'widgetopts-settings-nonce' ), ) );
142
+ }
143
+ }
144
+ add_action( 'admin_enqueue_scripts', 'widgetopts_load_admin_scripts', 100 );
145
+ endif;
146
+
147
+ if( !function_exists( 'widgetopts_widgets_footer' ) ){
148
+ function widgetopts_widgets_footer(){
149
+ global $widget_options;?>
150
+ <div class="widgetsopts-chooser" style="display:none;">
151
+ <?php if( isset( $widget_options['search'] ) && 'activate' == $widget_options['search'] ): ?>
152
+ <div id="widgetopts-widgets-chooser">
153
+ <label class="screen-reader-text" for="widgetopts-search-chooser"><?php _e( 'Search Sidebar', 'widget-options' );?></label>
154
+ <input type="text" id="widgetsopts-widgets-search" class="widgetopts-widgets-search widgetsopts-widgets-search" placeholder="Search sidebar…">
155
+ <div class="widgetopts-search-icon" aria-hidden="true"></div>
156
+ <button type="button" class="widgetopts-clear-results"><span class="screen-reader-text"><?php _e( 'Clear Results', 'widget-options' );?></span></button>
157
+ <p class="screen-reader-text" id="widgetopts-chooser-desc"><?php _e( 'The search results will be updated as you type.', 'widget-options' );?></p>
158
+ </div>
159
+ <?php endif; ?>
160
+ <ul class="widgetopts-chooser-sidebars"></ul>
161
+ <div class="widgetsopts-chooser-actions">
162
+ <button class="button widgetsopts-chooser-cancel"><?php _e( 'Cancel', 'widget-options' ); ?></button>
163
+ <button class="button button-primary widgetopts-chooser-action"><span><?php _e( 'Move', 'widget-options' ); ?></span> <?php _e( 'Widget', 'widget-options' ); ?></button>
164
+ </div>
165
+ </div>
166
+ <?php }
167
+ add_action( 'admin_footer-widgets.php', 'widgetopts_widgets_footer' );
168
+ }
169
+ ?>
includes/transient.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Shortcodes Handler
4
+ *
5
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
6
+ * @since 4.0
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ //remove widgetopts_pages transient when new page created
13
+ if( !function_exists( 'widgetopts_delete_transient_pages' ) ){
14
+ add_action( 'transition_post_status', 'widgetopts_delete_transient_pages', 10, 3 );
15
+ function widgetopts_delete_transient_pages( $new_status, $old_status, $post ){
16
+ global $widgetopts_types;
17
+
18
+ if ( 'page' == $post->post_type ){
19
+ delete_option( 'widgetopts_global_all_pages' );
20
+ }
21
+
22
+ if( 'publish' == $new_status && 'publish' != $old_status ){
23
+ if( is_array( $widgetopts_types ) && !empty( $widgetopts_types ) && !in_array( $post->post_type, $widgetopts_types ) ){
24
+ delete_option( 'widgetopts_global_types' );
25
+ }
26
+ }
27
+ }
28
+ }
29
+
30
+ //remove widgetopts_categories transient when new category created
31
+ if( !function_exists( 'widgetopts_delete_transient_terms' ) ){
32
+ add_action( 'create_term', 'widgetopts_delete_transient_terms', 10, 3 );
33
+ add_action( 'edit_term', 'widgetopts_delete_transient_terms', 10, 3 );
34
+ add_action( 'delete_term', 'widgetopts_delete_transient_terms', 10, 3 );
35
+ function widgetopts_delete_transient_terms( $term_id, $tt_id, $taxonomy ){
36
+ global $widgetopts_taxonomies;
37
+
38
+ delete_transient( 'widgetopts_taxonomy_' . $taxonomy );
39
+
40
+ if( is_array( $widgetopts_taxonomies ) && !empty( $widgetopts_taxonomies ) && !in_array( $taxonomy, $widgetopts_taxonomies ) ){
41
+ delete_option( 'widgetopts_global_taxonomies' );
42
+ }
43
+
44
+ if( $taxonomy == 'category' ){
45
+ delete_option( 'widgetopts_global_categories' );
46
+ }
47
+ }
48
+ }
49
+ ?>
includes/widgets/display.php ADDED
@@ -0,0 +1,474 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Handles Front-end Display
4
+ *
5
+ * @copyright Copyright (c) 2015, Jeffrey Carandang
6
+ * @since 1.0
7
+ */
8
+ // Exit if accessed directly
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+
11
+ /**
12
+ * Handles widget_display_callback filter
13
+ *
14
+ * @since 1.0
15
+ * @global $widget_options
16
+ * @return $instance
17
+ */
18
+
19
+ //check if function exists
20
+ if( !function_exists( 'widgetopts_display_callback' ) ):
21
+ function widgetopts_display_callback( $instance, $widget, $args ){
22
+ global $widget_options, $current_user;
23
+
24
+ $hidden = false;
25
+ $opts = ( isset( $instance[ 'extended_widget_opts-'. $widget->id ] ) ) ? $instance[ 'extended_widget_opts-'. $widget->id ] : array();
26
+ $visibility = array( 'show' => array(), 'hide' => array() );
27
+
28
+ //wordpress pages
29
+ $visibility = isset( $opts['visibility'] ) ? $opts['visibility'] : array();
30
+ $visibility_opts = isset( $opts['visibility']['options'] ) ? $opts['visibility']['options'] : 'hide';
31
+
32
+ $is_misc = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['misc'] ) ) ? true : false;
33
+ $is_types = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['post_type'] ) ) ? true : false;
34
+ $is_tax = ( 'activate' == $widget_options['visibility'] && isset( $widget_options['settings']['visibility'] ) && isset( $widget_options['settings']['visibility']['taxonomies'] ) ) ? true : false;
35
+
36
+ if ( $is_misc && ( ( is_home() && is_front_page() ) || is_front_page() ) ) {
37
+ if( isset( $visibility['misc']['home'] ) && $visibility_opts == 'hide' ){
38
+ $hidden = true; //hide if checked on hidden pages
39
+ }elseif( !isset( $visibility['misc']['home'] ) && $visibility_opts == 'show' ){
40
+ $hidden = true; //hide if not checked on visible pages
41
+ }
42
+
43
+ //do return to bypass other conditions
44
+ $hidden = apply_filters( 'widget_options_visibility_home', $hidden );
45
+ if( $hidden ){
46
+ return false;
47
+ }
48
+ }elseif ( $is_misc && is_home() ) { //filter for blog page
49
+ if( isset( $visibility['misc']['blog'] ) && $visibility_opts == 'hide' ){
50
+ $hidden = true; //hide if checked on hidden pages
51
+ }elseif( !isset( $visibility['misc']['blog'] ) && $visibility_opts == 'show' ){
52
+ $hidden = true; //hide if not checked on visible pages
53
+ }
54
+
55
+ //do return to bypass other conditions
56
+ $hidden = apply_filters( 'widget_options_visibility_blog', $hidden );
57
+ if( $hidden ){
58
+ return false;
59
+ }
60
+
61
+ }elseif ( $is_tax && is_category() ) {
62
+ if( !isset( $visibility['categories'] ) ){
63
+ $visibility['categories'] = array();
64
+ }
65
+
66
+ if( !isset( $visibility['categories']['all_categories'] ) && $visibility_opts == 'hide' && array_key_exists( get_query_var('cat') , $visibility['categories']) ){
67
+ $hidden = true; //hide if exists on hidden pages
68
+ }elseif( !isset( $visibility['categories']['all_categories'] ) && $visibility_opts == 'show' && !array_key_exists( get_query_var('cat') , $visibility['categories']) ){
69
+ $hidden = true; //hide if doesn't exists on visible pages
70
+ }elseif( isset( $visibility['categories']['all_categories'] ) && $visibility_opts == 'hide' ){
71
+ $hidden = true; //hide to all categories
72
+ }elseif( isset( $visibility['categories']['all_categories'] ) && $visibility_opts == 'show' ){
73
+ $hidden = false; //hide to all categories
74
+ }
75
+
76
+ //do return to bypass other conditions
77
+ $hidden = apply_filters( 'widget_options_visibility_categories', $hidden );
78
+ if( $hidden ){
79
+ return false;
80
+ }
81
+ }elseif ( $is_tax && is_tag() ) {
82
+ if( !isset( $visibility['tags'] ) ){
83
+ $visibility['tags'] = array();
84
+ }
85
+
86
+ if( ( isset( $visibility['taxonomies']['post_tag'] ) && $visibility_opts == 'hide' ) ||
87
+ ( !isset( $visibility['taxonomies']['post_tag'] ) && $visibility_opts == 'show' )
88
+ ){
89
+ $hidden = true; //hide to all tags
90
+ }elseif( isset( $visibility['taxonomies']['post_tag'] ) && $visibility_opts == 'show' ){
91
+ $hidden = false; //hide to all tags
92
+ }
93
+
94
+ //do return to bypass other conditions
95
+ $hidden = apply_filters( 'widget_options_visibility_tags', $hidden );
96
+ if( $hidden ){
97
+ return false;
98
+ }
99
+ }elseif ( $is_tax && is_tax() ) {
100
+ $term = get_queried_object();
101
+ if( !isset( $visibility['taxonomies'] ) ){
102
+ $visibility['taxonomies'] = array();
103
+ }
104
+
105
+ if( $visibility_opts == 'hide' && array_key_exists( $term->taxonomy , $visibility['taxonomies']) ){
106
+ $hidden = true; //hide if exists on hidden pages
107
+ }elseif( $visibility_opts == 'show' && !array_key_exists( $term->taxonomy , $visibility['taxonomies']) ){
108
+ $hidden = true; //hide if doesn't exists on visible pages
109
+ }
110
+
111
+ //do return to bypass other conditions
112
+ $hidden = apply_filters( 'widget_options_visibility_taxonomies', $hidden );
113
+ if( $hidden ){
114
+ return false;
115
+ }
116
+ }elseif ( $is_misc && is_archive() ) {
117
+ if( isset( $visibility['misc']['archives'] ) && $visibility_opts == 'hide' ){
118
+ $hidden = true; //hide if checked on hidden pages
119
+ }elseif( !isset( $visibility['misc']['archives'] ) && $visibility_opts == 'show' ){
120
+ $hidden = true; //hide if not checked on visible pages
121
+ }
122
+
123
+ //do return to bypass other conditions
124
+ $hidden = apply_filters( 'widget_options_visibility_archives', $hidden );
125
+ if( $hidden ){
126
+ return false;
127
+ }
128
+ }elseif ( $is_misc && is_404() ) {
129
+ if( isset( $visibility['misc']['404'] ) && $visibility_opts == 'hide' ){
130
+ $hidden = true; //hide if checked on hidden pages
131
+ }elseif( !isset( $visibility['misc']['404'] ) && $visibility_opts == 'show' ){
132
+ $hidden = true; //hide if not checked on visible pages
133
+ }
134
+
135
+ //do return to bypass other conditions
136
+ $hidden = apply_filters( 'widget_options_visibility_404', $hidden );
137
+ if( $hidden ){
138
+ return false;
139
+ }
140
+ }elseif ( $is_misc && is_search() ) {
141
+ if( isset( $visibility['misc']['search'] ) && $visibility_opts == 'hide' ){
142
+ $hidden = true; //hide if checked on hidden pages
143
+ }elseif( !isset( $visibility['misc']['search'] ) && $visibility_opts == 'show' ){
144
+ $hidden = true; //hide if not checked on visible pages
145
+ }
146
+
147
+ //do return to bypass other conditions
148
+ $hidden = apply_filters( 'widget_options_visibility_search', $hidden );
149
+ if( $hidden ){
150
+ return false;
151
+ }
152
+ }elseif ( is_single() && !is_page() ) {
153
+ global $post;
154
+ $type = $post->post_type;
155
+
156
+ if( !isset( $visibility['types'] ) ){
157
+ $visibility['types'] = array();
158
+ }
159
+ if( $visibility_opts == 'hide' && array_key_exists( $type , $visibility['types']) ){
160
+ $hidden = true; //hide if exists on hidden pages
161
+ }elseif( $visibility_opts == 'show' && !array_key_exists( $type , $visibility['types']) ){
162
+ $hidden = true; //hide if doesn't exists on visible pages
163
+ }
164
+ // do return to bypass other conditions
165
+ $hidden = apply_filters( 'widget_options_visibility_types', $hidden );
166
+ //hide posts assign on category
167
+ if( !isset( $visibility['categories'] ) ){
168
+ $visibility['categories'] = array();
169
+ }
170
+ if( isset( $visibility['categories']['all_categories'] ) && $visibility_opts == 'hide' ){
171
+ $hidden = true; //hide to all categories
172
+ }elseif( isset( $visibility['categories']['all_categories'] ) && $visibility_opts == 'show' ){
173
+ $hidden = false; //hide to all categories
174
+ }elseif( !isset( $visibility['categories']['all_categories'] ) && !empty( $visibility['categories'] ) ) {
175
+ $cats = wp_get_post_categories( get_the_ID() );
176
+ if( is_array( $cats ) && !empty( $cats ) ){
177
+ $checked_cats = array_keys( $visibility['categories'] );
178
+ $intersect = array_intersect( $cats , $checked_cats );
179
+ if( !empty( $intersect ) && $visibility_opts == 'hide' ){
180
+ $hidden = true;
181
+ }elseif( !empty( $intersect ) && $visibility_opts == 'show' ){
182
+ $hidden = false;
183
+ }
184
+ }
185
+ }
186
+ // do return to bypass other conditions
187
+ $hidden = apply_filters( 'widget_options_visibility_post_category', $hidden );
188
+ if( $hidden ){
189
+ return false;
190
+ }
191
+ // echo $type;
192
+ }elseif ( $is_types && is_page() ) {
193
+ global $post;
194
+ //do post type condition first
195
+ if( isset( $visibility['types'] ) && isset( $visibility['types']['page'] ) ){
196
+ if( $visibility_opts == 'hide' && array_key_exists( 'page' , $visibility['types']) ){
197
+ $hidden = true; //hide if exists on hidden pages
198
+ }elseif( $visibility_opts == 'show' && !array_key_exists( 'page' , $visibility['types']) ){
199
+ $hidden = true; //hide if doesn't exists on visible pages
200
+ }
201
+ }else{
202
+ //do per pages condition
203
+ if( !isset( $visibility['pages'] ) ){
204
+ $visibility['pages'] = array();
205
+ }
206
+ if( $visibility_opts == 'hide' && array_key_exists( $post->ID , $visibility['pages']) ){
207
+ $hidden = true; //hide if exists on hidden pages
208
+ }elseif( $visibility_opts == 'show' && !array_key_exists( $post->ID , $visibility['pages']) ){
209
+ $hidden = true; //hide if doesn't exists on visible pages
210
+ }
211
+ }
212
+ //do return to bypass other conditions
213
+ $hidden = apply_filters( 'widget_options_visibility_page', $hidden );
214
+ if( $hidden ){
215
+ return false;
216
+ }
217
+ }
218
+
219
+ //end wordpress pages
220
+
221
+ //ACF
222
+ if( isset( $widget_options['acf'] ) && 'activate' == $widget_options['acf'] ){
223
+ if( isset( $visibility['acf']['field'] ) && !empty( $visibility['acf']['field'] ) ){
224
+ $acf = get_field_object( $visibility['acf']['field'] );
225
+ if( $acf && is_array( $acf ) ){
226
+ $acf_visibility = ( isset( $visibility['acf'] ) && isset( $visibility['acf']['visibility'] ) ) ? $visibility['acf']['visibility'] : 'hide';
227
+
228
+ //handle repeater fields
229
+ if( isset( $acf['value'] ) ){
230
+ if( is_array( $acf['value'] ) ){
231
+ $acf['value'] = implode(', ', array_map(function ( $acf_array_value ) {
232
+ $acf_implode = implode( ',', array_filter($acf_array_value) );
233
+ return $acf_implode;
234
+ }, $acf['value']));
235
+ }
236
+ }
237
+
238
+ switch ( $visibility['acf']['condition'] ) {
239
+ case 'equal':
240
+ if( isset( $acf['value'] ) ){
241
+ if( 'show' == $acf_visibility && $acf['value'] == $visibility['acf']['value'] ){
242
+ $hidden = false;
243
+ }else if( 'show' == $acf_visibility && $acf['value'] != $visibility['acf']['value'] ){
244
+ $hidden = true;
245
+ }else if( 'hide' == $acf_visibility && $acf['value'] == $visibility['acf']['value'] ){
246
+ $hidden = true;
247
+ }else if( 'hide' == $acf_visibility && $acf['value'] != $visibility['acf']['value'] ){
248
+ $hidden = false;
249
+ }
250
+ }
251
+ break;
252
+
253
+ case 'not_equal':
254
+ if( isset( $acf['value'] ) ){
255
+ if( 'show' == $acf_visibility && $acf['value'] == $visibility['acf']['value'] ){
256
+ $hidden = true;
257
+ }else if( 'show' == $acf_visibility && $acf['value'] != $visibility['acf']['value'] ){
258
+ $hidden = false;
259
+ }else if( 'hide' == $acf_visibility && $acf['value'] == $visibility['acf']['value'] ){
260
+ $hidden = false;
261
+ }else if( 'hide' == $acf_visibility && $acf['value'] != $visibility['acf']['value'] ){
262
+ $hidden = true;
263
+ }
264
+ }
265
+ break;
266
+
267
+ case 'contains':
268
+ if( isset( $acf['value'] ) ){
269
+ if( 'show' == $acf_visibility && strpos( $acf['value'], $visibility['acf']['value'] ) !== false ){
270
+ $hidden = false;
271
+ }else if( 'show' == $acf_visibility && strpos( $acf['value'], $visibility['acf']['value'] ) === false ){
272
+ $hidden = true;
273
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $visibility['acf']['value'] ) !== false ){
274
+ $hidden = true;
275
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $visibility['acf']['value'] ) === false ){
276
+ $hidden = false;
277
+ }
278
+ }
279
+ break;
280
+
281
+ case 'not_contains':
282
+ if( isset( $acf['value'] ) ){
283
+ if( 'show' == $acf_visibility && strpos( $acf['value'], $visibility['acf']['value'] ) !== false ){
284
+ $hidden = true;
285
+ }else if( 'show' == $acf_visibility && strpos( $acf['value'], $visibility['acf']['value'] ) === false ){
286
+ $hidden = false;
287
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $visibility['acf']['value'] ) !== false ){
288
+ $hidden = false;
289
+ }else if( 'hide' == $acf_visibility && strpos( $acf['value'], $visibility['acf']['value'] ) === false ){
290
+ $hidden = true;
291
+ }
292
+ }
293
+ break;
294
+
295
+ case 'empty':
296
+ if( 'show' == $acf_visibility && empty( $acf['value'] ) ){
297
+ $hidden = false;
298
+ }else if( 'show' == $acf_visibility && !empty( $acf['value'] ) ){
299
+ $hidden = true;
300
+ }elseif( 'hide' == $acf_visibility && empty( $acf['value'] ) ){
301
+ $hidden = true;
302
+ }else if( 'hide' == $acf_visibility && !empty( $acf['value'] ) ){
303
+ $hidden = false;
304
+ }
305
+ break;
306
+
307
+ case 'not_empty':
308
+ if( 'show' == $acf_visibility && empty( $acf['value'] ) ){
309
+ $hidden = true;
310
+ }else if( 'show' == $acf_visibility && !empty( $acf['value'] ) ){
311
+ $hidden = false;
312
+ }elseif( 'hide' == $acf_visibility && empty( $acf['value'] ) ){
313
+ $hidden = false;
314
+ }else if( 'hide' == $acf_visibility && !empty( $acf['value'] ) ){
315
+ $hidden = true;
316
+ }
317
+ break;
318
+
319
+ default:
320
+ # code...
321
+ break;
322
+ }
323
+
324
+ // //do return to bypass other conditions
325
+ $hidden = apply_filters( 'widget_options_visibility_acf', $hidden );
326
+ if( $hidden ){
327
+ return false;
328
+ }
329
+ }
330
+ }
331
+ }
332
+
333
+ //login state
334
+ if( isset( $widget_options['state'] ) && 'activate' == $widget_options['state'] && isset( $opts['roles'] ) ){
335
+ if( isset( $opts['roles']['state'] ) && !empty( $opts['roles']['state'] ) ){
336
+ //do state action here
337
+ if( $opts['roles']['state'] == 'out' && is_user_logged_in() ){
338
+ return false;
339
+ }else if( $opts['roles']['state'] == 'in' && !is_user_logged_in() ){
340
+ return false;
341
+ }
342
+ }
343
+ }
344
+
345
+ if( 'activate' == $widget_options['logic'] ){
346
+ // display widget logic
347
+ if( isset( $opts['class'] ) && isset( $opts['class']['logic'] ) && !empty( $opts['class']['logic'] ) ){
348
+ $display_logic = stripslashes( trim( $opts['class']['logic'] ) );
349
+ $display_logic = apply_filters( 'widget_options_logic_override', $display_logic );
350
+ $display_logic = apply_filters( 'extended_widget_options_logic_override', $display_logic );
351
+ if ( $display_logic === false ){
352
+ return false;
353
+ }
354
+ if ( $display_logic === true ){
355
+ return true;
356
+ }
357
+ if ( stristr($display_logic,"return")===false ){
358
+ $display_logic="return (" . $display_logic . ");";
359
+ }
360
+ if ( !eval( $display_logic ) ){
361
+ return false;
362
+ }
363
+ }
364
+ }
365
+
366
+ if( 'activate' == $widget_options['hide_title'] ){
367
+ //hide widget title
368
+ if( isset( $instance['title'] ) && isset( $opts['class'] ) && isset( $opts['class']['title'] ) && '1' == $opts['class']['title'] ){
369
+ $instance['title'] = '';
370
+ }
371
+ }
372
+
373
+ return $instance;
374
+ }
375
+ add_filter( 'widget_display_callback', 'widgetopts_display_callback', 50, 3 );
376
+ endif;
377
+
378
+ //Don't show widget title
379
+ if( !function_exists( 'widgetopts_remove_title' ) ):
380
+ function widgetopts_remove_title( $widget_title, $instance = array(), $widget_id = '' ){
381
+ global $widget_options;
382
+ if ( 'activate' == $widget_options['hide_title'] && is_array( $instance ) && !empty( $instance ) ){
383
+ foreach ( $instance as $key => $value) {
384
+ if( substr( $key, 0, 20 ) == 'extended_widget_opts' ){
385
+ $opts = ( isset( $instance[ $key ] ) ) ? $instance[ $key ] : array();
386
+
387
+ if( isset( $opts['class'] ) && isset( $opts['class']['title'] ) && '1' == $opts['class']['title'] ){
388
+ return;
389
+ }
390
+
391
+ break;
392
+ }
393
+ }
394
+ return $widget_title;
395
+ }else{
396
+ return ( $widget_title );
397
+ }
398
+ }
399
+ add_filter( 'widget_title', 'widgetopts_remove_title', 10, 4 );
400
+ endif;
401
+
402
+ /*
403
+ * Add custom classes on dynamic_sidebar_params filter
404
+ */
405
+ if( !function_exists( 'widgetopts_add_classes' ) ):
406
+ function widgetopts_add_classes( $params ){
407
+ global $widget_options, $wp_registered_widget_controls;
408
+ $classe_to_add = '';
409
+ $id_base = $wp_registered_widget_controls[ $params[0]['widget_id'] ]['id_base'];
410
+ $instance = get_option( 'widget_' . $id_base );
411
+
412
+ if( isset( $wp_registered_widget_controls[ $params[0]['widget_id'] ]['params'][0]['number'] ) ){
413
+ $num = $wp_registered_widget_controls[ $params[0]['widget_id'] ]['params'][0]['number'];
414
+ }elseif( isset( $wp_registered_widget_controls[ $params[0]['widget_id'] ]['callback'][0]->number ) ){
415
+ $num = $wp_registered_widget_controls[ $params[0]['widget_id'] ]['callback'][0]->number;
416
+ }else{
417
+ $num = substr( $params[0]['widget_id'], -1 );
418
+ }
419
+ if( isset( $instance[ $num ] ) ){
420
+ $opts = ( isset( $instance[ $num ][ 'extended_widget_opts-'. $params[0]['widget_id'] ] ) ) ? $instance[ $num ][ 'extended_widget_opts-'. $params[0]['widget_id'] ] : array();
421
+ }else{
422
+ $opts = array();
423
+ }
424
+
425
+ $custom_class = isset( $opts['class'] ) ? $opts['class'] : '';
426
+ $widget_id_set = $params[0]['widget_id'];
427
+
428
+ if( 'activate' == $widget_options['classes'] && isset( $widget_options['settings']['classes'] ) ){
429
+ //don't add the IDs when the setting is set to NO
430
+ if( isset( $widget_options['settings']['classes']['id'] ) ){
431
+ if( is_array( $custom_class ) && isset( $custom_class['id'] ) && !empty( $custom_class['id'] ) ){
432
+ $params[0]['before_widget'] = preg_replace( '/id="[^"]*/', "id=\"{$custom_class['id']}", $params[0]['before_widget'], 1 );
433
+ $widget_id_set = $custom_class['id'];
434
+ }
435
+ }
436
+
437
+ }
438
+
439
+ $get_classes = widgetopts_classes_generator( $opts, $widget_options, $widget_options['settings'] );
440
+
441
+ //double check array
442
+ if( !is_array( $get_classes ) ){
443
+ $get_classes = array();
444
+ }
445
+
446
+ if( 'activate' == $widget_options['classes'] ){
447
+ if( isset( $widget_options['settings']['classes']['auto'] ) ){
448
+ //do nothing
449
+ }else{
450
+ //check if widget class exists
451
+ if ( ( strpos( $params[0]['before_widget'], '"widget ' ) !== false ) ||
452
+ ( strpos( $params[0]['before_widget'], ' widget ' ) !== false ) ||
453
+ ( strpos( $params[0]['before_widget'], ' widget"' ) !== false)
454
+ ) {
455
+ //do nothing
456
+ }else{
457
+ $get_classes[] = 'widget';
458
+ }
459
+ }
460
+ }
461
+
462
+ if( !empty( $get_classes ) ){
463
+ $classes = 'class="'. ( implode( ' ', $get_classes ) ) . ' ';
464
+ $params[0]['before_widget'] = str_replace('class="', $classes, $params[0]['before_widget']);
465
+ }
466
+
467
+ // $params[0]['before_widget'] = str_replace('class="', ' data-animation="asdf" class="', $params[0]['before_widget']);
468
+
469
+ return $params;
470
+ }
471
+ add_filter( 'dynamic_sidebar_params', 'widgetopts_add_classes' );
472
+ endif;
473
+
474
+ ?>
includes/widgets/extras.php ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extra Functions
4
+ *
5
+ * Collections of extra functions to avoid repeatition
6
+ *
7
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
8
+ * @since 4.0
9
+ */
10
+
11
+ //create separate function returning classes for reuse
12
+ if( !function_exists( 'widgetopts_classes_generator' ) ){
13
+ function widgetopts_classes_generator( $opts, $tabs, $settings, $so = false ){
14
+ if( !empty( $opts ) && is_array( $opts ) ){
15
+ $classes = array();
16
+ $devices = isset( $opts['devices'] ) ? $opts['devices'] : '';
17
+ $alignment = isset( $opts['alignment'] ) ? $opts['alignment'] : '';
18
+ $columns = isset( $opts['column'] ) ? $opts['column'] : '';
19
+ $clearfix = isset( $opts['clearfix'] ) ? $opts['clearfix'] : '';
20
+ $custom_class = isset( $opts['class'] ) ? $opts['class'] : '';
21
+ $abbr = array(
22
+ 'mobile' => 'xs',
23
+ 'tablet' => 'sm',
24
+ 'desktop' => 'md',
25
+ );
26
+ if( isset( $devices['options'] ) ){
27
+ unset( $devices['options'] );
28
+ }
29
+
30
+ if( 'activate' == $tabs['devices'] ){
31
+ //devices visibility
32
+ if( !empty( $devices ) ){
33
+ $device_opts = ( isset( $opts['devices']['options'] ) ) ? $opts['devices']['options'] : 'hide';
34
+ $classes[] = 'extendedwopts-' . $device_opts ;
35
+
36
+ foreach ($devices as $key => $value) {
37
+ $classes[] = 'extendedwopts-' . $key;
38
+ }
39
+ }
40
+ }
41
+
42
+ if( 'activate' == $tabs['alignment'] ){
43
+ //alignment
44
+ if( !empty( $alignment ) ){
45
+ foreach ($alignment as $k => $v) {
46
+ if( 'default' != $v ){
47
+ $classes[] = 'extendedwopts-' . $abbr[ $k ] . '-'. $v ;
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ if( 'activate' == $tabs['classes'] && isset( $settings['classes'] ) ){
54
+ //classes & ID
55
+ // $options = get_option('extwopts_class_settings');
56
+ $predefined = array();
57
+ if( isset( $settings['classes'] ) && isset( $settings['classes']['classlists'] ) && !empty( $settings['classes']['classlists'] ) ){
58
+ $predefined = $settings['classes']['classlists'];
59
+ }
60
+
61
+ //don't add any classes when settings is set to predefined or hide
62
+ if( !isset( $settings['classes']['type'] ) ||
63
+ ( isset( $settings['classes']['type'] ) && !in_array( $settings['classes']['type'] , array( 'hide', 'predefined' ) ) ) ){
64
+ if( is_array( $custom_class ) && isset( $custom_class['classes'] ) && !empty( $custom_class['classes'] ) ){
65
+ $classes[] = $custom_class['classes'];
66
+ }
67
+ }
68
+
69
+ //don't add any classes when settings is set to text or hide
70
+ if( !isset( $settings['classes']['type'] ) ||
71
+ ( isset( $settings['classes']['type'] ) && !in_array( $settings['classes']['type'] , array( 'hide', 'text' ) ) ) ){
72
+ if( is_array( $predefined ) && !empty( $predefined ) ){
73
+ $predefined = array_unique( $predefined );
74
+ if( isset( $custom_class['predefined'] ) && is_array( $custom_class['predefined'] ) ){
75
+ $filtered = array_intersect( $predefined, $custom_class['predefined'] );
76
+ if( !empty( $filtered ) ){
77
+ $classes = array_merge( $classes, $filtered );
78
+ // $classes[] = implode( ' ', $filtered );
79
+ // $classes[] = ' ';
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+
86
+ if( $so && 'activate' == $tabs['hide_title'] ){
87
+ //add fixed class to widget
88
+ if( isset( $custom_class['title'] ) && !empty( $custom_class['title'] ) ){
89
+ $classes[] = 'widgetopts-hide_title';
90
+ }
91
+ }
92
+
93
+ return apply_filters( 'widgetopts_get_classes', $classes );
94
+ }
95
+ }
96
+ }
97
+
98
+ //add is_active_sidebar support
99
+ if( !function_exists( 'widgetopts_sidebars_widgets' ) ){
100
+ add_action( 'wp_loaded', 'widgetopts_sidebars_widgets_action' );
101
+ function widgetopts_sidebars_widgets_action() {
102
+ if( apply_filters( 'widgetopts_is_active_sidebar_support', true ) ){
103
+ add_filter( 'sidebars_widgets', 'widgetopts_sidebars_widgets' );
104
+ }
105
+ }
106
+ function widgetopts_sidebars_widgets( $sidebars ) {
107
+ if ( is_admin() ) {
108
+ return $sidebars;
109
+ }
110
+
111
+ global $wp_registered_widgets;
112
+ $checked = array();
113
+
114
+ foreach ( $sidebars as $s => $sidebar ) {
115
+ if ( $s == 'wp_inactive_widgets' || strpos( $s, 'orphaned_widgets' ) === 0 || empty( $sidebar ) ) {
116
+ continue;
117
+ }
118
+
119
+ foreach ( $sidebar as $w => $widget ) {
120
+ // $widget is the id of the widget
121
+ if ( ! isset( $wp_registered_widgets[ $widget ] ) ) {
122
+ continue;
123
+ }
124
+
125
+ if ( isset( $checked[ $widget ] ) ) {
126
+ $show = $checked[ $widget ];
127
+ } else {
128
+ $opts = $wp_registered_widgets[ $widget ];
129
+ $id_base = is_array( $opts['callback'] ) ? $opts['callback'][0]->id_base : $opts['callback'];
130
+
131
+ if ( ! $id_base ) {
132
+ continue;
133
+ }
134
+
135
+ $instance = get_option( 'widget_' . $id_base );
136
+
137
+ if ( ! $instance || ! is_array( $instance ) ) {
138
+ continue;
139
+ }
140
+
141
+ if ( isset( $instance['_multiwidget'] ) && $instance['_multiwidget'] ) {
142
+ $number = $opts['params'][0]['number'];
143
+ if ( ! isset( $instance[ $number ] ) ) {
144
+ continue;
145
+ }
146
+
147
+ $instance = $instance[ $number ];
148
+ unset( $number );
149
+ }
150
+
151
+ unset( $opts );
152
+
153
+ $show = widgetopts_display_callback( $instance, (object) array( 'id' => $widget ), '' );
154
+
155
+ $checked[ $widget ] = $show ? true : false;
156
+ }
157
+
158
+ if ( ! $show ) {
159
+ unset( $sidebars[ $s ][ $w ] );
160
+ }
161
+
162
+ unset( $widget );
163
+ }
164
+ unset( $sidebar );
165
+ }
166
+
167
+ return $sidebars;
168
+ }
169
+ }
170
+
171
+ ?>
includes/widgets/option-tabs/alignment.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Alignment Widget Options
4
+ *
5
+ * @copyright Copyright (c) 2015, Jeffrey Carandang
6
+ * @since 1.0
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ /**
13
+ * Add Alignment Widget Options Tab
14
+ *
15
+ * @since 1.0
16
+ * @return void
17
+ */
18
+
19
+ /**
20
+ * Called on 'extended_widget_opts_tabs'
21
+ * create new tab navigation for alignment options
22
+ */
23
+ function widgetopts_tab_alignment( $args ){ ?>
24
+ <li class="extended-widget-opts-tab-alignment">
25
+ <a href="#extended-widget-opts-tab-<?php echo $args['id'];?>-alignment" title="<?php _e( 'Alignment', 'widget-options' );?>" ><span class="dashicons dashicons-editor-aligncenter"></span> <span class="tabtitle"><?php _e( 'Alignment', 'widget-options' );?></span></a>
26
+ </li>
27
+ <?php
28
+ }
29
+ add_action( 'extended_widget_opts_tabs', 'widgetopts_tab_alignment' );
30
+
31
+ /**
32
+ * Called on 'extended_widget_opts_tabcontent'
33
+ * create new tab content options for alignment options
34
+ */
35
+ function widgetopts_tabcontent_alignment( $args ){
36
+ $desktop = '';
37
+ if( isset( $args['params'] ) && isset( $args['params']['alignment'] ) ){
38
+ if( isset( $args['params']['alignment']['desktop'] ) ){
39
+ $desktop = $args['params']['alignment']['desktop'];
40
+ }
41
+ }
42
+ ?>
43
+ <div id="extended-widget-opts-tab-<?php echo $args['id'];?>-alignment" class="extended-widget-opts-tabcontent extended-widget-opts-tabcontent-alignment">
44
+ <table class="form-table">
45
+ <tbody>
46
+ <tr valign="top">
47
+ <td scope="row"><strong><?php _e( 'Devices', 'widget-options' );?></strong></td>
48
+ <td><strong><?php _e( 'Alignment', 'widget-options' );?></strong></td>
49
+ </tr>
50
+ <tr valign="top">
51
+ <td scope="row"><span class="dashicons dashicons-desktop"></span> <?php _e( 'All Devices', 'widget-options' );?></td>
52
+ <td>
53
+ <select class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][alignment][desktop]">
54
+ <option value="default"><?php _e( 'Default', 'widget-options' );?></option>
55
+ <option value="center" <?php if( $desktop == 'center' ){ echo 'selected="selected"'; }?> ><?php _e( 'Center', 'widget-options' );?></option>
56
+ <option value="left" <?php if( $desktop == 'left' ){ echo 'selected="selected"'; }?>><?php _e( 'Left', 'widget-options' );?></option>
57
+ <option value="right" <?php if( $desktop == 'right' ){ echo 'selected="selected"'; }?>><?php _e( 'Right', 'widget-options' );?></option>
58
+ <option value="justify" <?php if( $desktop == 'justify' ){ echo 'selected="selected"'; }?>><?php _e( 'Justify', 'widget-options' );?></option>
59
+ </select>
60
+ </td>
61
+ </tr>
62
+ <tr valign="top" class="widgetopts-topro">
63
+ <td colspan="2"><small><?php _e( '<em>Upgrade to <a href="https://widget-options.com/" target="_blank">Pro Version</a> for Multiple Devices Alignment and Additional Widget Options.</em>', 'widget-options' );?></small></td>
64
+ </tr>
65
+ </tbody>
66
+ </table>
67
+ </div>
68
+ <?php
69
+ }
70
+ add_action( 'extended_widget_opts_tabcontent', 'widgetopts_tabcontent_alignment'); ?>
includes/widgets/option-tabs/devices.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Devices Visibility Widget Options
4
+ *
5
+ * @copyright Copyright (c) 2015, Jeffrey Carandang
6
+ * @since 1.0
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ /**
13
+ * Add Alignment Widget Options Tab
14
+ *
15
+ * @since 1.0
16
+ * @return void
17
+ */
18
+
19
+ /**
20
+ * Called on 'extended_widget_opts_tabs'
21
+ * create new tab navigation for alignment options
22
+ */
23
+ function widgetopts_tab_devices( $args ){ ?>
24
+ <li class="extended-widget-opts-tab-devices">
25
+ <a href="#extended-widget-opts-tab-<?php echo $args['id'];?>-devices" title="<?php _e( 'Devices', 'widget-options' );?>" ><span class="dashicons dashicons-smartphone"></span> <span class="tabtitle"><?php _e( 'Devices', 'widget-options' );?></span></a>
26
+ </li>
27
+ <?php
28
+ }
29
+ add_action( 'extended_widget_opts_tabs', 'widgetopts_tab_devices' );
30
+
31
+ /**
32
+ * Called on 'extended_widget_opts_tabcontent'
33
+ * create new tab content options for devices visibility options
34
+ */
35
+ function widgetopts_tabcontent_devices( $args ){
36
+ $desktop = '';
37
+ $tablet = '';
38
+ $mobile = '';
39
+ $options_role = '';
40
+ if( isset( $args['params'] ) && isset( $args['params']['devices'] ) ){
41
+ if( isset( $args['params']['devices']['options'] ) ){
42
+ $options_role = $args['params']['devices']['options'];
43
+ }
44
+ if( isset( $args['params']['devices']['desktop'] ) ){
45
+ $desktop = $args['params']['devices']['desktop'];
46
+ }
47
+ if( isset( $args['params']['devices']['tablet'] ) ){
48
+ $tablet = $args['params']['devices']['tablet'];
49
+ }
50
+ if( isset( $args['params']['devices']['mobile'] ) ){
51
+ $mobile = $args['params']['devices']['mobile'];
52
+ }
53
+ }
54
+ ?>
55
+ <div id="extended-widget-opts-tab-<?php echo $args['id'];?>-devices" class="extended-widget-opts-tabcontent extended-widget-opts-tabcontent-devices">
56
+ <p>
57
+ <strong><?php _e( 'Hide/Show', 'widget-options' );?></strong>
58
+ <select class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][devices][options]">
59
+ <option value="hide" <?php if( $options_role == 'hide' ){ echo 'selected="selected"'; }?> ><?php _e( 'Hide on checked devices', 'widget-options' );?></option>
60
+ <option value="show" <?php if( $options_role == 'show' ){ echo 'selected="selected"'; }?>><?php _e( 'Show on checked devices', 'widget-options' );?></option>
61
+ </select>
62
+ </p>
63
+ <table class="form-table">
64
+ <tbody>
65
+ <tr valign="top">
66
+ <td scope="row"><strong><?php _e( 'Devices', 'widget-options' );?></strong></td>
67
+ <td>&nbsp;</td>
68
+ </tr>
69
+ <tr valign="top">
70
+ <td scope="row"><span class="dashicons dashicons-desktop"></span> <label for="extended_widget_opts-<?php echo $args['id'];?>-devices-desktop"><?php _e( 'Desktop', 'widget-options' );?></label></td>
71
+ <td>
72
+ <input type="checkbox" name="<?php echo $args['namespace'];?>[extended_widget_opts][devices][desktop]" value="1" id="extended_widget_opts-<?php echo $args['id'];?>-devices-desktop" <?php if( !empty( $desktop ) ){ echo 'checked="checked"'; }?> />
73
+ </td>
74
+ </tr>
75
+ <tr valign="top">
76
+ <td scope="row"><span class="dashicons dashicons-tablet"></span> <label for="extended_widget_opts-<?php echo $args['id'];?>-devices-table"><?php _e( 'Tablet', 'widget-options' );?></label></td>
77
+ <td>
78
+ <input type="checkbox" name="<?php echo $args['namespace'];?>[extended_widget_opts][devices][tablet]" value="1" id="extended_widget_opts-<?php echo $args['id'];?>-devices-table" <?php if( !empty( $tablet ) ){ echo 'checked="checked"'; }?> />
79
+ </td>
80
+ </tr>
81
+ <tr valign="top">
82
+ <td scope="row"><span class="dashicons dashicons-smartphone"></span> <label for="extended_widget_opts-<?php echo $args['id'];?>-devices-mobile"><?php _e( 'Mobile', 'widget-options' );?></label></td>
83
+ <td>
84
+ <input type="checkbox" name="<?php echo $args['namespace'];?>[extended_widget_opts][devices][mobile]" value="1" id="extended_widget_opts-<?php echo $args['id'];?>-devices-mobile" <?php if( !empty( $mobile ) ){ echo 'checked="checked"'; }?> />
85
+ </td>
86
+ </tr>
87
+ </tbody>
88
+ </table>
89
+ </div>
90
+ <?php
91
+ }
92
+ add_action( 'extended_widget_opts_tabcontent', 'widgetopts_tabcontent_devices'); ?>
includes/widgets/option-tabs/settings.php ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Settings Widget Options
4
+ *
5
+ * @copyright Copyright (c) 2015, Jeffrey Carandang
6
+ * @since 1.0
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ /**
13
+ * Add Settings Widget Options Tab
14
+ *
15
+ * @since 1.0
16
+ * @return void
17
+ */
18
+
19
+ /**
20
+ * Called on 'extended_widget_opts_tabs'
21
+ * create new tab navigation for alignment options
22
+ */
23
+ if( !function_exists( 'widgetopts_tab_settings' ) ):
24
+ function widgetopts_tab_settings( $args ){ ?>
25
+ <li class="extended-widget-opts-tab-class">
26
+ <a href="#extended-widget-opts-tab-<?php echo $args['id'];?>-class" title="<?php _e( 'Class,ID & Logic', 'widget-options' );?>" ><span class="dashicons dashicons-admin-generic"></span> <span class="tabtitle"><?php _e( 'Other Settings', 'widget-options' );?></span></a>
27
+ </li>
28
+ <?php
29
+ }
30
+ add_action( 'extended_widget_opts_tabs', 'widgetopts_tab_settings' );
31
+ endif;
32
+
33
+ /**
34
+ * Called on 'extended_widget_opts_tabcontent'
35
+ * create new tab content options for alignment options
36
+ */
37
+ if( !function_exists( 'widgetopts_tabcontent_settings' ) ):
38
+ function widgetopts_tabcontent_settings( $args ){
39
+ global $widget_options;
40
+
41
+ $id = '';
42
+ $classes = '';
43
+ $logic = '';
44
+ $selected = 0;
45
+ $check = '';
46
+ if( isset( $args['params'] ) && isset( $args['params']['class'] ) ){
47
+ if( isset( $args['params']['class']['id'] ) ){
48
+ $id = $args['params']['class']['id'];
49
+ }
50
+ if( isset( $args['params']['class']['classes'] ) ){
51
+ $classes = $args['params']['class']['classes'];
52
+ }
53
+ if( isset( $args['params']['class']['selected'] ) ){
54
+ $selected = $args['params']['class']['selected'];
55
+ }
56
+ if( isset( $args['params']['class']['logic'] ) ){
57
+ $logic = $args['params']['class']['logic'];
58
+ }
59
+ if( isset( $args['params']['class']['title'] ) && $args['params']['class']['title'] == '1' ){
60
+ $check = 'checked="checked"';
61
+ }
62
+ }
63
+
64
+ $predefined = array();
65
+ if( isset( $widget_options['settings']['classes'] ) && isset( $widget_options['settings']['classes']['classlists'] ) && !empty( $widget_options['settings']['classes']['classlists'] ) ){
66
+ $predefined = $widget_options['settings']['classes']['classlists'];
67
+ }
68
+ ?>
69
+ <div id="extended-widget-opts-tab-<?php echo $args['id'];?>-class" class="extended-widget-opts-tabcontent extended-widget-opts-inside-tabcontent extended-widget-opts-tabcontent-class">
70
+
71
+ <div class="extended-widget-opts-settings-tabs extended-widget-opts-inside-tabs">
72
+ <input type="hidden" id="extended-widget-opts-settings-selectedtab" value="<?php echo $selected;?>" name="<?php echo $args['namespace'];?>[extended_widget_opts][class][selected]" />
73
+ <!-- start tab nav -->
74
+ <ul class="extended-widget-opts-settings-tabnav-ul">
75
+ <?php if( 'activate' == $widget_options['hide_title'] ){ ?>
76
+ <li class="extended-widget-opts-settings-tab-title">
77
+ <a href="#extended-widget-opts-settings-tab-<?php echo $args['id'];?>-title" title="<?php _e( 'Misc', 'widget-options' );?>" ><?php _e( 'Misc', 'widget-options' );?></a>
78
+ </li>
79
+ <?php } ?>
80
+
81
+ <?php if( 'activate' == $widget_options['classes'] ){ ?>
82
+ <li class="extended-widget-opts-settings-tab-class">
83
+ <a href="#extended-widget-opts-settings-tab-<?php echo $args['id'];?>-class" title="<?php _e( 'Class & ID', 'widget-options' );?>" ><?php _e( 'Class & ID', 'widget-options' );?></a>
84
+ </li>
85
+ <?php } ?>
86
+
87
+ <?php if( 'activate' == $widget_options['logic'] ){ ?>
88
+ <li class="extended-widget-opts-settings-tab-logic">
89
+ <a href="#extended-widget-opts-settings-tab-<?php echo $args['id'];?>-logic" title="<?php _e( 'Display Logic', 'widget-options' );?>" ><?php _e( 'Logic', 'widget-options' );?></a>
90
+ </li>
91
+ <?php } ?>
92
+ <div class="extended-widget-opts-clearfix"></div>
93
+ </ul><!-- end tab nav -->
94
+ <div class="extended-widget-opts-clearfix"></div>
95
+
96
+ <?php if( 'activate' == $widget_options['hide_title'] ){ ?>
97
+ <!-- start title tab content -->
98
+ <div id="extended-widget-opts-settings-tab-<?php echo $args['id'];?>-title" class="extended-widget-opts-settings-tabcontent extended-widget-opts-inner-tabcontent">
99
+ <div class="widget-opts-title">
100
+ <?php if( 'activate' == $widget_options['hide_title'] ){ ?>
101
+ <p class="widgetopts-subtitle"><?php _e( 'Hide Widget Title', 'widget-options' );?></p>
102
+ <p>
103
+ <input type="checkbox" name="<?php echo $args['namespace'];?>[extended_widget_opts][class][title]" id="opts-class-title-<?php echo $args['id'];?>" value="1" <?php echo $check;?> />
104
+ <label for="opts-class-title-<?php echo $args['id'];?>"><?php _e( 'Check to hide widget title', 'widget-options' );?></label>
105
+ </p>
106
+ <?php } ?>
107
+ </div>
108
+ </div><!-- end title tab content -->
109
+ <?php } ?>
110
+
111
+ <?php if( 'activate' == $widget_options['classes'] ){ ?>
112
+ <!-- start class tab content -->
113
+ <div id="extended-widget-opts-settings-tab-<?php echo $args['id'];?>-class" class="extended-widget-opts-settings-tabcontent extended-widget-opts-inner-tabcontent">
114
+ <div class="widget-opts-class">
115
+ <table class="form-table">
116
+ <tbody>
117
+ <?php if( isset( $widget_options['settings']['classes'] ) && ( isset( $widget_options['settings']['classes']['id'] ) && '1' == $widget_options['settings']['classes']['id'] ) ){?>
118
+ <tr valign="top" class="widgetopts_id_fld">
119
+ <td scope="row">
120
+ <strong><?php _e( 'Widget CSS ID:', 'widget-options' );?></strong><br />
121
+ <input type="text" id="opts-class-id-<?php echo $args['id'];?>" class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][class][id]" value="<?php echo $id;?>" />
122
+ </td>
123
+ </tr>
124
+ <?php } ?>
125
+
126
+ <?php if( !isset( $widget_options['settings']['classes'] ) ||
127
+ ( isset( $widget_options['settings']['classes'] ) && isset( $widget_options['settings']['classes']['type'] ) && !in_array( $widget_options['settings']['classes']['type'] , array( 'hide', 'predefined' ) ) ) ){?>
128
+ <tr valign="top">
129
+ <td scope="row">
130
+ <strong><?php _e( 'Widget CSS Classes:', 'widget-options' );?></strong><br />
131
+ <input type="text" id="opts-class-classes-<?php echo $args['id'];?>" class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][class][classes]" value="<?php echo $classes;?>" />
132
+ <small><em><?php _e( 'Separate each class with space.', 'widget-options' );?></em></small>
133
+ </td>
134
+ </tr>
135
+ <?php } ?>
136
+ <?php if( !isset( $widget_options['settings']['classes'] ) ||
137
+ ( isset( $widget_options['settings']['classes'] ) && isset( $widget_options['settings']['classes']['type'] ) && !in_array( $widget_options['settings']['classes']['type'] , array( 'hide', 'text' ) ) ) ){?>
138
+ <?php if( is_array( $predefined ) && !empty( $predefined ) ){
139
+ $predefined = array_unique( $predefined ); //remove dups
140
+ ?>
141
+ <tr valign="top">
142
+ <td scope="row">
143
+ <strong><?php _e( 'Available Widget Classes:', 'widget-options' );?></strong><br />
144
+ <div class="extended-widget-opts-class-lists" style="max-height: 230px;padding: 5px;overflow:auto;">
145
+ <?php foreach ($predefined as $key => $value) {
146
+ if( isset( $args['params']['class']['predefined'] ) &&
147
+ is_array( $args['params']['class']['predefined'] ) &&
148
+ in_array( $value , $args['params']['class']['predefined'] ) ){
149
+ $checked = 'checked="checked"';
150
+ }else{
151
+ $checked = '';
152
+ }
153
+ ?>
154
+ <p>
155
+ <input type="checkbox" name="<?php echo $args['namespace'];?>[extended_widget_opts][class][predefined][]" id="<?php echo $args['id'];?>-opts-class-<?php echo $key;?>" value="<?php echo $value;?>" <?php echo $checked;?> />
156
+ <label for="<?php echo $args['id'];?>-opts-class-<?php echo $key;?>"><?php echo $value;?></label>
157
+ </p>
158
+ <?php } ?>
159
+ </div>
160
+ </td>
161
+ </tr>
162
+ <?php } ?>
163
+ <?php } ?>
164
+ </tbody>
165
+ </table>
166
+ </div>
167
+ </div><!-- end class tab content -->
168
+ <?php } ?>
169
+
170
+ <?php if( 'activate' == $widget_options['logic'] ){ ?>
171
+ <!-- start logic tab content -->
172
+ <div id="extended-widget-opts-settings-tab-<?php echo $args['id'];?>-logic" class="extended-widget-opts-settings-tabcontent extended-widget-opts-inner-tabcontent">
173
+ <div class="widget-opts-logic">
174
+ <p><small><?php _e( 'The text field lets you use <a href="http://codex.wordpress.org/Conditional_Tags" target="_blank">WP Conditional Tags</a>, or any general PHP code.', 'widget-options' );?></small></p>
175
+ <textarea class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][class][logic]"><?php echo stripslashes( $logic );?></textarea>
176
+
177
+ <?php if( !isset( $widget_options['settings']['logic'] ) ||
178
+ ( isset( $widget_options['settings']['logic'] ) && !isset( $widget_options['settings']['logic']['notice'] ) ) ){ ?>
179
+ <p><a href="#" class="widget-opts-toggler-note"><?php _e( 'Click to Toggle Note', 'widget-options' );?></a></p>
180
+ <p class="widget-opts-toggle-note"><small><?php _e( 'PLEASE NOTE that the display logic you introduce is EVAL\'d directly. Anyone who has access to edit widget appearance will have the right to add any code, including malicious and possibly destructive functions. There is an optional filter <em>"widget_options_logic_override"</em> which you can use to bypass the EVAL with your own code if needed.', 'widget-options' );?></small></p>
181
+ <?php } ?>
182
+ </div>
183
+ </div><!-- end logiv tab content -->
184
+ <?php } ?>
185
+
186
+ </div><!-- end .extended-widget-opts-settings-tabs -->
187
+
188
+
189
+ </div>
190
+ <?php
191
+ }
192
+ add_action( 'extended_widget_opts_tabcontent', 'widgetopts_tabcontent_settings');
193
+ endif; ?>
includes/widgets/option-tabs/state.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Roles Widget Options
4
+ *
5
+ * @copyright Copyright (c) 2015, Jeffrey Carandang
6
+ * @since 1.0
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ /**
13
+ * Add Roles Widget Options Tab
14
+ *
15
+ * @since 1.0
16
+ * @return void
17
+ */
18
+
19
+ /**
20
+ * Called on 'extended_widget_opts_tabs'
21
+ * create new tab navigation for alignment options
22
+ */
23
+ function widgetopts_tab_state( $args ){ ?>
24
+ <li class="extended-widget-opts-tab-roles">
25
+ <a href="#extended-widget-opts-tab-<?php echo $args['id'];?>-roles" title="<?php _e( 'Roles', 'widget-options' );?>" ><span class="dashicons dashicons-admin-users"></span> <span class="tabtitle"><?php _e( 'Roles', 'widget-options' );?></span></a>
26
+ </li>
27
+ <?php
28
+ }
29
+ add_action( 'extended_widget_opts_tabs', 'widgetopts_tab_state' );
30
+
31
+ /**
32
+ * Called on 'extended_widget_opts_tabcontent'
33
+ * create new tab content options for alignment options
34
+ */
35
+ function widgetopts_tabcontent_state( $args ){
36
+ $roles = get_editable_roles();
37
+ $state = '';
38
+ if( isset( $args['params']['roles'][ 'state' ] ) ){
39
+ $state = $args['params']['roles'][ 'state' ];
40
+ }
41
+ ?>
42
+ <div id="extended-widget-opts-tab-<?php echo $args['id'];?>-roles" class="extended-widget-opts-tabcontent extended-widget-opts-tabcontent-roles">
43
+ <p class="widgetopts-subtitle"><?php _e( 'User Login State', 'widget-options' );?></p>
44
+ <p>
45
+ <select class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][roles][state]">
46
+ <option value=""><?php _e( 'Select Visibility Option', 'widget-options' );?></option>
47
+ <option value="in" <?php if( $state == 'in' ){ echo 'selected="selected"'; }?> ><?php _e( 'Show only for Logged-in Users', 'widget-options' );?></option>
48
+ <option value="out" <?php if( $state == 'out' ){ echo 'selected="selected"'; }?>><?php _e( 'Show only for Logged-out Users', 'widget-options' );?></option>
49
+ </select>
50
+ </p>
51
+ <p><small><?php _e( 'Restrict widget visibility for logged-in and logged-out users. ', 'widget-options' );?></small></p>
52
+ </div>
53
+ <?php
54
+ }
55
+ add_action( 'extended_widget_opts_tabcontent', 'widgetopts_tabcontent_state'); ?>
includes/widgets/option-tabs/upsell.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Upsell Extended Version Widget Options
4
+ *
5
+ * @copyright Copyright (c) 2015, Jeffrey Carandang
6
+ * @since 1.0
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ /**
13
+ * Add Upgrade to Pro Widget Options Tab
14
+ *
15
+ * @since 1.0
16
+ * @return void
17
+ */
18
+
19
+ /**
20
+ * Called on 'extended_widget_opts_tabs'
21
+ * create new tab navigation for alignment options
22
+ */
23
+ function widgetopts_tab_gopro( $args ){ ?>
24
+ <li class="extended-widget-gopro-tab-alignment">
25
+ <a href="#extended-widget-opts-tab-<?php echo $args['id'];?>-gopro">+</a>
26
+ </li>
27
+ <?php
28
+ }
29
+ add_action( 'extended_widget_opts_tabs', 'widgetopts_tab_gopro', 100 );
30
+
31
+ /**
32
+ * Called on 'extended_widget_opts_tabcontent'
33
+ * create new tab content options for alignment options
34
+ */
35
+ function widgetopts_tabcontent_gopro( $args ){ ?>
36
+ <div id="extended-widget-opts-tab-<?php echo $args['id'];?>-gopro" class="extended-widget-opts-tabcontent extended-widget-opts-tabcontent-gopro">
37
+ <p class="widgetopts-unlock-features">
38
+ <span class="dashicons dashicons-lock"></span><?php _e( 'Unlock all Options', 'widget-options' );?>
39
+ </p>
40
+ <p>
41
+ <?php _e( 'Get the world\'s most complete widget management and get the best out of your widgets! Upgrade to extended version to get:', 'widget-options' );?>
42
+ </p>
43
+ <ul>
44
+ <li>
45
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Animation Options', 'widget-options' );?>
46
+ </li>
47
+ <li>
48
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Custom Styling Options', 'widget-options' );?>
49
+ </li>
50
+ <li>
51
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Column Display', 'widget-options' );?>
52
+ </li>
53
+ <li>
54
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'User Roles Visibility Restriction', 'widget-options' );?>
55
+ </li>
56
+ <li>
57
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Fixed/Sticky Widget Options', 'widget-options' );?>
58
+ </li>
59
+ <li>
60
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Days and Date Range Restriction', 'widget-options' );?>
61
+ </li>
62
+ <li>
63
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Link Widget Options', 'widget-options' );?>
64
+ </li>
65
+ <li>
66
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Clone Widget Options', 'widget-options' );?>
67
+ </li>
68
+ <li>
69
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Widget Caching Options', 'widget-options' );?>
70
+ </li>
71
+ <li>
72
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Shortcodes Options', 'widget-options' );?>
73
+ </li>
74
+ <li>
75
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Extended Taxonomy and Post Types Support', 'widget-options' );?>
76
+ </li>
77
+ <li>
78
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Disable Widgets and Permissions', 'widget-options' );?>
79
+ </li>
80
+ <li>
81
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Target URLs and Wildcard Restrictions', 'widget-options' );?>
82
+ </li>
83
+ <li>
84
+ <span class="dashicons dashicons-lock"></span> <?php _e( 'Pagebuilder by SiteOrigin Support', 'widget-options' );?>
85
+ </li>
86
+ </ul>
87
+ <p><strong><a href="http://widget-options.com/?utm_source=wordpressadmin&utm_medium=widgettabs&utm_campaign=widgetoptsprotab" class="button-primary" target="_blank"><?php _e( 'Learn More', 'widget-options' );?></a></strong></p>
88
+ </div>
89
+ <?php
90
+ }
91
+ add_action( 'extended_widget_opts_tabcontent', 'widgetopts_tabcontent_gopro'); ?>
includes/widgets/option-tabs/visibility.php ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Pages Visibility Widget Options
4
+ *
5
+ * @copyright Copyright (c) 2015, Jeffrey Carandang
6
+ * @since 1.0
7
+ */
8
+
9
+ // Exit if accessed directly
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ /**
13
+ * Add Visibility Widget Options Tab
14
+ *
15
+ * @since 1.0
16
+ * @return void
17
+ */
18
+
19
+ /**
20
+ * Called on 'extended_widget_opts_tabs'
21
+ * create new tab navigation for visibility options
22
+ */
23
+ function widgetopts_tab_visibility( $args ){ ?>
24
+ <li class="extended-widget-opts-tab-visibility">
25
+ <a href="#extended-widget-opts-tab-<?php echo $args['id'];?>-visibility" title="<?php _e( 'Visibility', 'widget-options' );?>" ><span class="dashicons dashicons-visibility"></span> <span class="tabtitle"><?php _e( 'Visibility', 'widget-options' );?></span></a>
26
+ </li>
27
+ <?php
28
+ }
29
+ add_action( 'extended_widget_opts_tabs', 'widgetopts_tab_visibility' );
30
+
31
+ /**
32
+ * Called on 'extended_widget_opts_tabcontent'
33
+ * create new tab content options for visibility options
34
+ */
35
+ function widgetopts_tabcontent_visibility( $args ){
36
+ global $widget_options, $widgetopts_taxonomies, $widgetopts_pages, $widgetopts_types, $widgetopts_categories;
37
+
38
+ $checked = "";
39
+ $main = "";
40
+ $selected = 0;
41
+ $tax_opts = (array) get_option( 'extwopts_taxonomy_settings' );
42
+ $pages = ( !empty( $widgetopts_pages ) ) ? $widgetopts_pages : array();
43
+ $taxonomies = ( !empty( $widgetopts_taxonomies ) ) ? $widgetopts_taxonomies : array();
44
+ $types = ( !empty( $widgetopts_types ) ) ? $widgetopts_types : array();
45
+ $categories = ( !empty( $widgetopts_categories ) ) ? $widgetopts_categories : array();
46
+
47
+ //declare miscellaneous pages - wordpress default pages
48
+ $misc = array(
49
+ 'home' => __( 'Home/Front', 'widget-options' ),
50
+ 'blog' => __( 'Blog', 'widget-options' ),
51
+ 'archives' => __( 'Archives', 'widget-options' ),
52
+ // 'single' => __( 'Single Post', 'widget-options' ),
53
+ '404' => __( '404', 'widget-options' ),
54
+ 'search' => __( 'Search', 'widget-options' )
55
+ );
56
+
57
+ //unset builtin post types
58
+ foreach ( array( 'revision', 'attachment', 'nav_menu_item' ) as $unset ) {
59
+ unset( $types[ $unset ] );
60
+ }
61
+
62
+ //pro version only
63
+ // $get_terms = array();
64
+ // if( !empty( $widget_options['settings']['taxonomies'] ) && is_array( $widget_options['settings']['taxonomies'] ) ){
65
+ // foreach ( $widget_options['settings']['taxonomies'] as $tax_opt => $vall ) {
66
+ // $tax_name = 'widgetopts_taxonomy_'. $tax_opt;
67
+ // global $$tax_name;
68
+ // $get_terms[ $tax_opt ] = $$tax_name;
69
+ // }
70
+ // }
71
+
72
+
73
+ //get save values
74
+ $options_values = '';
75
+ $misc_values = array();
76
+ $pages_values = array();
77
+ $types_values = array();
78
+ $cat_values = array();
79
+ $tax_values = array();
80
+ $terms_values = array();
81
+ $acf_values = array();
82
+ if( isset( $args['params'] ) && isset( $args['params']['visibility'] ) ){
83
+ if( isset( $args['params']['visibility']['options'] ) ){
84
+ $options_values = $args['params']['visibility']['options'];
85
+ }
86
+
87
+ if( isset( $args['params']['visibility']['misc'] ) ){
88
+ $misc_values = $args['params']['visibility']['misc'];
89
+ }
90
+
91
+ if( isset( $args['params']['visibility']['pages'] ) ){
92
+ $pages_values = $args['params']['visibility']['pages'];
93
+ }
94
+
95
+ if( isset( $args['params']['visibility']['types'] ) ){
96
+ $types_values = $args['params']['visibility']['types'];
97
+ }
98
+
99
+ if( isset( $args['params']['visibility']['categories'] ) ){
100
+ $cat_values = $args['params']['visibility']['categories'];
101
+ }
102
+
103
+ if( isset( $args['params']['visibility']['taxonomies'] ) ){
104
+ $tax_values = $args['params']['visibility']['taxonomies'];
105
+ }
106
+
107
+ if( isset( $args['params']['visibility']['tax_terms'] ) ){
108
+ $terms_values = $args['params']['visibility']['tax_terms'];
109
+ }
110
+
111
+ if( isset( $args['params']['visibility']['acf'] ) ){
112
+ $acf_values = $args['params']['visibility']['acf'];
113
+ }
114
+
115
+ if( isset( $args['params']['visibility']['selected'] ) ){
116
+ $selected = $args['params']['visibility']['selected'];
117
+ }
118
+
119
+ if( isset( $args['params']['visibility']['main'] ) ){
120
+ $main = $args['params']['visibility']['main'];
121
+ }
122
+ }
123
+
124
+ ?>
125
+ <div id="extended-widget-opts-tab-<?php echo $args['id'];?>-visibility" class="extended-widget-opts-tabcontent extended-widget-opts-inside-tabcontent extended-widget-opts-tabcontent-visibility">
126
+ <div class="extended-widget-opts-visibility-m-tabs extended-widget-opts-inside-tabs">
127
+ <input type="hidden" id="extended-widget-opts-visibility-m-selectedtab" value="<?php echo $main;?>" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][main]" />
128
+
129
+ <ul class="extended-widget-opts-visibility-m-tabnav-ul">
130
+ <li class="extended-widget-opts-visibility-tab-main">
131
+ <a href="#extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-main" title="<?php _e( 'Home, Blog, Search, etc..', 'widget-options' );?>" ><?php _e( 'WordPress Pages', 'widget-options' );?></a>
132
+ </li>
133
+ <?php if( isset( $widget_options['acf'] ) && 'activate' == $widget_options['acf'] ):?>
134
+ <li class="extended-widget-opts-visibility-tab-main">
135
+ <a href="#extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-acf" title="<?php _e( 'Advanced Custom Fields', 'widget-options' );?>" ><?php _e( 'ACF', 'widget-options' );?></a>
136
+ </li>
137
+ <?php endif;?>
138
+ </ul>
139
+
140
+ <div id="extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-main" class="extended-widget-opts-visibility-tabcontent extended-widget-opts-inner-tabcontent">
141
+ <p><strong><?php _e( 'Hide/Show', 'widget-options' );?></strong>
142
+ <select class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][options]">
143
+ <option value="hide" <?php if( $options_values == 'hide' ){ echo 'selected="selected"'; }?> ><?php _e( 'Hide on checked pages', 'widget-options' );?></option>
144
+ <option value="show" <?php if( $options_values == 'show' ){ echo 'selected="selected"'; }?>><?php _e( 'Show on checked pages', 'widget-options' );?></option>
145
+ </select>
146
+ </p>
147
+
148
+ <div class="extended-widget-opts-visibility-tabs extended-widget-opts-inside-tabs">
149
+ <input type="hidden" id="extended-widget-opts-visibility-selectedtab" value="<?php echo $selected;?>" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][selected]" />
150
+ <!-- start tab nav -->
151
+ <ul class="extended-widget-opts-visibility-tabnav-ul">
152
+ <?php if( isset( $widget_options['settings']['visibility'] ) &&
153
+ isset( $widget_options['settings']['visibility']['misc'] ) &&
154
+ '1' == $widget_options['settings']['visibility']['misc'] ){ ?>
155
+ <li class="extended-widget-opts-visibility-tab-visibility">
156
+ <a href="#extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-misc" title="<?php _e( 'Home, Blog, Search, etc..', 'widget-options' );?>" ><?php _e( 'Misc', 'widget-options' );?></a>
157
+ </li>
158
+ <?php } ?>
159
+
160
+ <?php if( isset( $widget_options['settings']['visibility'] ) &&
161
+ isset( $widget_options['settings']['visibility']['post_type'] ) &&
162
+ '1' == $widget_options['settings']['visibility']['post_type'] ){ ?>
163
+ <li class="extended-widget-opts-visibility-tab-visibility">
164
+ <a href="#extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-types" title="<?php _e( 'Pages & Custom Post Types', 'widget-options' );?>" ><?php _e( 'Post Types', 'widget-options' );?></a>
165
+ </li>
166
+ <?php } ?>
167
+
168
+ <?php if( isset( $widget_options['settings']['visibility'] ) &&
169
+ isset( $widget_options['settings']['visibility']['taxonomies'] ) &&
170
+ '1' == $widget_options['settings']['visibility']['taxonomies'] ){ ?>
171
+ <li class="extended-widget-opts-visibility-tab-visibility">
172
+ <a href="#extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-tax" title="<?php _e( 'Categories, Tags & Taxonomies', 'widget-options' );?>" ><?php _e( 'Taxonomies', 'widget-options' );?></a>
173
+ </li>
174
+ <?php } ?>
175
+ <div class="extended-widget-opts-clearfix"></div>
176
+ </ul><!-- end tab nav -->
177
+ <div class="extended-widget-opts-clearfix"></div>
178
+
179
+ <?php if( isset( $widget_options['settings']['visibility'] ) &&
180
+ isset( $widget_options['settings']['visibility']['misc'] ) &&
181
+ '1' == $widget_options['settings']['visibility']['misc'] ){ ?>
182
+ <!-- start misc tab content -->
183
+ <div id="extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-misc" class="extended-widget-opts-visibility-tabcontent extended-widget-opts-inner-tabcontent">
184
+ <div class="extended-widget-opts-misc">
185
+ <?php foreach ($misc as $key => $value) {
186
+ if( isset( $misc_values[ $key ] ) && $misc_values[ $key ] == '1' ){
187
+ $checked = 'checked="checked"';
188
+ }else{
189
+ $checked = '';
190
+ }
191
+ ?>
192
+ <p>
193
+ <input type="checkbox" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][misc][<?php echo $key;?>]" id="<?php echo $args['id'];?>-opts-misc-<?php echo $key;?>" value="1" <?php echo $checked;?> />
194
+ <label for="<?php echo $args['id'];?>-opts-misc-<?php echo $key;?>"><?php echo $value;?></label>
195
+ </p>
196
+ <?php } ?>
197
+ </div>
198
+ </div><!-- end misc tab content -->
199
+ <?php } ?>
200
+
201
+ <?php if( isset( $widget_options['settings']['visibility'] ) &&
202
+ isset( $widget_options['settings']['visibility']['post_type'] ) &&
203
+ '1' == $widget_options['settings']['visibility']['post_type'] ){ ?>
204
+ <!-- start types tab content -->
205
+ <div id="extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-types" class="extended-widget-opts-visibility-tabcontent extended-widget-opts-inner-tabcontent">
206
+ <div class="extended-widget-opts-inner-lists" style="height: 230px;padding: 5px;overflow:auto;">
207
+ <h4 id="extended-widget-opts-pages"><?php _e( 'Pages', 'widget-options' );?> +/-</h4>
208
+ <div class="extended-widget-opts-pages">
209
+ <?php
210
+ $page_class = new WidgetOpts_Pages_Checkboxes();
211
+ $page_checkboxes = $page_class->walk( $widgetopts_pages, 0, $args );
212
+ if ( $page_checkboxes ) {
213
+ echo '<div class="widgetopts-ul-pages">' . $page_checkboxes . '</div>';
214
+ }
215
+ ?>
216
+ </div>
217
+
218
+ <h4 id="extended-widget-opts-types"><?php _e( 'Custom Post Types', 'widget-options' );?> +/-</h4>
219
+ <div class="extended-widget-opts-types">
220
+ <?php foreach ($types as $ptype => $type) {
221
+ // if ( ! $type->has_archive ) {
222
+ // // don't give the option if there is no archive page
223
+ // continue;
224
+ // }
225
+
226
+ if( isset( $types_values[ $ptype ] ) && $types_values[ $ptype ] == '1' ){
227
+ $checked = 'checked="checked"';
228
+ }else{
229
+ $checked = '';
230
+ }
231
+ ?>
232
+ <p>
233
+ <input type="checkbox" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][types][<?php echo $ptype;?>]" id="<?php echo $args['id'];?>-opts-types-<?php echo $ptype;?>" value="1" <?php echo $checked;?> />
234
+ <label for="<?php echo $args['id'];?>-opts-types-<?php echo $ptype;?>"><?php echo stripslashes( $type->labels->name );?></label>
235
+ </p>
236
+ <?php } ?>
237
+ </div>
238
+ </div>
239
+ </div><!-- end types tab content -->
240
+ <?php } ?>
241
+
242
+ <?php if( isset( $widget_options['settings']['visibility'] ) &&
243
+ isset( $widget_options['settings']['visibility']['taxonomies'] ) &&
244
+ '1' == $widget_options['settings']['visibility']['taxonomies'] ){ ?>
245
+ <!-- start tax tab content -->
246
+ <div id="extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-tax" class="extended-widget-opts-visibility-tabcontent extended-widget-opts-inner-tabcontent">
247
+ <div class="extended-widget-opts-inner-lists" style="height: 230px;padding: 5px;overflow:auto;">
248
+ <h4 id="extended-widget-opts-categories"><?php _e( 'Categories', 'widget-options' );?> +/-</h4>
249
+ <div class="extended-widget-opts-categories">
250
+ <p>
251
+ <input type="checkbox" name="extended_widget_opts-<?php echo $args['id'];?>[extended_widget_opts][visibility][categories][all_categories]" id="<?php echo $args['id'];?>-opts-categories-all" value="1" <?php if( isset( $cat_values['all_categories'] ) ){ echo 'checked="checked"'; };?> />
252
+ <label for="<?php echo $args['id'];?>-opts-categories-all"><?php _e( 'All Categories', 'widget-options' );?></label>
253
+ </p>
254
+ <?php foreach ($categories as $cat) {
255
+ if( isset( $cat_values[ $cat->cat_ID ] ) && $cat_values[ $cat->cat_ID ] == '1' ){
256
+ $checked = 'checked="checked"';
257
+ }else{
258
+ $checked = '';
259
+ }
260
+ ?>
261
+ <p>
262
+ <input type="checkbox" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][categories][<?php echo $cat->cat_ID;?>]" id="<?php echo $args['id'];?>-opts-categories-<?php echo $cat->cat_ID;?>" value="1" <?php echo $checked;?> />
263
+ <label for="<?php echo $args['id'];?>-opts-categories-<?php echo $cat->cat_ID;?>"><?php echo $cat->cat_name;?></label>
264
+ </p>
265
+ <?php } ?>
266
+ </div>
267
+
268
+ <h4 id="extended-widget-opts-taxonomies"><?php _e( 'Taxonomies', 'widget-options' );?> +/-</h4>
269
+ <div class="extended-widget-opts-taxonomies">
270
+ <?php foreach ( $taxonomies as $taxonomy ) {
271
+ if( isset( $tax_values[ $taxonomy->name ] ) && $tax_values[ $taxonomy->name ] == '1' ){
272
+ $checked = 'checked="checked"';
273
+ }else{
274
+ $checked = '';
275
+ }
276
+ ?>
277
+ <p>
278
+ <input type="checkbox" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][taxonomies][<?php echo $taxonomy->name;?>]" id="<?php echo $args['id'];?>-opts-taxonomies-<?php echo $taxonomy->name;?>" value="1" <?php echo $checked;?> />
279
+ <label for="<?php echo $args['id'];?>-opts-taxonomies-<?php echo $taxonomy->name;?>"><?php echo $taxonomy->label;?></label> <?php if( isset( $taxonomy->object_type ) && isset( $taxonomy->object_type[0] ) ){ echo ' <small>- '. $taxonomy->object_type[0] .'</small>'; } ?>
280
+ </p>
281
+ <?php } ?>
282
+ </div>
283
+ </div>
284
+ </div><!-- end tax tab content -->
285
+ <?php } ?>
286
+ </div><!-- end .extended-widget-opts-visibility-tabs -->
287
+ </div><!-- End WordPress Pages tab -->
288
+
289
+ <?php if( isset( $widget_options['acf'] ) && 'activate' == $widget_options['acf'] ):?>
290
+ <div id="extended-widget-opts-visibility-tab-<?php echo $args['id'];?>-acf" class="extended-widget-opts-visibility-tabcontent extended-widget-opts-inner-tabcontent">
291
+ <?php
292
+ $fields = array();
293
+
294
+ if ( function_exists( 'acf_get_field_groups' ) ) {
295
+ $groups = acf_get_field_groups();
296
+ if ( is_array( $groups ) ) {
297
+ foreach ( $groups as $group ) {
298
+ $fields[ $group['ID'] ] = array( 'title' => $group['title'], 'fields' => acf_get_fields( $group ) );
299
+ }
300
+ }
301
+ }else{
302
+ $groups = apply_filters( 'acf/get_field_groups', array() );
303
+ if ( is_array( $groups ) ) {
304
+ foreach ( $groups as $group ) {
305
+ $fields[ $group['id'] ] = array( 'title' => $group['title'], 'fields' => apply_filters( 'acf/field_group/get_fields', array(), $group['id'] ) );
306
+ }
307
+ }
308
+ }
309
+ ?>
310
+ <p><strong><?php _e( 'Hide/Show', 'widget-options' );?></strong>
311
+ <select class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][acf][visibility]">
312
+ <option value="hide" <?php echo ( isset( $acf_values['visibility'] ) && $acf_values['visibility'] == 'hide' ) ? 'selected="selected"' : ''?> ><?php _e( 'Hide when Condition\'s met', 'widget-options' );?></option>
313
+ <option value="show" <?php echo ( isset( $acf_values['visibility'] ) && $acf_values['visibility'] == 'show' ) ? 'selected="selected"' : ''?>><?php _e( 'Show when Condition\'s met', 'widget-options' );?></option>
314
+ </select>
315
+ </p>
316
+
317
+ <p><strong><?php _e( 'Choose ACF Field', 'widget-options' );?></strong>
318
+ <select class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][acf][field]">
319
+ <option value=""><?php _e( 'Select Field', 'widget-options' );?></option>
320
+ <?php
321
+ if( !empty( $fields ) ){
322
+ foreach( $fields as $k => $field ){?>
323
+ <optgroup label="<?php echo $field['title'];?>">
324
+ <?php foreach( $field['fields'] as $key => $f ){ ?>
325
+ <option value="<?php echo $f['key'];?>" <?php echo ( isset( $acf_values['field'] ) && $acf_values['field'] == $f['key'] ) ? 'selected="selected"' : ''?> ><?php echo $f['label'];?></option>
326
+ <?php } ?>
327
+ </optgroup>
328
+ <?php }
329
+ } ?>
330
+ </select>
331
+ </p>
332
+ <p><strong><?php _e( 'Condition', 'widget-options' );?></strong>
333
+ <select class="widefat" name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][acf][condition]">
334
+ <option value=""><?php _e( 'Select Condition', 'widget-options' );?></option>
335
+ <optgroup label="<?php _e( 'Conditional', 'widget-options' );?>">
336
+ <option value="equal" <?php echo ( isset( $acf_values['condition'] ) && $acf_values['condition'] == 'equal' ) ? 'selected="selected"' : ''?> ><?php _e( 'Is Equal to', 'widget-options' );?></option>
337
+ <option value="not_equal" <?php echo ( isset( $acf_values['condition'] ) && $acf_values['condition'] == 'not_equal' ) ? 'selected="selected"' : ''?> ><?php _e( 'Is Not Equal to', 'widget-options' );?></option>
338
+ <option value="contains" <?php echo ( isset( $acf_values['condition'] ) && $acf_values['condition'] == 'contains' ) ? 'selected="selected"' : ''?> ><?php _e( 'Contains', 'widget-options' );?></option>
339
+ <option value="not_contains" <?php echo ( isset( $acf_values['condition'] ) && $acf_values['condition'] == 'not_contains' ) ? 'selected="selected"' : ''?> ><?php _e( 'Does Not Contain', 'widget-options' );?></option>
340
+ </optgroup>
341
+ <optgroup label="<?php _e( 'Value Based', 'widget-options' );?>">
342
+ <option value="empty" <?php echo ( isset( $acf_values['condition'] ) && $acf_values['condition'] == 'empty' ) ? 'selected="selected"' : ''?> ><?php _e( 'Is Empty', 'widget-options' );?></option>
343
+ <option value="not_empty" <?php echo ( isset( $acf_values['condition'] ) && $acf_values['condition'] == 'not_empty' ) ? 'selected="selected"' : ''?> ><?php _e( 'Is Not Empty', 'widget-options' );?></option>
344
+ </optgroup>
345
+ </select>
346
+ </p>
347
+ <p><strong><?php _e( 'Conditional Value', 'widget-options' );?></strong>
348
+ <textarea name="<?php echo $args['namespace'];?>[extended_widget_opts][visibility][acf][value]" id="<?php echo $args['id'];?>-opts-acf-value" class="widefat widgetopts-acf-conditional"><?php echo (isset( $acf_values['value'] )) ? $acf_values['value'] : ''?></textarea>
349
+ </p>
350
+ </div><?php endif; ?>
351
+ </div><!-- end main tab -->
352
+
353
+ </div>
354
+ <?php
355
+ }
356
+ add_action( 'extended_widget_opts_tabcontent', 'widgetopts_tabcontent_visibility'); ?>
includes/widgets/widgets.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Add Widget Options
4
+ *
5
+ * Process Managing of Widget Options.
6
+ *
7
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
8
+ * @since 2.0
9
+ */
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+
14
+
15
+ /**
16
+ * Output widget search filter textfield before widget lists
17
+ *
18
+ * @since 3.3
19
+ */
20
+ if( !function_exists( 'widgetopts_add_search_input' ) ):
21
+ function widgetopts_add_search_input() {
22
+ global $widget_options;
23
+ if( isset( $widget_options['search'] ) && 'activate' == $widget_options['search'] ): ?>
24
+ <div id="widgetopts-widgets-filter">
25
+ <label class="screen-reader-text" for="widgetopts-widgets-search"><?php _e( 'Search Widgets', 'widget-options' ); ?></label>
26
+ <input type="text" id="widgetopts-widgets-search" class="widgetopts-widgets-search" placeholder="<?php esc_attr_e( 'Search widgets&hellip;', 'widget-options' ) ?>" />
27
+ <div class="widgetopts-search-icon" aria-hidden="true"></div>
28
+ <button type="button" class="widgetopts-clear-results"><span class="screen-reader-text"><?php _e( 'Clear Results', 'widget-options' ); ?></span></button>
29
+ <p class="screen-reader-text" id="widgetopts-search-desc"><?php _e( 'The search results will be updated as you type.', 'widget-options' ); ?></p>
30
+ </div>
31
+ <?php
32
+ endif;
33
+ }
34
+ add_action( 'widgets_admin_page', 'widgetopts_add_search_input' );
35
+ endif;
36
+
37
+ /**
38
+ * Add Options on in_widget_form action
39
+ *
40
+ * @since 2.0
41
+ * @return void
42
+ */
43
+
44
+ function widgetopts_in_widget_form( $widget, $return, $instance ){
45
+ global $widget_options, $wp_registered_widget_controls;
46
+ $width = ( isset( $wp_registered_widget_controls[$widget->id]['width'] ) ) ? (int) $wp_registered_widget_controls[ $widget->id]['width' ] : 250;
47
+ $opts = ( isset( $instance[ 'extended_widget_opts-'. $widget->id ] ) ) ? $instance[ 'extended_widget_opts-'. $widget->id ] : array();
48
+ $is_siteorigin = ( isset( $widget_options['siteorigin'] ) ) ? $widget_options['siteorigin'] : '';
49
+
50
+ /** change widget names for SO Pagebuilder support **/
51
+ if( isset( $widget->id ) && 'temp' == $widget->id ){
52
+ $namespace = 'widgets['. $widget->number .']';
53
+ $optsname = 'widgets['. $widget->number .'][extended_widget_opts_name]';
54
+ $opts = ( isset( $instance[ 'extended_widget_opts' ] ) ) ? $instance[ 'extended_widget_opts'] : array();
55
+ $widget->id = $widget->number;
56
+
57
+ //create siteorigin pagebuilder variable
58
+ echo '<input type="hidden" name="'. $namespace .'[siteorigin]" value="1" />';
59
+ }else{
60
+ $namespace = 'extended_widget_opts-'. $widget->id;
61
+ $optsname = 'extended_widget_opts_name';
62
+ }
63
+
64
+ $args = array(
65
+ 'width' => $width,
66
+ 'id' => $widget->id,
67
+ 'params' => $opts,
68
+ 'namespace' => $namespace
69
+ );
70
+ $selected = 0;
71
+ if( isset( $opts['tabselect'] ) ){
72
+ $selected = $opts['tabselect'];
73
+ }
74
+
75
+ ?>
76
+
77
+ <input type="hidden" name="extended_widget_opts_name" value="extended_widget_opts-<?php echo $widget->id;?>">
78
+ <input type="hidden" name="<?php echo $args['namespace'];?>[extended_widget_opts][id_base]" value="<?php echo $widget->id;?>" />
79
+ <div class="extended-widget-opts-form <?php if( $width > 480 ){ echo 'extended-widget-opts-form-large'; }else if( $width <= 480 ){ echo 'extended-widget-opts-form-small'; }?>">
80
+ <div class="extended-widget-opts-tabs">
81
+ <ul class="extended-widget-opts-tabnav-ul">
82
+ <?php do_action( 'extended_widget_opts_tabs', $args );?>
83
+ <div class="extended-widget-opts-clearfix"></div>
84
+ </ul>
85
+
86
+ <?php do_action( 'extended_widget_opts_tabcontent', $args );?>
87
+ <input type="hidden" id="extended-widget-opts-selectedtab" value="<?php echo $selected;?>" name="extended_widget_opts-<?php echo $args['id'];?>[extended_widget_opts][tabselect]" />
88
+ <div class="extended-widget-opts-clearfix"></div>
89
+ </div><!-- end .extended-widget-opts-tabs -->
90
+ </div><!-- end .extended-widget-opts-form -->
91
+
92
+ <?php if( 'activate' == $is_siteorigin ){?>
93
+ <script type="text/javascript">
94
+ jQuery(document).ready(function($){
95
+ if($('.so-content .extended-widget-opts-tabs').length > 0){
96
+ $('.extended-widget-opts-tabs').tabs({ active: 1 });
97
+ $('.extended-widget-opts-visibility-tabs').tabs({ active: 0 });
98
+ $('.extended-widget-opts-settings-tabs').tabs({ active: 0 });
99
+ }
100
+ });
101
+ </script>
102
+ <?php } else{ ?>
103
+ <style type="text/css">
104
+ .so-content.panel-dialog .extended-widget-opts-form{ display: none; }
105
+ </style>
106
+ <?php } ?>
107
+
108
+ <?php
109
+ }
110
+ add_action( 'in_widget_form', 'widgetopts_in_widget_form', 10, 3 );
111
+
112
+ /*
113
+ * Update Options
114
+ */
115
+ function widgetopts_ajax_update_callback( $instance, $new_instance, $this_widget){
116
+ global $widget_options;
117
+
118
+ if( isset($_POST['extended_widget_opts_name']) ||
119
+ ( !isset( $_POST['extended_widget_opts_name'] ) && isset( $new_instance['siteorigin'] ) )
120
+ ){
121
+ //check if from SO pagebuilder
122
+ if( is_array( $new_instance ) && isset( $new_instance['extended_widget_opts'] ) && isset( $new_instance['siteorigin'] ) ){
123
+ $name = 'extended_widget_opts';
124
+ $options = widgetopts_sanitize_array( $new_instance );
125
+ }else{
126
+ $name = strip_tags( $_POST['extended_widget_opts_name'] );
127
+ $options = $_POST[ $name ];
128
+ }
129
+ if( isset( $options['extended_widget_opts'] ) ){
130
+ // update_option( $name , $options['extended_widget_opts'] );
131
+ if( isset( $options['extended_widget_opts']['class']['link'] ) && !empty( $options['extended_widget_opts']['class']['link'] ) ){
132
+ $options['extended_widget_opts']['class']['link'] = widgetopts_addhttp( $options['extended_widget_opts']['class']['link'] );
133
+ }
134
+ $instance[ $name ] = widgetopts_sanitize_array( $options['extended_widget_opts'] );
135
+
136
+ //remove cache
137
+ if( isset( $options['extended_widget_opts']['id_base'] ) && isset( $widget_options['cache'] ) && 'activate' == $widget_options['cache'] ){
138
+ $transient_name = 'widgetopts-cache_'. $options['extended_widget_opts']['id_base'];
139
+ delete_transient( $transient_name );
140
+ }
141
+ }
142
+ }
143
+ return $instance;
144
+ }
145
+ add_filter( 'widget_update_callback', 'widgetopts_ajax_update_callback', 10, 3);
146
+
147
+ ?>
plugin.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Widget Options
4
+ * Plugin URI: https://widget-options.com/
5
+ * Description: Additional Widget options for better widget control. Get <strong><a href="http://widget-options.com/" target="_blank" >Extended Widget Options for WordPress</a></strong> for complete widget controls. Thanks!
6
+ * Version: 3.7.2
7
+ * Author: Phpbits Creative Studio
8
+ * Author URI: https://phpbits.net/
9
+ * Text Domain: widget-options
10
+ * Domain Path: languages
11
+ *
12
+ * @category Widgets
13
+ * @author Jeffrey Carandang
14
+ * @version 3.2
15
+ */
16
+ // Exit if accessed directly.
17
+ if ( ! defined( 'ABSPATH' ) ) exit;
18
+ if ( ! class_exists( 'WP_Widget_Options' ) ) :
19
+
20
+ /**
21
+ * Main WP_Widget_Options Class.
22
+ *
23
+ * @since 3.2
24
+ */
25
+ final class WP_Widget_Options {
26
+ /**
27
+ * @var WP_Widget_Options The one true WP_Widget_Options
28
+ * @since 3.2
29
+ */
30
+ private static $instance;
31
+
32
+ /**
33
+ * Main WP_Widget_Options Instance.
34
+ *
35
+ * Insures that only one instance of WP_Widget_Options exists in memory at any one
36
+ * time. Also prevents needing to define globals all over the place.
37
+ *
38
+ * @since 3.2
39
+ * @static
40
+ * @staticvar array $instance
41
+ * @uses WP_Widget_Options::setup_constants() Setup the constants needed.
42
+ * @uses WP_Widget_Options::includes() Include the required files.
43
+ * @uses WP_Widget_Options::load_textdomain() load the language files.
44
+ * @see WIDGETOPTS()
45
+ * @return object|WP_Widget_Options The one true WP_Widget_Options
46
+ */
47
+ public static function instance() {
48
+ if ( ! isset( self::$instance ) && ! ( self::$instance instanceof WP_Widget_Options ) ) {
49
+ self::$instance = new WP_Widget_Options;
50
+ self::$instance->setup_constants();
51
+
52
+ // add_action( 'plugins_loaded', array( self::$instance, 'load_textdomain' ) );
53
+
54
+ self::$instance->includes();
55
+ // self::$instance->roles = new WIDGETOPTS_Roles();
56
+ }
57
+ return self::$instance;
58
+ }
59
+
60
+ /**
61
+ * Setup plugin constants.
62
+ *
63
+ * @access private
64
+ * @since 4.1
65
+ * @return void
66
+ */
67
+ private function setup_constants() {
68
+
69
+ // Plugin version.
70
+ if ( ! defined( 'WIDGETOPTS_PLUGIN_NAME' ) ) {
71
+ define( 'WIDGETOPTS_PLUGIN_NAME', 'Widget Options' );
72
+ }
73
+
74
+ // Plugin version.
75
+ if ( ! defined( 'WIDGETOPTS_VERSION' ) ) {
76
+ define( 'WIDGETOPTS_VERSION', ' 3.7.2' );
77
+ }
78
+
79
+ // Plugin Folder Path.
80
+ if ( ! defined( 'WIDGETOPTS_PLUGIN_DIR' ) ) {
81
+ define( 'WIDGETOPTS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
82
+ }
83
+
84
+ // Plugin Folder URL.
85
+ if ( ! defined( 'WIDGETOPTS_PLUGIN_URL' ) ) {
86
+ define( 'WIDGETOPTS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
87
+ }
88
+
89
+ // Plugin Root File.
90
+ if ( ! defined( 'WIDGETOPTS_PLUGIN_FILE' ) ) {
91
+ define( 'WIDGETOPTS_PLUGIN_FILE', __FILE__ );
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Include required files.
97
+ *
98
+ * @access private
99
+ * @since 4.1
100
+ * @return void
101
+ */
102
+ private function includes() {
103
+ global $widget_options, $extended_license, $widgetopts_taxonomies, $widgetopts_pages, $widgetopts_types, $widgetopts_categories, $pagenow;
104
+
105
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/register-settings.php';
106
+ $widget_options = widgetopts_get_settings();
107
+
108
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/extras.php';
109
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/scripts.php';
110
+
111
+ //call admin only resources
112
+ if ( is_admin() ) {
113
+
114
+ //other global variables to prevent duplicate and faster calls
115
+ $widgetopts_pages = widgetopts_global_pages();
116
+
117
+ //admin settings
118
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/globals.php';
119
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/welcome.php';
120
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/display-settings.php';
121
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/transient.php';
122
+
123
+ if( in_array( $pagenow, array( 'options-general.php' ) ) ){
124
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/visibility.php';
125
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/devices.php';
126
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/alignment.php';
127
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/title.php';
128
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/classes.php';
129
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/logic.php';
130
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/links.php';
131
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/fixed.php';
132
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/columns.php';
133
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/roles.php';
134
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/dates.php';
135
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/styling.php';
136
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/animation.php';
137
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/taxonomies.php';
138
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/disable_widgets.php';
139
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/permission.php';
140
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/shortcodes.php';
141
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/cache.php';
142
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/siteorigin.php';
143
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/sidebar-upsell_pro.php';
144
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/sidebar-opt_in.php';
145
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/sidebar-more_plugins.php';
146
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/sidebar-support_box.php';
147
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/search.php';
148
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/sliding.php';
149
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/move.php';
150
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/clone.php';
151
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/elementor.php';
152
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/import-export.php';
153
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/widget-area.php';
154
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/urls.php';
155
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/beaver_builder.php';
156
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/acf.php';
157
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/state.php';
158
+ }
159
+
160
+ // if( in_array( $pagenow, array( 'widgets.php' ) ) ){
161
+ //widget callbacks
162
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/widgets/widgets.php';
163
+
164
+ //add visibility tab if activated
165
+ if( $widget_options['visibility'] == 'activate' ){
166
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/widgets/option-tabs/visibility.php';
167
+ }
168
+ //add devices tab if activated
169
+ if( $widget_options['devices'] == 'activate' ){
170
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/widgets/option-tabs/devices.php';
171
+ }
172
+
173
+ //add alignment tab if activated
174
+ if( $widget_options['alignment'] == 'activate' ){
175
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/widgets/option-tabs/alignment.php';
176
+ }
177
+
178
+ //add alignment tab if activated
179
+ if( isset( $widget_options['state'] ) && $widget_options['state'] == 'activate' ){
180
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/widgets/option-tabs/state.php';
181
+ }
182
+
183
+ //add settings tab if activated
184
+ if( 'activate' == $widget_options['hide_title'] ||
185
+ 'activate' == $widget_options['classes'] ||
186
+ 'activate' == $widget_options['logic'] ){
187
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/widgets/option-tabs/settings.php';
188
+ }
189
+
190
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/widgets/option-tabs/upsell.php';
191
+
192
+ if( ( isset( $widget_options['import_export'] ) && 'activate' == $widget_options['import_export'] ) ||
193
+ ( isset( $widget_options['widget_area'] ) && 'activate' == $widget_options['widget_area'] )
194
+ ){
195
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/import-export.php';
196
+ }
197
+ // }
198
+
199
+ //admin notices
200
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/notices.php';
201
+
202
+ } //end is_admin condition
203
+
204
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/widgets/extras.php';
205
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/widgets/display.php';
206
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/ajax-functions.php';
207
+
208
+ //pagebuilders support
209
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/pagebuilders/siteorigin.php';
210
+ if( defined( 'ELEMENTOR_VERSION' ) && isset( $widget_options['elementor'] ) && 'activate' == $widget_options['elementor'] ){
211
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/pagebuilders/elementor/elementor.php';
212
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/pagebuilders/elementor/render.php';
213
+ }
214
+ if( class_exists( 'FLBuilderLoader' ) && isset( $widget_options['beaver'] ) && 'activate' == $widget_options['beaver'] ){
215
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/pagebuilders/beaver/beaver.php';
216
+ }
217
+
218
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/install.php';
219
+ }
220
+
221
+ }
222
+
223
+ endif; // End if class_exists check.
224
+
225
+
226
+ /**
227
+ * The main function for that returns WP_Widget_Options
228
+ *
229
+ * The main function responsible for returning the one true WP_Widget_Options
230
+ * Instance to functions everywhere.
231
+ *
232
+ * Use this function like you would a global variable, except without needing
233
+ * to declare the global.
234
+ *
235
+ * Example: <?php $widgetopts = WP_Widget_Options(); ?>
236
+ *
237
+ * @since 3.2
238
+ * @return object|WP_Widget_Options The one true WP_Widget_Options Instance.
239
+ */
240
+ if( !function_exists( 'WIDGETOPTS' ) ){
241
+ function WIDGETOPTS() {
242
+ return WP_Widget_Options::instance();
243
+ }
244
+ // Get Plugin Running.
245
+ if( function_exists( 'is_multisite' ) && is_multisite() ){
246
+ //loads on plugins_loaded action to avoid issue on multisite
247
+ add_action( 'plugins_loaded', 'WIDGETOPTS', apply_filters( 'widgetopts_priority', 90 ) );
248
+ }else{
249
+ WIDGETOPTS();
250
+ }
251
+ }
252
+ ?>
readme.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # [WordPress Widget Options](https://widget-options.com/) #
2
+
3
+ ![Plugin Version](https://img.shields.io/wordpress/plugin/v/widget-options.svg?maxAge=2592000) ![Total Downloads](https://img.shields.io/wordpress/plugin/dt/widget-options.svg?maxAge=2592000) ![Plugin Rating](https://img.shields.io/wordpress/plugin/r/widget-options.svg?maxAge=2592000) ![WordPress Compatibility](https://img.shields.io/wordpress/v/widget-options.svg?maxAge=2592000) [![License](https://img.shields.io/badge/license-GPL--2.0%2B-red.svg)](https://github.com/phpbits/widget-options/blob/master/LICENSE)
4
+
5
+ ### Welcome to our GitHub Repository
6
+
7
+ Widget Options for WordPress provide extensive options for better widget management. This plugin will give you complete freedom on handling each of your widgets.
8
+
9
+ More information can be found at [widget-options.com](https://widget-options.com/).
10
+
11
+ ## Installation ##
12
+
13
+ For detailed setup instructions, visit the plugin [Installation](https://wordpress.org/plugins/widget-options/installation/) page.
14
+
15
+ ## Bugs ##
16
+ If you find an issue, let us know [here](https://github.com/phpbits/widget-options/issues)!
17
+
18
+ ## Support ##
19
+ This is a developer's portal for Widget Options and should _not_ be used for support. Please visit the [support page](https://phpbits.net/support) if you need to submit a support request.
20
+
21
+ ## Contributions ##
22
+ There are various ways you can contribute:
23
+
24
+ 1. Raise an [Issue](https://github.com/phpbits/widget-options/issues) on GitHub
25
+ 2. Send us a Pull Request with your bug fixes and/or new features
26
+ 3. Translate Widget Options into different languages
27
+ 4. Provide feedback and suggestions on [enhancements](https://github.com/phpbits/widget-options/issues)
readme.txt ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Widget Options ===
2
+ Contributors: phpbits
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FMKC2SLPTULP8
4
+ Tags: widgets, restrict widgets, display widgets, widget logic, hide widgets, hide widget, sidebar, widget content, display widget, widget options, widget option, widget, widget css, CSS, widget classes, widget styling, widget ID, widget custom class, widget visibility, widget ninja, jetpack visibility, siteorigin, siteorigin pagebuilder, pagebuilder by siteorigin
5
+ Requires at least: 4.0
6
+ Tested up to: 4.9
7
+ Stable tag: 3.6.1
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Get Better Control over your Widgets. Easily show or hide WordPress widgets on specified pages & devices and/or assign custom alignment.
12
+
13
+ == Description ==
14
+
15
+ <strong>Control your sidebar widgets more!</strong> Assign different contents on your sidebars, footer and any sidebar widgets.
16
+
17
+ <strong>Widget Options</strong> adds elegant and feature-packed tabbed options below each widget to completely manage and control each widgets visibility and appearance.
18
+
19
+ Built with seamlessly integration with WordPress, Widget Options is the world's most complete widget management plugin solution yet.
20
+
21
+ [vimeo https://vimeo.com/190057410]
22
+
23
+ <h4>Show or hide widgets on specific WordPress pages</h4>
24
+ With Widget Options Plugin, you can easily assign pages visibility and restrict each widgets on different pages, posts, custom post types, categories, tags and custom taxonomies.
25
+
26
+ <h4>Show or hide widgets on mobile devices, desktop and/or tablet screen sizes</h4>
27
+ Display less widgets on your mobile devices for easier website navigation without affecting your desktop and tablet versions. Maximizing this feature you can show different sidebar widget contents for each devices for better user content targeting.
28
+
29
+ <h4>Custom WordPress widget alignments</h4>
30
+ Change your widget alignment to look better on your site. Comes with <strong>center, left, right and justified alignment</strong> options.
31
+
32
+ <h4>Custom Widget ID & Classes</h4>
33
+ Create predefined classes on the plugin's setting page and use them later for each widgets. You can also add custom widget ID and additional classes for styling or javascript purposes.
34
+
35
+ <h4>Display Widget Logic</h4>
36
+ Use <a href="http://codex.wordpress.org/Conditional_Tags">WordPress Conditional tags</a> to manage and restrict your widgets using display widget logic option if you're geeky enough to use PHP conditions and in need of custom restrictions.
37
+
38
+ <h4>Hide Widget Title</h4>
39
+ Easily hide widget title on front-end display while retaining them on the backend dashboard for labelling.
40
+
41
+ <h4>Enable / Disable Options</h4>
42
+ Use only the features you want and disable any other widget options easily using the brand new settings page.
43
+
44
+ <h4>Live Widget Search Filter</h4>
45
+ Increase administrator widget management by enabling live widget search box on your widget dashboard to locate any widgets easier rather than scrolling the page.
46
+
47
+ <h4>Easily Move WordPress Widgets without dragging</h4>
48
+ Increase productivity and widgets management by moving any widgets easily by clicking a link and selecting the sidebar widget area instead of drag and drop! Elegant option specially on smaller screen devices such as mobile.
49
+
50
+ <h4>Import & Export Widgets and Widget Area Backup</h4>
51
+ You can now import and export WordPress widgets easily and create any backup of specific sidebar widget areas. Move widgets to another websites at ease.
52
+
53
+ <h4>View your changes live!</h4>
54
+ This plugin is customizer ready for easier customization. View your changes live before saving it, <strong>not just better control but a time saver plugin!</strong>
55
+
56
+ <h3>Pagebuilder by SiteOrigin Plugin Compatible</h3>
57
+ Extend your SiteOrigin Pagebuilder powered website's widget panels control and management using Widget Options! Restrict devices visibility, change alignments, hide widget panel title, add custom classes and control visibility using display widget logic option! <br /><strong>Pagebuilder by SiteOrigin Plugin + Widget Options = Total Freedom!</strong>
58
+
59
+ <h3>Elementor Pagebuilder Ready!</h3>
60
+ Extend Widget Options visibility restrictions to elementor widgets! You can now have same widget management feature available to your Elementor powered websites.
61
+
62
+ <h3>Beaver Builder Plugin Ready!</h3>
63
+ Now with Beaver Builder plugin integration! You can fully manage each modules on many ways you want it too! Integrated smoothly to upgrade your website building workflow.
64
+
65
+ <h3>Advanced Custom Fields (ACF) Support!</h3>
66
+ Easily show or hide any widgets using your ACF fields and conditions. You can restric widget with the following conditions:
67
+
68
+ * Equal To
69
+ * Not Equal To
70
+ * Contains
71
+ * Does Not Contain
72
+ * Is Empty
73
+ * Is Not Empty
74
+
75
+ ACF integration is also available on Elementor and Beaver Builder integration.
76
+
77
+ <blockquote>
78
+ <p><strong>Upgrade to Extended Widget Options</strong><br />
79
+ For more widgets management and restriction options, upgrade to <a href="http://widget-options.com/pricing/">Extended Widget Options today!</a></p>
80
+ </blockquote>
81
+
82
+ <h4>Premium Features</h4>
83
+
84
+ * Custom WordPress Widget Styling
85
+ * Widget Animations on scroll and page load
86
+ * Sticky / Fixed WordPress Widgets
87
+ * Custom Widget Links
88
+ * Widget Cache
89
+ * Custom Widget Columns Display
90
+ * Restrict Widget Visibility per User Roles
91
+ * Widget Visibility per Days and Date Range
92
+ * Extended Taxonomy and Terms Support
93
+ * Display Sidebars and Widgets using Shortcodes
94
+ * Disable any WordPress Widgets
95
+ * Permission Options
96
+ * Target URLs and Wildcard Restrictions
97
+ * Option for child page to inherit parent widget visibilities
98
+
99
+ Check full <a href="http://widget-options.com/features/">Extended Widget Options features</a>.
100
+
101
+ <h4>Add-ons</h4>
102
+
103
+ In need of <a href="https://widget-options.com/modal-pop-up-and-sliding-widget-options/" target="_blank">WordPress Sliding Panel</a> for your widgets? Check out <a href="https://widget-options.com/modal-pop-up-and-sliding-widget-options/" target="_blank">Sliding Widget Options</a> add-on and transform any of your widgets to modal pop-up, slide in and/or sliding widget panel; and increase your website's user engagement!
104
+
105
+ If you like to contribute, report issue or have suggestions, you can find the development version on <a href="https://github.com/phpbits/widget-options" target="_blank">Github</a>.
106
+
107
+ <strong>More information</strong>
108
+
109
+ * Follow the developer <a href="https://twitter.com/phpbits" target="_blank">@Twitter</a>
110
+ * <a href="https://www.facebook.com/groups/WPwidgets/" target="_blank">Join Facebook Community Group</a>
111
+ * Other <a href="https://phpbits.net/plugins/">WordPress plugins</a>
112
+
113
+ == Installation ==
114
+
115
+ This section describes how to install the plugin and get it working.
116
+
117
+ e.g.
118
+
119
+ 1. Upload the full directory into your wp-content/plugins directory
120
+ 2. Activate the plugin at the plugin administration page
121
+ 3. Go to Settings > Widget Options and add predefined Classes if you need to
122
+ 4. When you drag or open any widgets you'll see the Widget Options below
123
+ 5. I hope you'll love this plugin :)
124
+
125
+ == Frequently Asked Questions ==
126
+
127
+ = How do I begin working with this plugin? =
128
+ After Widget Options plugin activation you'll get welcome message with detailed video instructions to get started. Then go to <strong>Settings > Widget Options</strong> to enable/disable the features you want. Then go to <strong>Appearance > Widgets</strong> and start optimising your widgets!
129
+
130
+ = How do I add set of predefined custom CSS classes for widgets? =
131
+ Easy! Simply go to <strong>Settings > Widget Options</strong> and on <em>Classes & ID</em> module click Configure Settings then you can add your predefined CSS classes for your widgets.
132
+
133
+ = What widgets are supported? =
134
+ All of them! Yes, we haven't come across any single non-working widgets yet.
135
+
136
+ = How's the speed and loading time compare to other plugins? =
137
+ Widget Options is a featured pack fully lightweight plugin. Using Query Monitor plugin you'll find that the plugin doesn't load too much queries and doesn't affect your website's loading time. You can check more information how optimized Widget Options is <a href="https://widget-options.com/new-improved-widget-options-wordpress/">here</a>.
138
+
139
+ == Screenshots ==
140
+
141
+ 1. Widgets Visibility Options
142
+ 2. Device Visibility Options
143
+ 3. Widgets Custom Alignment
144
+ 4. Widget CSS ID & Classes
145
+ 5. Display Widget Logic
146
+ 6. Pagebuilder by SiteOrigin Plugin Widget Options
147
+ 7. Widget Importer & Exporter Feature
148
+ 8. Beaver Builder Integration
149
+ 9. Elementor Pagebuilder Integration
150
+ 10. Advanced Custom Fields ( ACF ) Support
151
+
152
+ == Changelog ==
153
+
154
+ = 3.7.2 =
155
+ * Fix issue with latest ACF version
156
+
157
+ = 3.7.1 =
158
+ * Add fixes for https://wordpress.org/support/topic/php-errors-after-upgrade-to-3-7/
159
+
160
+ = 3.7 =
161
+ * Add <strong>Advanced Custom Fields ( ACF )</strong> support
162
+ * Integrate ACF conditions on Elementor and Beaver Builder integration too
163
+ * Add <strong>User Logged-in State</strong> feature to easily restrict widget on loggedin or loggedout users
164
+ * Add <strong>User Logged-in State</strong> to Elementor integration as well
165
+ * Show rating notice on widget dashboard and Widget Options settings page only
166
+ * Fixes and other improvements
167
+
168
+ = 3.6 =
169
+ * Add <strong>Beaver Builder Plugin Integration</strong>. Go to Settings > Widget Options to enable this brand new feature.
170
+ * Fixes and other improvements
171
+
172
+ = 3.5 =
173
+ * Go to <strong>Settings > Widget Options</strong> to enable the brand new features below. Thanks!
174
+ * Add <strong>Widget Importer & Exporter Feature</strong>
175
+ * Add <strong>Specific Widget Area Backup</strong> Downloader
176
+ * Improve pages list and indent child pages
177
+ * Option to remove all widgets assigned on widget area
178
+ * Fix issues with Elementor and OceanWP integration
179
+ * Add Target URLs and Wildcard Restrictions module upgrade on settings page
180
+ * Improvements for the upcoming Beaver Builder integration
181
+
182
+ = 3.4 =
183
+ * Add <strong>Move WordPress Widgets</strong> Feature
184
+ * Add <strong>Elementor Pagebuilder Support</strong> Beta Feature
185
+ * Add option to disable automatic addition of .widget class
186
+ * Fixes and support for is_active_sidebar
187
+ * Update subscription sidebar and add free e-book download
188
+ * Add module card for <a href="https://widget-options.com/modal-pop-up-and-sliding-widget-options/" target="_blank">WordPress Sliding Panel</a> add-on
189
+ * Add module card for <a href="https://widget-options.com/features/clone-wordpress-widgets/" target="_blank">Clone WordPress Widgets</a> premium feature
190
+ * Improvements for better speed on admin widgets dashboard
191
+
192
+ = 3.3.2 =
193
+ * Use better Global pages items to prevent issues with site with lots of pages
194
+ * Fix Multisite Issue when Network Activated
195
+ * Add 'widget' class to fix issue with Elegant Themes that using 'et_widget' as base class
196
+ * Add support for <a href="https://widget-options.com/modal-pop-up-and-sliding-widget-options/" target="_blank">Sliding Widgets</a> add-on
197
+
198
+ = 3.3.1 =
199
+ * Fix PHP 7.0 Global variables issue
200
+
201
+ = 3.3 =
202
+ * Add Widget Live Search option on widgets.php admin dashboard
203
+
204
+ = 3.2.1 =
205
+ * Fix Categories not updating when new one added
206
+ * Re-add review/rating admin notice from version 3.1
207
+
208
+ = 3.2 =
209
+ * Improve Plugin Loading and Performance
210
+ * Fix issues reported on github
211
+
212
+ = 3.1 =
213
+ * Add Pagebuilder by SiteOrigin Plugin Widgets Compatibility
214
+ * Fixes for https://github.com/phpbits/widget-options/issues/6
215
+ * Performance enhancement
216
+
217
+ = 3.0.2 =
218
+ * Fix reported issue : https://github.com/phpbits/widget-options/issues/7
219
+ * Fix DIVI jQuery UI styling issues
220
+
221
+ = 3.0.1 =
222
+ * Fix reported issue : https://github.com/phpbits/widget-options/issues/4
223
+
224
+ = 3.0 =
225
+ * Improve settings page and add modular options inspired by iThemes Security Plugin
226
+ * Add user selection for features
227
+ * Add Hide Widget Title option
228
+ * Revamp saving options
229
+ * other minor improvements
230
+
231
+ = 2.0 =
232
+ * Add Widget Display Logic Options
233
+ * Improve Tab UI for better navigation
234
+ * other minor improvements
235
+
236
+ = 1.3 =
237
+ * Apply Category Widgets Visibility Selection to associated posts
238
+ * Update pro tabs with additional features added on Extended Widget Options 2.0
239
+
240
+ = 1.2 =
241
+ * Add Widget CSS ID and Classes tab options. <a href="https://phpbits.net/widget-options-improved-control-adding-id-classes-options">Learn more about this update</a>
242
+ * Add Blog Page Visibility for Widgets as per @cfabrice & @fljdave request
243
+
244
+ = 1.1.1 =
245
+ * Reduce Transient to 5 minutes
246
+
247
+ = 1.1 =
248
+ * Set Transient for queries to reduce loading time
249
+
250
+ = 1.0 =
251
+ * Initial Plugin release
252
+
253
+ == Upgrade Notice ==
254
+
255
+ = 1.0 =
256
+
257
+ * Initial Plugin release
258
+
259
+ == Contact and Credits ==
260
+
261
+ Widget Options for WordPress is maintained and developed by <a href="https://phpbits.net/">Phpbits Creative Studio</a>.
screenshot-1.png ADDED
Binary file
screenshot-10.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file
screenshot-5.png ADDED
Binary file
screenshot-6.png ADDED
Binary file
screenshot-7.png ADDED
Binary file
screenshot-8.png ADDED
Binary file
screenshot-9.png ADDED
Binary file