Carousel Slider - Version 1.8.0

Version Description

Download this release

Release Info

Developer sayful
Plugin Icon Carousel Slider
Version 1.8.0
Comparing to
See all releases

Code changes from version 1.7.2 to 1.8.0

Files changed (123) hide show
  1. LICENSE +674 -0
  2. assets/css/admin.css +1 -2
  3. assets/css/admin.css.map +0 -7
  4. assets/css/style.css +1 -224
  5. assets/img/icon-images.svg +0 -55
  6. assets/img/logo.svg +121 -0
  7. assets/img/svg-icons.svg +18 -0
  8. assets/js/admin.js +592 -218
  9. assets/js/admin.min.js +1 -0
  10. assets/js/admin/accordion.js +15 -0
  11. assets/js/admin/hero-banner.js +295 -0
  12. assets/{sass → js}/admin/index.php +0 -0
  13. assets/js/admin/media-gallery.js +131 -0
  14. assets/js/admin/media-url.js +40 -0
  15. assets/js/admin/modal.js +16 -0
  16. assets/js/admin/slide-type.js +144 -0
  17. assets/js/admin/vendors.js +69 -0
  18. assets/js/jquery.livequery.js +0 -8
  19. assets/js/owl.carousel.min.js +0 -7
  20. assets/{sass → js/public}/index.php +0 -0
  21. assets/js/public/script.js +69 -0
  22. assets/{sass/public → js/vendors}/index.php +0 -0
  23. assets/js/{jquery.magnific-popup.min.js → vendors/jquery.magnific-popup.min.js} +0 -0
  24. assets/js/vendors/jquery.tipTip.min.js +1 -0
  25. assets/js/vendors/owl.carousel.min.js +7 -0
  26. assets/js/{select2.min.js → vendors/select2.min.js} +0 -0
  27. assets/js/vendors/wp-color-picker-alpha.min.js +12 -0
  28. assets/sass/admin/_meta-box.scss +0 -169
  29. assets/sass/public/_post-carousel.scss +0 -120
  30. assets/{sass → scss}/admin.scss +5 -0
  31. assets/{sass → scss}/admin/_datepicker.scss +0 -0
  32. assets/scss/admin/_meta-box.scss +239 -0
  33. assets/scss/admin/_modal.scss +108 -0
  34. assets/{sass → scss}/admin/_model.scss +0 -0
  35. assets/{sass → scss}/admin/_select2.scss +0 -0
  36. assets/scss/admin/_tab.scss +79 -0
  37. assets/{sass → scss}/admin/_toggle.scss +1 -3
  38. assets/scss/admin/_tooltip.scss +133 -0
  39. assets/{sass → scss}/admin/_widget.scss +0 -0
  40. {languages → assets/scss/admin}/index.php +0 -0
  41. assets/scss/index.php +2 -0
  42. assets/{sass → scss}/public/_animate.scss +0 -0
  43. assets/{sass → scss}/public/_autoheight.scss +0 -0
  44. assets/scss/public/_button.scss +39 -0
  45. assets/scss/public/_content-carousel.scss +46 -0
  46. assets/{sass → scss}/public/_core.scss +0 -3
  47. assets/scss/public/_image-carousel.scss +34 -0
  48. assets/{sass → scss}/public/_lazyload.scss +0 -0
  49. assets/{sass → scss}/public/_magnific-popup.scss +0 -0
  50. assets/scss/public/_post-carousel.scss +120 -0
  51. assets/scss/public/_post-carousel2.scss +63 -0
  52. assets/{sass → scss}/public/_product-carousel.scss +0 -0
  53. assets/{sass → scss}/public/_product_modal.scss +0 -0
  54. assets/{sass → scss}/public/_theme.scss +84 -50
  55. assets/{sass → scss}/public/_variables.scss +0 -0
  56. assets/{sass → scss}/public/_video.scss +0 -0
  57. assets/scss/public/index.php +2 -0
  58. assets/{sass → scss}/style.scss +3 -0
  59. assets/scss/utilities/_mixins.scss +74 -0
  60. assets/scss/utilities/_variables.scss +145 -0
  61. carousel-slider.php +71 -248
  62. includes/class-carousel-slider-activation.php +0 -53
  63. includes/class-carousel-slider-activator.php +75 -0
  64. includes/class-carousel-slider-admin.php +405 -376
  65. includes/class-carousel-slider-content-carousel.php +199 -0
  66. includes/class-carousel-slider-credit.php +52 -0
  67. includes/class-carousel-slider-documentation.php +34 -25
  68. includes/class-carousel-slider-form.php +337 -230
  69. includes/class-carousel-slider-i18n.php +55 -0
  70. includes/class-carousel-slider-meta-box.php +393 -0
  71. includes/class-carousel-slider-number-to-word.php +253 -0
  72. includes/class-carousel-slider-product.php +490 -56
  73. includes/class-carousel-slider-script.php +265 -0
  74. includes/class-carousel-slider-structured-data.php +276 -154
  75. includes/class-carousel-slider-vc-element.php +76 -60
  76. includes/functions-carousel-slider.php +560 -0
  77. languages/carousel-slider.pot +0 -318
  78. readme.txt +52 -7
  79. screenshot-1.jpg +0 -0
  80. screenshot-2.jpg +0 -0
  81. screenshot-3.jpg +0 -0
  82. screenshot-4.jpg +0 -0
  83. screenshot-5.jpg +0 -0
  84. screenshot-6.jpg +0 -0
  85. screenshot-7.jpg +0 -0
  86. shortcodes/class-carousel-slider-deprecated-shortcode.php +182 -111
  87. shortcodes/class-carousel-slider-shortcode.php +277 -259
  88. templates/admin/autoplay.php +32 -32
  89. templates/admin/documentation.php +124 -0
  90. templates/admin/general.php +36 -42
  91. templates/admin/hero-banner-slider.php +270 -0
  92. templates/admin/images-media.php +14 -13
  93. templates/admin/images-settings.php +39 -38
  94. templates/admin/images-url.php +90 -85
  95. templates/admin/navigation.php +32 -32
  96. templates/admin/parts/hero-banner/tab-background.php +64 -0
  97. templates/admin/parts/hero-banner/tab-content.php +28 -0
  98. templates/admin/parts/hero-banner/tab-link-button-one.php +118 -0
  99. templates/admin/parts/hero-banner/tab-link-button-two.php +119 -0
  100. templates/admin/parts/hero-banner/tab-link.php +51 -0
  101. templates/admin/parts/hero-banner/tab-style.php +117 -0
  102. templates/admin/parts/index.php +2 -0
  103. templates/admin/post-carousel.php +84 -83
  104. templates/admin/product-carousel.php +128 -126
  105. templates/admin/responsive.php +46 -46
  106. templates/admin/types.php +28 -25
  107. templates/admin/video-carousel.php +28 -23
  108. templates/carousel.php +0 -55
  109. templates/documentation.php +0 -119
  110. templates/images-carousel-url.php +0 -77
  111. templates/images-carousel.php +0 -104
  112. templates/post-carousel.php +0 -172
  113. templates/product-carousel.php +0 -246
  114. templates/public/hero-banner-slider.php +193 -0
  115. templates/public/images-carousel-url.php +65 -0
  116. templates/public/images-carousel.php +89 -0
  117. templates/public/index.php +2 -0
  118. templates/public/post-carousel.php +107 -0
  119. templates/public/product-carousel-2.php +52 -0
  120. templates/public/product-carousel.php +121 -0
  121. templates/public/video-carousel.php +26 -0
  122. templates/video-carousel.php +0 -38
  123. widgets/widget-carousel_slider.php +62 -56
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 CHANGED
@@ -1,2 +1 @@
1
- div[id*="_carousel_slider"] .widget-top{background:#ddffff !important;border:1px solid #2196f3 !important}div[id*="_carousel_slider"] .widget-top:hover{background:#ffdddd !important;border:1px solid #f44336 !important}.shapla-toggle{margin:0 0 1em !important}.shapla-toggle-title{display:block;padding:15px 10px;outline:0;cursor:pointer;position:relative}.shapla-toggle-title:after{position:absolute;right:15px;font-size:18px;font:400 20px/1 dashicons;margin-left:-1px;padding-right:3px;vertical-align:top;content:"\f132"}.shapla-toggle-title.ui-state-active:after{content:"\f460"}.shapla-toggle-content{padding:20px;background-color:#f1f1f1}.shapla-toggle--normal .shapla-toggle-title{background:#9e9e9e;color:white;font-weight:600}.shapla-toggle--stroke .shapla-toggle-title{border:1px solid #363f48;font-weight:600}.shapla-toggle--stroke .shapla-toggle-title:after{color:#363f48}.shapla-toggle--stroke .shapla-toggle-content{padding:20px;background-color:#ffffff;border:1px solid #363f48;border-top:none}.overflowHidden{overflow:hidden}.overflowVisible{overflow:visible}.sp-input-group{margin-bottom:10px}.sp-input-group:after{content:"";display:table;clear:both}.sp-input-label label{font-weight:600;margin-right:30px}.sp-input-label,.sp-input-field{float:left;width:100%}.sp-input-desc{color:#999;font-size:0.9em;line-height:1.3em;margin:10px 30px 10px 0}.sp-input-text{width:100%;padding:8px 8px 8px 16px;height:35px !important}.sp-input-text option{padding:8px 4px}@media only screen and (min-width: 600px){.sp-input-label{width:40%}.sp-input-field{width:60%}}@media only screen and (min-width: 783px){.sp-input-label{width:30%}.sp-input-field{width:70%}.sp-input-text{width:25em}}@media only screen and (min-width: 851px){.sp-input-label,.sp-input-field{width:100%}}@media only screen and (min-width: 1200px){.sp-input-label{width:40%}.sp-input-field{width:60%}}@media only screen and (min-width: 1600px){.sp-input-label{width:30%}.sp-input-field{width:70%}}.carousel_slider_images:before,.carousel_slider_images:after{display:table;content:""}.carousel_slider_images:after{clear:both}.carousel_slider_gallery_btn{border:1px solid #616161;color:#616161;background-color:#f1f1f1;padding:5px 15px;text-decoration:none}.carousel_slider_gallery_btn:hover{background-color:#ffffff;color:#616161}.carousel_slider_gallery_list{margin:15px 0 0 0;padding:0;list-style:none;box-sizing:border-box}.carousel_slider_gallery_list:before,.carousel_slider_gallery_list:after{display:table;content:""}.carousel_slider_gallery_list:after{clear:both}.carousel_slider_gallery_list li{float:left;margin:0;padding:0}.carousel_slider_gallery_list li>img{margin-right:10px;margin-bottom:10px;display:block;box-shadow:0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)}#field-_post_date_after,#field-_post_date_before,#field-_post_categories,#field-_post_tags,#field-_post_in{display:none}#field-_product_query,#field-_product_categories,#field-_product_tags,#field-_product_in{display:none}.ui-datepicker{background-color:#ffffff;border:1px solid #cccccc;box-shadow:0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);padding:8px;display:none}.ui-datepicker-header{background-color:#f1f1f1}.ui-datepicker-prev,.ui-datepicker-next{color:#000;padding:6px;cursor:pointer}.ui-datepicker-prev:hover,.ui-datepicker-next:hover{color:#000}.ui-datepicker-prev{float:left}.ui-datepicker-next{float:right}.ui-datepicker-calendar td>a{border:1px solid #ddd;display:block;padding:6px;text-decoration:none;color:#000;background-color:#f1f1f1}.ui-datepicker-calendar td.ui-datepicker-today>a{color:#000;background-color:#ffeb3b}.ui-datepicker-calendar td.ui-datepicker-current-day>a{color:#fff;background-color:#f44336}.sp-wp-editor-container{max-width:560px}.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:0;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:0}.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:0;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:0;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:0;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:0;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:0;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:white;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:white}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}.carousel_slider-modal{display:none;position:fixed;z-index:10000;left:0;top:0;width:100%;height:100%;overflow:hidden;background-color:#000;background-color:rgba(0,0,0,0.8)}.carousel_slider-modal-content{position:relative;background-color:#fefefe;margin:50px auto 18px;padding:0;border:1px solid #23282d;min-height:300px;width:412px;box-shadow:0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)}.carousel_slider-modal-header{background-color:#23282d;color:white;font-weight:bold;padding:10px 16px}.carousel_slider-modal-body{overflow-x:hidden;overflow-y:scroll;padding:2px 16px}.carousel_slider-modal-footer{background-color:#23282d;color:white;font-weight:bold;padding:10px 16px}.carousel_slider-modal-footer img{display:none;height:14px;vertical-align:middle;width:14px}.carousel_slider-form{margin-left:-15px;margin-right:-15px}.carousel_slider-fields{background-color:#f1f1f1;margin:15px;padding:15px 25px 15px 15px;position:relative;display:inline-block;float:left}.carousel_slider-fields label.setting{display:block;margin-bottom:5px}.carousel_slider-fields label.setting .name{display:inline-block;vertical-align:top;width:75px}.carousel_slider-fields label.setting input,.carousel_slider-fields label.setting textarea{width:250px}.carousel_slider-fields .actions{position:absolute;right:0;top:0}.carousel_slider-fields .actions>span{background:#fff none repeat scroll 0 0;display:block;float:none;cursor:pointer}.carousel_slider-fields .actions>span .dashicons-plus-alt:hover{color:green}.carousel_slider-fields .actions>span .dashicons-trash:hover{color:red}.carousel_slider-close{color:#f1f1f1;float:right;font-size:28px;font-weight:bold}.carousel_slider-close:hover,.carousel_slider-close:focus{color:#fff;text-decoration:none;cursor:pointer}.carousel_slider_url_images_list{margin:15px 0 0;padding:0;list-style:none}.carousel_slider_url_images_list li{float:left;display:inline-block;margin:0 5px 5px 0}@media only screen and (min-width: 820px){.carousel_slider-modal-content{width:810px}}@media only screen and (min-width: 1230px){.carousel_slider-modal-content{width:1220px}}
2
- /*# sourceMappingURL=admin.css.map */
1
+ div[id*="_carousel_slider"] .widget-top{background:#ddffff !important;border:1px solid #2196f3 !important}div[id*="_carousel_slider"] .widget-top:hover{background:#ffdddd !important;border:1px solid #f44336 !important}.shapla-toggle{margin:1em 0 !important}.shapla-toggle-title{display:block;padding:15px 10px;outline:0;cursor:pointer;position:relative}.shapla-toggle-title:after{position:absolute;right:15px;font:400 20px/1 dashicons;margin-left:-1px;padding-right:3px;vertical-align:top;content:"\f132"}.shapla-toggle-title.ui-state-active:after{content:"\f460"}.shapla-toggle-content{padding:20px;background-color:#f1f1f1}.shapla-toggle--normal .shapla-toggle-title{background:#9e9e9e;color:white;font-weight:600}.shapla-toggle--stroke .shapla-toggle-title{border:1px solid #363f48;font-weight:600}.shapla-toggle--stroke .shapla-toggle-title:after{color:#363f48}.shapla-toggle--stroke .shapla-toggle-content{padding:20px;background-color:#ffffff;border:1px solid #363f48;border-top:none}.overflowHidden{overflow:hidden}.overflowVisible{overflow:visible}.sp-input-group{margin-bottom:10px}.sp-input-group:after{content:"";display:table;clear:both}.sp-input-label label{font-weight:600;margin-right:30px}.sp-input-label,.sp-input-field{float:left;width:100%}.sp-input-desc{color:#999;font-size:0.9em;line-height:1.3em;margin:10px 30px 10px 0}.sp-input-text{width:100%;padding:8px 8px 8px 16px;height:35px !important}.sp-input-text option{padding:8px 4px}.spacing-text{width:62px}@media only screen and (min-width: 600px){.sp-input-label{width:40%}.sp-input-field{width:60%}}@media only screen and (min-width: 783px){.sp-input-label{width:30%}.sp-input-field{width:70%}.sp-input-text{width:25em}}@media only screen and (min-width: 851px){.sp-input-label,.sp-input-field{width:100%}}@media only screen and (min-width: 1200px){.sp-input-label{width:40%}.sp-input-field{width:60%}}@media only screen and (min-width: 1600px){.sp-input-label{width:30%}.sp-input-field{width:70%}}.carousel_slider_images:before,.carousel_slider_images:after{display:table;content:""}.carousel_slider_images:after{clear:both}.carousel_slider_gallery_btn{border:1px solid #616161;color:#616161;background-color:#f1f1f1;padding:5px 15px;text-decoration:none}.carousel_slider_gallery_btn:hover{background-color:#ffffff;color:#616161}.carousel_slider_gallery_list{margin:15px 0 0 0;padding:0;list-style:none;box-sizing:border-box}.carousel_slider_gallery_list:before,.carousel_slider_gallery_list:after{display:table;content:""}.carousel_slider_gallery_list:after{clear:both}.carousel_slider_gallery_list li{float:left;margin:0;padding:0}.carousel_slider_gallery_list li>img{margin-right:10px;margin-bottom:10px;display:block;box-shadow:0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)}#field-_post_date_after,#field-_post_date_before,#field-_post_categories,#field-_post_tags,#field-_post_in{display:none}#field-_product_query,#field-_product_categories,#field-_product_tags,#field-_product_in{display:none}#carousel-slider-navigation-settings p,#carousel-slider-responsive-settings p,#carousel-slider-autoplay-settings p{overflow:hidden}#carousel-slider-navigation-settings input.small-text,#carousel-slider-navigation-settings select.small-text,#carousel-slider-responsive-settings input.small-text,#carousel-slider-responsive-settings select.small-text,#carousel-slider-autoplay-settings input.small-text,#carousel-slider-autoplay-settings select.small-text{float:right}.tab-background .slide_bg_wrapper{display:flex;padding:1rem 0}.tab-background .slide_thumb{position:relative;float:left;margin-right:1rem;border:solid 1px #e0e0e0;padding:5px}.tab-background .slide_thumb>div{width:320px;height:180px;background-color:#f1f1f1;background-repeat:no-repeat;background-position:top left;background-size:100% auto}.tab-background .slide_thumb>span{display:inline-block;position:absolute;top:0;right:0;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:14px;padding:3px 3px;background-color:rgba(0,0,0,0.5);color:#ffffff;cursor:pointer;transition:all .3s ease-in-out}.tab-background .slide_thumb>span.hidden{display:none !important}.tab-background .slide_image_settings_line{display:block;margin:0.5rem 0}.tab-background .slide_image_settings_line>span{width:150px;display:inline-block}.ui-datepicker{background-color:#ffffff;border:1px solid #cccccc;box-shadow:0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);padding:8px;display:none}.ui-datepicker-header{background-color:#f1f1f1}.ui-datepicker-prev,.ui-datepicker-next{color:#000;padding:6px;cursor:pointer}.ui-datepicker-prev:hover,.ui-datepicker-next:hover{color:#000}.ui-datepicker-prev{float:left}.ui-datepicker-next{float:right}.ui-datepicker-calendar td>a{border:1px solid #ddd;display:block;padding:6px;text-decoration:none;color:#000;background-color:#f1f1f1}.ui-datepicker-calendar td.ui-datepicker-today>a{color:#000;background-color:#ffeb3b}.ui-datepicker-calendar td.ui-datepicker-current-day>a{color:#fff;background-color:#f44336}.sp-wp-editor-container{max-width:560px}.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:0;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:0}.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:0;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:0;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:0;outline:0;background-image:-webkit-linear-gradient(top, white 50%, #eee 100%);background-image:-o-linear-gradient(top, white 50%, #eee 100%);background-image:linear-gradient(to bottom, white 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, white 0%, #eee 50%);background-image:-o-linear-gradient(top, white 0%, #eee 50%);background-image:linear-gradient(to bottom, white 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%, white 100%);background-image:-o-linear-gradient(top, #eee 50%, white 100%);background-image:linear-gradient(to bottom, #eee 50%, white 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:0;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:0;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:white;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:white}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}.carousel_slider-modal{display:none;position:fixed;z-index:10000;left:0;top:0;width:100%;height:100%;overflow:hidden;background-color:#000;background-color:rgba(0,0,0,0.8)}.carousel_slider-modal-content{position:relative;background-color:#fefefe;margin:50px auto 18px;padding:0;border:1px solid #23282d;min-height:300px;width:412px;box-shadow:0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)}.carousel_slider-modal-header{background-color:#23282d;color:white;font-weight:bold;padding:10px 16px}.carousel_slider-modal-body{overflow-x:hidden;overflow-y:scroll;padding:2px 16px}.carousel_slider-modal-footer{background-color:#23282d;color:white;font-weight:bold;padding:10px 16px}.carousel_slider-modal-footer img{display:none;height:14px;vertical-align:middle;width:14px}.carousel_slider-form{margin-left:-15px;margin-right:-15px}.carousel_slider-fields{background-color:#f1f1f1;margin:15px;padding:15px 25px 15px 15px;position:relative;display:inline-block;float:left}.carousel_slider-fields label.setting{display:block;margin-bottom:5px}.carousel_slider-fields label.setting .name{display:inline-block;vertical-align:top;width:75px}.carousel_slider-fields label.setting input,.carousel_slider-fields label.setting textarea{width:250px}.carousel_slider-fields .actions{position:absolute;right:0;top:0}.carousel_slider-fields .actions>span{background:#fff none repeat scroll 0 0;display:block;float:none;cursor:pointer}.carousel_slider-fields .actions>span .dashicons-plus-alt:hover{color:green}.carousel_slider-fields .actions>span .dashicons-trash:hover{color:red}.carousel_slider-close{color:#f1f1f1;float:right;font-size:28px;font-weight:bold}.carousel_slider-close:hover,.carousel_slider-close:focus{color:#fff;text-decoration:none;cursor:pointer}.carousel_slider_url_images_list{margin:15px 0 0;padding:0;list-style:none}.carousel_slider_url_images_list li{float:left;display:inline-block;margin:0 5px 5px 0}@media only screen and (min-width: 820px){.carousel_slider-modal-content{width:810px}}@media only screen and (min-width: 1230px){.carousel_slider-modal-content{width:1220px}}.modal{bottom:0;left:0;position:absolute;right:0;top:0;align-items:center;display:none;justify-content:center;overflow:hidden;position:fixed;z-index:10000}.admin-bar .modal{top:32px}.modal .delete-icon{user-select:none;-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0.2);border:none;border-radius:32px;cursor:pointer;display:inline-block;flex-grow:0;flex-shrink:0;font-size:1rem;outline:none;position:relative;vertical-align:top;height:20px;width:20px}.modal .delete-icon:before,.modal .delete-icon:after{background-color:#fff;content:"";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.modal .delete-icon:before{height:2px;width:50%}.modal .delete-icon:after{height:50%;width:2px}.modal .delete-icon:hover,.modal .delete-icon:focus{background-color:rgba(0,0,0,0.3)}.modal .delete-icon:active{background-color:rgba(0,0,0,0.4)}.modal .delete-icon.is-small{height:16px;width:16px}.modal .delete-icon.is-medium{height:24px;width:24px}.modal .delete-icon.is-large{height:32px;width:32px}.modal.is-active{display:flex}.modal-background{bottom:0;left:0;position:absolute;right:0;top:0;background-color:rgba(0,0,0,0.86)}.modal-content,.modal-card{margin:0 20px;max-height:calc(100vh - 160px);overflow:auto;position:relative;width:100%}@media screen and (min-width: 769px), print{.modal-content,.modal-card{margin:0 auto;max-height:calc(100vh - 40px);width:640px}}.modal-close{user-select:none;-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0.2);border:none;border-radius:32px;cursor:pointer;display:inline-block;flex-grow:0;flex-shrink:0;font-size:1rem;outline:none;position:relative;vertical-align:top;height:20px;width:20px;background:none;height:40px;position:fixed;right:20px;top:20px;width:40px}.modal-close:before,.modal-close:after{background-color:#fff;content:"";display:block;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) rotate(45deg);transform-origin:center center}.modal-close:before{height:2px;width:50%}.modal-close:after{height:50%;width:2px}.modal-close:hover,.modal-close:focus{background-color:rgba(0,0,0,0.3)}.modal-close:active{background-color:rgba(0,0,0,0.4)}.modal-close.is-small{height:16px;width:16px}.modal-close.is-medium{height:24px;width:24px}.modal-close.is-large{height:32px;width:32px}.modal-card{display:flex;flex-direction:column;max-height:calc(100vh - 40px);overflow:hidden}.modal-card-head,.modal-card-foot{align-items:center;background-color:#f5f5f5;display:flex;flex-shrink:0;justify-content:flex-start;margin:0;padding:20px;position:relative}.modal-card-head{border-bottom:1px solid #f5f5f5;border-top-left-radius:5px;border-top-right-radius:5px}.modal-card-title{color:#212121;flex-grow:1;flex-shrink:0;font-size:1.5rem;line-height:1;margin:0;padding:0}.modal-card-foot{border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-top:1px solid #f5f5f5}.modal-card-foot .button:not(:last-child){margin-right:10px}.modal-card-body{-webkit-overflow-scrolling:touch;background-color:#fff;flex-grow:1;flex-shrink:1;overflow:auto;margin:0;padding:20px}.cs-tooltip{display:inline-block;width:1.5em;height:1.5em;float:right}.cs-tooltip:after{font-family:Dashicons;speak:none;font-weight:400;text-transform:none;-webkit-font-smoothing:antialiased;width:100%;height:100%;text-align:center;content:"\f223";cursor:help}#tiptip_holder{display:none;position:absolute;top:0;left:0;z-index:99999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_left{padding-right:5px}#tiptip_content{font-size:11px;color:#fff;text-shadow:0 0 2px #000;padding:4px 8px;border:1px solid rgba(255,255,255,0.25);background-color:#191919;background-color:rgba(25,25,25,0.92);background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;box-shadow:0 0 3px #555;-webkit-box-shadow:0 0 3px #555;-moz-box-shadow:0 0 3px #555}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_holder.tip_top #tiptip_arrow{border-top-color:#fff;border-top-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_bottom #tiptip_arrow{border-bottom-color:#fff;border-bottom-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_right #tiptip_arrow{border-right-color:#fff;border-right-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_left #tiptip_arrow{border-left-color:#fff;border-left-color:rgba(255,255,255,0.35)}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#191919;border-top-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#191919;border-bottom-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#191919;border-right-color:rgba(25,25,25,0.92)}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#191919;border-left-color:rgba(25,25,25,0.92)}@media screen and (-webkit-min-device-pixel-ratio: 0){#tiptip_content{padding:4px 8px 5px 8px;background-color:rgba(45,45,45,0.88)}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:rgba(45,45,45,0.88)}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:rgba(20,20,20,0.92)}}.shapla-nav{list-style:none !important;margin:0;padding:0}.shapla-nav:before,.shapla-nav:after{display:table;content:' '}.shapla-nav:after{clear:both}.shapla-nav li{float:left;position:relative;margin:0 1px -1px 0 !important;z-index:1;outline:0}.shapla-nav a{text-decoration:none;display:block;padding:15px 10px;line-height:1;outline:0}.shapla-tab{margin:0 0 2em 0;padding:21px 20px 20px 20px}.shapla-tab p:first-of-type{margin-top:0}.shapla-tab p:last-of-type{margin-bottom:0}.shapla-tabs--normal .shapla-nav a{background:#323232;color:#fff}.shapla-tabs--normal .shapla-nav .ui-tabs-active a{background:#f1f1f1;color:#323232;outline:0}.shapla-tabs--normal .shapla-tab{background:#f1f1f1}.shapla-tabs--stroke .shapla-nav li{margin:0 -1px 0 0 !important}.shapla-tabs--stroke .shapla-nav a{border:1px solid #323232;color:#323232}.shapla-tabs--stroke .shapla-nav .ui-tabs-active a{border-bottom-color:white}.shapla-tabs--stroke .shapla-tab{border:1px solid #323232;margin-top:-1px}
 
assets/css/admin.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": "AACA,uCAAuC,CACnC,UAAU,CAAE,kBAAkB,CAC9B,MAAM,CAAE,4BAA4B,CAEpC,6CAAQ,CACP,UAAU,CAAE,kBAAkB,CAC9B,MAAM,CAAE,4BAA4B,CCNzC,cAAe,CACd,MAAM,CAAE,kBAAkB,CAE1B,oBAAQ,CACP,OAAO,CAAE,KAAK,CACd,OAAO,CAAE,SAAS,CAClB,OAAO,CAAE,CAAC,CACV,MAAM,CAAE,OAAO,CACf,QAAQ,CAAE,QAAQ,CAElB,0BAAQ,CACP,QAAQ,CAAE,QAAQ,CAClB,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,IAAI,CACf,IAAI,CAAE,oBAAoB,CAC1B,WAAW,CAAE,IAAI,CACjB,aAAa,CAAE,GAAG,CAClB,cAAc,CAAE,GAAG,CACnB,OAAO,CAAE,OAAO,CAGjB,0CAAwB,CACvB,OAAO,CAAE,OAAO,CAIlB,sBAAU,CACT,OAAO,CAAE,IAAI,CACb,gBAAgB,CAAE,OAAO,CAG1B,2CAA+B,CAC9B,UAAU,CAAE,OAAO,CACnB,KAAK,CAAE,KAAK,CACZ,WAAW,CAAE,GAAG,CAGjB,2CAA+B,CAC9B,MAAM,CAAE,iBAAiB,CACzB,WAAW,CAAE,GAAG,CAEhB,iDAAQ,CACP,KAAK,CAAE,OAAO,CAGhB,6CAAiC,CAChC,OAAO,CAAE,IAAI,CACb,gBAAgB,CAAE,OAAO,CACzB,MAAM,CAAE,iBAAiB,CACzB,UAAU,CAAE,IAAI,CCjDlB,eAAgB,CACf,QAAQ,CAAE,MAAM,CAEjB,gBAAiB,CAChB,QAAQ,CAAE,OAAO,CAIjB,eAAc,CACb,aAAa,CAAE,IAAI,CACnB,qBAAQ,CACP,OAAO,CAAC,EAAE,CACV,OAAO,CAAC,KAAK,CACb,KAAK,CAAC,IAAI,CAKX,qBAAM,CACL,WAAW,CAAE,GAAG,CAChB,YAAY,CAAE,IAAI,CAKpB,+BACc,CACb,KAAK,CAAE,IAAI,CACX,KAAK,CAAE,IAAI,CAEZ,cAAa,CACZ,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,KAAK,CAChB,WAAW,CAAE,KAAK,CAClB,MAAM,CAAE,gBAAgB,CAEzB,cAAa,CACZ,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,gBAAgB,CACzB,MAAM,CAAE,eAAe,CAEvB,qBAAO,CACN,OAAO,CAAE,OAAO,CAMnB,yCAA0C,CAExC,eAAc,CACb,KAAK,CAAE,GAAG,CAEX,eAAc,CACb,KAAK,CAAE,GAAG,EAKb,yCAA0C,CACzC,eAAgB,CACf,KAAK,CAAE,GAAG,CAEX,eAAgB,CACf,KAAK,CAAE,GAAG,CAEX,cAAe,CACd,KAAK,CAAE,IAAI,EAIb,yCAA0C,CACzC,+BACgB,CACf,KAAK,CAAE,IAAI,EAIb,0CAA2C,CAC1C,eAAgB,CACf,KAAK,CAAE,GAAG,CAEX,eAAgB,CACf,KAAK,CAAE,GAAG,EAIZ,0CAA2C,CAC1C,eAAgB,CACf,KAAK,CAAE,GAAG,CAEX,eAAgB,CACf,KAAK,CAAE,GAAG,EAOV,4DACQ,CACP,OAAO,CAAE,KAAK,CACd,OAAO,CAAE,EAAE,CAEZ,6BAAQ,CACP,KAAK,CAAE,IAAI,CAGb,4BAAc,CACb,MAAM,CAAE,iBAAiB,CACzB,KAAK,CAAE,OAAO,CACd,gBAAgB,CAAE,OAAO,CACzB,OAAO,CAAE,QAAQ,CACjB,eAAe,CAAE,IAAI,CAErB,kCAAQ,CACP,gBAAgB,CAAE,OAAO,CACzB,KAAK,CAAE,OAAO,CAGhB,6BAAe,CACd,MAAM,CAAE,UAAU,CAClB,OAAO,CAAE,CAAC,CACV,UAAU,CAAE,IAAI,CAChB,UAAU,CAAE,UAAU,CACtB,wEACQ,CACP,OAAO,CAAE,KAAK,CACd,OAAO,CAAE,EAAE,CAEZ,mCAAQ,CACP,KAAK,CAAE,IAAI,CAGZ,gCAAG,CACF,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CAEV,oCAAM,CACL,YAAY,CAAE,IAAI,CAClB,aAAa,CAAE,IAAI,CACnB,OAAO,CAAE,KAAK,CACd,UAAU,CAAC,0DAA0D,CASzE,0GAIgB,CACf,OAAO,CAAE,IAAI,CAKd,wFAGmB,CAClB,OAAO,CAAE,IAAI,CCtKd,cAAc,CACb,gBAAgB,CAAE,OAAO,CACzB,MAAM,CAAC,iBAAiB,CACxB,UAAU,CAAC,0DAA0D,CACrE,OAAO,CAAE,GAAG,CACZ,OAAO,CAAE,IAAI,CAEd,qBAAsB,CACrB,gBAAgB,CAAE,OAAO,CAE1B,uCACoB,CACnB,KAAK,CAAC,IAAI,CACV,OAAO,CAAE,GAAG,CACZ,MAAM,CAAE,OAAO,CAEhB,mDAC0B,CACzB,KAAK,CAAC,IAAI,CAEX,mBAAoB,CACnB,KAAK,CAAE,IAAI,CAEZ,mBAAoB,CACnB,KAAK,CAAE,KAAK,CAEb,4BAA+B,CAC9B,MAAM,CAAE,cAAc,CACtB,OAAO,CAAE,KAAK,CACd,OAAO,CAAE,GAAG,CACZ,eAAe,CAAE,IAAI,CACrB,KAAK,CAAC,IAAI,CACV,gBAAgB,CAAC,OAAO,CAEzB,gDAAmD,CAClD,KAAK,CAAC,IAAI,CACV,gBAAgB,CAAC,OAAO,CAEzB,sDAAyD,CACxD,KAAK,CAAC,IAAI,CACV,gBAAgB,CAAC,OAAO,CAEzB,uBAAwB,CACvB,SAAS,CAAE,KAAK,CC5CjB,kBAAmB,CACjB,UAAU,CAAE,UAAU,CACtB,OAAO,CAAE,YAAY,CACrB,MAAM,CAAE,CAAC,CACT,QAAQ,CAAE,QAAQ,CAClB,cAAc,CAAE,MAAM,CACtB,6CAA8C,CAC5C,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,OAAO,CACf,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,IAAI,CACZ,WAAW,CAAE,IAAI,CACjB,mBAAmB,CAAE,IAAI,CACzB,0EAA2E,CACzE,OAAO,CAAE,KAAK,CACd,YAAY,CAAE,GAAG,CACjB,aAAa,CAAE,IAAI,CACnB,QAAQ,CAAE,MAAM,CAChB,aAAa,CAAE,QAAQ,CACvB,WAAW,CAAE,MAAM,CACrB,uEAAwE,CACtE,QAAQ,CAAE,QAAQ,CACtB,qFAAsF,CACpF,aAAa,CAAE,GAAG,CAClB,YAAY,CAAE,IAAI,CACpB,+CAAgD,CAC9C,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,OAAO,CACf,OAAO,CAAE,KAAK,CACd,UAAU,CAAE,IAAI,CAChB,WAAW,CAAE,IAAI,CACjB,mBAAmB,CAAE,IAAI,CACzB,4EAA6E,CAC3E,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,MAAM,CAChB,YAAY,CAAE,GAAG,CACjB,aAAa,CAAE,QAAQ,CACvB,WAAW,CAAE,MAAM,CACvB,0CAA2C,CACzC,KAAK,CAAE,IAAI,CACX,iEAAkE,CAChE,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,IAAI,CACZ,SAAS,CAAE,IAAI,CACf,UAAU,CAAE,GAAG,CACf,OAAO,CAAE,CAAC,CACV,+FAAgG,CAC9F,kBAAkB,CAAE,IAAI,CAEhC,iBAAkB,CAChB,gBAAgB,CAAE,KAAK,CACvB,MAAM,CAAE,cAAc,CACtB,aAAa,CAAE,CAAC,CAChB,UAAU,CAAE,UAAU,CACtB,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CAClB,IAAI,CAAE,SAAS,CACf,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,IAAI,CAEf,gBAAiB,CACf,OAAO,CAAE,KAAK,CAEhB,yBAA0B,CACxB,UAAU,CAAE,IAAI,CAChB,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CAEZ,wBAAyB,CACvB,OAAO,CAAE,GAAG,CACZ,WAAW,CAAE,IAAI,CACjB,mBAAmB,CAAE,IAAI,CACzB,uCAAwC,CACtC,MAAM,CAAE,OAAO,CAEnB,0CAA2C,CACzC,IAAI,CAAE,CAAC,CAET,iDAAkD,CAChD,aAAa,CAAE,IAAI,CACnB,yBAAyB,CAAE,CAAC,CAC5B,0BAA0B,CAAE,CAAC,CAE/B,iDAAkD,CAChD,UAAU,CAAE,IAAI,CAChB,sBAAsB,CAAE,CAAC,CACzB,uBAAuB,CAAE,CAAC,CAE5B,yBAA0B,CACxB,OAAO,CAAE,KAAK,CACd,OAAO,CAAE,GAAG,CACZ,gDAAiD,CAC/C,OAAO,CAAE,GAAG,CACZ,KAAK,CAAE,IAAI,CACX,UAAU,CAAE,UAAU,CACtB,8EAA+E,CAC7E,kBAAkB,CAAE,IAAI,CAC5B,8CAA+C,CAC7C,OAAO,CAAE,IAAI,CAEjB,mBAAoB,CAClB,MAAM,CAAE,CAAC,CACT,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CACV,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,KAAK,CACf,IAAI,CAAE,CAAC,CACP,GAAG,CAAE,CAAC,CACN,UAAU,CAAE,IAAI,CAChB,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,CAAC,CACV,OAAO,CAAE,EAAE,CACX,gBAAgB,CAAE,IAAI,CACtB,MAAM,CAAE,gBAAgB,CAE1B,0BAA2B,CACzB,MAAM,CAAE,YAAY,CACpB,IAAI,CAAE,wBAAwB,CAC9B,MAAM,CAAE,cAAc,CACtB,MAAM,CAAE,eAAe,CACvB,QAAQ,CAAE,iBAAiB,CAC3B,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,mBAAmB,CAC7B,KAAK,CAAE,cAAc,CAEvB,sDAAuD,CACrD,gBAAgB,CAAE,IAAI,CACtB,MAAM,CAAE,cAAc,CACtB,aAAa,CAAE,CAAC,CAChB,mFAAoF,CAClF,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,IAAI,CACnB,gFAAiF,CAC/E,MAAM,CAAE,OAAO,CACf,KAAK,CAAE,KAAK,CACZ,WAAW,CAAE,IAAI,CACnB,sFAAuF,CACrF,KAAK,CAAE,IAAI,CACb,gFAAiF,CAC/E,MAAM,CAAE,IAAI,CACZ,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,GAAG,CACR,KAAK,CAAE,GAAG,CACV,KAAK,CAAE,IAAI,CACX,kFAAmF,CACjF,YAAY,CAAE,wCAAwC,CACtD,YAAY,CAAE,KAAK,CACnB,YAAY,CAAE,aAAa,CAC3B,MAAM,CAAE,CAAC,CACT,IAAI,CAAE,GAAG,CACT,WAAW,CAAE,IAAI,CACjB,UAAU,CAAE,IAAI,CAChB,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,GAAG,CACR,KAAK,CAAE,CAAC,CAEd,2FAA4F,CAC1F,KAAK,CAAE,IAAI,CAEb,2FAA4F,CAC1F,IAAI,CAAE,GAAG,CACT,KAAK,CAAE,IAAI,CAEb,kFAAmF,CACjF,gBAAgB,CAAE,IAAI,CACtB,MAAM,CAAE,OAAO,CACf,4GAA6G,CAC3G,OAAO,CAAE,IAAI,CAEjB,0GAA2G,CACzG,YAAY,CAAE,wCAAwC,CACtD,YAAY,CAAE,aAAa,CAE7B,wDAAyD,CACvD,gBAAgB,CAAE,KAAK,CACvB,MAAM,CAAE,cAAc,CACtB,aAAa,CAAE,CAAC,CAChB,MAAM,CAAE,IAAI,CACZ,qFAAsF,CACpF,UAAU,CAAE,UAAU,CACtB,UAAU,CAAE,IAAI,CAChB,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,KAAK,CACd,KAAK,CAAE,IAAI,CACX,wFAAyF,CACvF,UAAU,CAAE,IAAI,CACpB,wFAAyF,CACvF,KAAK,CAAE,IAAI,CACX,UAAU,CAAE,GAAG,CACf,KAAK,CAAE,IAAI,CACb,kFAAmF,CACjF,MAAM,CAAE,OAAO,CACf,KAAK,CAAE,KAAK,CACZ,WAAW,CAAE,IAAI,CACjB,UAAU,CAAE,GAAG,CACf,YAAY,CAAE,IAAI,CACpB,mFAAoF,CAClF,gBAAgB,CAAE,OAAO,CACzB,MAAM,CAAE,cAAc,CACtB,aAAa,CAAE,CAAC,CAChB,MAAM,CAAE,OAAO,CACf,KAAK,CAAE,IAAI,CACX,YAAY,CAAE,GAAG,CACjB,UAAU,CAAE,GAAG,CACf,OAAO,CAAE,KAAK,CAChB,2FAA4F,CAC1F,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,OAAO,CACf,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,GAAG,CACjB,iGAAkG,CAChG,KAAK,CAAE,IAAI,CAEjB,8RAAiS,CAC/R,KAAK,CAAE,KAAK,CAEd,8FAA+F,CAC7F,WAAW,CAAE,GAAG,CAChB,YAAY,CAAE,IAAI,CAEpB,sGAAuG,CACrG,WAAW,CAAE,GAAG,CAChB,YAAY,CAAE,IAAI,CAEpB,iFAAkF,CAChF,MAAM,CAAE,eAAe,CACvB,OAAO,CAAE,CAAC,CAEZ,oFAAqF,CACnF,gBAAgB,CAAE,IAAI,CACtB,MAAM,CAAE,OAAO,CAEjB,0FAA2F,CACzF,OAAO,CAAE,IAAI,CAEf,iNAAmN,CACjN,sBAAsB,CAAE,CAAC,CACzB,uBAAuB,CAAE,CAAC,CAE5B,iNAAmN,CACjN,yBAAyB,CAAE,CAAC,CAC5B,0BAA0B,CAAE,CAAC,CAE/B,4EAA6E,CAC3E,MAAM,CAAE,cAAc,CAExB,0EAA2E,CACzE,UAAU,CAAE,WAAW,CACvB,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,CAAC,CACV,UAAU,CAAE,IAAI,CAChB,kBAAkB,CAAE,SAAS,CAE/B,sEAAyE,CACvE,UAAU,CAAE,KAAK,CACjB,UAAU,CAAE,IAAI,CAElB,gEAAiE,CAC/D,OAAO,CAAE,CAAC,CAEZ,wEAAyE,CACvE,KAAK,CAAE,IAAI,CAEb,wEAAyE,CACvE,gBAAgB,CAAE,IAAI,CAExB,6EAA8E,CAC5E,YAAY,CAAE,GAAG,CACjB,qGAAsG,CACpG,YAAY,CAAE,CAAC,CACjB,sGAAuG,CACrG,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,GAAG,CACjB,+HAAgI,CAC9H,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,GAAG,CACjB,wJAAyJ,CACvJ,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,GAAG,CACjB,iLAAkL,CAChL,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,GAAG,CACjB,0MAA2M,CACzM,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,GAAG,CAE7B,gFAAiF,CAC/E,gBAAgB,CAAE,OAAO,CACzB,KAAK,CAAE,KAAK,CAEd,mDAAoD,CAClD,MAAM,CAAE,OAAO,CACf,OAAO,CAAE,KAAK,CACd,OAAO,CAAE,GAAG,CAEd,sDAAuD,CACrD,gBAAgB,CAAE,OAAO,CACzB,MAAM,CAAE,cAAc,CACtB,aAAa,CAAE,CAAC,CAChB,OAAO,CAAE,CAAC,CACV,gBAAgB,CAAE,iDAAqD,CACvE,gBAAgB,CAAE,4CAAgD,CAClE,gBAAgB,CAAE,+CAAmD,CACrE,iBAAiB,CAAE,QAAQ,CAC3B,MAAM,CAAE,8GAA8G,CACtH,4DAA6D,CAC3D,MAAM,CAAE,iBAAiB,CAC3B,mFAAoF,CAClF,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,IAAI,CACnB,gFAAiF,CAC/E,MAAM,CAAE,OAAO,CACf,KAAK,CAAE,KAAK,CACZ,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,IAAI,CACpB,sFAAuF,CACrF,KAAK,CAAE,IAAI,CACb,gFAAiF,CAC/E,gBAAgB,CAAE,IAAI,CACtB,MAAM,CAAE,IAAI,CACZ,WAAW,CAAE,cAAc,CAC3B,uBAAuB,CAAE,GAAG,CAC5B,0BAA0B,CAAE,GAAG,CAC/B,MAAM,CAAE,IAAI,CACZ,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,GAAG,CACR,KAAK,CAAE,GAAG,CACV,KAAK,CAAE,IAAI,CACX,gBAAgB,CAAE,iDAAuD,CACzE,gBAAgB,CAAE,4CAAkD,CACpE,gBAAgB,CAAE,+CAAqD,CACvE,iBAAiB,CAAE,QAAQ,CAC3B,MAAM,CAAE,8GAA8G,CACtH,kFAAmF,CACjF,YAAY,CAAE,wCAAwC,CACtD,YAAY,CAAE,KAAK,CACnB,YAAY,CAAE,aAAa,CAC3B,MAAM,CAAE,CAAC,CACT,IAAI,CAAE,GAAG,CACT,WAAW,CAAE,IAAI,CACjB,UAAU,CAAE,IAAI,CAChB,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,GAAG,CACR,KAAK,CAAE,CAAC,CAEd,2FAA4F,CAC1F,KAAK,CAAE,IAAI,CAEb,2FAA4F,CAC1F,MAAM,CAAE,IAAI,CACZ,YAAY,CAAE,cAAc,CAC5B,aAAa,CAAE,CAAC,CAChB,sBAAsB,CAAE,GAAG,CAC3B,yBAAyB,CAAE,GAAG,CAC9B,IAAI,CAAE,GAAG,CACT,KAAK,CAAE,IAAI,CAEb,8EAA+E,CAC7E,MAAM,CAAE,iBAAiB,CACzB,wGAAyG,CACvG,UAAU,CAAE,WAAW,CACvB,MAAM,CAAE,IAAI,CACZ,0GAA2G,CACzG,YAAY,CAAE,wCAAwC,CACtD,YAAY,CAAE,aAAa,CAEjC,uGAAwG,CACtG,UAAU,CAAE,IAAI,CAChB,sBAAsB,CAAE,CAAC,CACzB,uBAAuB,CAAE,CAAC,CAC1B,gBAAgB,CAAE,+CAAmD,CACrE,gBAAgB,CAAE,0CAA8C,CAChE,gBAAgB,CAAE,6CAAiD,CACnE,iBAAiB,CAAE,QAAQ,CAC3B,MAAM,CAAE,8GAA8G,CAExH,uGAAwG,CACtG,aAAa,CAAE,IAAI,CACnB,yBAAyB,CAAE,CAAC,CAC5B,0BAA0B,CAAE,CAAC,CAC7B,gBAAgB,CAAE,iDAAqD,CACvE,gBAAgB,CAAE,4CAAgD,CAClE,gBAAgB,CAAE,+CAAmD,CACrE,iBAAiB,CAAE,QAAQ,CAC3B,MAAM,CAAE,8GAA8G,CAExH,wDAAyD,CACvD,gBAAgB,CAAE,KAAK,CACvB,MAAM,CAAE,cAAc,CACtB,aAAa,CAAE,CAAC,CAChB,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,CAAC,CACV,8DAA+D,CAC7D,MAAM,CAAE,iBAAiB,CAC3B,qFAAsF,CACpF,UAAU,CAAE,IAAI,CAChB,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,KAAK,CAChB,kFAAmF,CACjF,OAAO,CAAE,IAAI,CACf,mFAAoF,CAClF,gBAAgB,CAAE,OAAO,CACzB,MAAM,CAAE,cAAc,CACtB,aAAa,CAAE,CAAC,CAChB,MAAM,CAAE,OAAO,CACf,KAAK,CAAE,IAAI,CACX,YAAY,CAAE,GAAG,CACjB,UAAU,CAAE,GAAG,CACf,OAAO,CAAE,KAAK,CAChB,2FAA4F,CAC1F,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,OAAO,CACf,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,GAAG,CACjB,iGAAkG,CAChG,KAAK,CAAE,IAAI,CAEjB,8FAA+F,CAC7F,KAAK,CAAE,KAAK,CAEd,8FAA+F,CAC7F,WAAW,CAAE,GAAG,CAChB,YAAY,CAAE,IAAI,CAEpB,sGAAuG,CACrG,WAAW,CAAE,GAAG,CAChB,YAAY,CAAE,IAAI,CAEpB,gFAAiF,CAC/E,MAAM,CAAE,iBAAiB,CAE3B,yGAA0G,CACxG,UAAU,CAAE,IAAI,CAChB,sBAAsB,CAAE,CAAC,CACzB,uBAAuB,CAAE,CAAC,CAE5B,yGAA0G,CACxG,aAAa,CAAE,IAAI,CACnB,yBAAyB,CAAE,CAAC,CAC5B,0BAA0B,CAAE,CAAC,CAE/B,4EAA6E,CAC3E,MAAM,CAAE,cAAc,CACtB,OAAO,CAAE,CAAC,CAEZ,0EAA2E,CACzE,OAAO,CAAE,CAAC,CACV,UAAU,CAAE,IAAI,CAElB,6CAA8C,CAC5C,gBAAgB,CAAE,KAAK,CACvB,MAAM,CAAE,qBAAqB,CAE/B,oDAAqD,CACnD,aAAa,CAAE,IAAI,CAErB,oDAAqD,CACnD,UAAU,CAAE,IAAI,CAElB,sEAAyE,CACvE,UAAU,CAAE,KAAK,CACjB,UAAU,CAAE,IAAI,CAElB,gEAAiE,CAC/D,OAAO,CAAE,CAAC,CAEZ,wEAAyE,CACvE,KAAK,CAAE,IAAI,CAEb,gFAAiF,CAC/E,gBAAgB,CAAE,OAAO,CACzB,KAAK,CAAE,KAAK,CAEd,mDAAoD,CAClD,MAAM,CAAE,OAAO,CACf,OAAO,CAAE,KAAK,CACd,OAAO,CAAE,GAAG,CAEd,qEAAsE,CACpE,YAAY,CAAE,OAAO,CCletB,sBAAO,CACN,OAAO,CAAE,IAAI,CACV,QAAQ,CAAE,KAAK,CACf,OAAO,CAAE,KAAK,CACd,IAAI,CAAE,CAAC,CACP,GAAG,CAAE,CAAC,CACN,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,QAAQ,CAAE,MAAM,CAChB,gBAAgB,CAAE,IAAU,CAC5B,gBAAgB,CAAE,eAAe,CAEjC,8BAAS,CACR,QAAQ,CAAE,QAAQ,CAClB,gBAAgB,CAAE,OAAO,CACzB,MAAM,CAAE,cAAc,CACtB,OAAO,CAAE,CAAC,CACV,MAAM,CAAE,iBAAiB,CACzB,UAAU,CAAE,KAAK,CACjB,KAAK,CAAE,KAAK,CAEZ,UAAU,CAAE,yDAAyD,CAGzE,6BAAS,CACR,gBAAgB,CAAE,OAAO,CACzB,KAAK,CAAE,KAAK,CACZ,WAAW,CAAE,IAAI,CACjB,OAAO,CAAE,SAAS,CAEnB,2BAAO,CAEN,UAAU,CAAE,MAAM,CAClB,UAAU,CAAE,MAAM,CAClB,OAAO,CAAE,QAAQ,CAGlB,6BAAS,CACR,gBAAgB,CAAE,OAAO,CACzB,KAAK,CAAE,KAAK,CACZ,WAAW,CAAE,IAAI,CACjB,OAAO,CAAE,SAAS,CAElB,iCAAI,CACH,OAAO,CAAE,IAAI,CACb,MAAM,CAAE,IAAI,CACZ,cAAc,CAAE,MAAM,CACtB,KAAK,CAAE,IAAI,CAKd,qBAAO,CACN,WAAW,CAAE,KAAK,CAClB,YAAY,CAAE,KAAK,CAIpB,uBAAS,CACR,gBAAgB,CAAE,OAAO,CACzB,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,mBAAmB,CAC5B,QAAQ,CAAE,QAAQ,CAClB,OAAO,CAAE,YAAY,CACrB,KAAK,CAAE,IAAI,CAEX,qCAAc,CACb,OAAO,CAAE,KAAK,CACd,aAAa,CAAE,GAAG,CAElB,2CAAM,CACL,OAAO,CAAE,YAAY,CACrB,cAAc,CAAE,GAAG,CACnB,KAAK,CAAE,IAAI,CAEZ,0FAAgB,CACf,KAAK,CAAE,KAAK,CAGd,gCAAS,CACR,QAAQ,CAAE,QAAQ,CAClB,KAAK,CAAE,CAAC,CACR,GAAG,CAAE,CAAC,CAEN,qCAAO,CACN,UAAU,CAAE,2BAA2B,CACvC,OAAO,CAAE,KAAK,CACd,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,OAAO,CAEf,+DAA0B,CACzB,KAAK,CAAE,KAAK,CAGb,4DAAuB,CACtB,KAAK,CAAE,GAAG,CAMd,sBAAQ,CACP,KAAK,CAAE,OAAO,CACX,KAAK,CAAE,KAAK,CACZ,SAAS,CAAE,IAAI,CACf,WAAW,CAAE,IAAI,CAEjB,yDACQ,CACP,KAAK,CAAE,IAAI,CACX,eAAe,CAAE,IAAI,CACrB,MAAM,CAAE,OAAO,CAKrB,gCAAiC,CAChC,MAAM,CAAE,QAAQ,CAChB,OAAO,CAAE,CAAC,CACV,UAAU,CAAE,IAAI,CAEhB,mCAAG,CACF,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,YAAY,CACrB,MAAM,CAAE,WAAW,CAIrB,yCAA0C,CACzC,8BAA+B,CAC9B,KAAK,CAAE,KAAK,EAId,0CAA2C,CAC1C,8BAA+B,CAC9B,KAAK,CAAE,MAAM",
4
- "sources": ["../sass/admin/_widget.scss","../sass/admin/_toggle.scss","../sass/admin/_meta-box.scss","../sass/admin/_datepicker.scss","../sass/admin/_select2.scss","../sass/admin/_model.scss"],
5
- "names": [],
6
- "file": "admin.css"
7
- }
 
 
 
 
 
 
 
assets/css/style.css CHANGED
@@ -1,224 +1 @@
1
- .carousel-slider { display: none; width: 100%; -webkit-tap-highlight-color: transparent; position: relative; z-index: 1; }
2
- .carousel-slider .owl-stage { position: relative; -ms-touch-action: pan-Y; }
3
- .carousel-slider .owl-stage:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; }
4
- .carousel-slider .owl-stage-outer { position: relative; overflow: hidden; -webkit-transform: translate3d(0px, 0px, 0px); }
5
- .carousel-slider .owl-item { position: relative; min-height: 1px; float: left; -webkit-backface-visibility: hidden; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
6
- .carousel-slider .owl-item img { display: block; width: 100%; -webkit-transform-style: preserve-3d; }
7
- .carousel-slider .owl-nav.disabled, .carousel-slider .owl-dots.disabled { display: none; }
8
- .carousel-slider .owl-nav .owl-prev, .carousel-slider .owl-nav .owl-next, .carousel-slider .owl-dot { cursor: pointer; cursor: hand; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
9
- .carousel-slider.owl-loaded { display: block; }
10
- .carousel-slider.owl-loading { opacity: 0; display: block; }
11
- .carousel-slider.owl-hidden { opacity: 0; }
12
- .carousel-slider.owl-refresh .owl-item { visibility: hidden; }
13
- .carousel-slider.owl-drag .owl-item { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
14
- .carousel-slider.owl-grab { cursor: move; cursor: grab; }
15
- .carousel-slider.owl-rtl { direction: rtl; }
16
- .carousel-slider.owl-rtl .owl-item { float: right; }
17
-
18
- .no-js .carousel-slider { display: block; }
19
-
20
- .carousel-slider .animated { animation-duration: 1000ms; animation-fill-mode: both; }
21
- .carousel-slider .owl-animated-in { z-index: 0; }
22
- .carousel-slider .owl-animated-out { z-index: 1; }
23
- .carousel-slider .fadeOut { animation-name: fadeOut; }
24
-
25
- @keyframes fadeOut { 0% { opacity: 1; }
26
- 100% { opacity: 0; } }
27
- .owl-height { transition: height 500ms ease-in-out; }
28
-
29
- .carousel-slider .owl-item img.owl-lazy { background: url("../img/ajax-loader.gif") no-repeat center; min-width: 32px; min-height: 32px; }
30
-
31
- .carousel-slider .owl-video-wrapper { position: relative; height: 100%; background: #000; }
32
- .carousel-slider .owl-video-play-icon { position: absolute; height: 80px; width: 80px; left: 50%; top: 50%; margin-left: -40px; margin-top: -40px; background: url("../img/play.svg") no-repeat; cursor: pointer; z-index: 1; -webkit-backface-visibility: hidden; transition: transform 100ms ease; }
33
- .carousel-slider .owl-video-play-icon:hover { transform: scale(1.3, 1.3); }
34
- .carousel-slider .owl-video-playing .owl-video-tn, .carousel-slider .owl-video-playing .owl-video-play-icon { display: none; }
35
- .carousel-slider .owl-video-tn { opacity: 0; height: 100%; background-position: center center; background-repeat: no-repeat; background-size: contain; transition: opacity 400ms ease; }
36
- .carousel-slider .owl-video-frame { position: relative; z-index: 1; height: 100%; width: 100%; }
37
-
38
- .carousel-slider { position: relative; }
39
- .carousel-slider .owl-nav [class*='owl-'] { height: 48px; width: 20px; display: inline-block; position: absolute; top: 50%; transform: translateY(-50%); opacity: 0; margin: 0; padding: 0; transition: all .3s ease-in-out; }
40
- .carousel-slider .owl-nav [class*='owl-']:first-child { left: -25px; }
41
- .carousel-slider .owl-nav [class*='owl-']:last-child { right: -25px; }
42
- .carousel-slider .owl-nav .disabled { opacity: 0.5; cursor: default; }
43
- .carousel-slider .owl-dots { text-align: center; -webkit-tap-highlight-color: transparent; margin-top: 10px; }
44
- .carousel-slider .owl-dots .owl-dot { display: inline-block; zoom: 1; *display: inline; }
45
- .carousel-slider .owl-dots .owl-dot span { width: 10px; height: 10px; margin: 4px 8px; background-color: #9e9e9e; display: block; -webkit-backface-visibility: visible; transition: opacity 200ms ease; }
46
- .carousel-slider .owl-dots .owl-dot.active span, .carousel-slider .owl-dots .owl-dot:hover span { background-color: #4caf50; }
47
- .carousel-slider .carousel-slider__item { position: relative; }
48
- .carousel-slider .carousel-slider__item img { display: block; margin-left: auto; margin-right: auto; max-width: 100%; height: auto; }
49
- .carousel-slider .carousel-slider__caption { position: relative; }
50
- .carousel-slider .carousel-slider__caption .title { overflow: hidden; text-overflow: ellipsis; color: #474747; font-size: 16px; font-weight: 500; margin: 10px 0 0; text-align: center; }
51
- .carousel-slider .carousel-slider__caption .caption { font-size: 14px; font-weight: 300; margin: 10px 0 0; text-align: center; }
52
- .carousel-slider:hover .owl-nav [class*='owl-'] { opacity: 1; }
53
- @media (max-width: 767px) { .carousel-slider:hover .owl-nav { display: none; }
54
- .carousel-slider .owl-nav { display: none; } }
55
-
56
- .carousel-slider__post { border: 1px solid #f1f1f1; float: left; height: 450px; width: 100%; position: relative; display: block; overflow: hidden; }
57
- .carousel-slider__post-content { bottom: 0; position: absolute; top: 0; transition: all 0.2s ease 0s; width: 100%; display: block; }
58
- .carousel-slider__post-image { border-bottom: 1px solid #f1f1f1; display: block; height: 207px; line-height: 0; margin: 0 auto; overflow: hidden; text-align: center; width: 100%; background-color: #f1f1f1; background-size: cover; background-position: center center; }
59
- .carousel-slider__post-title { display: block; margin: 10px 15px 0; max-height: 70px; }
60
- .carousel-slider__post-title h1 { color: #4a4a4a; font: bold 18px/1.4em Arial,sans-serif; margin-bottom: 0; margin-top: 0; }
61
- .carousel-slider__post-excerpt { color: #7d7d7d; font-size: 14px; line-height: 1.5em; padding: 10px 15px 5px; text-align: left; width: 100%; position: absolute; top: 285px; }
62
- .carousel-slider__post-excerpt-overlay { background: transparent none repeat scroll 0 0; display: block; height: 20px; width: 100%; }
63
- .carousel-slider__post-meta { bottom: 10px; color: #8e8e8e; font-size: 12px; left: 0; padding: 0 15px; position: absolute; width: 100%; display: block; }
64
- .carousel-slider__post-publication-meta { background-color: white; display: block; padding-top: 15px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
65
- .carousel-slider__post-details-info { display: inline-block; }
66
- .carousel-slider__post-author { display: block; font-style: normal; line-height: 1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
67
- .carousel-slider__post-author-link { color: #8e8e8e; display: inline-block; max-width: 175px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
68
- .carousel-slider__post-category { color: #4cc1be; text-transform: uppercase; position: absolute; right: 15px; top: 50px; z-index: 1; }
69
-
70
- .carousel-slider__product { position: relative; text-align: center; border: 1px solid #f1f1f1; }
71
- .carousel-slider__product .woocommerce-LoopProduct-link { display: block; overflow: hidden; margin: 0 0 .5em; }
72
- .carousel-slider__product .onsale { border: 0 none; line-height: 1; margin: 0; padding: 15px 5px; color: #f1f1f1; background-color: #96588a; position: absolute; left: 8px; top: 8px; border-radius: 50%; }
73
- .carousel-slider__product h3 { padding: .5em 1em; text-align: left; margin: 0; font-size: 1em; color: #333333; }
74
- .carousel-slider__product a { text-decoration: none; box-shadow: none; }
75
- .carousel-slider__product a img { width: 100%; height: auto; display: block; box-shadow: none; }
76
- .carousel-slider__product strong { display: block; }
77
- .carousel-slider__product .price { color: #333333; display: inline-block; font-weight: normal; margin: .5em 1em; font-size: .857em; float: left; }
78
- .carousel-slider__product .price del { color: inherit; background-color: transparent; opacity: 0.5; display: inline-block; }
79
- .carousel-slider__product .price ins { color: inherit; background-color: transparent; font-weight: bold; }
80
- .carousel-slider__product .star-rating { color: #96588a; display: inline-block; margin: .5em 1em; float: right; overflow: hidden; position: relative; height: 1em; line-height: 1; font-size: 1em; width: 5.4em; font-family: 'star'; }
81
- .carousel-slider__product .star-rating:before { content: "\73\73\73\73\73"; float: left; top: 0; left: 0; position: absolute; }
82
- .carousel-slider__product .star-rating span { overflow: hidden; float: left; top: 0; left: 0; position: absolute; padding-top: 1.5em; }
83
- .carousel-slider__product .star-rating span:before { content: "\53\53\53\53\53"; top: 0; position: absolute; left: 0; }
84
- .carousel-slider__product a.add_to_cart_button, .carousel-slider__product a.added_to_cart, .carousel-slider__product a.quick_view { color: #f1f1f1; background-color: #96588a; margin: 1em; line-height: 1; cursor: pointer; position: relative; text-decoration: none; overflow: visible; padding: .5em 1em; font-weight: normal; border-radius: 3px; left: auto; border: 0; white-space: nowrap; display: block; background-image: none; box-shadow: none; -webkit-box-shadow: none; text-shadow: none; }
85
- .carousel-slider__product a.add_to_cart_button:hover, .carousel-slider__product a.added_to_cart:hover, .carousel-slider__product a.quick_view:hover { color: #f1f1f1; background-color: #96588a; text-decoration: none; background-image: none; }
86
- .carousel-slider__product a.add_to_cart_button.loading { opacity: 0.25; padding-right: 2.618em; }
87
- .carousel-slider__product a.add_to_cart_button.loading:after { font-family: "WooCommerce"; content: "\e01c"; vertical-align: top; -webkit-font-smoothing: antialiased; font-weight: normal; position: absolute; top: .618em; right: 1em; -webkit-animation: spin 2s linear infinite; -moz-animation: spin 2s linear infinite; animation: spin 2s linear infinite; }
88
- .carousel-slider__product a.add_to_cart_button.added:after { font-family: 'WooCommerce'; content: "\e017"; margin-left: .53em; vertical-align: bottom; }
89
-
90
- /* Magnific Popup CSS */
91
- .mfp-bg { top: 0; left: 0; width: 100%; height: 100%; z-index: 1042; overflow: hidden; position: fixed; background: #0b0b0b; opacity: 0.8; }
92
-
93
- .mfp-wrap { top: 0; left: 0; width: 100%; height: 100%; z-index: 1043; position: fixed; outline: none !important; -webkit-backface-visibility: hidden; }
94
-
95
- .mfp-container { text-align: center; position: absolute; width: 100%; height: 100%; left: 0; top: 0; padding: 0 8px; box-sizing: border-box; }
96
-
97
- .mfp-container:before { content: ''; display: inline-block; height: 100%; vertical-align: middle; }
98
-
99
- .mfp-align-top .mfp-container:before { display: none; }
100
-
101
- .mfp-content { position: relative; display: inline-block; vertical-align: middle; margin: 0 auto; text-align: left; z-index: 1045; }
102
-
103
- .mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content { width: 100%; cursor: auto; }
104
-
105
- .mfp-ajax-cur { cursor: progress; }
106
-
107
- .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { cursor: -moz-zoom-out; cursor: -webkit-zoom-out; cursor: zoom-out; }
108
-
109
- .mfp-zoom { cursor: pointer; cursor: -webkit-zoom-in; cursor: -moz-zoom-in; cursor: zoom-in; }
110
-
111
- .mfp-auto-cursor .mfp-content { cursor: auto; }
112
-
113
- .mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter { -webkit-user-select: none; -moz-user-select: none; user-select: none; }
114
-
115
- .mfp-loading.mfp-figure { display: none; }
116
-
117
- .mfp-hide { display: none !important; }
118
-
119
- .mfp-preloader { color: #CCC; position: absolute; top: 50%; width: auto; text-align: center; margin-top: -0.8em; left: 8px; right: 8px; z-index: 1044; }
120
- .mfp-preloader a { color: #CCC; }
121
- .mfp-preloader a:hover { color: #FFF; }
122
-
123
- .mfp-s-ready .mfp-preloader { display: none; }
124
-
125
- .mfp-s-error .mfp-content { display: none; }
126
-
127
- button.mfp-close, button.mfp-arrow { overflow: visible; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; display: block; outline: none; padding: 0; z-index: 1046; box-shadow: none; touch-action: manipulation; }
128
- button::-moz-focus-inner { padding: 0; border: 0; }
129
-
130
- .mfp-close { width: 44px; height: 44px; line-height: 44px; position: absolute; right: 0; top: 0; text-decoration: none; text-align: center; opacity: 0.65; padding: 0 0 18px 10px; color: #FFF; font-style: normal; font-size: 28px; font-family: Arial, Baskerville, monospace; }
131
- .mfp-close:hover, .mfp-close:focus { opacity: 1; }
132
- .mfp-close:active { top: 1px; }
133
-
134
- .mfp-close-btn-in .mfp-close { color: #333; }
135
-
136
- .mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close { color: #FFF; right: -6px; text-align: right; padding-right: 6px; width: 100%; }
137
-
138
- .mfp-counter { position: absolute; top: 0; right: 0; color: #CCC; font-size: 12px; line-height: 18px; white-space: nowrap; }
139
-
140
- .mfp-arrow { position: absolute; opacity: 0.65; margin: 0; top: 50%; margin-top: -55px; padding: 0; width: 90px; height: 110px; -webkit-tap-highlight-color: transparent; }
141
- .mfp-arrow:active { margin-top: -54px; }
142
- .mfp-arrow:hover, .mfp-arrow:focus { opacity: 1; }
143
- .mfp-arrow:before, .mfp-arrow:after { content: ''; display: block; width: 0; height: 0; position: absolute; left: 0; top: 0; margin-top: 35px; margin-left: 35px; border: medium inset transparent; }
144
- .mfp-arrow:after { border-top-width: 13px; border-bottom-width: 13px; top: 8px; }
145
- .mfp-arrow:before { border-top-width: 21px; border-bottom-width: 21px; opacity: 0.7; }
146
-
147
- .mfp-arrow-left { left: 0; }
148
- .mfp-arrow-left:after { border-right: 17px solid #FFF; margin-left: 31px; }
149
- .mfp-arrow-left:before { margin-left: 25px; border-right: 27px solid #3F3F3F; }
150
-
151
- .mfp-arrow-right { right: 0; }
152
- .mfp-arrow-right:after { border-left: 17px solid #FFF; margin-left: 39px; }
153
- .mfp-arrow-right:before { border-left: 27px solid #3F3F3F; }
154
-
155
- .mfp-iframe-holder { padding-top: 40px; padding-bottom: 40px; }
156
- .mfp-iframe-holder .mfp-content { line-height: 0; width: 100%; max-width: 900px; }
157
- .mfp-iframe-holder .mfp-close { top: -40px; }
158
-
159
- .mfp-iframe-scaler { width: 100%; height: 0; overflow: hidden; padding-top: 56.25%; }
160
- .mfp-iframe-scaler iframe { position: absolute; display: block; top: 0; left: 0; width: 100%; height: 100%; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); background: #000; }
161
-
162
- /* Main image in popup */
163
- img.mfp-img { width: auto; max-width: 100%; height: auto; display: block; line-height: 0; box-sizing: border-box; padding: 40px 0 40px; margin: 0 auto; }
164
-
165
- /* The shadow behind the image */
166
- .mfp-figure { line-height: 0; }
167
- .mfp-figure:after { content: ''; position: absolute; left: 0; top: 40px; bottom: 40px; display: block; right: 0; width: auto; height: auto; z-index: -1; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); background: #444; }
168
- .mfp-figure small { color: #BDBDBD; display: block; font-size: 12px; line-height: 14px; }
169
- .mfp-figure figure { margin: 0; }
170
-
171
- .mfp-bottom-bar { margin-top: -36px; position: absolute; top: 100%; left: 0; width: 100%; cursor: auto; }
172
-
173
- .mfp-title { text-align: left; line-height: 18px; color: #F3F3F3; word-wrap: break-word; padding-right: 36px; }
174
-
175
- .mfp-image-holder .mfp-content { max-width: 100%; }
176
-
177
- .mfp-gallery .mfp-image-holder .mfp-figure { cursor: pointer; }
178
-
179
- @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) { /** Remove all paddings around the image on small screen */
180
- .mfp-img-mobile .mfp-image-holder { padding-left: 0; padding-right: 0; }
181
- .mfp-img-mobile img.mfp-img { padding: 0; }
182
- .mfp-img-mobile .mfp-figure:after { top: 0; bottom: 0; }
183
- .mfp-img-mobile .mfp-figure small { display: inline; margin-left: 5px; }
184
- .mfp-img-mobile .mfp-bottom-bar { background: rgba(0, 0, 0, 0.6); bottom: 0; margin: 0; top: auto; padding: 3px 5px; position: fixed; box-sizing: border-box; }
185
- .mfp-img-mobile .mfp-bottom-bar:empty { padding: 0; }
186
- .mfp-img-mobile .mfp-counter { right: 5px; top: 3px; }
187
- .mfp-img-mobile .mfp-close { top: 0; right: 0; width: 35px; height: 35px; line-height: 35px; background: rgba(0, 0, 0, 0.6); position: fixed; text-align: center; padding: 0; } }
188
- @media all and (max-width: 900px) { .mfp-arrow { -webkit-transform: scale(0.75); transform: scale(0.75); }
189
- .mfp-arrow-left { -webkit-transform-origin: 0; transform-origin: 0; }
190
- .mfp-arrow-right { -webkit-transform-origin: 100%; transform-origin: 100%; }
191
- .mfp-container { padding-left: 6px; padding-right: 6px; } }
192
- .mfp-with-zoom .mfp-container, .mfp-with-zoom.mfp-bg { opacity: 0; -webkit-backface-visibility: hidden; /* ideally, transition speed should match zoom duration */ -webkit-transition: all 0.3s ease-out; -moz-transition: all 0.3s ease-out; -o-transition: all 0.3s ease-out; transition: all 0.3s ease-out; }
193
-
194
- .mfp-with-zoom.mfp-ready .mfp-container { opacity: 1; }
195
-
196
- .mfp-with-zoom.mfp-ready.mfp-bg { opacity: 0.8; }
197
-
198
- .mfp-with-zoom.mfp-removing .mfp-container, .mfp-with-zoom.mfp-removing.mfp-bg { opacity: 0; }
199
-
200
- .mfp-content .product { background-color: #ffffff; display: table; margin: 0 auto; padding: 15px; }
201
- .mfp-content .product .images { display: inline-block; float: left; max-width: 600px; }
202
- .mfp-content .product .images img { display: block; }
203
- .mfp-content .product .onsale { left: 24px; top: 24px; position: absolute; }
204
- .mfp-content .product .summary { display: inline-block; margin-left: 15px; width: 300px; }
205
- .mfp-content .product .product_title, .mfp-content .product .description { margin: 1em 0; }
206
- .mfp-content .product .price { display: inline-block; font-weight: normal; margin: .5em 1em; font-size: .857em; float: left; }
207
- .mfp-content .product .price del { color: inherit; background-color: transparent; opacity: 0.5; display: inline-block; }
208
- .mfp-content .product .price ins { color: inherit; background-color: transparent; font-weight: bold; }
209
- .mfp-content .product .star-rating { display: inline-block; margin: .5em 1em; float: right; overflow: hidden; position: relative; height: 1em; line-height: 1; font-size: 1em; width: 5.4em; font-family: 'star'; }
210
- .mfp-content .product .star-rating:before { content: "\73\73\73\73\73"; float: left; top: 0; left: 0; position: absolute; }
211
- .mfp-content .product .star-rating span { overflow: hidden; float: left; top: 0; left: 0; position: absolute; padding-top: 1.5em; }
212
- .mfp-content .product .star-rating span:before { content: "\53\53\53\53\53"; top: 0; position: absolute; left: 0; }
213
- .mfp-content .product a.add_to_cart_button, .mfp-content .product a.added_to_cart { margin: 0; line-height: 1; cursor: pointer; position: relative; text-decoration: none; overflow: visible; padding: .5em 1em; font-weight: normal; border-radius: 3px; left: auto; border: 0; white-space: nowrap; display: inline-block; background-image: none; box-shadow: none; -webkit-box-shadow: none; text-shadow: none; }
214
- .mfp-content .product a.add_to_cart_button:hover, .mfp-content .product a.added_to_cart:hover { text-decoration: none; background-image: none; }
215
- .mfp-content .product a.add_to_cart_button.loading { opacity: 0.25; padding-right: 2.618em; }
216
- .mfp-content .product a.add_to_cart_button.loading:after { font-family: "WooCommerce"; content: "\e01c"; vertical-align: top; -webkit-font-smoothing: antialiased; font-weight: normal; position: absolute; top: .618em; right: 1em; -webkit-animation: spin 2s linear infinite; -moz-animation: spin 2s linear infinite; animation: spin 2s linear infinite; }
217
- .mfp-content .product a.add_to_cart_button.added:after { font-family: 'WooCommerce'; content: "\e017"; margin-left: .53em; vertical-align: bottom; }
218
-
219
- .mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content { max-width: 945px; margin-top: 40px; margin-bottom: 40px; }
220
-
221
- @media (max-width: 600px) { .mfp-content .product .images { margin-bottom: 30px; }
222
- .mfp-content .product .summary { display: block; margin: 0; width: 100%; } }
223
- @media (min-width: 601px) { .mfp-content .product .images { display: inline-block; width: 49%; }
224
- .mfp-content .product .summary { display: inline-block; margin: 0 0 0 1%; width: 49%; } }
1
+ .carousel-slider{display:none;width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}.carousel-slider .owl-stage{position:relative;-ms-touch-action:pan-Y}.carousel-slider .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.carousel-slider .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0px, 0px, 0px)}.carousel-slider .owl-item{position:relative;min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.carousel-slider .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d}.carousel-slider .owl-nav.disabled,.carousel-slider .owl-dots.disabled{display:none}.carousel-slider .owl-nav .owl-prev,.carousel-slider .owl-nav .owl-next,.carousel-slider .owl-dot{cursor:hand;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.carousel-slider.owl-loaded{display:block}.carousel-slider.owl-loading{opacity:0;display:block}.carousel-slider.owl-hidden{opacity:0}.carousel-slider.owl-refresh .owl-item{visibility:hidden}.carousel-slider.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.carousel-slider.owl-grab{cursor:-webkit-grab;cursor:grab}.carousel-slider.owl-rtl{direction:rtl}.carousel-slider.owl-rtl .owl-item{float:right}.no-js .carousel-slider{display:block}.carousel-slider .animated{-webkit-animation-duration:1000ms;animation-duration:1000ms;-webkit-animation-fill-mode:both;animation-fill-mode:both}.carousel-slider .owl-animated-in{z-index:0}.carousel-slider .owl-animated-out{z-index:1}.carousel-slider .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{-webkit-transition:height 500ms ease-in-out;transition:height 500ms ease-in-out}.carousel-slider .owl-item img.owl-lazy{background:url("../img/ajax-loader.gif") no-repeat center;min-width:32px;min-height:32px}.carousel-slider .owl-video-wrapper{position:relative;height:100%;background:#000}.carousel-slider .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url("../img/play.svg") no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;-webkit-transition:-webkit-transform 100ms ease;transition:-webkit-transform 100ms ease;transition:transform 100ms ease;transition:transform 100ms ease, -webkit-transform 100ms ease}.carousel-slider .owl-video-play-icon:hover{-webkit-transform:scale(1.3, 1.3);transform:scale(1.3, 1.3)}.carousel-slider .owl-video-playing .owl-video-tn,.carousel-slider .owl-video-playing .owl-video-play-icon{display:none}.carousel-slider .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;-webkit-transition:opacity 400ms ease;transition:opacity 400ms ease}.carousel-slider .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}.carousel-slider .owl-nav .owl-prev,.carousel-slider .owl-nav .owl-next{height:48px;width:48px;display:inline-block;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);opacity:0;margin:0;padding:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.carousel-slider .owl-nav .owl-prev{left:0}.carousel-slider .owl-nav .owl-next{right:0}.carousel-slider:hover .owl-nav .owl-prev,.carousel-slider:hover .owl-nav .owl-next{opacity:1}@media (max-width: 767px){.carousel-slider:hover .owl-nav{display:none}.carousel-slider .owl-nav{display:none}}.carousel-slider.arrows-visible-always .owl-prev,.carousel-slider.arrows-visible-always .owl-next{opacity:1}.carousel-slider.arrows-outside .owl-nav .owl-prev{left:-48px}.carousel-slider.arrows-outside .owl-nav .owl-next{right:-48px}.carousel-slider .owl-dots{text-align:center;-webkit-tap-highlight-color:transparent;margin-top:10px}.carousel-slider .owl-dots .owl-dot{display:inline-block;zoom:1;*display:inline}.carousel-slider .owl-dots .owl-dot span{width:10px;height:10px;margin:4px 8px;background-color:#9e9e9e;display:block;-webkit-backface-visibility:visible;-webkit-transition:opacity 200ms ease;transition:opacity 200ms ease}.carousel-slider .owl-dots .owl-dot.active span,.carousel-slider .owl-dots .owl-dot:hover span{background-color:#4caf50}.carousel-slider.dots-center .owl-dots{text-align:center}.carousel-slider.dots-left .owl-dots{text-align:left}.carousel-slider.dots-left .owl-dots:first-child span{margin-left:0}.carousel-slider.dots-right .owl-dots{text-align:right}.carousel-slider.dots-right .owl-dots:last-child span{margin-right:0}.carousel-slider.dots-visible-hover .owl-dots{opacity:0}.carousel-slider.dots-visible-hover:hover .owl-dots{opacity:1}.carousel-slider.dots-circle .owl-dots .owl-dot span{border-radius:9999px}.carousel-slider__post{border:1px solid #f1f1f1;float:left;height:450px;width:100%;position:relative;display:block;overflow:hidden}.carousel-slider__post-content{bottom:0;position:absolute;top:0;-webkit-transition:all 0.2s ease 0s;transition:all 0.2s ease 0s;width:100%;display:block}.carousel-slider__post-image{border-bottom:1px solid #f1f1f1;display:block;height:207px;line-height:0;margin:0 auto;overflow:hidden;text-align:center;width:100%;background-color:#f1f1f1;background-size:cover;background-position:center center}.carousel-slider__post-title{display:block;margin:10px 15px 0;max-height:70px}.carousel-slider__post-title h1{color:#4a4a4a;font:bold 18px/1.4em Arial,sans-serif;margin-bottom:0;margin-top:0}.carousel-slider__post-excerpt{color:#7d7d7d;font-size:14px;line-height:1.5em;padding:10px 15px 5px;text-align:left;width:100%;position:absolute;top:285px}.carousel-slider__post-excerpt-overlay{background:transparent none repeat scroll 0 0;display:block;height:20px;width:100%}.carousel-slider__post-meta{bottom:10px;color:#8e8e8e;font-size:12px;left:0;padding:0 15px;position:absolute;width:100%;display:block}.carousel-slider__post-publication-meta{background-color:white;display:block;padding-top:15px;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.carousel-slider__post-details-info{display:inline-block}.carousel-slider__post-author{display:block;font-style:normal;line-height:1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:5px}.carousel-slider__post-author-link{color:#8e8e8e;display:inline-block;max-width:175px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.carousel-slider__post-category{color:#4cc1be;text-transform:uppercase;position:absolute;right:15px;top:50px;z-index:1}.carousel-slider__product{position:relative;text-align:center;border:1px solid #f1f1f1}.carousel-slider__product .woocommerce-LoopProduct-link{display:block;overflow:hidden;margin:0 0 .5em}.carousel-slider__product .onsale{border:0 none;line-height:1;margin:0;padding:15px 5px;color:#f1f1f1;background-color:#96588a;position:absolute;left:8px;top:8px;border-radius:50%}.carousel-slider__product h3{padding:.5em 1em;text-align:left;margin:0;font-size:1em;color:#333}.carousel-slider__product a{text-decoration:none;-webkit-box-shadow:none;box-shadow:none}.carousel-slider__product a img{width:100%;height:auto;display:block;-webkit-box-shadow:none;box-shadow:none}.carousel-slider__product strong{display:block}.carousel-slider__product .price{color:#333;display:inline-block;font-weight:normal;margin:.5em 1em;font-size:.857em;float:left}.carousel-slider__product .price del{color:inherit;background-color:transparent;opacity:0.5;display:inline-block}.carousel-slider__product .price ins{color:inherit;background-color:transparent;font-weight:bold}.carousel-slider__product .star-rating{color:#96588a;display:inline-block;margin:.5em 1em;float:right;overflow:hidden;position:relative;height:1em;line-height:1;font-size:1em;width:5.4em;font-family:'star'}.carousel-slider__product .star-rating:before{content:"\73\73\73\73\73";float:left;top:0;left:0;position:absolute}.carousel-slider__product .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}.carousel-slider__product .star-rating span:before{content:"\53\53\53\53\53";top:0;position:absolute;left:0}.carousel-slider__product a.add_to_cart_button,.carousel-slider__product a.added_to_cart,.carousel-slider__product a.quick_view{color:#f1f1f1;background-color:#96588a;margin:1em;line-height:1;cursor:pointer;position:relative;text-decoration:none;overflow:visible;padding:.5em 1em;font-weight:normal;border-radius:3px;left:auto;border:0;white-space:nowrap;display:block;background-image:none;box-shadow:none;-webkit-box-shadow:none;text-shadow:none}.carousel-slider__product a.add_to_cart_button:hover,.carousel-slider__product a.added_to_cart:hover,.carousel-slider__product a.quick_view:hover{color:#f1f1f1;background-color:#96588a;text-decoration:none;background-image:none}.carousel-slider__product a.add_to_cart_button.loading{opacity:0.25;padding-right:2.618em}.carousel-slider__product a.add_to_cart_button.loading:after{font-family:"WooCommerce";content:"\e01c";vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:normal;position:absolute;top:.618em;right:1em;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.carousel-slider__product a.add_to_cart_button.added:after{font-family:'WooCommerce';content:"\e017";margin-left:.53em;vertical-align:bottom}.carousel-slider__content .slide-content-inner{padding:0}.carousel-slider__content .slide-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:0 auto;padding:1rem;max-width:1140px;min-height:300px}.carousel-slider__content .heading-title-wrapper,.carousel-slider__content .description-title-wrapper{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;padding:0}.carousel-slider__content .heading-title,.carousel-slider__content .description-title{margin:0;padding:0}.carousel-slider__content .buttons-wrapper-one{margin-right:0.5rem}.carousel-slider__content .buttons-wrapper-two{margin-left:0.5rem}.carousel-slider__content img{max-width:100%;width:auto !important}.carousel-slider .carousel-slider__item{position:relative}.carousel-slider .carousel-slider__item img{display:block;margin-left:auto;margin-right:auto;max-width:100%;height:auto}.carousel-slider .carousel-slider__caption{position:relative}.carousel-slider .carousel-slider__caption .title{overflow:hidden;text-overflow:ellipsis;color:#474747;font-size:16px;font-weight:500;margin:10px 0 0;text-align:center}.carousel-slider .carousel-slider__caption .caption{font-size:14px;font-weight:300;margin:10px 0 0;text-align:center}.cs-button{-webkit-appearance:none;-webkit-font-smoothing:inherit;display:inline-block;font-size:1rem;line-height:1;padding:0.75em 1em;border-radius:0;text-decoration:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all 200ms ease-in-out;transition:all 200ms ease-in-out}.cs-button:hover{text-decoration:none}.cs-button--normal{opacity:0.9;filter:alpha(opacity=90)}.cs-button--stroke{background:transparent;border-width:1px;border-style:solid;border-color:transparent}.cs-button--medium{font-size:1.2rem;padding:0.9em 1.2em}.cs-button--large{font-size:1.5rem;padding:0.9em 1.6em}.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:1042;overflow:hidden;position:fixed;background:#0b0b0b;opacity:.8}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:1043;position:fixed;outline:none !important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:0 8px;-webkit-box-sizing:border-box;box-sizing:border-box}.mfp-container:before{content:'';display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-inline-holder .mfp-content,.mfp-ajax-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-close,.mfp-arrow,.mfp-preloader,.mfp-counter{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none !important}.mfp-preloader{color:#CCC;position:absolute;top:50%;width:auto;text-align:center;margin-top:-0.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#CCC}.mfp-preloader a:hover{color:#fff}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.mfp-close,button.mfp-arrow{overflow:visible;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;display:block;outline:none;padding:0;z-index:1046;-webkit-box-shadow:none;box-shadow:none;-ms-touch-action:manipulation;touch-action:manipulation}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:.65;padding:0 0 18px 10px;color:#fff;font-style:normal;font-size:28px;font-family:Arial, Baskerville, monospace}.mfp-close:hover,.mfp-close:focus{opacity:1}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#333}.mfp-image-holder .mfp-close,.mfp-iframe-holder .mfp-close{color:#fff;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{position:absolute;opacity:.65;margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:hover,.mfp-arrow:focus{opacity:1}.mfp-arrow:before,.mfp-arrow:after{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:0.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #fff;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #fff;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 0 40px;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:'';position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6);background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,0.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,0.6);position:fixed;text-align:center;padding:0}}@media all and (max-width: 900px){.mfp-arrow{-webkit-transform:scale(0.75);transform:scale(0.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}.mfp-with-zoom .mfp-container,.mfp-with-zoom.mfp-bg{opacity:0;-webkit-backface-visibility:hidden;-webkit-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.mfp-with-zoom.mfp-ready .mfp-container{opacity:1}.mfp-with-zoom.mfp-ready.mfp-bg{opacity:0.8}.mfp-with-zoom.mfp-removing .mfp-container,.mfp-with-zoom.mfp-removing.mfp-bg{opacity:0}.mfp-content .product{background-color:#ffffff;display:table;margin:0 auto;padding:15px}.mfp-content .product .images{display:inline-block;float:left;max-width:600px}.mfp-content .product .images img{display:block}.mfp-content .product .onsale{left:24px;top:24px;position:absolute}.mfp-content .product .summary{display:inline-block;margin-left:15px;width:300px}.mfp-content .product .product_title,.mfp-content .product .description{margin:1em 0}.mfp-content .product .price{display:inline-block;font-weight:normal;margin:.5em 1em;font-size:.857em;float:left}.mfp-content .product .price del{color:inherit;background-color:transparent;opacity:0.5;display:inline-block}.mfp-content .product .price ins{color:inherit;background-color:transparent;font-weight:bold}.mfp-content .product .star-rating{display:inline-block;margin:.5em 1em;float:right;overflow:hidden;position:relative;height:1em;line-height:1;font-size:1em;width:5.4em;font-family:'star'}.mfp-content .product .star-rating:before{content:"\73\73\73\73\73";float:left;top:0;left:0;position:absolute}.mfp-content .product .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}.mfp-content .product .star-rating span:before{content:"\53\53\53\53\53";top:0;position:absolute;left:0}.mfp-content .product a.add_to_cart_button,.mfp-content .product a.added_to_cart{margin:0;line-height:1;cursor:pointer;position:relative;text-decoration:none;overflow:visible;padding:.5em 1em;font-weight:normal;border-radius:3px;left:auto;border:0;white-space:nowrap;display:inline-block;background-image:none;box-shadow:none;-webkit-box-shadow:none;text-shadow:none}.mfp-content .product a.add_to_cart_button:hover,.mfp-content .product a.added_to_cart:hover{text-decoration:none;background-image:none}.mfp-content .product a.add_to_cart_button.loading{opacity:0.25;padding-right:2.618em}.mfp-content .product a.add_to_cart_button.loading:after{font-family:"WooCommerce";content:"\e01c";vertical-align:top;-webkit-font-smoothing:antialiased;font-weight:normal;position:absolute;top:.618em;right:1em;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.mfp-content .product a.add_to_cart_button.added:after{font-family:'WooCommerce';content:"\e017";margin-left:.53em;vertical-align:bottom}.mfp-inline-holder .mfp-content,.mfp-ajax-holder .mfp-content{max-width:945px;margin-top:40px;margin-bottom:40px}@media (max-width: 600px){.mfp-content .product .images{margin-bottom:30px}.mfp-content .product .summary{display:block;margin:0;width:100%}}@media (min-width: 601px){.mfp-content .product .images{display:inline-block;width:49%}.mfp-content .product .summary{display:inline-block;margin:0 0 0 1%;width:49%}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/img/icon-images.svg DELETED
@@ -1,55 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://creativecommons.org/ns#"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
- height="500"
11
- id="Layer_1"
12
- version="1.1"
13
- viewBox="0 0 500 500"
14
- width="500"
15
- xml:space="preserve"
16
- inkscape:version="0.91 r13725"
17
- sodipodi:docname="icon.svg"><metadata
18
- id="metadata15"><rdf:RDF><cc:Work
19
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
20
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
21
- id="defs13" /><sodipodi:namedview
22
- pagecolor="#ffffff"
23
- bordercolor="#666666"
24
- borderopacity="1"
25
- objecttolerance="10"
26
- gridtolerance="10"
27
- guidetolerance="10"
28
- inkscape:pageopacity="0"
29
- inkscape:pageshadow="2"
30
- inkscape:window-width="1366"
31
- inkscape:window-height="697"
32
- id="namedview11"
33
- showgrid="false"
34
- fit-margin-top="0"
35
- fit-margin-left="0"
36
- fit-margin-right="0"
37
- fit-margin-bottom="0"
38
- inkscape:zoom="0.65186406"
39
- inkscape:cx="-230.31968"
40
- inkscape:cy="200.41848"
41
- inkscape:window-x="0"
42
- inkscape:window-y="24"
43
- inkscape:window-maximized="1"
44
- inkscape:current-layer="Layer_1" /><g
45
- style="fill:#f44336;fill-opacity:1"
46
- id="g5"
47
- transform="matrix(1.1158443,0,0,1.3020918,-35.634138,-83.373233)"><path
48
- inkscape:connector-curvature="0"
49
- style="fill:#f44336;fill-opacity:1"
50
- id="path7"
51
- d="m 457.6,140.2 -82.5,-4 -4.8,-53.8 C 369.3,71.1 359.2,63.2 347.4,64.1 L 51.4,88.4 C 39.6,89.4 31.1,98.9 32,110.1 l 21.2,235.8 c 1,11.3 11.2,19.2 22.9,18.3 l 15,-1.2 -2.4,45.8 c -0.6,12.6 9.2,22.8 22.4,23.5 L 441.3,448 c 13.2,0.6 24.1,-8.6 24.8,-21.2 L 480,163.5 c 0.6,-12.5 -9.3,-22.7 -22.4,-23.3 z m -355,5.3 -7.1,134.8 -17.4,24.7 -16,-178 c 0,-0.2 0,-0.3 0,-0.5 0,-0.2 0,-0.3 0,-0.5 0.5,-5 4.3,-9 9.5,-9.4 l 261,-21.4 c 5.2,-0.4 9.7,3 10.5,7.9 0,0.2 0.3,0.2 0.3,0.4 0,0.1 0.3,0.2 0.3,0.4 l 2.7,30.8 -219,-10.5 c -13.2,-0.4 -24.2,8.8 -24.8,21.3 z M 436.7,382.4 390,327.1 362.5,294.4 c -2.4,-2.9 -6.3,-5.3 -10.6,-5.5 -4.3,-0.2 -7.5,1.5 -11.1,4.1 l -16.4,11.9 c -3.5,2.1 -6.2,3.5 -9.9,3.3 -3.6,-0.2 -6.8,-1.6 -9.1,-3.8 -0.8,-0.8 -2.3,-2.2 -3.5,-3.4 l -42.8,-48.9 c -3.1,-3.9 -8.2,-6.4 -13.8,-6.7 -5.7,-0.3 -11.2,2.1 -14.8,5.6 l -101.1,108.8 -6.8,7.4 0.3,-6.8 6.8,-128.9 3.3,-62.9 c 0,-0.2 0,-0.4 0,-0.5 0,-0.2 0,-0.4 0,-0.5 1.4,-5.4 6.2,-9.3 11.9,-9 l 204.2,9.8 28.7,1.4 58.3,2.8 c 5.8,0.3 10.3,4.7 10.4,10.2 0,0.2 0.3,0.3 0.3,0.5 0,0.2 0.3,0.3 0.3,0.5 l -10.4,198.6 z" /></g><path
52
- inkscape:connector-curvature="0"
53
- style="fill:#4caf50;fill-opacity:1"
54
- id="path9"
55
- d="m 398.02561,237.56916 c 19.4,0 35.2,-15.8 35.2,-35.2 0,-19.4 -15.7,-35.2 -35.2,-35.2 -19.4,0 -35.2,15.7 -35.2,35.2 0,19.5 15.7,35.2 35.2,35.2 z" /></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/img/logo.svg ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#"
3
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"
4
+ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
5
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="256" height="256" viewBox="0 0 500 500"
6
+ id="svg2" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="icon.svg">
7
+ <defs id="defs4"/>
8
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0"
9
+ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.979899"
10
+ inkscape:cx="200.15847" inkscape:cy="117.31086" inkscape:document-units="px"
11
+ inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1366"
12
+ inkscape:window-height="697" inkscape:window-x="0" inkscape:window-y="24"
13
+ inkscape:window-maximized="1">
14
+ <inkscape:grid type="xygrid" id="grid4159"/>
15
+ </sodipodi:namedview>
16
+ <metadata id="metadata7">
17
+ <rdf:RDF>
18
+ <cc:Work rdf:about="">
19
+ <dc:format>image/svg+xml</dc:format>
20
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
21
+ <dc:title/>
22
+ </cc:Work>
23
+ </rdf:RDF>
24
+ </metadata>
25
+ <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-552.36216)">
26
+ <g id="g3367" transform="translate(9.4331868,-0.18496445)">
27
+ <rect y="642.36224" x="69.999985" height="200" width="100" id="rect3336"
28
+ style="fill:#f44336;fill-opacity:1"/>
29
+ <rect y="642.36218" x="190.02231" height="200" width="100" id="rect3336-3"
30
+ style="fill:#4caf50;fill-opacity:1"/>
31
+ <rect y="642.36224" x="310.02234" height="200" width="100" id="rect3336-6"
32
+ style="fill:#2196f3;fill-opacity:1"/>
33
+ <g transform="matrix(2.5,0,0,2.5,19.919128,722.36216)" id="g4280">
34
+ <rect style="fill:none" y="0" x="0" width="20" height="20" id="rect4268"/>
35
+ <g id="g4270">
36
+ <path inkscape:connector-curvature="0" d="m 14,5 -5,5 5,5 -1,2 -7,-7 7,-7 z" id="path4272"/>
37
+ </g>
38
+ </g>
39
+ <g inkscape:transform-center-y="2.0203051" inkscape:transform-center-x="12.121831"
40
+ transform="matrix(2.5,0,0,2.5,410.01132,722.36216)" id="g4351">
41
+ <rect style="fill:none" y="0" x="0" width="20" height="20" id="rect4339"/>
42
+ <g id="g4341">
43
+ <path inkscape:connector-curvature="0" d="M 6,15 11,10 6,5 7,3 14,10 7,17 Z" id="path4343"/>
44
+ </g>
45
+ </g>
46
+ </g>
47
+ <g transform="matrix(1.0251246,0,0,1.9522527,2.3334664,231.46917)"
48
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#00d1b2;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
49
+ id="flowRoot4356">
50
+ <g id="g3499" style="fill:#00d1b2;fill-opacity:1">
51
+ <path id="path3455"
52
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
53
+ d="m 102.04871,369.91455 q -1.1261,2.82898 -3.04871,4.83399 -1.922607,1.97753 -4.174805,3.24096 -2.224731,1.23596 -4.559326,1.81275 -2.307129,0.57678 -4.257202,0.57678 -3.131104,0 -5.438232,-0.74158 -2.307129,-0.74158 -3.845215,-2.38953 -1.51062,-1.64794 -2.279663,-4.28466 -0.741578,-2.63672 -0.741578,-6.42701 0,-1.9226 0.219727,-4.1748 0.247192,-2.27966 0.769043,-4.69666 0.521851,-2.41699 1.318359,-4.86145 0.823975,-2.44445 1.977539,-4.69665 1.153565,-2.27966 2.664185,-4.2572 1.51062,-1.97754 3.405762,-3.43323 1.895141,-1.45569 4.20227,-2.27966 2.307129,-0.85144 5.081177,-0.85144 1.950073,0 3.652954,0.43945 1.730347,0.41199 2.993775,1.31836 1.29089,0.90637 2.005,2.33459 0.74158,1.42823 0.74158,3.43323 0,1.1261 -0.21972,2.0874 -0.19227,0.93384 -0.68665,1.64795 -0.46692,0.68665 -1.23596,1.07117 -0.74158,0.38452 -1.812747,0.38452 -0.659179,0 -1.538086,-0.24719 -0.85144,-0.24719 -1.647949,-1.2085 0.494385,-0.24719 0.961304,-0.76904 0.466919,-0.54932 0.823975,-1.23596 0.357055,-0.71411 0.576782,-1.53809 0.219726,-0.82397 0.219726,-1.64795 0,-0.65918 -0.19226,-1.29089 -0.164795,-0.63171 -0.576783,-1.09863 -0.411987,-0.46692 -1.071167,-0.74158 -0.659179,-0.30213 -1.593017,-0.30213 -1.565552,0 -3.048706,1.15357 -1.455689,1.15356 -2.774048,3.1311 -1.290894,1.95008 -2.389526,4.55933 -1.071167,2.60925 -1.84021,5.52063 -0.769043,2.91138 -1.208496,5.98755 -0.439454,3.07617 -0.439454,5.93262 0,1.95007 0.274659,3.57055 0.302124,1.59302 1.043701,2.74658 0.769043,1.15357 2.059936,1.81275 1.31836,0.63171 3.378296,0.63171 3.323364,0 6.152344,-1.48315 2.828979,-1.48316 4.806516,-4.14734 l 1.2909,0.57678 z"
54
+ inkscape:connector-curvature="0"/>
55
+ <path id="path3457"
56
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
57
+ d="m 132.5907,369.3927 q -0.79651,2.27966 -1.73035,3.95508 -0.93384,1.67541 -1.95007,2.82898 -0.98877,1.15356 -2.03247,1.86767 -1.0437,0.71411 -2.03247,1.09864 -0.98877,0.38452 -1.89514,0.52185 -0.90638,0.13733 -1.64795,0.13733 -2.38953,0 -3.81775,-1.2909 -1.40076,-1.31836 -1.70288,-3.87268 -0.68665,0.96131 -1.51062,1.89514 -0.82398,0.90638 -1.84021,1.64795 -1.01624,0.71411 -2.27967,1.18103 -1.23596,0.43946 -2.74658,0.43946 -1.45569,0 -2.80151,-0.46692 -1.34583,-0.46692 -2.38953,-1.53809 -1.0437,-1.07117 -1.67541,-2.80151 -0.631718,-1.73035 -0.631718,-4.22974 0,-1.92261 0.384518,-4.11987 0.38453,-2.19727 1.18103,-4.39453 0.79651,-2.19727 1.97754,-4.20227 1.2085,-2.03247 2.80152,-3.57056 1.62048,-1.56555 3.65295,-2.47192 2.03247,-0.93384 4.47693,-0.93384 2.38953,0 3.46069,0.82397 1.09864,0.82398 1.09864,2.03247 l 0,0.41199 0.60424,-2.99377 8.10242,0 -4.03747,19.11621 q -0.13733,0.46692 -0.19227,0.93384 -0.0549,0.43945 -0.0549,0.8789 0,2.41699 2.30713,2.41699 0.82398,0 1.51062,-0.41198 0.71411,-0.43946 1.2909,-1.15357 0.57678,-0.71411 1.01623,-1.67541 0.43945,-0.98877 0.74158,-2.05994 l 2.36206,0 z m -14.17237,-12.68921 q 0,-0.24719 -0.10986,-0.60425 -0.10986,-0.38452 -0.38452,-0.71411 -0.24719,-0.35705 -0.68665,-0.57678 -0.43945,-0.24719 -1.12609,-0.24719 -1.18103,0 -2.2522,0.76904 -1.0437,0.76904 -1.92261,2.05994 -0.8789,1.26342 -1.56555,2.88391 -0.68665,1.62048 -1.18103,3.35083 -0.46692,1.70288 -0.71411,3.37829 -0.24719,1.64795 -0.24719,2.96631 0,1.62049 0.30212,2.49939 0.30212,0.87891 0.71411,1.31836 0.43945,0.41199 0.93384,0.49439 0.49438,0.0824 0.87891,0.0824 0.63171,0 1.31835,-0.30212 0.71412,-0.32959 1.34583,-0.93384 0.65918,-0.63171 1.18103,-1.56555 0.54932,-0.93384 0.82397,-2.1698 l 2.69165,-12.68921 z"
58
+ inkscape:connector-curvature="0"/>
59
+ <path id="path3459"
60
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
61
+ d="m 128.05884,379.47266 5.96008,-28.125 8.10242,0 -0.71411,3.48816 q 0.74157,-0.65918 1.51062,-1.2909 0.76904,-0.63171 1.59301,-1.09863 0.85144,-0.49439 1.75782,-0.79651 0.90637,-0.30212 1.9226,-0.30212 0.96131,0 1.67542,0.35705 0.74158,0.35706 1.23596,0.93384 0.49439,0.57678 0.74158,1.34582 0.24719,0.76905 0.24719,1.59302 0,0.74158 -0.24719,1.48316 -0.24719,0.71411 -0.76904,1.29089 -0.49439,0.57678 -1.26343,0.9613 -0.76905,0.35706 -1.78528,0.35706 -0.79651,0 -1.23596,-0.27466 -0.41199,-0.27466 -0.63172,-0.68664 -0.21972,-0.41199 -0.32959,-0.87891 -0.0824,-0.49438 -0.19226,-0.90637 -0.10986,-0.41199 -0.30212,-0.68665 -0.1648,-0.27466 -0.57678,-0.27466 -1.2909,0 -2.1698,0.60425 -0.87891,0.57678 -1.92261,1.53809 l -4.5044,21.36841 -8.10241,0 z"
62
+ inkscape:connector-curvature="0"/>
63
+ <path id="path3461"
64
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
65
+ d="m 183.01794,358.10425 q -1.64794,1.73034 -4.2572,2.93884 -2.60925,1.2085 -5.71289,1.73035 -0.32959,3.90014 -1.51062,7.03125 -1.15356,3.1311 -2.93884,5.32837 -1.78528,2.19726 -4.09241,3.37829 -2.30713,1.18103 -4.88891,1.18103 -1.95008,0 -3.62549,-0.46692 -1.64795,-0.49438 -2.85645,-1.53808 -1.18103,-1.07117 -1.84021,-2.74658 -0.68664,-1.70288 -0.68664,-4.11988 0,-1.64795 0.35705,-3.73535 0.32959,-2.11487 1.07117,-4.3396 0.76904,-2.22473 1.95007,-4.3396 1.2085,-2.14233 2.91138,-3.81775 1.73035,-1.67541 3.98254,-2.69165 2.2522,-1.0437 5.13611,-1.0437 7.22351,0 7.22351,8.98132 l 0,0.0549 q 0.13733,0.0549 0.24719,0.0549 0.13733,0 0.35706,0 0.98877,0 2.11487,-0.27466 1.15356,-0.30212 2.30713,-0.76904 1.15356,-0.46692 2.25219,-1.07117 1.09864,-0.63171 2.00501,-1.26343 l 0.49438,1.53809 z m -14.63928,4.83398 q -0.8789,-0.21972 -1.20849,-0.85144 -0.30213,-0.65918 -0.30213,-1.51062 0,-1.18103 0.46692,-1.92261 0.49439,-0.76904 1.29089,-1.12609 -0.0549,-0.90638 -0.19226,-1.51062 -0.13733,-0.63172 -0.38452,-1.01624 -0.24719,-0.41199 -0.63171,-0.57678 -0.35706,-0.1648 -0.93384,-0.1648 -1.01623,0 -1.95007,0.79651 -0.93384,0.76904 -1.78528,2.05994 -0.82398,1.29089 -1.53809,2.96631 -0.68664,1.64795 -1.18103,3.40576 -0.49438,1.75781 -0.76904,3.48816 -0.27466,1.70288 -0.27466,3.10364 0,1.40075 0.13733,2.27966 0.1648,0.87891 0.49439,1.40076 0.35705,0.49438 0.90637,0.68664 0.54931,0.19226 1.34582,0.19226 1.01624,0 2.03247,-0.90637 1.0437,-0.90637 1.92261,-2.47192 0.87891,-1.56556 1.53809,-3.70789 0.68664,-2.14233 1.01623,-4.61426 z"
66
+ inkscape:connector-curvature="0"/>
67
+ <path id="path3463"
68
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
69
+ d="m 206.88574,369.3927 q -0.79651,2.27966 -1.73034,3.95508 -0.93384,1.67541 -1.95008,2.82898 -0.98877,1.15356 -2.03247,1.86767 -1.0437,0.71411 -2.03247,1.09864 -0.98877,0.38452 -1.89514,0.52185 -0.90637,0.13733 -1.64795,0.13733 -2.41699,0 -3.84521,-1.31836 -1.42823,-1.34583 -1.73035,-4.01001 -1.07117,1.73034 -2.1698,2.77404 -1.09863,1.04371 -2.1698,1.62049 -1.07117,0.57678 -2.0874,0.74158 -1.01624,0.19226 -1.89515,0.19226 -1.26342,0 -2.36206,-0.38453 -1.09863,-0.38452 -1.9226,-1.20849 -0.79651,-0.82398 -1.26343,-2.0874 -0.46692,-1.26343 -0.46692,-3.04871 0,-0.76904 0.10986,-1.67541 0.10987,-0.93384 0.32959,-2.00501 l 3.81775,-18.04504 8.10242,0 -4.03748,19.11621 q -0.16479,0.8789 -0.16479,1.59301 0,0.96131 0.35705,1.64795 0.35706,0.65918 1.31836,0.65918 0.82398,0 1.51062,-0.35705 0.68665,-0.38452 1.23597,-1.0437 0.57678,-0.65918 0.98877,-1.56555 0.43945,-0.93384 0.76904,-2.00501 l 3.81775,-18.04504 8.10241,0 -4.03747,19.11621 q -0.13733,0.46692 -0.19226,0.93384 -0.0549,0.43945 -0.0549,0.8789 0,1.18103 0.54931,1.64795 0.57679,0.43945 1.75782,0.43945 0.82397,0 1.51062,-0.35705 0.71411,-0.38452 1.29089,-1.0437 0.57678,-0.65918 1.01623,-1.56555 0.43946,-0.93384 0.74158,-2.00501 l 2.36206,0 z"
70
+ inkscape:connector-curvature="0"/>
71
+ <path id="path3465"
72
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
73
+ d="m 228.41895,369.3927 q -2.19727,2.55432 -4.422,4.22974 -2.19727,1.64795 -4.17481,2.80151 -0.8789,0.93384 -1.97754,1.59302 -1.07116,0.63171 -2.25219,1.0437 -1.15357,0.38452 -2.36206,0.54932 -1.18103,0.19226 -2.2522,0.19226 -2.11487,0 -3.68042,-0.63172 -1.53809,-0.65918 -2.55432,-1.67541 -1.01624,-1.0437 -1.48316,-2.30713 -0.49438,-1.2909 -0.49438,-2.58179 0,-0.98877 0.27466,-1.81274 0.24719,-0.85144 0.65918,-1.51062 0.41198,-0.65918 0.93383,-1.1261 0.54932,-0.49439 1.1261,-0.76904 2.36206,-4.22974 3.98255,-8.34961 1.62048,-4.14734 2.93884,-8.32215 l 8.32214,-1.09863 q 0.1648,3.65295 0.30213,6.3446 0.16479,2.66419 0.30212,4.64173 0.13733,1.95007 0.24719,3.32336 0.10987,1.37329 0.19226,2.44446 0.10987,1.0437 0.13733,1.92261 0.0549,0.85144 0.0549,1.78528 0,0.63171 -0.0549,1.15356 -0.0275,0.52185 -0.16479,0.98877 1.23596,-0.71411 2.22473,-1.40076 1.01624,-0.71411 1.81274,-1.42822 l 2.36207,0 z m -22.65931,2.03247 q 0,1.97754 0.76905,2.96631 0.79651,0.9613 2.66418,0.9613 0.93384,0 1.81275,-0.24719 0.8789,-0.27466 1.56555,-0.87891 0.68664,-0.63171 1.09863,-1.62048 0.41199,-0.98877 0.41199,-2.47192 0,-0.71411 -0.0549,-1.37329 -0.0275,-0.68665 -0.0824,-1.42823 -0.0549,-0.76904 -0.1648,-1.70288 -0.0824,-0.93384 -0.21972,-2.1698 -0.10987,-1.23596 -0.2472,-2.85644 -0.13732,-1.62049 -0.30212,-3.79029 -0.85144,2.74659 -2.005,5.32837 -1.15357,2.58179 -2.55433,5.30091 0.54932,0.30212 0.90638,0.76904 0.38452,0.46692 0.38452,1.18103 0,0.52185 -0.1648,1.01624 -0.16479,0.49438 -0.49438,0.90637 -0.32959,0.38452 -0.79651,0.63171 -0.43945,0.21973 -1.01624,0.21973 -0.46692,0 -0.8789,-0.13733 -0.41199,-0.13733 -0.63172,-0.60425 z"
74
+ inkscape:connector-curvature="0"/>
75
+ <path id="path3467"
76
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
77
+ d="m 249.62256,369.3927 q -1.18103,1.97754 -2.71912,3.84522 -1.51062,1.86767 -3.43323,3.32336 -1.89514,1.45569 -4.22973,2.36206 -2.30713,0.87891 -5.08118,0.87891 -2.005,0 -3.62549,-0.49439 -1.62048,-0.52185 -2.77404,-1.59302 -1.15357,-1.07116 -1.75782,-2.74658 -0.63171,-1.70288 -0.63171,-4.09241 0,-1.62048 0.32959,-3.73535 0.32959,-2.11487 1.0437,-4.3396 0.71411,-2.22473 1.89514,-4.36706 1.18103,-2.14234 2.85645,-3.81775 1.67541,-1.70288 3.92761,-2.71912 2.2522,-1.0437 5.13611,-1.0437 1.89514,0 3.07617,0.46692 1.2085,0.43945 1.89514,1.18103 0.71411,0.74158 0.96131,1.73035 0.27465,0.9613 0.27465,2.005 0,2.44446 -1.07116,4.55933 -1.07117,2.0874 -2.88391,3.65295 -1.78528,1.56555 -4.11988,2.52686 -2.33459,0.9613 -4.86145,1.1261 -0.0549,0.63171 -0.10986,1.20849 -0.0275,0.54932 -0.0275,1.0437 0,1.42823 0.2472,2.36206 0.27465,0.90638 0.76904,1.42823 0.52185,0.52185 1.26343,0.74157 0.76904,0.19226 1.78527,0.19226 1.67542,0 3.02124,-0.43945 1.3733,-0.43945 2.55433,-1.20849 1.18103,-0.76905 2.22473,-1.81275 1.07116,-1.0437 2.14233,-2.22473 l 1.92261,0 z m -15.35339,-3.98254 q 1.59301,-0.10987 3.07617,-0.90638 1.48315,-0.7965 2.60925,-2.05993 1.1261,-1.2909 1.78528,-2.91138 0.68664,-1.64795 0.68664,-3.40576 0,-1.0437 -0.30212,-1.67542 -0.30212,-0.63171 -1.09863,-0.63171 -1.07117,0 -2.11487,1.0437 -1.01624,1.01624 -1.92261,2.66419 -0.90637,1.64795 -1.62048,3.73535 -0.68665,2.05993 -1.09863,4.14734 z"
78
+ inkscape:connector-curvature="0"/>
79
+ <path id="path3469"
80
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
81
+ d="m 253.66003,341.10291 8.32215,-1.1261 -6.45447,30.37719 q -0.13733,0.46692 -0.19226,0.87891 -0.0549,0.38452 -0.0549,0.76904 0,0.96131 0.49438,1.62049 0.49439,0.63171 1.81275,0.63171 0.79651,0 1.15356,-0.10986 0.35706,-0.10987 0.65918,-0.2472 -0.10986,1.51062 -0.68664,2.63672 -0.54932,1.09864 -1.40076,1.84021 -0.85144,0.71411 -1.92261,1.07117 -1.07117,0.35706 -2.1698,0.35706 -1.26343,0 -2.36206,-0.38453 -1.09863,-0.41198 -1.92261,-1.23596 -0.79651,-0.85144 -1.26342,-2.14233 -0.46692,-1.29089 -0.46692,-3.10364 0,-0.74158 0.10986,-1.64795 0.10986,-0.93384 0.32959,-2.005 l 6.01501,-28.17993 z"
82
+ inkscape:connector-curvature="0"/>
83
+ <path id="path3471"
84
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
85
+ d="m 302.68652,344.86572 q 0,1.18103 -0.32959,2.1698 -0.30212,0.96131 -0.85144,1.67542 -0.54931,0.68664 -1.34582,1.07116 -0.79651,0.38453 -1.73035,0.38453 -1.07117,0 -1.95007,-0.43946 -0.85144,-0.46692 -1.48316,-1.31836 1.0437,-0.76904 1.67542,-2.03247 0.63171,-1.29089 0.63171,-2.74658 0,-1.81274 -1.07116,-2.85644 -1.07117,-1.07117 -2.93885,-1.07117 -1.1261,0 -2.0874,0.43945 -0.93384,0.41199 -1.62048,1.18103 -0.65918,0.74158 -1.0437,1.78528 -0.35706,1.0437 -0.35706,2.27966 0,1.86768 0.90637,3.51563 0.90637,1.64795 2.27967,3.24097 1.37329,1.59301 2.9663,3.24096 1.59302,1.62049 2.96631,3.48816 1.37329,1.84021 2.27967,4.01001 0.90637,2.14233 0.90637,4.75159 0,2.77405 -1.15357,5.13611 -1.15356,2.33459 -3.2135,4.06494 -2.03247,1.70288 -4.80652,2.66418 -2.74658,0.98877 -5.96008,0.98877 -2.69165,0 -4.88892,-0.71411 -2.1698,-0.68665 -3.73535,-1.97754 -1.53808,-1.31836 -2.38952,-3.1311 -0.85144,-1.81275 -0.85144,-4.03748 0,-1.86767 0.60424,-3.48816 0.60425,-1.62048 1.64795,-2.80151 1.0437,-1.2085 2.47193,-1.89514 1.42822,-0.68665 3.0487,-0.68665 1.97754,0 3.32337,0.98877 1.34582,0.98877 1.67541,2.71912 -1.48315,0 -2.66418,0.41199 -1.18103,0.41198 -2.00501,1.15356 -0.82397,0.74158 -1.29089,1.81274 -0.43945,1.0437 -0.43945,2.36206 0,2.47193 1.42822,3.92762 1.45569,1.42822 3.90015,1.42822 1.48315,0 2.74658,-0.52185 1.26343,-0.54932 2.1698,-1.48316 0.90637,-0.93383 1.42822,-2.22473 0.52185,-1.29089 0.52185,-2.80151 0,-1.53809 -0.52185,-2.93884 -0.49438,-1.42823 -1.34582,-2.74659 -0.85145,-1.34582 -1.92261,-2.63671 -1.07117,-1.2909 -2.19727,-2.58179 -1.1261,-1.31836 -2.19726,-2.63672 -1.07117,-1.31836 -1.92261,-2.69165 -0.85144,-1.40076 -1.37329,-2.88391 -0.49439,-1.48316 -0.49439,-3.13111 0,-2.22473 0.93384,-4.0924 0.9613,-1.89514 2.63672,-3.26844 1.70288,-1.37329 4.01001,-2.14233 2.30713,-0.79651 5.02624,-0.79651 2.27967,0 4.11988,0.57678 1.84021,0.54932 3.1311,1.59302 1.31836,1.01624 2.03247,2.47193 0.71411,1.45568 0.71411,3.24096 z"
86
+ inkscape:connector-curvature="0"/>
87
+ <path id="path3473"
88
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
89
+ d="m 321.06116,369.3927 q -0.79651,2.27966 -1.78528,3.95508 -0.9613,1.67541 -2.03247,2.82898 -1.0437,1.15356 -2.1698,1.86767 -1.09863,0.71411 -2.14234,1.09864 -1.0437,0.38452 -2.005,0.52185 -0.93384,0.13733 -1.67542,0.13733 -1.26342,0 -2.36206,-0.38453 -1.09863,-0.38452 -1.9226,-1.20849 -0.79651,-0.82398 -1.26343,-2.0874 -0.46692,-1.26343 -0.46692,-3.04871 0,-0.76904 0.10986,-1.67541 0.10987,-0.93384 0.32959,-2.00501 l 6.01502,-28.17993 8.32214,-1.1261 -6.45447,30.3772 q -0.13733,0.46692 -0.19226,0.93384 -0.0275,0.43945 -0.0275,0.8789 0,1.18103 0.54931,1.64795 0.54932,0.43945 1.73035,0.43945 0.82397,0 1.59302,-0.35705 0.79651,-0.38452 1.45569,-1.0437 0.65918,-0.65918 1.18103,-1.56555 0.52185,-0.93384 0.85144,-2.00501 l 2.36206,0 z"
90
+ inkscape:connector-curvature="0"/>
91
+ <path id="path3475"
92
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
93
+ d="m 332.62427,343.87695 q 0,0.93384 -0.35706,1.75782 -0.35705,0.7965 -0.98877,1.40075 -0.60425,0.57678 -1.42822,0.93384 -0.79651,0.32959 -1.73035,0.32959 -0.93383,0 -1.75781,-0.32959 -0.79651,-0.35706 -1.40076,-0.93384 -0.60424,-0.60425 -0.9613,-1.40075 -0.32959,-0.82398 -0.32959,-1.75782 0,-0.93383 0.32959,-1.73034 0.35706,-0.82398 0.9613,-1.42823 0.60425,-0.63171 1.40076,-0.98877 0.82398,-0.35705 1.75781,-0.35705 0.93384,0 1.73035,0.35705 0.82397,0.35706 1.42822,0.98877 0.63172,0.60425 0.98877,1.42823 0.35706,0.79651 0.35706,1.73034 z m 3.48816,25.51575 q -0.79651,2.27966 -1.78528,3.95508 -0.96131,1.67541 -2.03247,2.82898 -1.0437,1.15356 -2.1698,1.86767 -1.09863,0.71411 -2.14234,1.09864 -1.0437,0.38452 -2.005,0.52185 -0.93384,0.13733 -1.67542,0.13733 -1.26342,0 -2.36206,-0.38453 -1.09863,-0.38452 -1.9226,-1.20849 -0.79651,-0.82398 -1.26343,-2.0874 -0.46692,-1.26343 -0.46692,-3.04871 0,-0.76904 0.10986,-1.67541 0.10987,-0.93384 0.32959,-2.00501 l 3.81775,-18.04504 8.10242,0 -4.03748,19.11621 q -0.13733,0.46692 -0.19226,0.93384 -0.0275,0.43945 -0.0275,0.8789 0,1.18103 0.54931,1.64795 0.54932,0.43945 1.73035,0.43945 0.82397,0 1.59302,-0.35705 0.79651,-0.38452 1.45569,-1.0437 0.65918,-0.65918 1.18103,-1.56555 0.52185,-0.93384 0.85144,-2.00501 l 2.36206,0 z"
94
+ inkscape:connector-curvature="0"/>
95
+ <path id="path3477"
96
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
97
+ d="m 365.66565,369.3927 q -0.79651,2.27966 -1.73035,3.92761 -0.93384,1.64795 -1.95007,2.77405 -0.98877,1.09863 -2.03247,1.78528 -1.0437,0.65918 -2.03247,1.01623 -0.98877,0.35706 -1.89514,0.46692 -0.90638,0.10987 -1.64795,0.10987 -2.3346,0 -3.76282,-1.2085 -1.42822,-1.23596 -1.75781,-3.62549 -0.63172,0.96131 -1.45569,1.89514 -0.79651,0.90638 -1.84021,1.64795 -1.01624,0.71411 -2.27966,1.18103 -1.26343,0.43946 -2.74659,0.43946 -1.45568,0 -2.80151,-0.46692 -1.34583,-0.46692 -2.38953,-1.53809 -1.0437,-1.07117 -1.67541,-2.80151 -0.63172,-1.73035 -0.63172,-4.22974 0,-1.92261 0.38453,-4.11987 0.38452,-2.19727 1.18103,-4.39453 0.79651,-2.19727 1.97754,-4.20227 1.20849,-2.03247 2.80151,-3.57056 1.62048,-1.56555 3.65295,-2.47192 2.03247,-0.93384 4.47693,-0.93384 2.38953,0 3.4607,0.82397 1.09863,0.82398 1.09863,2.03247 l 0,0.21973 2.74658,-12.9364 8.32214,-1.1261 -6.45446,30.3772 q -0.13733,0.46692 -0.19226,0.93384 -0.0549,0.43945 -0.0549,0.8789 0,1.18103 0.54932,1.64795 0.57678,0.43945 1.75781,0.43945 0.82398,0 1.51062,-0.35705 0.71411,-0.38452 1.26343,-1.0437 0.57678,-0.65918 1.01624,-1.56555 0.43945,-0.93384 0.76904,-2.00501 l 2.36206,0 z m -16.86401,0 2.74658,-12.88147 q -0.0549,-0.24719 -0.19226,-0.57678 -0.10987,-0.32959 -0.35706,-0.63172 -0.24719,-0.32959 -0.68664,-0.52185 -0.41199,-0.21972 -1.07117,-0.21972 -1.18103,0 -2.2522,0.76904 -1.0437,0.76904 -1.92261,2.05994 -0.8789,1.26342 -1.56555,2.88391 -0.68664,1.62048 -1.18103,3.35083 -0.46692,1.70288 -0.71411,3.37829 -0.24719,1.64795 -0.24719,2.96631 0,1.62049 0.30212,2.49939 0.30213,0.87891 0.71411,1.31836 0.43946,0.41199 0.93384,0.49439 0.49439,0.0824 0.87891,0.0824 0.57678,0 1.26343,-0.27465 0.71411,-0.30213 1.34582,-0.87891 0.65918,-0.57678 1.18103,-1.45569 0.54932,-0.87891 0.82398,-2.05994 l 0,-0.30212 z"
98
+ inkscape:connector-curvature="0"/>
99
+ <path id="path3479"
100
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
101
+ d="m 386.8418,369.3927 q -1.18103,1.97754 -2.71912,3.84522 -1.51062,1.86767 -3.43323,3.32336 -1.89514,1.45569 -4.22973,2.36206 -2.30713,0.87891 -5.08118,0.87891 -2.005,0 -3.62549,-0.49439 -1.62048,-0.52185 -2.77405,-1.59302 -1.15356,-1.07116 -1.75781,-2.74658 -0.63171,-1.70288 -0.63171,-4.09241 0,-1.62048 0.32959,-3.73535 0.32959,-2.11487 1.0437,-4.3396 0.71411,-2.22473 1.89514,-4.36706 1.18103,-2.14234 2.85645,-3.81775 1.67541,-1.70288 3.92761,-2.71912 2.2522,-1.0437 5.13611,-1.0437 1.89514,0 3.07617,0.46692 1.20849,0.43945 1.89514,1.18103 0.71411,0.74158 0.9613,1.73035 0.27466,0.9613 0.27466,2.005 0,2.44446 -1.07117,4.55933 -1.07116,2.0874 -2.88391,3.65295 -1.78527,1.56555 -4.11987,2.52686 -2.33459,0.9613 -4.86145,1.1261 -0.0549,0.63171 -0.10986,1.20849 -0.0275,0.54932 -0.0275,1.0437 0,1.42823 0.24719,2.36206 0.27466,0.90638 0.76905,1.42823 0.52185,0.52185 1.26342,0.74157 0.76905,0.19226 1.78528,0.19226 1.67542,0 3.02124,-0.43945 1.37329,-0.43945 2.55432,-1.20849 1.18103,-0.76905 2.22474,-1.81275 1.07116,-1.0437 2.14233,-2.22473 l 1.92261,0 z m -15.3534,-3.98254 q 1.59302,-0.10987 3.07618,-0.90638 1.48315,-0.7965 2.60925,-2.05993 1.1261,-1.2909 1.78528,-2.91138 0.68664,-1.64795 0.68664,-3.40576 0,-1.0437 -0.30212,-1.67542 -0.30213,-0.63171 -1.09863,-0.63171 -1.07117,0 -2.11487,1.0437 -1.01624,1.01624 -1.92261,2.66419 -0.90637,1.64795 -1.62048,3.73535 -0.68665,2.05993 -1.09864,4.14734 z"
102
+ inkscape:connector-curvature="0"/>
103
+ <path id="path3481"
104
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.25px;font-family:Lobster;-inkscape-font-specification:Lobster;text-align:center;text-anchor:middle;fill:#00d1b2;fill-opacity:1"
105
+ d="m 382.83179,379.47266 5.96008,-28.125 8.10242,0 -0.71411,3.48816 q 0.74157,-0.65918 1.51062,-1.2909 0.76904,-0.63171 1.59301,-1.09863 0.85144,-0.49439 1.75782,-0.79651 0.90637,-0.30212 1.9226,-0.30212 0.96131,0 1.67542,0.35705 0.74158,0.35706 1.23596,0.93384 0.49439,0.57678 0.74158,1.34582 0.24719,0.76905 0.24719,1.59302 0,0.74158 -0.24719,1.48316 -0.24719,0.71411 -0.76905,1.29089 -0.49438,0.57678 -1.26342,0.9613 -0.76905,0.35706 -1.78528,0.35706 -0.79651,0 -1.23596,-0.27466 -0.41199,-0.27466 -0.63172,-0.68664 -0.21972,-0.41199 -0.32959,-0.87891 -0.0824,-0.49438 -0.19226,-0.90637 -0.10986,-0.41199 -0.30212,-0.68665 -0.1648,-0.27466 -0.57678,-0.27466 -1.2909,0 -2.1698,0.60425 -0.87891,0.57678 -1.92261,1.53809 l -4.5044,21.36841 -8.10241,0 z"
106
+ inkscape:connector-curvature="0"/>
107
+ </g>
108
+ </g>
109
+ <g id="g4359" transform="translate(13.72272,4.8433532)">
110
+ <rect y="852.39502" x="199.99997" height="10" width="10" id="rect4315" style="fill:#000000;fill-opacity:1"/>
111
+ <rect y="852.36774" x="214.99846" height="10" width="10" id="rect4315-3"
112
+ style="fill:#000000;fill-opacity:1"/>
113
+ <rect y="852.37762" x="230.01768" height="10" width="10" id="rect4315-6"
114
+ style="fill:#000000;fill-opacity:1"/>
115
+ <rect y="852.3526" x="245.05391" height="10" width="10" id="rect4315-7"
116
+ style="fill:#000000;fill-opacity:1"/>
117
+ <rect y="852.32104" x="260.0347" height="10" width="10" id="rect4315-7-5"
118
+ style="fill:#000000;fill-opacity:1"/>
119
+ </g>
120
+ </g>
121
+ </svg>
assets/img/svg-icons.svg ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg"
2
+ xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <symbol id="icon-trash" viewBox="0 0 20 20">
4
+ <path d="M12 4h3c0.55 0 1 0.45 1 1v1h-13v-1c0-0.55 0.45-1 1-1h3c0.23-1.14 1.29-2 2.5-2s2.27 0.86 2.5 2zM8 4h3c-0.21-0.58-0.85-1-1.5-1s-1.29 0.42-1.5 1zM4 7h11v10c0 0.55-0.45 1-1 1h-9c-0.55 0-1-0.45-1-1v-10zM7 16v-7h-1v7h1zM10 16v-7h-1v7h1zM13 16v-7h-1v7h1z"></path>
5
+ </symbol>
6
+ <symbol id="icon-angle-down" viewBox="0 0 20 20">
7
+ <path d="M5 6l5 5 5-5 2 1-7 7-7-7z"></path>
8
+ </symbol>
9
+ <symbol id="icon-angle-up" viewBox="0 0 20 20">
10
+ <path d="M15 14l-5-5-5 5-2-1 7-7 7 7z"></path>
11
+ </symbol>
12
+ <symbol id="icon-angle-down-alt" viewBox="0 0 20 20">
13
+ <path d="M9 2h2v12l4-4 2 1-7 7-7-7 2-1 4 4v-12z"></path>
14
+ </symbol>
15
+ <symbol id="icon-angle-up-alt" viewBox="0 0 20 20">
16
+ <path d="M11 18h-2v-12l-4 4-2-1 7-7 7 7-2 1-4-4v12z"></path>
17
+ </symbol>
18
+ </svg>
assets/js/admin.js CHANGED
@@ -1,226 +1,332 @@
1
- (function( $ ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  "use strict";
3
 
4
- if ( $('#_carousel_slider_slide_type').val() == 'post-carousel' ) {
5
- var _postQueryType = $('#_post_query_type').val();
6
- if ( _postQueryType == 'latest_posts' ) {}
7
- if ( _postQueryType == 'date_range' ) {
8
- $('#field-_post_date_after').show();
9
- $('#field-_post_date_before').show();
10
- }
11
- if ( _postQueryType == 'post_categories' ) {
12
- $('#field-_post_categories').show();
13
- }
14
- if ( _postQueryType == 'post_tags' ) {
15
- $('#field-_post_tags').show();
16
- }
17
- if ( _postQueryType == 'specific_posts' ) {
18
- $('#field-_post_in').show();
19
- $('#field-_posts_per_page').hide();
20
- }
21
- }
22
 
23
- $('#_post_query_type').on('change', function(){
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
- $('#field-_post_date_after').hide('fast');
26
- $('#field-_post_date_before').hide('fast');
27
- $('#field-_post_categories').hide('fast');
28
- $('#field-_post_tags').hide('fast');
29
- $('#field-_post_in').hide('fast');
30
- $('#field-_posts_per_page').show('fast');
31
 
32
- if ( this.value == 'date_range' ) {
33
- $('#field-_post_date_after').slideDown();
34
- $('#field-_post_date_before').slideDown();
35
- }
36
- if ( this.value == 'post_categories' ) {
37
- $('#field-_post_categories').slideDown();
38
- }
39
- if ( this.value == 'post_tags' ) {
40
- $('#field-_post_tags').slideDown();
41
- }
42
- if ( this.value == 'specific_posts' ) {
43
- $('#field-_post_in').slideDown();
44
- $('#field-_posts_per_page').hide('fast');
45
- }
46
  });
47
 
48
- if ( $('#_carousel_slider_slide_type').val() == 'product-carousel' ) {
49
- var _productQueryType = $('#_product_query_type').val();
50
- if ( _productQueryType == 'query_porduct' ) {
51
- $('#field-_product_query').show();
52
- }
53
- if ( _productQueryType == 'product_categories' ) {
54
- $('#field-_product_categories').show();
55
- }
56
- if ( _productQueryType == 'product_tags' ) {
57
- $('#field-_product_tags').show();
58
- }
59
- if ( _productQueryType == 'specific_products' ) {
60
- $('#field-_product_in').show();
61
- }
62
- }
63
 
64
- $('#_product_query_type').on('change', function(){
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
- $('#field-_product_query').hide('fast');
67
- $('#field-_product_categories').hide('fast');
68
- $('#field-_product_tags').hide('fast');
69
- $('#field-_product_in').hide('fast');
70
- $('#field-_products_per_page').show('fast');
71
 
72
- if ( this.value == 'query_porduct' ) {
73
- $('#field-_product_query').slideDown();
74
- }
75
- if ( this.value == 'product_categories' ) {
76
- $('#field-_product_categories').slideDown();
77
- }
78
- if ( this.value == 'product_tags' ) {
79
- $('#field-_product_tags').slideDown();
80
- }
81
- if ( this.value == 'specific_products' ) {
82
- $('#field-_product_in').slideDown();
83
- $('#field-_products_per_page').hide('fast');
84
- }
85
  });
86
 
87
- $('#_carousel_slider_slide_type').on('change', function() {
88
-
89
- $('#section_images_settings').hide('fast');
90
- $('#section_url_images_settings').hide('fast');
91
- $('#section_images_general_settings').hide('fast');
92
- $('#section_post_query').hide('fast');
93
- $('#section_video_settings').hide('fast');
94
- $('#section_product_query').hide('fast');
95
-
96
- if (this.value == 'image-carousel') {
97
- $('#section_images_settings').slideDown();
98
- $('#section_images_general_settings').slideDown();
99
- }
100
- if (this.value == 'image-carousel-url') {
101
- $('#section_url_images_settings').slideDown();
102
- $('#section_images_general_settings').slideDown();
103
- }
104
- if (this.value == 'post-carousel') {
105
- $('#section_post_query').slideDown();
106
- }
107
- if (this.value == 'video-carousel') {
108
- $('#section_video_settings').slideDown();
109
- }
110
- if (this.value == 'product-carousel') {
111
- $('#section_product_query').slideDown();
112
- }
113
  });
114
 
115
- // Select2
116
- $("select.select2").each( function () {
117
- $(this).select2();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  });
119
 
120
- // Accordion
121
- $(".shapla-toggle").each( function () {
122
- if($(this).attr('data-id') == 'closed') {
123
- $(this).accordion({
124
- header: '.shapla-toggle-title',
125
- collapsible: true,
126
- heightStyle: "content",
127
- active: false
128
- });
129
- } else {
130
- $(this).accordion({
131
- header: '.shapla-toggle-title',
132
- collapsible: true,
133
- heightStyle: "content"
134
- });
135
  }
136
- });
137
-
138
- //Initializing jQuery UI Datepicker
139
- $('.datepicker').each(function(){
140
- $( this ).datepicker({
141
- dateFormat: 'MM dd, yy',
142
- changeMonth: true,
143
- changeYear: true,
144
- onClose: function( selectedDate ){
145
- $( this ).datepicker( 'option', 'minDate', selectedDate );
146
- }
147
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  });
149
 
150
- // Initializing WP Color Picker
151
- $('.colorpicker').each(function(){
152
- $(this).wpColorPicker();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  });
154
 
155
- // URL Images Model
156
- $( "#_images_urls_btn" ).on('click', function(){
157
- $( "#CarouselSliderModal" ).css("display", "block");
158
- $("body").addClass("overflowHidden");
 
 
159
  });
160
- $( "#CarouselSliderModal" ).on('click', '.carousel_slider-close', function(){
161
- $( "#CarouselSliderModal" ).css("display", "none");
162
- $("body").removeClass("overflowHidden");
 
 
 
 
163
  });
164
 
165
- $('.carousel_slider-fields').livequery(function(){
166
- var carouselSliderFields = '<div class="carousel_slider-fields">'
167
- + '<label class="setting">'
168
- + '<span class="name">URL</span>'
169
- + '<input type="url" name="_images_urls[url][]" value="" autocomplete="off">'
170
- + '</label>'
171
- + '<label class="setting">'
172
- + '<span class="name">Title</span>'
173
- + '<input type="text" name="_images_urls[title][]" value="" autocomplete="off">'
174
- + '</label>'
175
- + '<label class="setting">'
176
- + '<span class="name">Caption</span>'
177
- + '<textarea name="_images_urls[caption][]"></textarea>'
178
- + '</label>'
179
- + '<label class="setting">'
180
- + '<span class="name">Alt Text</span>'
181
- + '<input type="text" name="_images_urls[alt][]" value="" autocomplete="off">'
182
- + '</label>'
183
- + '<label class="setting">'
184
- + '<span class="name">Link To URL</span>'
185
- + '<input type="text" name="_images_urls[link_url][]" value="" autocomplete="off">'
186
- + '</label>'
187
- + '<div class="actions">'
188
- + '<span><span class="dashicons dashicons-move"></span></span>'
189
- + '<span class="add_row"><span class="dashicons dashicons-plus-alt"></span></span>'
190
- + '<span class="delete_row"><span class="dashicons dashicons-trash"></span></span>'
191
- + '</div>'
192
- + '</div>';
193
- // Append new row
194
- $( this ).on('click', '.add_row', function(){
195
- $( this ).closest('.carousel_slider-fields').after(carouselSliderFields);
196
- });
197
- // Delete current row row
198
- $( this ).on('click', '.delete_row', function(){
199
- $( this ).closest('.carousel_slider-fields').remove();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  });
201
  });
202
- $('#carousel_slider_form').sortable();
203
- var carouselSliderBodyHeight = $( window ).height() - (38 + 48 + 32 + 30);
204
- $('.carousel_slider-modal-body').css('height', carouselSliderBodyHeight + 'px');
205
 
206
- // Gallery Images Editor
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  var frame,
208
- isMultiple = true,
209
- images = CarouselSlider.image_ids,
210
  selection = loadImages(images);
211
 
212
- $('#carousel_slider_gallery_btn').on('click', function(e) {
213
  e.preventDefault();
214
  var options = {
215
- title: CarouselSlider.create_btn_text,
216
  state: 'gallery-edit',
217
- // frame: 'post',
218
  frame: 'post',
219
  selection: selection
220
  };
221
 
222
- if( frame || selection ) {
223
- options['title'] = CarouselSlider.edit_btn_text;
224
  }
225
 
226
  frame = wp.media(options).open();
@@ -228,57 +334,56 @@
228
  // Tweak Views
229
  frame.menu.get('view').unset('cancel');
230
  frame.menu.get('view').unset('separateCancel');
231
- frame.menu.get('view').get('gallery-edit').el.innerHTML = CarouselSlider.edit_btn_text;
232
  frame.content.get('view').sidebar.unset('gallery'); // Hide Gallery Settings in sidebar
233
 
234
  // when editing a gallery
235
  overrideGalleryInsert();
236
- frame.on( 'toolbar:render:gallery-edit', function() {
237
  overrideGalleryInsert();
238
  });
239
 
240
- frame.on( 'content:render:browse', function( browser ) {
241
- if ( !browser ) return;
242
  // Hide Gallery Settings in sidebar
243
- browser.sidebar.on('ready', function(){
244
  browser.sidebar.unset('gallery');
245
  });
246
  // Hide filter/search as they don't work
247
- browser.toolbar.on('ready', function(){
248
- if(browser.toolbar.controller._state == 'gallery-library'){
249
  browser.toolbar.$el.hide();
250
  }
251
  });
252
  });
253
 
254
  // All images removed
255
- frame.state().get('library').on( 'remove', function() {
256
  var models = frame.state().get('library');
257
- if(models.length == 0){
258
  selection = false;
259
  $.post(ajaxurl, {
260
  ids: '',
261
  action: 'carousel_slider_save_images',
262
- post_id: CarouselSlider.post_id,
263
- nonce: CarouselSlider.nonce
264
  });
265
  }
266
  });
267
 
268
- function overrideGalleryInsert(){
269
  frame.toolbar.get('view').set({
270
  insert: {
271
  style: 'primary',
272
- text: CarouselSlider.save_btn_text,
273
- click: function(){
274
  var models = frame.state().get('library'),
275
  ids = '';
276
 
277
- models.each( function( attachment ) {
278
  ids += attachment.id + ','
279
  });
280
 
281
- this.el.innerHTML = CarouselSlider.progress_btn_text;
282
 
283
  $.ajax({
284
  type: 'POST',
@@ -286,18 +391,16 @@
286
  data: {
287
  ids: ids,
288
  action: 'carousel_slider_save_images',
289
- post_id: CarouselSlider.post_id,
290
- nonce: CarouselSlider.nonce
291
  },
292
- success: function(){
293
  selection = loadImages(ids);
294
- $('#_carousel_slider_images_ids').val( ids );
295
  frame.close();
296
  },
297
  dataType: 'html'
298
- }).done( function( data ) {
299
- $('.carousel_slider_gallery_list').html( data );
300
- console.log(data);
301
  });
302
  }
303
  }
@@ -306,26 +409,26 @@
306
 
307
  });
308
 
309
- function loadImages(images){
310
- if (images){
311
  var shortcode = new wp.shortcode({
312
- tag: 'gallery',
313
- attrs: { ids: images },
314
- type: 'single'
315
  });
316
 
317
- var attachments = wp.media.gallery.attachments( shortcode );
318
 
319
- var selection = new wp.media.model.Selection( attachments.models, {
320
- props: attachments.props.toJSON(),
321
  multiple: true
322
  });
323
 
324
  selection.gallery = attachments.gallery;
325
 
326
- selection.more().done( function() {
327
  // Break ties with the query.
328
- selection.props.set({ query: false });
329
  selection.unmirror();
330
  selection.props.unset('orderby');
331
  });
@@ -334,4 +437,275 @@
334
  }
335
  return false;
336
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  })(jQuery);
1
+ (function ($) {
2
+ 'use strict';
3
+ $(document).on("click", ".accordion-header", function () {
4
+ $(this).toggleClass('active');
5
+ var panel = $(this).next();
6
+
7
+ if (parseInt(panel.css('max-height')) > 0) {
8
+ panel.css('max-height', '0');
9
+ panel.css('overflow', 'hidden');
10
+ } else {
11
+ panel.css('max-height', panel.prop('scrollHeight') + "px");
12
+ panel.css('overflow', 'visible');
13
+ }
14
+ });
15
+ })(jQuery);
16
+ (function ($) {
17
  "use strict";
18
 
19
+ var body = $('body'),
20
+ contentButtonModal = $('#contentButtonModal'),
21
+ frame,
22
+ section,
23
+ imgIdInput,
24
+ slideCanvas,
25
+ delImgLink,
26
+ buttonConfig;
27
+
28
+ // Add new content slide
29
+ body.on('click', '.carousel-slider__add-slide', function (e) {
30
+ e.preventDefault();
 
 
 
 
 
 
31
 
32
+ $.ajax({
33
+ url: ajaxurl,
34
+ method: 'POST',
35
+ data: {
36
+ action: 'add_content_slide',
37
+ task: 'add-slide',
38
+ post_id: $(this).data('post-id')
39
+ },
40
+ success: function () {
41
+ window.location.reload(true);
42
+ }
43
+ });
44
+ });
45
 
46
+ // Delete a slide
47
+ body.on('click', '.carousel_slider__delete_slide', function (e) {
48
+ e.preventDefault();
 
 
 
49
 
50
+ $.ajax({
51
+ url: ajaxurl,
52
+ method: 'POST',
53
+ data: {
54
+ action: 'add_content_slide',
55
+ task: 'delete-slide',
56
+ post_id: $(this).data('post-id'),
57
+ slide_pos: $(this).data('slide-pos')
58
+ },
59
+ success: function () {
60
+ window.location.reload(true);
61
+ }
62
+ });
 
63
  });
64
 
65
+ // Move slide to top
66
+ body.on('click', '.carousel_slider__move_top', function (e) {
67
+ e.preventDefault();
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
+ $.ajax({
70
+ url: ajaxurl,
71
+ method: 'POST',
72
+ data: {
73
+ action: 'add_content_slide',
74
+ task: 'move-slide-top',
75
+ post_id: $(this).data('post-id'),
76
+ slide_pos: $(this).data('slide-pos')
77
+ },
78
+ success: function () {
79
+ window.location.reload(true);
80
+ }
81
+ });
82
+ });
83
 
84
+ // Move slide up
85
+ body.on('click', '.carousel_slider__move_up', function (e) {
86
+ e.preventDefault();
 
 
87
 
88
+ $.ajax({
89
+ url: ajaxurl,
90
+ method: 'POST',
91
+ data: {
92
+ action: 'add_content_slide',
93
+ task: 'move-slide-up',
94
+ post_id: $(this).data('post-id'),
95
+ slide_pos: $(this).data('slide-pos')
96
+ },
97
+ success: function () {
98
+ window.location.reload(true);
99
+ }
100
+ });
101
  });
102
 
103
+ // Move slide down
104
+ body.on('click', '.carousel_slider__move_down', function (e) {
105
+ e.preventDefault();
106
+
107
+ $.ajax({
108
+ url: ajaxurl,
109
+ method: 'POST',
110
+ data: {
111
+ action: 'add_content_slide',
112
+ task: 'move-slide-down',
113
+ post_id: $(this).data('post-id'),
114
+ slide_pos: $(this).data('slide-pos')
115
+ },
116
+ success: function () {
117
+ window.location.reload(true);
118
+ }
119
+ });
 
 
 
 
 
 
 
 
 
120
  });
121
 
122
+ // Move slide to bottom
123
+ body.on('click', '.carousel_slider__move_bottom', function (e) {
124
+ e.preventDefault();
125
+
126
+ $.ajax({
127
+ url: ajaxurl,
128
+ method: 'POST',
129
+ data: {
130
+ action: 'add_content_slide',
131
+ task: 'move-slide-bottom',
132
+ post_id: $(this).data('post-id'),
133
+ slide_pos: $(this).data('slide-pos')
134
+ },
135
+ success: function () {
136
+ window.location.reload(true);
137
+ }
138
+ });
139
  });
140
 
141
+ // Add slide image
142
+ body.on('click', '.slide_image_add', function (e) {
143
+ e.preventDefault();
144
+
145
+ var _this = $(this);
146
+ section = _this.closest('.slide_bg_wrapper');
147
+ slideCanvas = section.find('.content_slide_canvas');
148
+ imgIdInput = section.find('.background_image_id');
149
+ delImgLink = section.find('.delete-bg-img');
150
+
151
+ // If the media frame already exists, reopen it.
152
+ if (frame) {
153
+ frame.open();
154
+ return;
 
155
  }
156
+
157
+ // Create a new media frame
158
+ frame = wp.media({
159
+ title: _this.data('title'),
160
+ button: {
161
+ text: _this.data('button-text')
162
+ },
163
+ multiple: false // Set to true to allow multiple files to be selected
 
 
 
164
  });
165
+
166
+ // When an image is selected in the media frame...
167
+ frame.on('select', function () {
168
+
169
+ // Get media attachment details from the frame state
170
+ var attachment = frame.state().get('selection').first().toJSON();
171
+
172
+ // Send the attachment URL to our custom image input field.
173
+ slideCanvas.css('background-image', 'url(' + attachment.url + ')');
174
+
175
+ // Send the attachment id to our hidden input
176
+ imgIdInput.val(attachment.id);
177
+
178
+ // Show the remove image link
179
+ delImgLink.removeClass('hidden');
180
+ });
181
+
182
+ // Finally, open the modal on click
183
+ frame.open();
184
  });
185
 
186
+ // Remove slide image
187
+ body.on('click', '.delete-bg-img', function (e) {
188
+ e.preventDefault();
189
+
190
+ section = $(this).closest('.slide_bg_wrapper');
191
+ slideCanvas = section.find('.content_slide_canvas');
192
+ imgIdInput = section.find('.background_image_id');
193
+ delImgLink = section.find('.delete-bg-img');
194
+
195
+ // Clear out the preview image
196
+ slideCanvas.css('background-image', '');
197
+
198
+ // Delete the image id from the hidden input
199
+ imgIdInput.val('0');
200
+
201
+ // Hide the delete image link
202
+ delImgLink.addClass('hidden');
203
  });
204
 
205
+ // Background Position
206
+ body.on('change', '.background_image_position', function () {
207
+ var _val = $(this).val();
208
+ section = $(this).closest('.slide_bg_wrapper');
209
+ slideCanvas = section.find('.content_slide_canvas');
210
+ slideCanvas.css('background-position', _val);
211
  });
212
+
213
+ // Background Size
214
+ body.on('change', '.background_image_size', function () {
215
+ var _val = $(this).val();
216
+ section = $(this).closest('.slide_bg_wrapper');
217
+ slideCanvas = section.find('.content_slide_canvas');
218
+ slideCanvas.css('background-size', _val);
219
  });
220
 
221
+ // Add Button Style to Modal for Edit
222
+ $('.addContentButton').on('click', function (e) {
223
+ e.preventDefault();
224
+
225
+ buttonConfig = $(this).closest('.button_config');
226
+ var button_text = buttonConfig.find('.button_text').val();
227
+ var button_url = buttonConfig.find('.button_url').val();
228
+ var button_target = buttonConfig.find('.button_target').val();
229
+ var button_type = buttonConfig.find('.button_type').val();
230
+ var button_size = buttonConfig.find('.button_size').val();
231
+ var button_color = buttonConfig.find('.button_color').val();
232
+
233
+ contentButtonModal.find('#_button_text').val(button_text);
234
+ contentButtonModal.find('#_button_url').val(button_url);
235
+ contentButtonModal.find('#_button_target').val(button_target);
236
+ contentButtonModal.find('#_button_type').val(button_type);
237
+ contentButtonModal.find('#_button_size').val(button_size);
238
+ contentButtonModal.find('#_button_color').val(button_color);
239
+
240
+ contentButtonModal.addClass('is-active');
241
+ });
242
+
243
+ // Save Button style from modal form
244
+ $('#saveContentButton').on('click', function (e) {
245
+ e.preventDefault();
246
+
247
+ if (!buttonConfig) {
248
+ contentButtonModal.removeClass('is-active');
249
+ return false;
250
+ }
251
+
252
+ var button_text = contentButtonModal.find('#_button_text').val();
253
+ var button_url = contentButtonModal.find('#_button_url').val();
254
+ var button_target = contentButtonModal.find('#_button_target').val();
255
+ var button_type = contentButtonModal.find('#_button_type').val();
256
+ var button_size = contentButtonModal.find('#_button_size').val();
257
+ var button_color = contentButtonModal.find('#_button_color').val();
258
+
259
+ buttonConfig.find('.button_text').val(button_text);
260
+ buttonConfig.find('.button_url').val(button_url);
261
+ buttonConfig.find('.button_target').val(button_target);
262
+ buttonConfig.find('.button_type').val(button_type);
263
+ buttonConfig.find('.button_size').val(button_size);
264
+ buttonConfig.find('.button_color').val(button_color);
265
+
266
+ contentButtonModal.removeClass('is-active');
267
+
268
+ });
269
+
270
+ // Background Color
271
+ $('.slide-color-picker').each(function () {
272
+ section = $(this).closest('.slide_bg_wrapper');
273
+ slideCanvas = section.find('.content_slide_canvas');
274
+ $(this).wpColorPicker({
275
+ palettes: [
276
+ '#2196F3', // Blue
277
+ '#009688', // Teal
278
+ '#4CAF50', // Green
279
+ '#F44336', // Red
280
+ '#FFEB3B', // Yellow
281
+ '#00D1B2', // Firoza
282
+ '#000000', // Blank
283
+ '#ffffff' // White
284
+ ],
285
+ change: function (event, ui) {
286
+ slideCanvas.css('background-color', ui.color.toString());
287
+ }
288
  });
289
  });
 
 
 
290
 
291
+ // Slide Link
292
+ $(document).on('change', '.link_type', function (e) {
293
+ var _this = $(this);
294
+ var _val = _this.val();
295
+ var _tab = _this.closest('.tab-content-link');
296
+ var _linkFull = _tab.find('.ContentCarouselLinkFull');
297
+ var _linkBtn = _tab.find('.ContentCarouselLinkButtons');
298
+ if (_val === 'full') {
299
+ _linkBtn.hide();
300
+ _linkFull.show();
301
+ } else if (_val === 'button') {
302
+ _linkFull.hide();
303
+ _linkBtn.show();
304
+ } else {
305
+ _linkFull.hide();
306
+ _linkBtn.hide();
307
+ }
308
+ })
309
+
310
+ })(jQuery);
311
+ (function ($) {
312
+ "use strict";
313
+
314
  var frame,
315
+ _this = $('#carousel_slider_gallery_btn'),
316
+ images = _this.data('ids'),
317
  selection = loadImages(images);
318
 
319
+ _this.on('click', function (e) {
320
  e.preventDefault();
321
  var options = {
322
+ title: _this.data('create'),
323
  state: 'gallery-edit',
 
324
  frame: 'post',
325
  selection: selection
326
  };
327
 
328
+ if (frame || selection) {
329
+ options['title'] = _this.data('edit');
330
  }
331
 
332
  frame = wp.media(options).open();
334
  // Tweak Views
335
  frame.menu.get('view').unset('cancel');
336
  frame.menu.get('view').unset('separateCancel');
337
+ frame.menu.get('view').get('gallery-edit').el.innerHTML = _this.data('edit');
338
  frame.content.get('view').sidebar.unset('gallery'); // Hide Gallery Settings in sidebar
339
 
340
  // when editing a gallery
341
  overrideGalleryInsert();
342
+ frame.on('toolbar:render:gallery-edit', function () {
343
  overrideGalleryInsert();
344
  });
345
 
346
+ frame.on('content:render:browse', function (browser) {
347
+ if (!browser) return;
348
  // Hide Gallery Settings in sidebar
349
+ browser.sidebar.on('ready', function () {
350
  browser.sidebar.unset('gallery');
351
  });
352
  // Hide filter/search as they don't work
353
+ browser.toolbar.on('ready', function () {
354
+ if (browser.toolbar.controller._state === 'gallery-library') {
355
  browser.toolbar.$el.hide();
356
  }
357
  });
358
  });
359
 
360
  // All images removed
361
+ frame.state().get('library').on('remove', function () {
362
  var models = frame.state().get('library');
363
+ if (models.length === 0) {
364
  selection = false;
365
  $.post(ajaxurl, {
366
  ids: '',
367
  action: 'carousel_slider_save_images',
368
+ post_id: _this.data('id')
 
369
  });
370
  }
371
  });
372
 
373
+ function overrideGalleryInsert() {
374
  frame.toolbar.get('view').set({
375
  insert: {
376
  style: 'primary',
377
+ text: _this.data('save'),
378
+ click: function () {
379
  var models = frame.state().get('library'),
380
  ids = '';
381
 
382
+ models.each(function (attachment) {
383
  ids += attachment.id + ','
384
  });
385
 
386
+ this.el.innerHTML = _this.data('progress');
387
 
388
  $.ajax({
389
  type: 'POST',
391
  data: {
392
  ids: ids,
393
  action: 'carousel_slider_save_images',
394
+ post_id: _this.data('id')
 
395
  },
396
+ success: function () {
397
  selection = loadImages(ids);
398
+ $('#_carousel_slider_images_ids').val(ids);
399
  frame.close();
400
  },
401
  dataType: 'html'
402
+ }).done(function (data) {
403
+ $('.carousel_slider_gallery_list').html(data);
 
404
  });
405
  }
406
  }
409
 
410
  });
411
 
412
+ function loadImages(images) {
413
+ if (images) {
414
  var shortcode = new wp.shortcode({
415
+ tag: 'gallery',
416
+ attrs: {ids: images},
417
+ type: 'single'
418
  });
419
 
420
+ var attachments = wp.media.gallery.attachments(shortcode);
421
 
422
+ var selection = new wp.media.model.Selection(attachments.models, {
423
+ props: attachments.props.toJSON(),
424
  multiple: true
425
  });
426
 
427
  selection.gallery = attachments.gallery;
428
 
429
+ selection.more().done(function () {
430
  // Break ties with the query.
431
+ selection.props.set({query: false});
432
  selection.unmirror();
433
  selection.props.unset('orderby');
434
  });
437
  }
438
  return false;
439
  }
440
+
441
+ })(jQuery);
442
+ /**
443
+ * Carousel Slider Gallery from URL
444
+ */
445
+ (function ($) {
446
+ 'use strict';
447
+
448
+ var body = $('body'),
449
+ modal = $('#CarouselSliderModal'),
450
+ modalOpenBtn = $('#_images_urls_btn'),
451
+ template = $('#carouselSliderGalleryUrlTemplate').html();
452
+
453
+ // URL Images Model
454
+ modalOpenBtn.on('click', function (e) {
455
+ e.preventDefault();
456
+ modal.css("display", "block");
457
+ $("body").addClass("overflowHidden");
458
+ });
459
+ modal.on('click', '.carousel_slider-close', function (e) {
460
+ e.preventDefault();
461
+ modal.css("display", "none");
462
+ $("body").removeClass("overflowHidden");
463
+ });
464
+
465
+ var carouselSliderBodyHeight = $(window).height() - (38 + 48 + 32 + 30);
466
+ $('.carousel_slider-modal-body').css('height', carouselSliderBodyHeight + 'px');
467
+
468
+ // Append new row
469
+ body.on('click', '.add_row', function () {
470
+ $(this).closest('.carousel_slider-fields').after(template);
471
+ });
472
+
473
+ // Delete current row
474
+ body.on('click', '.delete_row', function () {
475
+ $(this).closest('.carousel_slider-fields').remove();
476
+ });
477
+
478
+ // Make fields sortable
479
+ $('#carousel_slider_form').sortable();
480
+
481
+ })(jQuery);
482
+ (function ($) {
483
+ 'use strict';
484
+
485
+ // Open modal
486
+ $(document).on('click', '[data-toggle="modal"]', function (e) {
487
+ e.preventDefault();
488
+ $($(this).data('target')).addClass('is-active');
489
+ });
490
+
491
+ // Close modal
492
+ $(document).on('click', '[data-dismiss="modal"]', function (e) {
493
+ e.preventDefault();
494
+ $(this).closest('.modal').removeClass('is-active');
495
+ });
496
+
497
+ })(jQuery);
498
+ (function ($) {
499
+ "use strict";
500
+
501
+ var slide_type = $('#_carousel_slider_slide_type'),
502
+ section_images_settings = $('#section_images_settings'),
503
+ section_url_images_settings = $('#section_url_images_settings'),
504
+ section_images_general_settings = $('#section_images_general_settings'),
505
+ section_post_query = $('#section_post_query'),
506
+ section_video_settings = $('#section_video_settings'),
507
+ section_product_query = $('#section_product_query'),
508
+ section_content_carousel = $('#section_content_carousel'),
509
+ // Slide Type -- Post
510
+ _post_query_type = $('#_post_query_type'),
511
+ _post_date_after = $('#field-_post_date_after'),
512
+ _post_date_before = $('#field-_post_date_before'),
513
+ _post_categories = $('#field-_post_categories'),
514
+ _post_tags = $('#field-_post_tags'),
515
+ _post_in = $('#field-_post_in'),
516
+ _posts_per_page = $('#field-_posts_per_page'),
517
+ // Slide Type -- Product
518
+ _product_query_type = $('#_product_query_type'),
519
+ _product_query = $('#field-_product_query'),
520
+ _product_categories = $('#field-_product_categories'),
521
+ _product_tags = $('#field-_product_tags'),
522
+ _product_in = $('#field-_product_in'),
523
+ _products_per_page = $('#field-_products_per_page');
524
+
525
+ // Slide Type
526
+ slide_type.on('change', function () {
527
+ section_images_settings.hide('fast');
528
+ section_url_images_settings.hide('fast');
529
+ section_images_general_settings.hide('fast');
530
+ section_post_query.hide('fast');
531
+ section_video_settings.hide('fast');
532
+ section_product_query.hide('fast');
533
+ section_content_carousel.hide('fast');
534
+
535
+ if (this.value === 'image-carousel') {
536
+ section_images_settings.slideDown();
537
+ section_images_general_settings.slideDown();
538
+ }
539
+ if (this.value === 'image-carousel-url') {
540
+ section_url_images_settings.slideDown();
541
+ section_images_general_settings.slideDown();
542
+ }
543
+ if (this.value === 'post-carousel') {
544
+ section_post_query.slideDown();
545
+ }
546
+ if (this.value === 'video-carousel') {
547
+ section_video_settings.slideDown();
548
+ }
549
+ if (this.value === 'product-carousel') {
550
+ section_product_query.slideDown();
551
+ _product_query.show();
552
+ }
553
+ if (this.value === 'hero-banner-slider') {
554
+ section_content_carousel.slideDown();
555
+ }
556
+ });
557
+
558
+ // Slide Type -- Post Carousel
559
+ if (slide_type.val() === 'post-carousel') {
560
+ var _postQueryType = _post_query_type.val();
561
+ if (_postQueryType === 'date_range') {
562
+ _post_date_after.show();
563
+ _post_date_before.show();
564
+ }
565
+ if (_postQueryType === 'post_categories') {
566
+ _post_categories.show();
567
+ }
568
+ if (_postQueryType === 'post_tags') {
569
+ _post_tags.show();
570
+ }
571
+ if (_postQueryType === 'specific_posts') {
572
+ _post_in.show();
573
+ _posts_per_page.hide();
574
+ }
575
+ }
576
+
577
+ _post_query_type.on('change', function () {
578
+
579
+ _post_date_after.hide('fast');
580
+ _post_date_before.hide('fast');
581
+ _post_categories.hide('fast');
582
+ _post_tags.hide('fast');
583
+ _post_in.hide('fast');
584
+ _posts_per_page.show('fast');
585
+
586
+ if (this.value === 'date_range') {
587
+ _post_date_after.slideDown();
588
+ _post_date_before.slideDown();
589
+ }
590
+ if (this.value === 'post_categories') {
591
+ _post_categories.slideDown();
592
+ }
593
+ if (this.value === 'post_tags') {
594
+ _post_tags.slideDown();
595
+ }
596
+ if (this.value === 'specific_posts') {
597
+ _post_in.slideDown();
598
+ _posts_per_page.hide('fast');
599
+ }
600
+ });
601
+
602
+ // Slide Type -- Product Carousel
603
+ if (slide_type.val() === 'product-carousel') {
604
+ var _productQueryType = _product_query_type.val();
605
+ if (_productQueryType === 'query_porduct') {
606
+ _product_query.show();
607
+ }
608
+ if (_productQueryType === 'product_categories') {
609
+ _product_categories.show();
610
+ }
611
+ if (_productQueryType === 'product_tags') {
612
+ _product_tags.show();
613
+ }
614
+ if (_productQueryType === 'specific_products') {
615
+ _product_in.show();
616
+ }
617
+ }
618
+
619
+ _product_query_type.on('change', function () {
620
+
621
+ _product_query.hide('fast');
622
+ _product_categories.hide('fast');
623
+ _product_tags.hide('fast');
624
+ _product_in.hide('fast');
625
+ _products_per_page.show('fast');
626
+
627
+ if (this.value === 'query_porduct') {
628
+ _product_query.slideDown();
629
+ }
630
+ if (this.value === 'product_categories') {
631
+ _product_categories.slideDown();
632
+ }
633
+ if (this.value === 'product_tags') {
634
+ _product_tags.slideDown();
635
+ }
636
+ if (this.value === 'specific_products') {
637
+ _product_in.slideDown();
638
+ _products_per_page.hide('fast');
639
+ }
640
+ });
641
+ })(jQuery);
642
+
643
+ (function ($) {
644
+ "use strict";
645
+
646
+ // Initializing TipTip
647
+ $(".cs-tooltip").each(function () {
648
+ $(this).tipTip();
649
+ });
650
+
651
+ // Initializing Select2
652
+ $("select.select2").each(function () {
653
+ $(this).select2();
654
+ });
655
+
656
+ // Initializing jQuery UI Accordion
657
+ $(".shapla-toggle").each(function () {
658
+ if ($(this).attr('data-id') === 'closed') {
659
+ $(this).accordion({
660
+ collapsible: true,
661
+ heightStyle: "content",
662
+ active: false
663
+ });
664
+ } else {
665
+ $(this).accordion({
666
+ collapsible: true,
667
+ heightStyle: "content"
668
+ });
669
+ }
670
+ });
671
+
672
+ // Initializing jQuery UI Tab
673
+ $(".shapla-tabs").tabs({
674
+ hide: {
675
+ effect: "fadeOut",
676
+ duration: 200
677
+ },
678
+ show: {
679
+ effect: "fadeIn",
680
+ duration: 200
681
+ }
682
+ });
683
+
684
+ //Initializing jQuery UI Date picker
685
+ $('.datepicker').each(function () {
686
+ $(this).datepicker({
687
+ dateFormat: 'MM dd, yy',
688
+ changeMonth: true,
689
+ changeYear: true,
690
+ onClose: function (selectedDate) {
691
+ $(this).datepicker('option', 'minDate', selectedDate);
692
+ }
693
+ });
694
+ });
695
+
696
+ // Initializing WP Color Picker
697
+ $('.color-picker').each(function () {
698
+ $(this).wpColorPicker({
699
+ palettes: [
700
+ '#2196F3', // Blue
701
+ '#009688', // Teal
702
+ '#4CAF50', // Green
703
+ '#F44336', // Red
704
+ '#FFEB3B', // Yellow
705
+ '#00D1B2', // Firoza
706
+ '#000000', // Blank
707
+ '#ffffff' // White
708
+ ]
709
+ });
710
+ });
711
  })(jQuery);
assets/js/admin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){"use strict";e(document).on("click",".accordion-header",function(){e(this).toggleClass("active");var t=e(this).next();parseInt(t.css("max-height"))>0?(t.css("max-height","0"),t.css("overflow","hidden")):(t.css("max-height",t.prop("scrollHeight")+"px"),t.css("overflow","visible"))})}(jQuery),function(e){"use strict";var t,i,o,s,a,n,l=e("body"),d=e("#contentButtonModal");l.on("click",".carousel-slider__add-slide",function(t){t.preventDefault(),e.ajax({url:ajaxurl,method:"POST",data:{action:"add_content_slide",task:"add-slide",post_id:e(this).data("post-id")},success:function(){window.location.reload(!0)}})}),l.on("click",".carousel_slider__delete_slide",function(t){t.preventDefault(),e.ajax({url:ajaxurl,method:"POST",data:{action:"add_content_slide",task:"delete-slide",post_id:e(this).data("post-id"),slide_pos:e(this).data("slide-pos")},success:function(){window.location.reload(!0)}})}),l.on("click",".carousel_slider__move_top",function(t){t.preventDefault(),e.ajax({url:ajaxurl,method:"POST",data:{action:"add_content_slide",task:"move-slide-top",post_id:e(this).data("post-id"),slide_pos:e(this).data("slide-pos")},success:function(){window.location.reload(!0)}})}),l.on("click",".carousel_slider__move_up",function(t){t.preventDefault(),e.ajax({url:ajaxurl,method:"POST",data:{action:"add_content_slide",task:"move-slide-up",post_id:e(this).data("post-id"),slide_pos:e(this).data("slide-pos")},success:function(){window.location.reload(!0)}})}),l.on("click",".carousel_slider__move_down",function(t){t.preventDefault(),e.ajax({url:ajaxurl,method:"POST",data:{action:"add_content_slide",task:"move-slide-down",post_id:e(this).data("post-id"),slide_pos:e(this).data("slide-pos")},success:function(){window.location.reload(!0)}})}),l.on("click",".carousel_slider__move_bottom",function(t){t.preventDefault(),e.ajax({url:ajaxurl,method:"POST",data:{action:"add_content_slide",task:"move-slide-bottom",post_id:e(this).data("post-id"),slide_pos:e(this).data("slide-pos")},success:function(){window.location.reload(!0)}})}),l.on("click",".slide_image_add",function(n){n.preventDefault();var l=e(this);i=l.closest(".slide_bg_wrapper"),s=i.find(".content_slide_canvas"),o=i.find(".background_image_id"),a=i.find(".delete-bg-img"),t?t.open():((t=wp.media({title:l.data("title"),button:{text:l.data("button-text")},multiple:!1})).on("select",function(){var e=t.state().get("selection").first().toJSON();s.css("background-image","url("+e.url+")"),o.val(e.id),a.removeClass("hidden")}),t.open())}),l.on("click",".delete-bg-img",function(t){t.preventDefault(),i=e(this).closest(".slide_bg_wrapper"),s=i.find(".content_slide_canvas"),o=i.find(".background_image_id"),a=i.find(".delete-bg-img"),s.css("background-image",""),o.val("0"),a.addClass("hidden")}),l.on("change",".background_image_position",function(){var t=e(this).val();i=e(this).closest(".slide_bg_wrapper"),(s=i.find(".content_slide_canvas")).css("background-position",t)}),l.on("change",".background_image_size",function(){var t=e(this).val();i=e(this).closest(".slide_bg_wrapper"),(s=i.find(".content_slide_canvas")).css("background-size",t)}),e(".addContentButton").on("click",function(t){t.preventDefault();var i=(n=e(this).closest(".button_config")).find(".button_text").val(),o=n.find(".button_url").val(),s=n.find(".button_target").val(),a=n.find(".button_type").val(),l=n.find(".button_size").val(),c=n.find(".button_color").val();d.find("#_button_text").val(i),d.find("#_button_url").val(o),d.find("#_button_target").val(s),d.find("#_button_type").val(a),d.find("#_button_size").val(l),d.find("#_button_color").val(c),d.addClass("is-active")}),e("#saveContentButton").on("click",function(e){if(e.preventDefault(),!n)return d.removeClass("is-active"),!1;var t=d.find("#_button_text").val(),i=d.find("#_button_url").val(),o=d.find("#_button_target").val(),s=d.find("#_button_type").val(),a=d.find("#_button_size").val(),l=d.find("#_button_color").val();n.find(".button_text").val(t),n.find(".button_url").val(i),n.find(".button_target").val(o),n.find(".button_type").val(s),n.find(".button_size").val(a),n.find(".button_color").val(l),d.removeClass("is-active")}),e(".slide-color-picker").each(function(){i=e(this).closest(".slide_bg_wrapper"),s=i.find(".content_slide_canvas"),e(this).wpColorPicker({palettes:["#2196F3","#009688","#4CAF50","#F44336","#FFEB3B","#00D1B2","#000000","#ffffff"],change:function(e,t){s.css("background-color",t.color.toString())}})}),e(document).on("change",".link_type",function(t){var i=e(this),o=i.val(),s=i.closest(".tab-content-link"),a=s.find(".ContentCarouselLinkFull"),n=s.find(".ContentCarouselLinkButtons");"full"===o?(n.hide(),a.show()):"button"===o?(a.hide(),n.show()):(a.hide(),n.hide())})}(jQuery),function(e){"use strict";function t(e){if(e){var t=new wp.shortcode({tag:"gallery",attrs:{ids:e},type:"single"}),i=wp.media.gallery.attachments(t),o=new wp.media.model.Selection(i.models,{props:i.props.toJSON(),multiple:!0});return o.gallery=i.gallery,o.more().done(function(){o.props.set({query:!1}),o.unmirror(),o.props.unset("orderby")}),o}return!1}var i,o=e("#carousel_slider_gallery_btn"),s=t(o.data("ids"));o.on("click",function(a){function n(){i.toolbar.get("view").set({insert:{style:"primary",text:o.data("save"),click:function(){var a="";i.state().get("library").each(function(e){a+=e.id+","}),this.el.innerHTML=o.data("progress"),e.ajax({type:"POST",url:ajaxurl,data:{ids:a,action:"carousel_slider_save_images",post_id:o.data("id")},success:function(){s=t(a),e("#_carousel_slider_images_ids").val(a),i.close()},dataType:"html"}).done(function(t){e(".carousel_slider_gallery_list").html(t)})}}})}a.preventDefault();var l={title:o.data("create"),state:"gallery-edit",frame:"post",selection:s};(i||s)&&(l.title=o.data("edit")),(i=wp.media(l).open()).menu.get("view").unset("cancel"),i.menu.get("view").unset("separateCancel"),i.menu.get("view").get("gallery-edit").el.innerHTML=o.data("edit"),i.content.get("view").sidebar.unset("gallery"),n(),i.on("toolbar:render:gallery-edit",function(){n()}),i.on("content:render:browse",function(e){e&&(e.sidebar.on("ready",function(){e.sidebar.unset("gallery")}),e.toolbar.on("ready",function(){"gallery-library"===e.toolbar.controller._state&&e.toolbar.$el.hide()}))}),i.state().get("library").on("remove",function(){0===i.state().get("library").length&&(s=!1,e.post(ajaxurl,{ids:"",action:"carousel_slider_save_images",post_id:o.data("id")}))})})}(jQuery),function(e){"use strict";var t=e("body"),i=e("#CarouselSliderModal"),o=e("#_images_urls_btn"),s=e("#carouselSliderGalleryUrlTemplate").html();o.on("click",function(t){t.preventDefault(),i.css("display","block"),e("body").addClass("overflowHidden")}),i.on("click",".carousel_slider-close",function(t){t.preventDefault(),i.css("display","none"),e("body").removeClass("overflowHidden")});var a=e(window).height()-148;e(".carousel_slider-modal-body").css("height",a+"px"),t.on("click",".add_row",function(){e(this).closest(".carousel_slider-fields").after(s)}),t.on("click",".delete_row",function(){e(this).closest(".carousel_slider-fields").remove()}),e("#carousel_slider_form").sortable()}(jQuery),function(e){"use strict";e(document).on("click",'[data-toggle="modal"]',function(t){t.preventDefault(),e(e(this).data("target")).addClass("is-active")}),e(document).on("click",'[data-dismiss="modal"]',function(t){t.preventDefault(),e(this).closest(".modal").removeClass("is-active")})}(jQuery),function(e){"use strict";var t=e("#_carousel_slider_slide_type"),i=e("#section_images_settings"),o=e("#section_url_images_settings"),s=e("#section_images_general_settings"),a=e("#section_post_query"),n=e("#section_video_settings"),l=e("#section_product_query"),d=e("#section_content_carousel"),c=e("#_post_query_type"),r=e("#field-_post_date_after"),u=e("#field-_post_date_before"),_=e("#field-_post_categories"),f=e("#field-_post_tags"),p=e("#field-_post_in"),h=e("#field-_posts_per_page"),v=e("#_product_query_type"),g=e("#field-_product_query"),b=e("#field-_product_categories"),m=e("#field-_product_tags"),w=e("#field-_product_in"),y=e("#field-_products_per_page");if(t.on("change",function(){i.hide("fast"),o.hide("fast"),s.hide("fast"),a.hide("fast"),n.hide("fast"),l.hide("fast"),d.hide("fast"),"image-carousel"===this.value&&(i.slideDown(),s.slideDown()),"image-carousel-url"===this.value&&(o.slideDown(),s.slideDown()),"post-carousel"===this.value&&a.slideDown(),"video-carousel"===this.value&&n.slideDown(),"product-carousel"===this.value&&(l.slideDown(),g.show()),"hero-banner-slider"===this.value&&d.slideDown()}),"post-carousel"===t.val()){var k=c.val();"date_range"===k&&(r.show(),u.show()),"post_categories"===k&&_.show(),"post_tags"===k&&f.show(),"specific_posts"===k&&(p.show(),h.hide())}if(c.on("change",function(){r.hide("fast"),u.hide("fast"),_.hide("fast"),f.hide("fast"),p.hide("fast"),h.show("fast"),"date_range"===this.value&&(r.slideDown(),u.slideDown()),"post_categories"===this.value&&_.slideDown(),"post_tags"===this.value&&f.slideDown(),"specific_posts"===this.value&&(p.slideDown(),h.hide("fast"))}),"product-carousel"===t.val()){var D=v.val();"query_porduct"===D&&g.show(),"product_categories"===D&&b.show(),"product_tags"===D&&m.show(),"specific_products"===D&&w.show()}v.on("change",function(){g.hide("fast"),b.hide("fast"),m.hide("fast"),w.hide("fast"),y.show("fast"),"query_porduct"===this.value&&g.slideDown(),"product_categories"===this.value&&b.slideDown(),"product_tags"===this.value&&m.slideDown(),"specific_products"===this.value&&(w.slideDown(),y.hide("fast"))})}(jQuery),function(e){"use strict";e(".cs-tooltip").each(function(){e(this).tipTip()}),e("select.select2").each(function(){e(this).select2()}),e(".shapla-toggle").each(function(){"closed"===e(this).attr("data-id")?e(this).accordion({collapsible:!0,heightStyle:"content",active:!1}):e(this).accordion({collapsible:!0,heightStyle:"content"})}),e(".shapla-tabs").tabs({hide:{effect:"fadeOut",duration:200},show:{effect:"fadeIn",duration:200}}),e(".datepicker").each(function(){e(this).datepicker({dateFormat:"MM dd, yy",changeMonth:!0,changeYear:!0,onClose:function(t){e(this).datepicker("option","minDate",t)}})}),e(".color-picker").each(function(){e(this).wpColorPicker({palettes:["#2196F3","#009688","#4CAF50","#F44336","#FFEB3B","#00D1B2","#000000","#ffffff"]})})}(jQuery);
assets/js/admin/accordion.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ 'use strict';
3
+ $(document).on("click", ".accordion-header", function () {
4
+ $(this).toggleClass('active');
5
+ var panel = $(this).next();
6
+
7
+ if (parseInt(panel.css('max-height')) > 0) {
8
+ panel.css('max-height', '0');
9
+ panel.css('overflow', 'hidden');
10
+ } else {
11
+ panel.css('max-height', panel.prop('scrollHeight') + "px");
12
+ panel.css('overflow', 'visible');
13
+ }
14
+ });
15
+ })(jQuery);
assets/js/admin/hero-banner.js ADDED
@@ -0,0 +1,295 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ "use strict";
3
+
4
+ var body = $('body'),
5
+ contentButtonModal = $('#contentButtonModal'),
6
+ frame,
7
+ section,
8
+ imgIdInput,
9
+ slideCanvas,
10
+ delImgLink,
11
+ buttonConfig;
12
+
13
+ // Add new content slide
14
+ body.on('click', '.carousel-slider__add-slide', function (e) {
15
+ e.preventDefault();
16
+
17
+ $.ajax({
18
+ url: ajaxurl,
19
+ method: 'POST',
20
+ data: {
21
+ action: 'add_content_slide',
22
+ task: 'add-slide',
23
+ post_id: $(this).data('post-id')
24
+ },
25
+ success: function () {
26
+ window.location.reload(true);
27
+ }
28
+ });
29
+ });
30
+
31
+ // Delete a slide
32
+ body.on('click', '.carousel_slider__delete_slide', function (e) {
33
+ e.preventDefault();
34
+
35
+ $.ajax({
36
+ url: ajaxurl,
37
+ method: 'POST',
38
+ data: {
39
+ action: 'add_content_slide',
40
+ task: 'delete-slide',
41
+ post_id: $(this).data('post-id'),
42
+ slide_pos: $(this).data('slide-pos')
43
+ },
44
+ success: function () {
45
+ window.location.reload(true);
46
+ }
47
+ });
48
+ });
49
+
50
+ // Move slide to top
51
+ body.on('click', '.carousel_slider__move_top', function (e) {
52
+ e.preventDefault();
53
+
54
+ $.ajax({
55
+ url: ajaxurl,
56
+ method: 'POST',
57
+ data: {
58
+ action: 'add_content_slide',
59
+ task: 'move-slide-top',
60
+ post_id: $(this).data('post-id'),
61
+ slide_pos: $(this).data('slide-pos')
62
+ },
63
+ success: function () {
64
+ window.location.reload(true);
65
+ }
66
+ });
67
+ });
68
+
69
+ // Move slide up
70
+ body.on('click', '.carousel_slider__move_up', function (e) {
71
+ e.preventDefault();
72
+
73
+ $.ajax({
74
+ url: ajaxurl,
75
+ method: 'POST',
76
+ data: {
77
+ action: 'add_content_slide',
78
+ task: 'move-slide-up',
79
+ post_id: $(this).data('post-id'),
80
+ slide_pos: $(this).data('slide-pos')
81
+ },
82
+ success: function () {
83
+ window.location.reload(true);
84
+ }
85
+ });
86
+ });
87
+
88
+ // Move slide down
89
+ body.on('click', '.carousel_slider__move_down', function (e) {
90
+ e.preventDefault();
91
+
92
+ $.ajax({
93
+ url: ajaxurl,
94
+ method: 'POST',
95
+ data: {
96
+ action: 'add_content_slide',
97
+ task: 'move-slide-down',
98
+ post_id: $(this).data('post-id'),
99
+ slide_pos: $(this).data('slide-pos')
100
+ },
101
+ success: function () {
102
+ window.location.reload(true);
103
+ }
104
+ });
105
+ });
106
+
107
+ // Move slide to bottom
108
+ body.on('click', '.carousel_slider__move_bottom', function (e) {
109
+ e.preventDefault();
110
+
111
+ $.ajax({
112
+ url: ajaxurl,
113
+ method: 'POST',
114
+ data: {
115
+ action: 'add_content_slide',
116
+ task: 'move-slide-bottom',
117
+ post_id: $(this).data('post-id'),
118
+ slide_pos: $(this).data('slide-pos')
119
+ },
120
+ success: function () {
121
+ window.location.reload(true);
122
+ }
123
+ });
124
+ });
125
+
126
+ // Add slide image
127
+ body.on('click', '.slide_image_add', function (e) {
128
+ e.preventDefault();
129
+
130
+ var _this = $(this);
131
+ section = _this.closest('.slide_bg_wrapper');
132
+ slideCanvas = section.find('.content_slide_canvas');
133
+ imgIdInput = section.find('.background_image_id');
134
+ delImgLink = section.find('.delete-bg-img');
135
+
136
+ // If the media frame already exists, reopen it.
137
+ if (frame) {
138
+ frame.open();
139
+ return;
140
+ }
141
+
142
+ // Create a new media frame
143
+ frame = wp.media({
144
+ title: _this.data('title'),
145
+ button: {
146
+ text: _this.data('button-text')
147
+ },
148
+ multiple: false // Set to true to allow multiple files to be selected
149
+ });
150
+
151
+ // When an image is selected in the media frame...
152
+ frame.on('select', function () {
153
+
154
+ // Get media attachment details from the frame state
155
+ var attachment = frame.state().get('selection').first().toJSON();
156
+
157
+ // Send the attachment URL to our custom image input field.
158
+ slideCanvas.css('background-image', 'url(' + attachment.url + ')');
159
+
160
+ // Send the attachment id to our hidden input
161
+ imgIdInput.val(attachment.id);
162
+
163
+ // Show the remove image link
164
+ delImgLink.removeClass('hidden');
165
+ });
166
+
167
+ // Finally, open the modal on click
168
+ frame.open();
169
+ });
170
+
171
+ // Remove slide image
172
+ body.on('click', '.delete-bg-img', function (e) {
173
+ e.preventDefault();
174
+
175
+ section = $(this).closest('.slide_bg_wrapper');
176
+ slideCanvas = section.find('.content_slide_canvas');
177
+ imgIdInput = section.find('.background_image_id');
178
+ delImgLink = section.find('.delete-bg-img');
179
+
180
+ // Clear out the preview image
181
+ slideCanvas.css('background-image', '');
182
+
183
+ // Delete the image id from the hidden input
184
+ imgIdInput.val('0');
185
+
186
+ // Hide the delete image link
187
+ delImgLink.addClass('hidden');
188
+ });
189
+
190
+ // Background Position
191
+ body.on('change', '.background_image_position', function () {
192
+ var _val = $(this).val();
193
+ section = $(this).closest('.slide_bg_wrapper');
194
+ slideCanvas = section.find('.content_slide_canvas');
195
+ slideCanvas.css('background-position', _val);
196
+ });
197
+
198
+ // Background Size
199
+ body.on('change', '.background_image_size', function () {
200
+ var _val = $(this).val();
201
+ section = $(this).closest('.slide_bg_wrapper');
202
+ slideCanvas = section.find('.content_slide_canvas');
203
+ slideCanvas.css('background-size', _val);
204
+ });
205
+
206
+ // Add Button Style to Modal for Edit
207
+ $('.addContentButton').on('click', function (e) {
208
+ e.preventDefault();
209
+
210
+ buttonConfig = $(this).closest('.button_config');
211
+ var button_text = buttonConfig.find('.button_text').val();
212
+ var button_url = buttonConfig.find('.button_url').val();
213
+ var button_target = buttonConfig.find('.button_target').val();
214
+ var button_type = buttonConfig.find('.button_type').val();
215
+ var button_size = buttonConfig.find('.button_size').val();
216
+ var button_color = buttonConfig.find('.button_color').val();
217
+
218
+ contentButtonModal.find('#_button_text').val(button_text);
219
+ contentButtonModal.find('#_button_url').val(button_url);
220
+ contentButtonModal.find('#_button_target').val(button_target);
221
+ contentButtonModal.find('#_button_type').val(button_type);
222
+ contentButtonModal.find('#_button_size').val(button_size);
223
+ contentButtonModal.find('#_button_color').val(button_color);
224
+
225
+ contentButtonModal.addClass('is-active');
226
+ });
227
+
228
+ // Save Button style from modal form
229
+ $('#saveContentButton').on('click', function (e) {
230
+ e.preventDefault();
231
+
232
+ if (!buttonConfig) {
233
+ contentButtonModal.removeClass('is-active');
234
+ return false;
235
+ }
236
+
237
+ var button_text = contentButtonModal.find('#_button_text').val();
238
+ var button_url = contentButtonModal.find('#_button_url').val();
239
+ var button_target = contentButtonModal.find('#_button_target').val();
240
+ var button_type = contentButtonModal.find('#_button_type').val();
241
+ var button_size = contentButtonModal.find('#_button_size').val();
242
+ var button_color = contentButtonModal.find('#_button_color').val();
243
+
244
+ buttonConfig.find('.button_text').val(button_text);
245
+ buttonConfig.find('.button_url').val(button_url);
246
+ buttonConfig.find('.button_target').val(button_target);
247
+ buttonConfig.find('.button_type').val(button_type);
248
+ buttonConfig.find('.button_size').val(button_size);
249
+ buttonConfig.find('.button_color').val(button_color);
250
+
251
+ contentButtonModal.removeClass('is-active');
252
+
253
+ });
254
+
255
+ // Background Color
256
+ $('.slide-color-picker').each(function () {
257
+ section = $(this).closest('.slide_bg_wrapper');
258
+ slideCanvas = section.find('.content_slide_canvas');
259
+ $(this).wpColorPicker({
260
+ palettes: [
261
+ '#2196F3', // Blue
262
+ '#009688', // Teal
263
+ '#4CAF50', // Green
264
+ '#F44336', // Red
265
+ '#FFEB3B', // Yellow
266
+ '#00D1B2', // Firoza
267
+ '#000000', // Blank
268
+ '#ffffff' // White
269
+ ],
270
+ change: function (event, ui) {
271
+ slideCanvas.css('background-color', ui.color.toString());
272
+ }
273
+ });
274
+ });
275
+
276
+ // Slide Link
277
+ $(document).on('change', '.link_type', function (e) {
278
+ var _this = $(this);
279
+ var _val = _this.val();
280
+ var _tab = _this.closest('.tab-content-link');
281
+ var _linkFull = _tab.find('.ContentCarouselLinkFull');
282
+ var _linkBtn = _tab.find('.ContentCarouselLinkButtons');
283
+ if (_val === 'full') {
284
+ _linkBtn.hide();
285
+ _linkFull.show();
286
+ } else if (_val === 'button') {
287
+ _linkFull.hide();
288
+ _linkBtn.show();
289
+ } else {
290
+ _linkFull.hide();
291
+ _linkBtn.hide();
292
+ }
293
+ })
294
+
295
+ })(jQuery);
assets/{sass → js}/admin/index.php RENAMED
File without changes
assets/js/admin/media-gallery.js ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ "use strict";
3
+
4
+ var frame,
5
+ _this = $('#carousel_slider_gallery_btn'),
6
+ images = _this.data('ids'),
7
+ selection = loadImages(images);
8
+
9
+ _this.on('click', function (e) {
10
+ e.preventDefault();
11
+ var options = {
12
+ title: _this.data('create'),
13
+ state: 'gallery-edit',
14
+ frame: 'post',
15
+ selection: selection
16
+ };
17
+
18
+ if (frame || selection) {
19
+ options['title'] = _this.data('edit');
20
+ }
21
+
22
+ frame = wp.media(options).open();
23
+
24
+ // Tweak Views
25
+ frame.menu.get('view').unset('cancel');
26
+ frame.menu.get('view').unset('separateCancel');
27
+ frame.menu.get('view').get('gallery-edit').el.innerHTML = _this.data('edit');
28
+ frame.content.get('view').sidebar.unset('gallery'); // Hide Gallery Settings in sidebar
29
+
30
+ // when editing a gallery
31
+ overrideGalleryInsert();
32
+ frame.on('toolbar:render:gallery-edit', function () {
33
+ overrideGalleryInsert();
34
+ });
35
+
36
+ frame.on('content:render:browse', function (browser) {
37
+ if (!browser) return;
38
+ // Hide Gallery Settings in sidebar
39
+ browser.sidebar.on('ready', function () {
40
+ browser.sidebar.unset('gallery');
41
+ });
42
+ // Hide filter/search as they don't work
43
+ browser.toolbar.on('ready', function () {
44
+ if (browser.toolbar.controller._state === 'gallery-library') {
45
+ browser.toolbar.$el.hide();
46
+ }
47
+ });
48
+ });
49
+
50
+ // All images removed
51
+ frame.state().get('library').on('remove', function () {
52
+ var models = frame.state().get('library');
53
+ if (models.length === 0) {
54
+ selection = false;
55
+ $.post(ajaxurl, {
56
+ ids: '',
57
+ action: 'carousel_slider_save_images',
58
+ post_id: _this.data('id')
59
+ });
60
+ }
61
+ });
62
+
63
+ function overrideGalleryInsert() {
64
+ frame.toolbar.get('view').set({
65
+ insert: {
66
+ style: 'primary',
67
+ text: _this.data('save'),
68
+ click: function () {
69
+ var models = frame.state().get('library'),
70
+ ids = '';
71
+
72
+ models.each(function (attachment) {
73
+ ids += attachment.id + ','
74
+ });
75
+
76
+ this.el.innerHTML = _this.data('progress');
77
+
78
+ $.ajax({
79
+ type: 'POST',
80
+ url: ajaxurl,
81
+ data: {
82
+ ids: ids,
83
+ action: 'carousel_slider_save_images',
84
+ post_id: _this.data('id')
85
+ },
86
+ success: function () {
87
+ selection = loadImages(ids);
88
+ $('#_carousel_slider_images_ids').val(ids);
89
+ frame.close();
90
+ },
91
+ dataType: 'html'
92
+ }).done(function (data) {
93
+ $('.carousel_slider_gallery_list').html(data);
94
+ });
95
+ }
96
+ }
97
+ });
98
+ }
99
+
100
+ });
101
+
102
+ function loadImages(images) {
103
+ if (images) {
104
+ var shortcode = new wp.shortcode({
105
+ tag: 'gallery',
106
+ attrs: {ids: images},
107
+ type: 'single'
108
+ });
109
+
110
+ var attachments = wp.media.gallery.attachments(shortcode);
111
+
112
+ var selection = new wp.media.model.Selection(attachments.models, {
113
+ props: attachments.props.toJSON(),
114
+ multiple: true
115
+ });
116
+
117
+ selection.gallery = attachments.gallery;
118
+
119
+ selection.more().done(function () {
120
+ // Break ties with the query.
121
+ selection.props.set({query: false});
122
+ selection.unmirror();
123
+ selection.props.unset('orderby');
124
+ });
125
+
126
+ return selection;
127
+ }
128
+ return false;
129
+ }
130
+
131
+ })(jQuery);
assets/js/admin/media-url.js ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Carousel Slider Gallery from URL
3
+ */
4
+ (function ($) {
5
+ 'use strict';
6
+
7
+ var body = $('body'),
8
+ modal = $('#CarouselSliderModal'),
9
+ modalOpenBtn = $('#_images_urls_btn'),
10
+ template = $('#carouselSliderGalleryUrlTemplate').html();
11
+
12
+ // URL Images Model
13
+ modalOpenBtn.on('click', function (e) {
14
+ e.preventDefault();
15
+ modal.css("display", "block");
16
+ $("body").addClass("overflowHidden");
17
+ });
18
+ modal.on('click', '.carousel_slider-close', function (e) {
19
+ e.preventDefault();
20
+ modal.css("display", "none");
21
+ $("body").removeClass("overflowHidden");
22
+ });
23
+
24
+ var carouselSliderBodyHeight = $(window).height() - (38 + 48 + 32 + 30);
25
+ $('.carousel_slider-modal-body').css('height', carouselSliderBodyHeight + 'px');
26
+
27
+ // Append new row
28
+ body.on('click', '.add_row', function () {
29
+ $(this).closest('.carousel_slider-fields').after(template);
30
+ });
31
+
32
+ // Delete current row
33
+ body.on('click', '.delete_row', function () {
34
+ $(this).closest('.carousel_slider-fields').remove();
35
+ });
36
+
37
+ // Make fields sortable
38
+ $('#carousel_slider_form').sortable();
39
+
40
+ })(jQuery);
assets/js/admin/modal.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ 'use strict';
3
+
4
+ // Open modal
5
+ $(document).on('click', '[data-toggle="modal"]', function (e) {
6
+ e.preventDefault();
7
+ $($(this).data('target')).addClass('is-active');
8
+ });
9
+
10
+ // Close modal
11
+ $(document).on('click', '[data-dismiss="modal"]', function (e) {
12
+ e.preventDefault();
13
+ $(this).closest('.modal').removeClass('is-active');
14
+ });
15
+
16
+ })(jQuery);
assets/js/admin/slide-type.js ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ "use strict";
3
+
4
+ var slide_type = $('#_carousel_slider_slide_type'),
5
+ section_images_settings = $('#section_images_settings'),
6
+ section_url_images_settings = $('#section_url_images_settings'),
7
+ section_images_general_settings = $('#section_images_general_settings'),
8
+ section_post_query = $('#section_post_query'),
9
+ section_video_settings = $('#section_video_settings'),
10
+ section_product_query = $('#section_product_query'),
11
+ section_content_carousel = $('#section_content_carousel'),
12
+ // Slide Type -- Post
13
+ _post_query_type = $('#_post_query_type'),
14
+ _post_date_after = $('#field-_post_date_after'),
15
+ _post_date_before = $('#field-_post_date_before'),
16
+ _post_categories = $('#field-_post_categories'),
17
+ _post_tags = $('#field-_post_tags'),
18
+ _post_in = $('#field-_post_in'),
19
+ _posts_per_page = $('#field-_posts_per_page'),
20
+ // Slide Type -- Product
21
+ _product_query_type = $('#_product_query_type'),
22
+ _product_query = $('#field-_product_query'),
23
+ _product_categories = $('#field-_product_categories'),
24
+ _product_tags = $('#field-_product_tags'),
25
+ _product_in = $('#field-_product_in'),
26
+ _products_per_page = $('#field-_products_per_page');
27
+
28
+ // Slide Type
29
+ slide_type.on('change', function () {
30
+ section_images_settings.hide('fast');
31
+ section_url_images_settings.hide('fast');
32
+ section_images_general_settings.hide('fast');
33
+ section_post_query.hide('fast');
34
+ section_video_settings.hide('fast');
35
+ section_product_query.hide('fast');
36
+ section_content_carousel.hide('fast');
37
+
38
+ if (this.value === 'image-carousel') {
39
+ section_images_settings.slideDown();
40
+ section_images_general_settings.slideDown();
41
+ }
42
+ if (this.value === 'image-carousel-url') {
43
+ section_url_images_settings.slideDown();
44
+ section_images_general_settings.slideDown();
45
+ }
46
+ if (this.value === 'post-carousel') {
47
+ section_post_query.slideDown();
48
+ }
49
+ if (this.value === 'video-carousel') {
50
+ section_video_settings.slideDown();
51
+ }
52
+ if (this.value === 'product-carousel') {
53
+ section_product_query.slideDown();
54
+ _product_query.show();
55
+ }
56
+ if (this.value === 'hero-banner-slider') {
57
+ section_content_carousel.slideDown();
58
+ }
59
+ });
60
+
61
+ // Slide Type -- Post Carousel
62
+ if (slide_type.val() === 'post-carousel') {
63
+ var _postQueryType = _post_query_type.val();
64
+ if (_postQueryType === 'date_range') {
65
+ _post_date_after.show();
66
+ _post_date_before.show();
67
+ }
68
+ if (_postQueryType === 'post_categories') {
69
+ _post_categories.show();
70
+ }
71
+ if (_postQueryType === 'post_tags') {
72
+ _post_tags.show();
73
+ }
74
+ if (_postQueryType === 'specific_posts') {
75
+ _post_in.show();
76
+ _posts_per_page.hide();
77
+ }
78
+ }
79
+
80
+ _post_query_type.on('change', function () {
81
+
82
+ _post_date_after.hide('fast');
83
+ _post_date_before.hide('fast');
84
+ _post_categories.hide('fast');
85
+ _post_tags.hide('fast');
86
+ _post_in.hide('fast');
87
+ _posts_per_page.show('fast');
88
+
89
+ if (this.value === 'date_range') {
90
+ _post_date_after.slideDown();
91
+ _post_date_before.slideDown();
92
+ }
93
+ if (this.value === 'post_categories') {
94
+ _post_categories.slideDown();
95
+ }
96
+ if (this.value === 'post_tags') {
97
+ _post_tags.slideDown();
98
+ }
99
+ if (this.value === 'specific_posts') {
100
+ _post_in.slideDown();
101
+ _posts_per_page.hide('fast');
102
+ }
103
+ });
104
+
105
+ // Slide Type -- Product Carousel
106
+ if (slide_type.val() === 'product-carousel') {
107
+ var _productQueryType = _product_query_type.val();
108
+ if (_productQueryType === 'query_porduct') {
109
+ _product_query.show();
110
+ }
111
+ if (_productQueryType === 'product_categories') {
112
+ _product_categories.show();
113
+ }
114
+ if (_productQueryType === 'product_tags') {
115
+ _product_tags.show();
116
+ }
117
+ if (_productQueryType === 'specific_products') {
118
+ _product_in.show();
119
+ }
120
+ }
121
+
122
+ _product_query_type.on('change', function () {
123
+
124
+ _product_query.hide('fast');
125
+ _product_categories.hide('fast');
126
+ _product_tags.hide('fast');
127
+ _product_in.hide('fast');
128
+ _products_per_page.show('fast');
129
+
130
+ if (this.value === 'query_porduct') {
131
+ _product_query.slideDown();
132
+ }
133
+ if (this.value === 'product_categories') {
134
+ _product_categories.slideDown();
135
+ }
136
+ if (this.value === 'product_tags') {
137
+ _product_tags.slideDown();
138
+ }
139
+ if (this.value === 'specific_products') {
140
+ _product_in.slideDown();
141
+ _products_per_page.hide('fast');
142
+ }
143
+ });
144
+ })(jQuery);
assets/js/admin/vendors.js ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ "use strict";
3
+
4
+ // Initializing TipTip
5
+ $(".cs-tooltip").each(function () {
6
+ $(this).tipTip();
7
+ });
8
+
9
+ // Initializing Select2
10
+ $("select.select2").each(function () {
11
+ $(this).select2();
12
+ });
13
+
14
+ // Initializing jQuery UI Accordion
15
+ $(".shapla-toggle").each(function () {
16
+ if ($(this).attr('data-id') === 'closed') {
17
+ $(this).accordion({
18
+ collapsible: true,
19
+ heightStyle: "content",
20
+ active: false
21
+ });
22
+ } else {
23
+ $(this).accordion({
24
+ collapsible: true,
25
+ heightStyle: "content"
26
+ });
27
+ }
28
+ });
29
+
30
+ // Initializing jQuery UI Tab
31
+ $(".shapla-tabs").tabs({
32
+ hide: {
33
+ effect: "fadeOut",
34
+ duration: 200
35
+ },
36
+ show: {
37
+ effect: "fadeIn",
38
+ duration: 200
39
+ }
40
+ });
41
+
42
+ //Initializing jQuery UI Date picker
43
+ $('.datepicker').each(function () {
44
+ $(this).datepicker({
45
+ dateFormat: 'MM dd, yy',
46
+ changeMonth: true,
47
+ changeYear: true,
48
+ onClose: function (selectedDate) {
49
+ $(this).datepicker('option', 'minDate', selectedDate);
50
+ }
51
+ });
52
+ });
53
+
54
+ // Initializing WP Color Picker
55
+ $('.color-picker').each(function () {
56
+ $(this).wpColorPicker({
57
+ palettes: [
58
+ '#2196F3', // Blue
59
+ '#009688', // Teal
60
+ '#4CAF50', // Green
61
+ '#F44336', // Red
62
+ '#FFEB3B', // Yellow
63
+ '#00D1B2', // Firoza
64
+ '#000000', // Blank
65
+ '#ffffff' // White
66
+ ]
67
+ });
68
+ });
69
+ })(jQuery);
assets/js/jquery.livequery.js DELETED
@@ -1,8 +0,0 @@
1
- /*! jquery.livequery - v1.3.6 - 2016-12-09
2
- * Copyright (c)
3
- * (c) 2010, Brandon Aaron (http://brandonaaron.net)
4
- * (c) 2012 - 2016, Alexander Zaytsev (https://alexzaytsev.me)
5
- * Dual licensed under the MIT (MIT_LICENSE.txt)
6
- * and GPL Version 2 (GPL_LICENSE.txt) licenses.
7
- */
8
- !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a,b){function c(a,b,c,d){return!(a.selector!=b.selector||a.context!=b.context||c&&c.$lqguid!=b.fn.$lqguid||d&&d.$lqguid!=b.fn2.$lqguid)}a.extend(a.fn,{livequery:function(b,e){var f,g=this;return a.each(d.queries,function(a,d){if(c(g,d,b,e))return(f=d)&&!1}),f=f||new d(g.selector,g.context,b,e),f.stopped=!1,f.run(),g},expire:function(b,e){var f=this;return a.each(d.queries,function(a,g){c(f,g,b,e)&&!f.stopped&&d.stop(g.id)}),f}});var d=a.livequery=function(b,c,e,f){var g=this;return g.selector=b,g.context=c,g.fn=e,g.fn2=f,g.elements=a([]),g.stopped=!1,g.id=d.queries.push(g)-1,e.$lqguid=e.$lqguid||d.guid++,f&&(f.$lqguid=f.$lqguid||d.guid++),g};d.prototype={stop:function(){var b=this;b.stopped||(b.fn2&&b.elements.each(b.fn2),b.elements=a([]),b.stopped=!0)},run:function(){var b=this;if(!b.stopped){var c=b.elements,d=a(b.selector,b.context),e=d.not(c),f=c.not(d);b.elements=d,e.each(b.fn),b.fn2&&f.each(b.fn2)}}},a.extend(d,{guid:0,queries:[],queue:[],running:!1,timeout:null,registered:[],checkQueue:function(){if(d.running&&d.queue.length)for(var a=d.queue.length;a--;)d.queries[d.queue.shift()].run()},pause:function(){d.running=!1},play:function(){d.running=!0,d.run()},registerPlugin:function(){a.each(arguments,function(b,c){if(a.fn[c]&&!(a.inArray(c,d.registered)>0)){var e=a.fn[c];a.fn[c]=function(){var a=e.apply(this,arguments);return d.run(),a},d.registered.push(c)}})},run:function(c){c!==b?a.inArray(c,d.queue)<0&&d.queue.push(c):a.each(d.queries,function(b){a.inArray(b,d.queue)<0&&d.queue.push(b)}),d.timeout&&clearTimeout(d.timeout),d.timeout=setTimeout(d.checkQueue,20)},stop:function(c){c!==b?d.queries[c].stop():a.each(d.queries,d.prototype.stop)}}),d.registerPlugin("append","prepend","after","before","wrap","attr","removeAttr","addClass","removeClass","toggleClass","empty","remove","html","prop","removeProp"),a(function(){d.play()})});
 
 
 
 
 
 
 
 
assets/js/owl.carousel.min.js DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Owl Carousel v2.2.0
3
- * Copyright 2013-2016 David Deutsch
4
- * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
5
- */
6
- !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.$element.is(":visible")?(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized"))):!1:!1},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return"left"===c&&b>h-e&&h+e>b?d=a:"right"===c&&b>h-f-e&&h-f+e>b?d=a+1:this.op(b,"<",h)&&this.op(b,">",g[a+1]||h-f)&&(d="left"===c?a+1:a),-1===d},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||1>c?a=d:(0>a||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){for(b=this._items.length,c=this._items[--b].width(),d=this.$element.width();b--&&(c+=this._items[b].width()+this.settings.margin,!(c>d)););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(0>e),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&i>=d-e&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.leave("animating"),void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c),e=[],f=0;a.each(d,function(b,c){e.push(a(c).height())}),f=Math.max.apply(null,e),this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}}))},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="//www.youtube.com/embed/'+f.id+"?autoplay=1&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type?c='<iframe src="//player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>':"vzaar"===f.type&&(c='<iframe frameborder="0"height="'+h+'"width="'+g+'" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/'+f.id+'/player?autoplay=true"></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null);
7
- },a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(a,b){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},e.prototype._getNextTimeout=function(d,e){return this._timeout&&b.clearTimeout(this._timeout),b.setTimeout(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout)},e.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearTimeout(this._timeout),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;e>a;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):0>b&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){return g[b]!==d?(e=c?b:!0,!1):void 0}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
 
 
 
 
 
 
 
assets/{sass → js/public}/index.php RENAMED
File without changes
assets/js/public/script.js ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($) {
2
+ 'use strict';
3
+
4
+ var mobile = 767,
5
+ tablet = 768,
6
+ desktop = 1025,
7
+ minHeadingFont = 20,
8
+ minDescFont = 16,
9
+ heading,
10
+ headingFontSize = 60,
11
+ headingFontSizeNum = 60,
12
+ description,
13
+ descriptionFontSize = 24,
14
+ descriptionFontSizeNum = 24;
15
+
16
+
17
+ function scaleSliderText() {
18
+ var windowW = $(window).width();
19
+
20
+ $('.carousel-slider .slide-content').each(function () {
21
+
22
+ heading = $(this).find('.heading-title');
23
+ headingFontSize = heading.data('font-size');
24
+ headingFontSizeNum = parseInt(headingFontSize);
25
+
26
+ if (headingFontSizeNum) {
27
+ if (windowW <= mobile) {
28
+ headingFontSize = headingFontSizeNum / 3;
29
+ headingFontSize = headingFontSize < minHeadingFont ? minHeadingFont : headingFontSize;
30
+ heading.css('font-size', headingFontSize + 'px');
31
+ }
32
+ if (windowW >= tablet && windowW < desktop) {
33
+ headingFontSize = headingFontSizeNum / 2;
34
+ headingFontSize = headingFontSize < minHeadingFont ? minHeadingFont : headingFontSize;
35
+ heading.css('font-size', headingFontSize + 'px');
36
+ }
37
+ if (windowW >= desktop) {
38
+ heading.css('font-size', headingFontSize + 'px');
39
+ }
40
+ }
41
+
42
+ description = $(this).find('.description-title');
43
+ descriptionFontSize = description.data('font-size');
44
+ descriptionFontSizeNum = parseInt(descriptionFontSize);
45
+
46
+ if (descriptionFontSizeNum) {
47
+ if (windowW <= mobile) {
48
+ descriptionFontSize = descriptionFontSizeNum / 3;
49
+ descriptionFontSize = descriptionFontSize < minDescFont ? minDescFont : descriptionFontSize;
50
+ description.css('font-size', descriptionFontSize + 'px');
51
+ }
52
+ if (windowW >= tablet && windowW < desktop) {
53
+ descriptionFontSize = descriptionFontSizeNum / 2;
54
+ descriptionFontSize = descriptionFontSize < minDescFont ? minDescFont : descriptionFontSize;
55
+ description.css('font-size', descriptionFontSize + 'px');
56
+ }
57
+ if (windowW >= desktop) {
58
+ description.css('font-size', descriptionFontSize + 'px');
59
+ }
60
+ }
61
+ });
62
+ }
63
+
64
+
65
+ window.addEventListener("load", scaleSliderText);
66
+ window.addEventListener("resize", scaleSliderText);
67
+ window.addEventListener("orientationchange", scaleSliderText);
68
+
69
+ })(jQuery);
assets/{sass/public → js/vendors}/index.php RENAMED
File without changes
assets/js/{jquery.magnific-popup.min.js → vendors/jquery.magnific-popup.min.js} RENAMED
File without changes
assets/js/vendors/jquery.tipTip.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t){t.fn.tipTip=function(e){var o={activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:!1,enter:function(){},exit:function(){}},i=t.extend(o,e);if(t("#tiptip_holder").length<=0){var n=t('<div id="tiptip_holder" style="max-width:'+i.maxWidth+';"></div>'),r=t('<div id="tiptip_content"></div>'),a=t('<div id="tiptip_arrow"></div>');t("body").append(n.html(r).prepend(a.html('<div id="tiptip_arrow_inner"></div>')))}else var n=t("#tiptip_holder"),r=t("#tiptip_content"),a=t("#tiptip_arrow");return this.each(function(){function e(){i.enter.call(this),r.html(d),n.hide().removeAttr("class").css("margin","0"),a.removeAttr("style");var e=parseInt(f.offset().top),o=parseInt(f.offset().left),p=parseInt(f.outerWidth()),l=parseInt(f.outerHeight()),h=n.outerWidth(),c=n.outerHeight(),s=Math.round((p-h)/2),_=Math.round((l-c)/2),v=Math.round(o+s),m=Math.round(e+l+i.edgeOffset),g="",b="",M=Math.round(h-12)/2;"bottom"==i.defaultPosition?g="_bottom":"top"==i.defaultPosition?g="_top":"left"==i.defaultPosition?g="_left":"right"==i.defaultPosition&&(g="_right");var w=s+o<parseInt(t(window).scrollLeft()),O=h+o>parseInt(t(window).width());w&&s<0||"_right"==g&&!O||"_left"==g&&o<h+i.edgeOffset+5?(g="_right",b=Math.round(c-13)/2,M=-12,v=Math.round(o+p+i.edgeOffset),m=Math.round(e+_)):(O&&s<0||"_left"==g&&!w)&&(g="_left",b=Math.round(c-13)/2,M=Math.round(h),v=Math.round(o-(h+i.edgeOffset+5)),m=Math.round(e+_));var x=e+l+i.edgeOffset+c+8>parseInt(t(window).height()+t(window).scrollTop()),I=e+l-(i.edgeOffset+c+8)<0;x||"_bottom"==g&&x||"_top"==g&&!I?("_top"==g||"_bottom"==g?g="_top":g+="_top",b=c,m=Math.round(e-(c+5+i.edgeOffset))):(I|("_top"==g&&I)||"_bottom"==g&&!x)&&("_top"==g||"_bottom"==g?g="_bottom":g+="_bottom",b=-12,m=Math.round(e+l+i.edgeOffset)),"_right_top"==g||"_left_top"==g?m+=5:"_right_bottom"!=g&&"_left_bottom"!=g||(m-=5),"_left_top"!=g&&"_left_bottom"!=g||(v+=5),a.css({"margin-left":M+"px","margin-top":b+"px"}),n.css({"margin-left":v+"px","margin-top":m+"px"}).attr("class","tip"+g),u&&clearTimeout(u),u=setTimeout(function(){n.stop(!0,!0).fadeIn(i.fadeIn)},i.delay)}function o(){i.exit.call(this),u&&clearTimeout(u),n.fadeOut(i.fadeOut)}var f=t(this);if(i.content)d=i.content;else var d=f.attr(i.attribute);if(""!=d){i.content||f.removeAttr(i.attribute);var u=!1;"hover"==i.activation?(f.hover(function(){e()},function(){i.keepAlive||o()}),i.keepAlive&&n.hover(function(){},function(){o()})):"focus"==i.activation?f.focus(function(){e()}).blur(function(){o()}):"click"==i.activation&&(f.click(function(){return e(),!1}).hover(function(){},function(){i.keepAlive||o()}),i.keepAlive&&n.hover(function(){},function(){o()}))}})}}(jQuery);
assets/js/vendors/owl.carousel.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /**
2
+ * Owl Carousel v2.2.1
3
+ * Copyright 2013-2017 David Deutsch
4
+ * Licensed under ()
5
+ */
6
+ !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&e<=0&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.$element.is(":visible")&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return"left"===c&&b>h-e&&b<h+e?d=a:"right"===c&&b>h-f-e&&b<h-f+e?d=a+1:this.op(b,"<",h)&&this.op(b,">",g[a+1]||h-f)&&(d="left"===c?a+1:a),d===-1},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){for(b=this._items.length,c=this._items[--b].width(),d=this.$element.width();b--&&(c+=this._items[b].width()+this.settings.margin,!(c>d)););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=f*-1*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a<c;case">":return d?a<c:a>c;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&a.namespace.indexOf("owl")!==-1?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&e*-1||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c),e=[],f=0;a.each(d,function(b,c){e.push(a(c).height())}),f=Math.max.apply(null,e),this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};if(b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="//www.youtube.com/embed/'+f.id+"?autoplay=1&rel=0&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type?c='<iframe src="//player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>':"vzaar"===f.type&&(c='<iframe frameborder="0"height="'+h+'"width="'+g+'" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/'+f.id+'/player?autoplay=true"></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},
7
+ a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(a,b){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},e.prototype._getNextTimeout=function(d,e){return this._timeout&&b.clearTimeout(this._timeout),b.setTimeout(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout)},e.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearTimeout(this._timeout),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
assets/js/{select2.min.js → vendors/select2.min.js} RENAMED
File without changes
assets/js/vendors/wp-color-picker-alpha.min.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**!
2
+ * wp-color-picker-alpha
3
+ *
4
+ * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
5
+ * Only run in input and is defined data alpha in true
6
+ *
7
+ * Version: 1.2.2
8
+ * https://github.com/23r9i0/wp-color-picker-alpha
9
+ * Copyright (c) 2015 Sergio P.A. (23r9i0).
10
+ * Licensed under the GPLv2 license.
11
+ */
12
+ !function(t){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",i='<a tabindex="0" class="wp-color-result" />',e='<div class="wp-picker-holder" />',r='<div class="wp-picker-container" />',a='<input type="button" class="button button-small hidden" />';Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},t.widget("wp.wpColorPicker",t.wp.wpColorPicker,{_create:function(){if(t.support.iris){var n=this,s=n.element;t.extend(n.options,s.data()),n.close=t.proxy(n.close,n),n.initialValue=s.val(),s.addClass("wp-color-picker").hide().wrap(r),n.wrap=s.parent(),n.toggler=t(i).insertBefore(s).css({backgroundColor:n.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),n.pickerContainer=t(e).insertAfter(s),n.button=t(a),n.options.defaultColor?n.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString):n.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),s.wrap('<span class="wp-picker-input-wrap" />').after(n.button),s.iris({target:n.pickerContainer,hide:n.options.hide,width:n.options.width,mode:n.options.mode,palettes:n.options.palettes,change:function(i,e){n.options.alpha?(n.toggler.css({"background-image":"url("+o+")"}).html("<span />"),n.toggler.find("span").css({width:"100%",height:"100%",position:"absolute",top:0,left:0,"border-top-left-radius":"3px","border-bottom-left-radius":"3px",background:e.color.toString()})):n.toggler.css({backgroundColor:e.color.toString()}),t.isFunction(n.options.change)&&n.options.change.call(this,i,e)}}),s.val(n.initialValue),n._addListeners(),n.options.hide||n.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.on("click",function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(i){(""===t(this).val()||o.element.hasClass("iris-error"))&&(o.options.alpha?(o.toggler.removeAttr("style"),o.toggler.find("span").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,i))}),o.toggler.on("keyup",function(t){13!==t.keyCode&&32!==t.keyCode||(t.preventDefault(),o.toggler.trigger("click").next().focus())}),o.button.on("click",function(i){t(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?(o.toggler.removeAttr("style"),o.toggler.find("span").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,i)):t(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),t.widget("a8c.iris",t.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),"undefined"!=typeof this.options.alpha&&this.options.alpha){var o=this,i=o.element,e='<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>',r=t(e).appendTo(o.picker.find(".iris-picker-inner")),a=r.find(".iris-slider-offset-alpha"),n={aContainer:r,aSlider:a};"undefined"!=typeof i.data("custom-width")?o.options.customWidth=parseInt(i.data("custom-width"))||0:o.options.customWidth=100,o.options.defaultWidth=i.width(),(o._color._alpha<1||-1!=o._color.toString().indexOf("rgb"))&&i.width(parseInt(o.options.defaultWidth+o.options.customWidth)),t.each(n,function(t,i){o.controls[t]=i}),o.controls.square.css({"margin-right":"0"});var s=o.picker.width()-o.controls.square.width()-20,l=s/6,c=s/2-l;t.each(["aContainer","strip"],function(t,i){o.controls[i].width(c).css({"margin-left":l+"px"})}),o._initControls(),o._change()}},_initControls:function(){if(this._super(),this.options.alpha){var t=this,o=t.controls;o.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,i){t._color._alpha=parseFloat(i.value/100),t._change.apply(t,arguments)}})}},_change:function(){this._super();var t=this,i=t.element;if(this.options.alpha){var e=t.controls,r=parseInt(100*t._color._alpha),a=t._color.toRgb(),n=["rgb("+a.r+","+a.g+","+a.b+") 0%","rgba("+a.r+","+a.g+","+a.b+", 0) 100%"],s=t.options.defaultWidth,l=t.options.customWidth,c=t.picker.closest(".wp-picker-container").find(".wp-color-result");e.aContainer.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+o+")"}),c.hasClass("wp-picker-open")&&(e.aSlider.slider("value",r),t._color._alpha<1?(e.strip.attr("style",e.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),i.width(parseInt(s+l))):i.width(s))}var p=i.data("reset-alpha")||!1;p&&t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){t._color._alpha=1,t.active="external",t._change()})},_addInputListeners:function(t){var o=this,i=100,e=function(i){var e=new Color(t.val()),r=t.val();t.removeClass("iris-error"),e.error?""!==r&&t.addClass("iris-error"):e.toString()!==o._color.toString()&&("keyup"===i.type&&r.match(/^[0-9a-fA-F]{3}$/)||o._setOption("color",e.toString()))};t.on("change",e).on("keyup",o._debounce(e,i)),o.options.hide&&t.on("focus",function(){o.show()})}})}(jQuery);
assets/sass/admin/_meta-box.scss DELETED
@@ -1,169 +0,0 @@
1
- // Global
2
- .overflowHidden {
3
- overflow: hidden;
4
- }
5
- .overflowVisible {
6
- overflow: visible;
7
- }
8
- // Metabox fields
9
- .sp {
10
- &-input-group {
11
- margin-bottom: 10px;
12
- &:after {
13
- content:"";
14
- display:table;
15
- clear:both
16
- }
17
- }
18
-
19
- &-input-label {
20
- label {
21
- font-weight: 600;
22
- margin-right: 30px;
23
- }
24
- }
25
- &-input-field {}
26
-
27
- &-input-label,
28
- &-input-field {
29
- float: left;
30
- width: 100%;
31
- }
32
- &-input-desc {
33
- color: #999;
34
- font-size: 0.9em;
35
- line-height: 1.3em;
36
- margin: 10px 30px 10px 0;
37
- }
38
- &-input-text {
39
- width: 100%;
40
- padding: 8px 8px 8px 16px;
41
- height: 35px !important;
42
-
43
- option {
44
- padding: 8px 4px;
45
- }
46
- }
47
- }
48
-
49
-
50
- @media only screen and (min-width: 600px ){
51
- .sp {
52
- &-input-label {
53
- width: 40%;
54
- }
55
- &-input-field {
56
- width: 60%;
57
- }
58
- }
59
- }
60
-
61
- @media only screen and (min-width: 783px ){
62
- .sp-input-label {
63
- width: 30%;
64
- }
65
- .sp-input-field {
66
- width: 70%;
67
- }
68
- .sp-input-text {
69
- width: 25em;
70
- }
71
- }
72
-
73
- @media only screen and (min-width: 851px ){
74
- .sp-input-label,
75
- .sp-input-field {
76
- width: 100%;
77
- }
78
- }
79
-
80
- @media only screen and (min-width: 1200px ){
81
- .sp-input-label {
82
- width: 40%;
83
- }
84
- .sp-input-field {
85
- width: 60%;
86
- }
87
- }
88
-
89
- @media only screen and (min-width: 1600px ){
90
- .sp-input-label {
91
- width: 30%;
92
- }
93
- .sp-input-field {
94
- width: 70%;
95
- }
96
- }
97
-
98
- // Admin Media gallery
99
- .carousel_slider {
100
- &_images {
101
- &:before,
102
- &:after {
103
- display: table;
104
- content: "";
105
- }
106
- &:after {
107
- clear: both;
108
- }
109
- }
110
- &_gallery_btn {
111
- border: 1px solid #616161;
112
- color: #616161;
113
- background-color: #f1f1f1;
114
- padding: 5px 15px;
115
- text-decoration: none;
116
-
117
- &:hover {
118
- background-color: #ffffff;
119
- color: #616161;
120
- }
121
- }
122
- &_gallery_list {
123
- margin: 15px 0 0 0;
124
- padding: 0;
125
- list-style: none;
126
- box-sizing: border-box;
127
- &:before,
128
- &:after {
129
- display: table;
130
- content: "";
131
- }
132
- &:after {
133
- clear: both;
134
- }
135
-
136
- li {
137
- float: left;
138
- margin: 0;
139
- padding: 0;
140
-
141
- > img {
142
- margin-right: 10px;
143
- margin-bottom: 10px;
144
- display: block;
145
- box-shadow:0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
146
- }
147
- }
148
- }
149
- }
150
-
151
-
152
- // Hide Post carousel fields
153
- // Related fields will be open by jQuery
154
- #field-_post_date_after,
155
- #field-_post_date_before,
156
- #field-_post_categories,
157
- #field-_post_tags,
158
- #field-_post_in {
159
- display: none;
160
- }
161
-
162
- // Hide Post carousel fields
163
- // Related fields will be open by jQuery
164
- #field-_product_query,
165
- #field-_product_categories,
166
- #field-_product_tags,
167
- #field-_product_in {
168
- display: none;
169
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/sass/public/_post-carousel.scss DELETED
@@ -1,120 +0,0 @@
1
- .carousel-slider {
2
- &__post {
3
- border: 1px solid #f1f1f1;
4
- float: left;
5
- height: 450px;
6
- width: 100%;
7
- position: relative;
8
- display: block;
9
- overflow: hidden;
10
-
11
- &-content {
12
- bottom: 0;
13
- position: absolute;
14
- top: 0;
15
- transition: all 0.2s ease 0s;
16
- width: 100%;
17
- display: block;
18
- }
19
-
20
- &-image {
21
- border-bottom: 1px solid #f1f1f1;
22
- display: block;
23
- height: 207px;
24
- line-height: 0;
25
- margin: 0 auto;
26
- overflow: hidden;
27
- text-align: center;
28
- width: 100%;
29
- background-color: #f1f1f1;
30
- background-size: cover;
31
- background-position: center center;
32
- }
33
-
34
- &-title {
35
- display: block;
36
- margin: 10px 15px 0;
37
- max-height: 70px;
38
-
39
- h1 {
40
- color: #4a4a4a;
41
- font: bold 18px/1.4em Arial,sans-serif;
42
- margin-bottom: 0;
43
- margin-top: 0;
44
- }
45
- }
46
-
47
- &-excerpt {
48
- color: #7d7d7d;
49
- font-size: 14px;
50
- line-height: 1.5em;
51
- padding: 10px 15px 5px;
52
- text-align: left;
53
- width: 100%;
54
- position: absolute;
55
- top: 285px;
56
-
57
- &-overlay {
58
- background: transparent none repeat scroll 0 0;
59
- display: block;
60
- height: 20px;
61
- width: 100%;
62
- }
63
- }
64
-
65
- &-meta {
66
- bottom: 10px;
67
- color: #8e8e8e;
68
- font-size: 12px;
69
- left: 0;
70
- padding: 0 15px;
71
- position: absolute;
72
- width: 100%;
73
- display: block;
74
- }
75
-
76
- &-publication-meta {
77
- background-color: white;
78
- display: block;
79
- padding-top: 15px;
80
- width: 100%;
81
- overflow: hidden;
82
- text-overflow: ellipsis;
83
- white-space: nowrap;
84
- }
85
-
86
- &-details-info {
87
- display: inline-block;
88
- }
89
- &-author {
90
- display: block;
91
- font-style: normal;
92
- line-height: 1em;
93
- overflow: hidden;
94
- text-overflow: ellipsis;
95
- white-space: nowrap;
96
- margin-bottom: 5px;
97
-
98
- &-link {
99
- color: #8e8e8e;
100
- display: inline-block;
101
- max-width: 175px;
102
- overflow: hidden;
103
- text-overflow: ellipsis;
104
- vertical-align: middle;
105
- white-space: nowrap;
106
- }
107
- }
108
-
109
- &-category {
110
- color: #4cc1be;
111
- text-transform: uppercase;
112
- position: absolute;
113
- right: 15px;
114
- top: 50px;
115
- z-index: 1;
116
-
117
- &-link {}
118
- }
119
- }
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/{sass → scss}/admin.scss RENAMED
@@ -1,6 +1,11 @@
 
 
1
  @import 'admin/widget';
2
  @import 'admin/toggle';
3
  @import 'admin/meta-box';
4
  @import 'admin/datepicker';
5
  @import 'admin/select2';
6
  @import 'admin/model';
 
 
 
1
+ @import "utilities/variables";
2
+ @import "utilities/mixins";
3
  @import 'admin/widget';
4
  @import 'admin/toggle';
5
  @import 'admin/meta-box';
6
  @import 'admin/datepicker';
7
  @import 'admin/select2';
8
  @import 'admin/model';
9
+ @import 'admin/modal';
10
+ @import 'admin/tooltip';
11
+ @import 'admin/tab';
assets/{sass → scss}/admin/_datepicker.scss RENAMED
File without changes
assets/scss/admin/_meta-box.scss ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Global
2
+ .overflowHidden {
3
+ overflow: hidden;
4
+ }
5
+
6
+ .overflowVisible {
7
+ overflow: visible;
8
+ }
9
+
10
+ // Meta box fields
11
+ .sp {
12
+ &-input-group {
13
+ margin-bottom: 10px;
14
+ &:after {
15
+ content: "";
16
+ display: table;
17
+ clear: both
18
+ }
19
+ }
20
+
21
+ &-input-label {
22
+ label {
23
+ font-weight: 600;
24
+ margin-right: 30px;
25
+ }
26
+ }
27
+ &-input-field {
28
+ }
29
+
30
+ &-input-label,
31
+ &-input-field {
32
+ float: left;
33
+ width: 100%;
34
+ }
35
+ &-input-desc {
36
+ color: #999;
37
+ font-size: 0.9em;
38
+ line-height: 1.3em;
39
+ margin: 10px 30px 10px 0;
40
+ }
41
+ &-input-text {
42
+ width: 100%;
43
+ padding: 8px 8px 8px 16px;
44
+ height: 35px !important;
45
+
46
+ option {
47
+ padding: 8px 4px;
48
+ }
49
+ }
50
+ }
51
+
52
+ .spacing-text {
53
+ width: 62px;
54
+ }
55
+
56
+ @media only screen and (min-width: 600px) {
57
+ .sp {
58
+ &-input-label {
59
+ width: 40%;
60
+ }
61
+ &-input-field {
62
+ width: 60%;
63
+ }
64
+ }
65
+ }
66
+
67
+ @media only screen and (min-width: 783px) {
68
+ .sp-input-label {
69
+ width: 30%;
70
+ }
71
+ .sp-input-field {
72
+ width: 70%;
73
+ }
74
+ .sp-input-text {
75
+ width: 25em;
76
+ }
77
+ }
78
+
79
+ @media only screen and (min-width: 851px) {
80
+ .sp-input-label,
81
+ .sp-input-field {
82
+ width: 100%;
83
+ }
84
+ }
85
+
86
+ @media only screen and (min-width: 1200px) {
87
+ .sp-input-label {
88
+ width: 40%;
89
+ }
90
+ .sp-input-field {
91
+ width: 60%;
92
+ }
93
+ }
94
+
95
+ @media only screen and (min-width: 1600px) {
96
+ .sp-input-label {
97
+ width: 30%;
98
+ }
99
+ .sp-input-field {
100
+ width: 70%;
101
+ }
102
+ }
103
+
104
+ // Admin Media gallery
105
+ .carousel_slider {
106
+ &_images {
107
+ &:before,
108
+ &:after {
109
+ display: table;
110
+ content: "";
111
+ }
112
+ &:after {
113
+ clear: both;
114
+ }
115
+ }
116
+ &_gallery_btn {
117
+ border: 1px solid #616161;
118
+ color: #616161;
119
+ background-color: #f1f1f1;
120
+ padding: 5px 15px;
121
+ text-decoration: none;
122
+
123
+ &:hover {
124
+ background-color: #ffffff;
125
+ color: #616161;
126
+ }
127
+ }
128
+ &_gallery_list {
129
+ margin: 15px 0 0 0;
130
+ padding: 0;
131
+ list-style: none;
132
+ box-sizing: border-box;
133
+ &:before,
134
+ &:after {
135
+ display: table;
136
+ content: "";
137
+ }
138
+ &:after {
139
+ clear: both;
140
+ }
141
+
142
+ li {
143
+ float: left;
144
+ margin: 0;
145
+ padding: 0;
146
+
147
+ > img {
148
+ margin-right: 10px;
149
+ margin-bottom: 10px;
150
+ display: block;
151
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
152
+ }
153
+ }
154
+ }
155
+ }
156
+
157
+ // Hide Post carousel fields
158
+ // Related fields will be open by jQuery
159
+ #field-_post_date_after,
160
+ #field-_post_date_before,
161
+ #field-_post_categories,
162
+ #field-_post_tags,
163
+ #field-_post_in {
164
+ display: none;
165
+ }
166
+
167
+ // Hide Post carousel fields
168
+ // Related fields will be open by jQuery
169
+ #field-_product_query,
170
+ #field-_product_categories,
171
+ #field-_product_tags,
172
+ #field-_product_in {
173
+ display: none;
174
+ }
175
+
176
+ #carousel-slider-navigation-settings,
177
+ #carousel-slider-responsive-settings,
178
+ #carousel-slider-autoplay-settings {
179
+ p {
180
+ overflow: hidden;
181
+ }
182
+ input.small-text,
183
+ select.small-text {
184
+ float: right;
185
+ }
186
+ }
187
+
188
+ // Content Carousel Meta
189
+ .tab-background {
190
+ .slide_bg_wrapper {
191
+ display: flex;
192
+ padding: 1rem 0;
193
+ }
194
+ .slide_thumb {
195
+ position: relative;
196
+ float: left;
197
+ margin-right: 1rem;
198
+ border: solid 1px #e0e0e0;
199
+ padding: 5px;
200
+
201
+ > div {
202
+ width: 320px;
203
+ height: 180px;
204
+ background-color: #f1f1f1;
205
+ background-repeat: no-repeat;
206
+ background-position: top left;
207
+ background-size: 100% auto;
208
+ }
209
+
210
+ > span {
211
+ display: inline-block;
212
+ position: absolute;
213
+ top: 0;
214
+ right: 0;
215
+ font-family: Arial, Helvetica, sans-serif;
216
+ font-size: 14px;
217
+ line-height: 14px;
218
+ padding: 3px 3px;
219
+ background-color: rgba(0, 0, 0, 0.5);
220
+ color: #ffffff;
221
+ cursor: pointer;
222
+ transition: all .3s ease-in-out;
223
+
224
+ &.hidden {
225
+ display: none !important;
226
+ }
227
+ }
228
+ }
229
+
230
+ .slide_image_settings_line {
231
+ display: block;
232
+ margin: 0.5rem 0;
233
+
234
+ > span {
235
+ width: 150px;
236
+ display: inline-block;
237
+ }
238
+ }
239
+ }
assets/scss/admin/_modal.scss ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .modal {
2
+ @include overlay;
3
+ align-items: center;
4
+ display: none;
5
+ justify-content: center;
6
+ overflow: hidden;
7
+ position: fixed;
8
+ z-index: 10000;
9
+
10
+ .admin-bar & {
11
+ top: 32px;
12
+ }
13
+
14
+ .delete-icon {
15
+ @include delete;
16
+ }
17
+
18
+ // Modifiers
19
+ &.is-active {
20
+ display: flex;
21
+ }
22
+
23
+ &-background {
24
+ @include overlay;
25
+ background-color: rgba($black, 0.86);
26
+ }
27
+
28
+ &-content,
29
+ &-card {
30
+ margin: 0 20px;
31
+ max-height: calc(100vh - 160px);
32
+ overflow: auto;
33
+ position: relative;
34
+ width: 100%;
35
+ // Responsiveness
36
+ @media screen and (min-width: 769px), print {
37
+ margin: 0 auto;
38
+ max-height: calc(100vh - 40px);
39
+ width: 640px;
40
+ }
41
+ }
42
+
43
+ &-close {
44
+ @include delete;
45
+ background: none;
46
+ height: 40px;
47
+ position: fixed;
48
+ right: 20px;
49
+ top: 20px;
50
+ width: 40px;
51
+ }
52
+
53
+ &-card {
54
+ display: flex;
55
+ flex-direction: column;
56
+ max-height: calc(100vh - 40px);
57
+ overflow: hidden;
58
+ }
59
+
60
+ &-card-head,
61
+ &-card-foot {
62
+ align-items: center;
63
+ background-color: $background;
64
+ display: flex;
65
+ flex-shrink: 0;
66
+ justify-content: flex-start;
67
+ margin: 0;
68
+ padding: 20px;
69
+ position: relative;
70
+ }
71
+
72
+ &-card-head {
73
+ border-bottom: 1px solid $border;
74
+ border-top-left-radius: $radius-large;
75
+ border-top-right-radius: $radius-large;
76
+ }
77
+
78
+ &-card-title {
79
+ color: $text-strong;
80
+ flex-grow: 1;
81
+ flex-shrink: 0;
82
+ font-size: $size-4;
83
+ line-height: 1;
84
+ margin: 0;
85
+ padding: 0;
86
+ }
87
+
88
+ &-card-foot {
89
+ border-bottom-left-radius: $radius-large;
90
+ border-bottom-right-radius: $radius-large;
91
+ border-top: 1px solid $border;
92
+ .button {
93
+ &:not(:last-child) {
94
+ margin-right: 10px;
95
+ }
96
+ }
97
+ }
98
+
99
+ &-card-body {
100
+ -webkit-overflow-scrolling: touch;
101
+ background-color: $white;
102
+ flex-grow: 1;
103
+ flex-shrink: 1;
104
+ overflow: auto;
105
+ margin: 0;
106
+ padding: 20px;
107
+ }
108
+ }
assets/{sass → scss}/admin/_model.scss RENAMED
File without changes
assets/{sass → scss}/admin/_select2.scss RENAMED
File without changes
assets/scss/admin/_tab.scss ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Tabs */
2
+ $accent: #323232;
3
+
4
+ .shapla-nav {
5
+ list-style: none !important;
6
+ margin: 0;
7
+ padding: 0;
8
+
9
+ &:before,
10
+ &:after {
11
+ display: table;
12
+ content: ' ';
13
+ }
14
+
15
+ &:after {
16
+ clear: both;
17
+ }
18
+
19
+ li {
20
+ float: left;
21
+ position: relative;
22
+ margin: 0 1px -1px 0 !important;
23
+ z-index: 1;
24
+ outline: 0;
25
+ }
26
+ a {
27
+ text-decoration: none;
28
+ display: block;
29
+ padding: 15px 10px;
30
+ line-height: 1;
31
+ outline: 0;
32
+ }
33
+ }
34
+
35
+ .shapla-tab {
36
+ margin: 0 0 2em 0;
37
+ padding: 21px 20px 20px 20px;
38
+
39
+ p:first-of-type {
40
+ margin-top: 0;
41
+ }
42
+ p:last-of-type {
43
+ margin-bottom: 0;
44
+ }
45
+ }
46
+
47
+ .shapla-tabs--normal {
48
+ .shapla-nav {
49
+ a {
50
+ background: $accent;
51
+ color: #fff;
52
+ }
53
+ .ui-tabs-active a {
54
+ background: #f1f1f1;
55
+ color: $accent;
56
+ outline: 0;
57
+ }
58
+ }
59
+ .shapla-tab {
60
+ background: #f1f1f1;
61
+ }
62
+ }
63
+
64
+ .shapla-tabs--stroke {
65
+ .shapla-nav li {
66
+ margin: 0 -1px 0 0 !important;
67
+ }
68
+ .shapla-nav a {
69
+ border: 1px solid $accent;
70
+ color: $accent;
71
+ }
72
+ .shapla-nav .ui-tabs-active a {
73
+ border-bottom-color: white;
74
+ }
75
+ .shapla-tab {
76
+ border: 1px solid $accent;
77
+ margin-top: -1px;
78
+ }
79
+ }
assets/{sass → scss}/admin/_toggle.scss RENAMED
@@ -1,6 +1,5 @@
1
- // Toggle
2
  .shapla-toggle {
3
- margin: 0 0 1em !important;
4
 
5
  &-title {
6
  display: block;
@@ -12,7 +11,6 @@
12
  &:after {
13
  position: absolute;
14
  right: 15px;
15
- font-size: 18px;
16
  font: 400 20px/1 dashicons;
17
  margin-left: -1px;
18
  padding-right: 3px;
 
1
  .shapla-toggle {
2
+ margin: 1em 0 !important;
3
 
4
  &-title {
5
  display: block;
11
  &:after {
12
  position: absolute;
13
  right: 15px;
 
14
  font: 400 20px/1 dashicons;
15
  margin-left: -1px;
16
  padding-right: 3px;
assets/scss/admin/_tooltip.scss ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .cs-tooltip {
2
+ display: inline-block;
3
+ width: 1.5em;
4
+ height: 1.5em;
5
+ float: right;
6
+
7
+ &:after {
8
+ font-family: Dashicons;
9
+ speak: none;
10
+ font-weight: 400;
11
+ text-transform: none;
12
+ -webkit-font-smoothing: antialiased;
13
+ width: 100%;
14
+ height: 100%;
15
+ text-align: center;
16
+ content: "\f223";
17
+ cursor: help;
18
+ }
19
+ }
20
+
21
+ /* TipTip CSS - Version 1.2 */
22
+
23
+ #tiptip_holder {
24
+ display: none;
25
+ position: absolute;
26
+ top: 0;
27
+ left: 0;
28
+ z-index: 99999;
29
+ }
30
+
31
+ #tiptip_holder.tip_top {
32
+ padding-bottom: 5px;
33
+ }
34
+
35
+ #tiptip_holder.tip_bottom {
36
+ padding-top: 5px;
37
+ }
38
+
39
+ #tiptip_holder.tip_right {
40
+ padding-left: 5px;
41
+ }
42
+
43
+ #tiptip_holder.tip_left {
44
+ padding-right: 5px;
45
+ }
46
+
47
+ #tiptip_content {
48
+ font-size: 11px;
49
+ color: #fff;
50
+ text-shadow: 0 0 2px #000;
51
+ padding: 4px 8px;
52
+ border: 1px solid rgba(255,255,255,0.25);
53
+ background-color: rgb(25,25,25);
54
+ background-color: rgba(25,25,25,0.92);
55
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));
56
+ border-radius: 3px;
57
+ -webkit-border-radius: 3px;
58
+ -moz-border-radius: 3px;
59
+ box-shadow: 0 0 3px #555;
60
+ -webkit-box-shadow: 0 0 3px #555;
61
+ -moz-box-shadow: 0 0 3px #555;
62
+ }
63
+
64
+ #tiptip_arrow, #tiptip_arrow_inner {
65
+ position: absolute;
66
+ border-color: transparent;
67
+ border-style: solid;
68
+ border-width: 6px;
69
+ height: 0;
70
+ width: 0;
71
+ }
72
+
73
+ #tiptip_holder.tip_top #tiptip_arrow {
74
+ border-top-color: #fff;
75
+ border-top-color: rgba(255,255,255,0.35);
76
+ }
77
+
78
+ #tiptip_holder.tip_bottom #tiptip_arrow {
79
+ border-bottom-color: #fff;
80
+ border-bottom-color: rgba(255,255,255,0.35);
81
+ }
82
+
83
+ #tiptip_holder.tip_right #tiptip_arrow {
84
+ border-right-color: #fff;
85
+ border-right-color: rgba(255,255,255,0.35);
86
+ }
87
+
88
+ #tiptip_holder.tip_left #tiptip_arrow {
89
+ border-left-color: #fff;
90
+ border-left-color: rgba(255,255,255,0.35);
91
+ }
92
+
93
+ #tiptip_holder.tip_top #tiptip_arrow_inner {
94
+ margin-top: -7px;
95
+ margin-left: -6px;
96
+ border-top-color: rgb(25,25,25);
97
+ border-top-color: rgba(25,25,25,0.92);
98
+ }
99
+
100
+ #tiptip_holder.tip_bottom #tiptip_arrow_inner {
101
+ margin-top: -5px;
102
+ margin-left: -6px;
103
+ border-bottom-color: rgb(25,25,25);
104
+ border-bottom-color: rgba(25,25,25,0.92);
105
+ }
106
+
107
+ #tiptip_holder.tip_right #tiptip_arrow_inner {
108
+ margin-top: -6px;
109
+ margin-left: -5px;
110
+ border-right-color: rgb(25,25,25);
111
+ border-right-color: rgba(25,25,25,0.92);
112
+ }
113
+
114
+ #tiptip_holder.tip_left #tiptip_arrow_inner {
115
+ margin-top: -6px;
116
+ margin-left: -7px;
117
+ border-left-color: rgb(25,25,25);
118
+ border-left-color: rgba(25,25,25,0.92);
119
+ }
120
+
121
+ /* Webkit Hacks */
122
+ @media screen and (-webkit-min-device-pixel-ratio:0) {
123
+ #tiptip_content {
124
+ padding: 4px 8px 5px 8px;
125
+ background-color: rgba(45,45,45,0.88);
126
+ }
127
+ #tiptip_holder.tip_bottom #tiptip_arrow_inner {
128
+ border-bottom-color: rgba(45,45,45,0.88);
129
+ }
130
+ #tiptip_holder.tip_top #tiptip_arrow_inner {
131
+ border-top-color: rgba(20,20,20,0.92);
132
+ }
133
+ }
assets/{sass → scss}/admin/_widget.scss RENAMED
File without changes
{languages → assets/scss/admin}/index.php RENAMED
File without changes
assets/scss/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
assets/{sass → scss}/public/_animate.scss RENAMED
File without changes
assets/{sass → scss}/public/_autoheight.scss RENAMED
File without changes
assets/scss/public/_button.scss ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .cs-button {
2
+ -webkit-appearance: none;
3
+ -webkit-font-smoothing: inherit;
4
+ display: inline-block;
5
+ font-size: 1rem;
6
+ line-height: 1;
7
+ padding: 0.75em 1em;
8
+ border-radius: 0;
9
+ text-decoration: none;
10
+ text-align: center;
11
+ box-sizing: border-box;
12
+ transition: all 200ms ease-in-out;
13
+
14
+ &:hover {
15
+ text-decoration: none;
16
+ }
17
+
18
+ &--normal {
19
+ opacity: 0.9;
20
+ filter: alpha(opacity=90);
21
+ }
22
+
23
+ &--stroke {
24
+ background: transparent;
25
+ border-width: 1px;
26
+ border-style: solid;
27
+ border-color: transparent;
28
+ }
29
+
30
+ &--medium {
31
+ font-size: 1.2rem;
32
+ padding: 0.9em 1.2em;
33
+ }
34
+
35
+ &--large {
36
+ font-size: 1.5rem;
37
+ padding: 0.9em 1.6em;
38
+ }
39
+ }
assets/scss/public/_content-carousel.scss ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .carousel-slider__content {
2
+
3
+ .slide-content-inner {
4
+ padding: 0;
5
+ }
6
+
7
+ .slide-content {
8
+ display: flex;
9
+ flex-direction: column;
10
+ justify-content: center;
11
+ margin: 0 auto;
12
+ padding: 1rem;
13
+ max-width: 1140px;
14
+ min-height: 300px;
15
+ }
16
+
17
+ .heading,
18
+ .description {
19
+ &-title-wrapper {
20
+ display: inline-flex;
21
+ padding: 0;
22
+ }
23
+
24
+ &-title {
25
+ margin: 0;
26
+ padding: 0;
27
+ }
28
+ }
29
+
30
+ .buttons-wrapper {
31
+
32
+ &-one {
33
+ margin-right: 0.5rem;
34
+ }
35
+
36
+ &-two {
37
+ margin-left: 0.5rem;
38
+ }
39
+
40
+ }
41
+
42
+ img {
43
+ max-width: 100%;
44
+ width: auto !important;
45
+ }
46
+ }
assets/{sass → scss}/public/_core.scss RENAMED
@@ -48,10 +48,8 @@
48
  .owl-nav .owl-prev,
49
  .owl-nav .owl-next,
50
  .owl-dot {
51
- cursor: pointer;
52
  cursor: hand;
53
  -webkit-user-select: none;
54
- -khtml-user-select: none;
55
  -moz-user-select: none;
56
  -ms-user-select: none;
57
  user-select: none;
@@ -82,7 +80,6 @@
82
  }
83
 
84
  &.owl-grab {
85
- cursor: move;
86
  cursor: grab;
87
  }
88
 
48
  .owl-nav .owl-prev,
49
  .owl-nav .owl-next,
50
  .owl-dot {
 
51
  cursor: hand;
52
  -webkit-user-select: none;
 
53
  -moz-user-select: none;
54
  -ms-user-select: none;
55
  user-select: none;
80
  }
81
 
82
  &.owl-grab {
 
83
  cursor: grab;
84
  }
85
 
assets/scss/public/_image-carousel.scss ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .carousel-slider {
2
+ // Styling item
3
+ .carousel-slider__item {
4
+ position: relative;
5
+
6
+ img {
7
+ display: block;
8
+ margin-left: auto;
9
+ margin-right: auto;
10
+ max-width: 100%;
11
+ height: auto;
12
+ }
13
+ }
14
+ .carousel-slider__caption {
15
+ position: relative;
16
+
17
+ .title {
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ color: #474747;
21
+ font-size: 16px;
22
+ font-weight: 500;
23
+ margin: 10px 0 0;
24
+ text-align: center;
25
+ }
26
+
27
+ .caption {
28
+ font-size: 14px;
29
+ font-weight: 300;
30
+ margin: 10px 0 0;
31
+ text-align: center;
32
+ }
33
+ }
34
+ }
assets/{sass → scss}/public/_lazyload.scss RENAMED
File without changes
assets/{sass → scss}/public/_magnific-popup.scss RENAMED
File without changes
assets/scss/public/_post-carousel.scss ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .carousel-slider {
2
+ &__post {
3
+ border: 1px solid #f1f1f1;
4
+ float: left;
5
+ height: 450px;
6
+ width: 100%;
7
+ position: relative;
8
+ display: block;
9
+ overflow: hidden;
10
+
11
+ &-content {
12
+ bottom: 0;
13
+ position: absolute;
14
+ top: 0;
15
+ transition: all 0.2s ease 0s;
16
+ width: 100%;
17
+ display: block;
18
+ }
19
+
20
+ &-image {
21
+ border-bottom: 1px solid #f1f1f1;
22
+ display: block;
23
+ height: 207px;
24
+ line-height: 0;
25
+ margin: 0 auto;
26
+ overflow: hidden;
27
+ text-align: center;
28
+ width: 100%;
29
+ background-color: #f1f1f1;
30
+ background-size: cover;
31
+ background-position: center center;
32
+ }
33
+
34
+ &-title {
35
+ display: block;
36
+ margin: 10px 15px 0;
37
+ max-height: 70px;
38
+
39
+ h1 {
40
+ color: #4a4a4a;
41
+ font: bold 18px/1.4em Arial,sans-serif;
42
+ margin-bottom: 0;
43
+ margin-top: 0;
44
+ }
45
+ }
46
+
47
+ &-excerpt {
48
+ color: #7d7d7d;
49
+ font-size: 14px;
50
+ line-height: 1.5em;
51
+ padding: 10px 15px 5px;
52
+ text-align: left;
53
+ width: 100%;
54
+ position: absolute;
55
+ top: 285px;
56
+
57
+ &-overlay {
58
+ background: transparent none repeat scroll 0 0;
59
+ display: block;
60
+ height: 20px;
61
+ width: 100%;
62
+ }
63
+ }
64
+
65
+ &-meta {
66
+ bottom: 10px;
67
+ color: #8e8e8e;
68
+ font-size: 12px;
69
+ left: 0;
70
+ padding: 0 15px;
71
+ position: absolute;
72
+ width: 100%;
73
+ display: block;
74
+ }
75
+
76
+ &-publication-meta {
77
+ background-color: white;
78
+ display: block;
79
+ padding-top: 15px;
80
+ width: 100%;
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ white-space: nowrap;
84
+ }
85
+
86
+ &-details-info {
87
+ display: inline-block;
88
+ }
89
+ &-author {
90
+ display: block;
91
+ font-style: normal;
92
+ line-height: 1em;
93
+ overflow: hidden;
94
+ text-overflow: ellipsis;
95
+ white-space: nowrap;
96
+ margin-bottom: 5px;
97
+
98
+ &-link {
99
+ color: #8e8e8e;
100
+ display: inline-block;
101
+ max-width: 175px;
102
+ overflow: hidden;
103
+ text-overflow: ellipsis;
104
+ vertical-align: middle;
105
+ white-space: nowrap;
106
+ }
107
+ }
108
+
109
+ &-category {
110
+ color: #4cc1be;
111
+ text-transform: uppercase;
112
+ position: absolute;
113
+ right: 15px;
114
+ top: 50px;
115
+ z-index: 1;
116
+
117
+ &-link {}
118
+ }
119
+ }
120
+ }
assets/scss/public/_post-carousel2.scss ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .carousel-slider {
2
+ .blog-grid-inside {
3
+ display: flex;
4
+ flex-direction: column;
5
+ height: 100%;
6
+ border-radius: 3px;
7
+ border: 1px solid rgba(#000, 0.1);
8
+
9
+ .post-thumbnail {
10
+ margin: 0;
11
+ padding: 0;
12
+
13
+ img {
14
+ width: 100%;
15
+ height: auto;
16
+ }
17
+ }
18
+ .entry-header {
19
+ margin: 1rem;
20
+ padding: 0;
21
+ border: none;
22
+ }
23
+ .cat-links {
24
+ display: block;
25
+ margin-top: 0;
26
+ margin-bottom: .5rem;
27
+ line-height: 1.25;
28
+ }
29
+ .entry-title {
30
+ margin: 0;
31
+ padding: 0;
32
+ font-size: 1.25rem;
33
+ overflow-wrap: break-word;
34
+ }
35
+ .entry-summary {
36
+ margin: 0 1rem 1rem;
37
+ overflow-wrap: break-word;
38
+ }
39
+ .tags-links {
40
+ margin: 0 1rem 1rem;
41
+ }
42
+ .entry-footer {
43
+ margin: 0 1em 1.25rem;
44
+ overflow: hidden;
45
+ }
46
+ .byline,
47
+ .posted-on {
48
+ float: left;
49
+ font-size: .875rem;
50
+ line-height: 1.33;
51
+ }
52
+ .vcard img {
53
+ display: inline-block;
54
+ width: auto;
55
+ }
56
+ .posted-on {
57
+ float: right;
58
+ }
59
+ .published:not(.updated) {
60
+ display: none;
61
+ }
62
+ }
63
+ }
assets/{sass → scss}/public/_product-carousel.scss RENAMED
File without changes
assets/{sass → scss}/public/_product_modal.scss RENAMED
File without changes
assets/{sass → scss}/public/_theme.scss RENAMED
@@ -1,11 +1,11 @@
1
  .carousel-slider {
2
- position: relative;
3
-
4
  // Styling Next and Prev buttons
5
  .owl-nav {
6
- [class*='owl-'] {
 
7
  height: 48px;
8
- width: 20px;
9
  display: inline-block;
10
  position: absolute;
11
  top: 50%;
@@ -13,19 +13,54 @@
13
  opacity: 0;
14
  margin: 0;
15
  padding: 0;
16
- transition:all .3s ease-in-out;
 
17
 
18
- &:first-child {
19
- left: -25px;
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
- &:last-child {
22
- right: -25px;
 
 
 
 
 
23
  }
24
  }
 
 
 
 
25
 
26
- .disabled {
27
- opacity: 0.5;
28
- cursor: default;
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  }
30
  }
31
 
@@ -59,55 +94,54 @@
59
  }
60
  }
61
 
62
- // Styling item
63
- .carousel-slider__item {
64
- position: relative;
65
-
66
- img {
67
- display: block;
68
- margin-left: auto;
69
- margin-right: auto;
70
- max-width: 100%;
71
- height: auto;
72
- }
73
- }
74
- .carousel-slider__caption {
75
- position: relative;
76
-
77
- .title {
78
- overflow: hidden;
79
- text-overflow: ellipsis;
80
- color: #474747;
81
- font-size: 16px;
82
- font-weight: 500;
83
- margin: 10px 0 0;
84
  text-align: center;
85
  }
 
 
 
 
86
 
87
- .caption {
88
- font-size: 14px;
89
- font-weight: 300;
90
- margin: 10px 0 0;
91
- text-align: center;
92
  }
93
  }
 
 
 
94
 
95
- &:hover {
96
- .owl-nav {
97
- [class*='owl-'] {
98
- opacity: 1;
99
  }
100
  }
101
  }
102
 
103
- @media ( max-width: 767px ) {
104
- &:hover {
105
- .owl-nav {
106
- display : none;
107
- }
108
  }
109
- .owl-nav {
110
- display : none;
 
 
 
 
 
 
 
 
 
 
 
 
111
  }
112
  }
113
  }
1
  .carousel-slider {
2
+
 
3
  // Styling Next and Prev buttons
4
  .owl-nav {
5
+ .owl-prev,
6
+ .owl-next {
7
  height: 48px;
8
+ width: 48px;
9
  display: inline-block;
10
  position: absolute;
11
  top: 50%;
13
  opacity: 0;
14
  margin: 0;
15
  padding: 0;
16
+ transition: all .3s ease-in-out;
17
+ }
18
 
19
+ .owl-prev {
20
+ left: 0;
21
+ }
22
+
23
+ .owl-next {
24
+ right: 0;
25
+ }
26
+ }
27
+
28
+ &:hover {
29
+ .owl-nav {
30
+ .owl-prev,
31
+ .owl-next {
32
+ opacity: 1;
33
  }
34
+ }
35
+ }
36
+
37
+ @media (max-width: 767px) {
38
+ &:hover {
39
+ .owl-nav {
40
+ display: none;
41
  }
42
  }
43
+ .owl-nav {
44
+ display: none;
45
+ }
46
+ }
47
 
48
+ &.arrows-visible-always {
49
+ .owl-prev,
50
+ .owl-next {
51
+ opacity: 1;
52
+ }
53
+ }
54
+
55
+ &.arrows-outside {
56
+ .owl-nav {
57
+ .owl-prev {
58
+ left: -48px;
59
+ }
60
+
61
+ .owl-next {
62
+ right: -48px;
63
+ }
64
  }
65
  }
66
 
94
  }
95
  }
96
 
97
+ // Dots positions
98
+ &.dots-center {
99
+ .owl-dots {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  text-align: center;
101
  }
102
+ }
103
+ &.dots-left {
104
+ .owl-dots {
105
+ text-align: left;
106
 
107
+ &:first-child {
108
+ span {
109
+ margin-left: 0;
110
+ }
111
+ }
112
  }
113
  }
114
+ &.dots-right {
115
+ .owl-dots {
116
+ text-align: right;
117
 
118
+ &:last-child {
119
+ span {
120
+ margin-right: 0;
121
+ }
122
  }
123
  }
124
  }
125
 
126
+ // Dots visibility
127
+ &.dots-visible-hover {
128
+ .owl-dots {
129
+ opacity: 0;
 
130
  }
131
+
132
+ &:hover .owl-dots {
133
+ opacity: 1;
134
+ }
135
+ }
136
+
137
+ // Dots shape
138
+ &.dots-circle {
139
+ .owl-dots {
140
+ .owl-dot {
141
+ span {
142
+ border-radius: 9999px;
143
+ }
144
+ }
145
  }
146
  }
147
  }
assets/{sass → scss}/public/_variables.scss RENAMED
File without changes
assets/{sass → scss}/public/_video.scss RENAMED
File without changes
assets/scss/public/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
assets/{sass → scss}/style.scss RENAMED
@@ -7,6 +7,9 @@
7
  @import 'public/theme';
8
  @import 'public/post-carousel';
9
  @import 'public/product-carousel';
 
 
 
10
 
11
  @import 'public/magnific-popup';
12
  @import 'public/product_modal';
7
  @import 'public/theme';
8
  @import 'public/post-carousel';
9
  @import 'public/product-carousel';
10
+ @import 'public/content-carousel';
11
+ @import 'public/image-carousel';
12
+ @import 'public/button';
13
 
14
  @import 'public/magnific-popup';
15
  @import 'public/product_modal';
assets/scss/utilities/_mixins.scss ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ @mixin overlay($offset: 0) {
3
+ bottom: $offset;
4
+ left: $offset;
5
+ position: absolute;
6
+ right: $offset;
7
+ top: $offset;
8
+ }
9
+
10
+ @mixin delete {
11
+ user-select: none;
12
+ -moz-appearance: none;
13
+ -webkit-appearance: none;
14
+ background-color: rgba($black, 0.2);
15
+ border: none;
16
+ border-radius: 32px;
17
+ cursor: pointer;
18
+ display: inline-block;
19
+ flex-grow: 0;
20
+ flex-shrink: 0;
21
+ font-size: $size-normal;
22
+ outline: none;
23
+ position: relative;
24
+ vertical-align: top;
25
+ height: 20px;
26
+ width: 20px;
27
+
28
+ &:before,
29
+ &:after {
30
+ background-color: $white;
31
+ content: "";
32
+ display: block;
33
+ left: 50%;
34
+ position: absolute;
35
+ top: 50%;
36
+ transform: translateX(-50%) translateY(-50%) rotate(45deg);
37
+ transform-origin: center center;
38
+ }
39
+
40
+ &:before {
41
+ height: 2px;
42
+ width: 50%;
43
+ }
44
+
45
+ &:after {
46
+ height: 50%;
47
+ width: 2px;
48
+ }
49
+
50
+ &:hover,
51
+ &:focus {
52
+ background-color: rgba($black, 0.3);
53
+ }
54
+
55
+ &:active {
56
+ background-color: rgba($black, 0.4);
57
+ }
58
+
59
+ // Sizes
60
+ &.is-small {
61
+ height: 16px;
62
+ width: 16px;
63
+ }
64
+
65
+ &.is-medium {
66
+ height: 24px;
67
+ width: 24px;
68
+ }
69
+
70
+ &.is-large {
71
+ height: 32px;
72
+ width: 32px;
73
+ }
74
+ }
assets/scss/utilities/_variables.scss ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // == Colors
2
+ // Start with assigning color names to specific hex values.
3
+
4
+ $black: #000000 !default;
5
+ $grey-darker: #212121 !default;
6
+ $grey-dark: #616161 !default;
7
+ $grey: #9e9e9e !default;
8
+ $grey-light: #e0e0e0 !default;
9
+ $grey-lighter: #f5f5f5 !default;
10
+ $white: #ffffff !default;
11
+ $teal: #009688 !default;
12
+ $blue: #2196f3 !default;
13
+ $green: #4caf50 !default;
14
+ $yellow: #ffeb3b !default;
15
+ $amber: #ffc107 !default;
16
+ $orange: #ff9800 !default;
17
+ $red: #f44336 !default;
18
+ $purple: #9c27b0 !default;
19
+ $turquoise: #00d1b2 !default;
20
+ $pink: #e91e63 !default;
21
+
22
+ // Reassign color vars to semantic color scheme
23
+ $primary: $teal !default;
24
+ $info: $blue !default;
25
+ $success: $green !default;
26
+ $warning: $amber !default;
27
+ $danger: $red !default;
28
+ $light: $grey-lighter !default;
29
+ $dark: $grey-darker !default;
30
+
31
+ $colors: (
32
+ 'teal': $teal,
33
+ 'blue': $blue,
34
+ 'green': $green,
35
+ 'yellow': $yellow,
36
+ 'amber': $amber,
37
+ 'orange': $orange,
38
+ 'red': $red,
39
+ 'purple': $purple,
40
+ 'turquoise': $turquoise,
41
+ 'pink': $pink,
42
+ 'white': $white,
43
+ 'light': $grey-lighter,
44
+ 'grey-light': $grey-light,
45
+ 'grey': $grey,
46
+ 'grey-dark': $grey-dark,
47
+ 'dark': $grey-darker,
48
+ 'black': $black,
49
+ );
50
+
51
+ // General colors
52
+ $background: $grey-lighter !default;
53
+
54
+ $border: $grey-lighter !default;
55
+ $border-hover: $grey-light !default;
56
+
57
+ //== Link colors
58
+ $link: $primary !default;
59
+ $link-invert: findColorInvert($primary) !default;
60
+ $link-visited: $purple !default;
61
+
62
+ $link-hover: $grey-darker !default;
63
+ $link-hover-border: $grey-light !default;
64
+
65
+ $link-focus: $grey-darker !default;
66
+ $link-focus-border: $primary !default;
67
+
68
+ $link-active: $grey-darker !default;
69
+ $link-active-border: $grey-dark !default;
70
+
71
+ //== Button
72
+ $button: $grey-darker !default;
73
+ $button-background: $white !default;
74
+ $button-border: $grey-lighter !default;
75
+
76
+ $button-hover: $link-hover !default;
77
+ $button-hover-border: $link-hover-border !default;
78
+
79
+ $button-focus: $link-focus !default;
80
+ $button-focus-border: $link-focus-border !default;
81
+
82
+ $button-active: $link-active !default;
83
+ $button-active-border: $link-active-border !default;
84
+
85
+ $button-shadow-inset: inset 0 1px 2px rgba($black, 0.2) !default;
86
+
87
+ // Typography
88
+ $family-sans-serif: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default;
89
+ $family-monospace: monospace !default;
90
+
91
+ $family-primary: $family-sans-serif !default;
92
+ $family-code: $family-monospace !default;
93
+
94
+ $size-1: 3rem !default;
95
+ $size-2: 2.5rem !default;
96
+ $size-3: 2rem !default;
97
+ $size-4: 1.5rem !default;
98
+ $size-5: 1.25rem !default;
99
+ $size-6: 1rem !default;
100
+ $size-7: 0.75rem !default;
101
+
102
+ $size-small: $size-7 !default;
103
+ $size-normal: $size-6 !default;
104
+ $size-medium: $size-5 !default;
105
+ $size-large: $size-4 !default;
106
+
107
+ $weight-light: 300 !default;
108
+ $weight-normal: 400 !default;
109
+ $weight-semibold: 500 !default;
110
+ $weight-bold: 700 !default;
111
+
112
+ // Text colors
113
+ $text: $grey-dark !default;
114
+ $text-invert: findColorInvert($text) !default;
115
+ $text-light: $grey !default;
116
+ $text-strong: $grey-darker !default;
117
+
118
+ // Miscellaneous
119
+ $radius-small: 2px !default;
120
+ $radius: 3px !default;
121
+ $radius-large: 5px !default;
122
+
123
+ //== Grid breakpoints
124
+ $screen-sm: 576px !default;
125
+ $screen-md: 769px !default;
126
+ $screen-lg: 1000px !default;
127
+ $screen-xl: 1192px !default;
128
+ $screen-hd: 1384px !default;
129
+
130
+ //== Grid containers
131
+ $container-sm: 540px !default;
132
+ $container-md: 720px !default;
133
+ $container-lg: 960px !default;
134
+ $container-xl: 1140px !default;
135
+ $container-hd: 1340px !default;
136
+
137
+ // Responsiveness
138
+ // 960, 1152, and 1344 have been chosen because they are divisible by both 12 and 16
139
+ $tablet: 769px !default;
140
+ // 960px container + 40px
141
+ $desktop: 1000px !default;
142
+ // 1152px container + 40
143
+ $widescreen: 1192px !default;
144
+ // 1344px container + 40
145
+ $fullhd: 1384px !default;
carousel-slider.php CHANGED
@@ -1,45 +1,41 @@
1
  <?php
2
- /*
3
- Plugin Name: Carousel Slider
4
- Plugin URI: http://wordpress.org/plugins/carousel-slider
5
- Description: The Easiest Way to Create SEO friendly Image, Logo, Video, Post and WooCommerce Product Carousel.
6
- Version: 1.7.2
7
- Author: Sayful Islam
8
- Author URI: https://sayfulislam.com
9
- Text Domain: carousel-slider
10
- Domain Path: /languages/
11
- License: GPLv2 or later
12
- License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13
- */
 
 
 
 
 
 
14
 
15
  // If this file is called directly, abort.
16
  if ( ! defined( 'WPINC' ) ) {
17
  die;
18
  }
19
 
20
- // Define Carousel Slider Version
21
- if ( ! defined( 'CAROUSEL_SLIDER_VERSION' ) ) {
22
- define( 'CAROUSEL_SLIDER_VERSION', '1.7.2' );
23
- }
24
 
25
- if ( ! class_exists( 'Carousel_Slider' ) ):
26
-
27
- class Carousel_Slider {
28
- private $plugin_name;
29
- private $plugin_version;
30
- private $plugin_url;
31
- private $plugin_path;
32
 
33
  protected static $instance = null;
34
 
35
  /**
36
  * Main Carousel_Slider Instance
37
- *
38
  * Ensures only one instance of Carousel_Slider is loaded or can be loaded.
39
  *
40
  * @since 1.6.0
41
- * @static
42
- * @see Carousel_Slider()
43
  * @return Carousel_Slider - Main instance
44
  */
45
  public static function instance() {
@@ -54,272 +50,99 @@ if ( ! class_exists( 'Carousel_Slider' ) ):
54
  * Carousel_Slider constructor.
55
  */
56
  public function __construct() {
57
- $this->plugin_name = 'carousel-slider';
58
- $this->plugin_version = CAROUSEL_SLIDER_VERSION;
59
 
60
  register_activation_hook( __FILE__, array( $this, 'activation' ) );
61
  register_deactivation_hook( __FILE__, array( $this, 'deactivation' ) );
62
 
63
- add_action( 'wp_enqueue_scripts', array( $this, 'frontend_scripts' ), 15 );
64
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 10 );
65
- add_action( 'wp_footer', array( $this, 'inline_script' ), 30 );
66
- add_action( 'init', array( $this, 'load_textdomain' ) );
67
- add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ) );
68
- $this->includes();
69
  }
70
 
71
- /**
72
- * Load plugin textdomain
73
- */
74
- public function load_textdomain() {
75
- // Set filter for plugin's languages directory
76
- $lang_dir = dirname( plugin_basename( __FILE__ ) ) . '/languages/';
77
-
78
- // Traditional WordPress plugin locale filter
79
- $locale = apply_filters( 'plugin_locale', get_locale(), 'carousel-slider' );
80
- $mofile = sprintf( '%1$s-%2$s.mo', 'carousel-slider', $locale );
81
-
82
- // Setup paths to current locale file
83
- $mofile_local = $lang_dir . $mofile;
84
- $mofile_global = WP_LANG_DIR . '/carousel-slider/' . $mofile;
85
-
86
- if ( file_exists( $mofile_global ) ) {
87
- // Look in global /wp-content/languages/carousel-slider folder
88
- load_textdomain( $this->plugin_name, $mofile_global );
89
- } elseif ( file_exists( $mofile_local ) ) {
90
- // Look in local /wp-content/plugins/carousel-slider/languages/ folder
91
- load_textdomain( $this->plugin_name, $mofile_local );
92
- } else {
93
- // Load the default language files
94
- load_plugin_textdomain( $this->plugin_name, false, $lang_dir );
95
- }
96
  }
97
 
98
  /**
99
- * To be run when the plugin is activated
100
- * @return void
101
- */
102
- public function activation() {
103
- require_once $this->plugin_path() . '/includes/class-carousel-slider-activation.php';
104
- Carousel_Slider_Activation::activate();
105
- }
106
-
107
- /**
108
- * To be run when the plugin is deactivated
109
- * @return void
110
  */
111
- public function deactivation() {
112
- flush_rewrite_rules();
 
 
113
  }
114
 
115
  /**
116
  * Include admin and front facing files
117
  */
118
  public function includes() {
 
 
 
 
 
 
 
 
119
  if ( is_admin() ) {
120
  $this->admin_includes();
121
  }
122
  if ( ! is_admin() ) {
123
  $this->frontend_includes();
124
  }
125
-
126
- require_once $this->plugin_path() . '/widgets/widget-carousel_slider.php';
127
- require_once $this->plugin_path() . '/includes/class-carousel-slider-product.php';
128
  }
129
 
130
  /**
131
  * Include admin files
132
  */
133
  public function admin_includes() {
134
- require_once $this->plugin_path() . '/includes/class-carousel-slider-vc-element.php';
135
- require_once $this->plugin_path() . '/includes/class-carousel-slider-documentation.php';
136
- require_once $this->plugin_path() . '/includes/class-carousel-slider-form.php';
137
- require_once $this->plugin_path() . '/includes/class-carousel-slider-admin.php';
138
-
139
- new Carousel_Slider_Admin( $this->plugin_path(), $this->plugin_url() );
 
140
  }
141
 
142
  /**
143
  * Load front facing files
144
  */
145
  public function frontend_includes() {
146
- require_once $this->plugin_path() . '/shortcodes/class-carousel-slider-shortcode.php';
147
- require_once $this->plugin_path() . '/shortcodes/class-carousel-slider-deprecated-shortcode.php';
148
- require_once $this->plugin_path() . '/includes/class-carousel-slider-structured-data.php';
149
-
150
- new Carousel_Slider_Shortcode( $this->plugin_path(), $this->plugin_url() );
151
- new Carousel_Slider_Deprecated_Shortcode( $this->plugin_path() );
152
  }
153
 
154
  /**
155
- * Load frontend scripts
156
- */
157
- public function frontend_scripts() {
158
- wp_register_style( $this->plugin_name, $this->plugin_url() . '/assets/css/style.css', array(), $this->plugin_version, 'all' );
159
- wp_register_script( 'owl-carousel', $this->plugin_url() . '/assets/js/owl.carousel.min.js', array( 'jquery' ), '2.2.0', true );
160
- wp_register_script( 'magnific-popup', $this->plugin_url() . '/assets/js/jquery.magnific-popup.min.js', array(), '1.1.0', true );
161
-
162
- if ( $this->should_load_scripts() ) {
163
- wp_enqueue_style( $this->plugin_name );
164
- wp_enqueue_script( 'owl-carousel' );
165
- }
166
- }
167
-
168
- /**
169
- * Load admin scripts
170
- * @param $hook
171
- */
172
- public function admin_scripts( $hook ) {
173
- global $post;
174
-
175
- if ( $hook == 'post-new.php' || $hook == 'post.php' ) {
176
-
177
- if ( is_a( $post, 'WP_Post' ) && 'carousels' == $post->post_type ) {
178
-
179
- wp_enqueue_media();
180
- wp_enqueue_style( 'wp-color-picker' );
181
- wp_enqueue_style( $this->plugin_name . '-admin', $this->plugin_url() . '/assets/css/admin.css', array(), $this->plugin_version, 'all' );
182
- wp_enqueue_script( 'select2', $this->plugin_url() . '/assets/js/select2.min.js', array( 'jquery' ), '4.0.3', true );
183
- wp_enqueue_script( 'livequery', $this->plugin_url() . '/assets/js/jquery.livequery.js', array( 'jquery' ), '1.3.6', true );
184
- wp_enqueue_script( $this->plugin_name . '-admin', $this->plugin_url() . '/assets/js/admin.js', array( 'jquery', 'wp-color-picker', 'jquery-ui-accordion', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'select2', 'livequery' ), $this->plugin_version, true );
185
-
186
- wp_localize_script( $this->plugin_name . '-admin', 'CarouselSlider', array(
187
- 'post_id' => $post->ID,
188
- 'image_ids' => get_post_meta( $post->ID, '_wpdh_image_ids', true ),
189
- 'nonce' => wp_create_nonce( 'carousel_slider_ajax' ),
190
- 'create_btn_text' => __( 'Create Gallery', 'carousel-slider' ),
191
- 'edit_btn_text' => __( 'Edit Gallery', 'carousel-slider' ),
192
- 'save_btn_text' => __( 'Save Gallery', 'carousel-slider' ),
193
- 'progress_btn_text' => __( 'Saving...', 'carousel-slider' ),
194
- 'insert_btn_text' => __( 'Insert', 'carousel-slider' ),
195
- ) );
196
- }
197
- }
198
- }
199
-
200
- /**
201
- * Load front end inline script
202
- */
203
- public function inline_script() {
204
- if ( $this->should_load_scripts() ):
205
- ?>
206
- <script type="text/javascript">
207
- jQuery(document).ready(function ($) {
208
-
209
- $('body').find('.carousel-slider').each(function () {
210
- var _this = $(this);
211
- var isVideo = _this.data('slide-type') == 'video-carousel' ? true : false;
212
- var videoWidth = isVideo ? _this.data('video-width') : false;
213
- var videoHeight = isVideo ? _this.data('video-height') : false;
214
- var autoWidth = isVideo ? true : false;
215
-
216
- if (jQuery().magnificPopup) {
217
- var popupType = _this.data('slide-type') == 'product-carousel' ? 'ajax' : 'image';
218
- var popupGallery = _this.data('slide-type') != 'product-carousel' ? true : false;
219
- $(this).find('.magnific-popup').magnificPopup({
220
- type: popupType,
221
- gallery:{
222
- enabled: popupGallery
223
- },
224
- zoom: {
225
- enabled: popupGallery,
226
- duration: 300,
227
- easing: 'ease-in-out'
228
- }
229
- });
230
- }
231
-
232
- if (jQuery().owlCarousel) {
233
- _this.owlCarousel({
234
- nav: _this.data('nav'),
235
- dots: _this.data('dots'),
236
- margin: _this.data('margin'),
237
- loop: _this.data('loop'),
238
- autoplay: _this.data('autoplay'),
239
- autoplayTimeout: _this.data('autoplay-timeout'),
240
- autoplaySpeed: _this.data('autoplay-speed'),
241
- autoplayHoverPause: _this.data('autoplay-hover-pause'),
242
- slideBy: _this.data('slide-by'),
243
- lazyLoad: _this.data('lazy-load'),
244
- video: isVideo,
245
- videoWidth: videoWidth,
246
- videoHeight: videoHeight,
247
- autoWidth: autoWidth,
248
- navText: [_this.data('nav-previous-icon'), _this.data('nav-next-icon')],
249
- responsive: {
250
- 320: {items: _this.data('colums-mobile')},
251
- 600: {items: _this.data('colums-small-tablet')},
252
- 768: {items: _this.data('colums-tablet')},
253
- 993: {items: _this.data('colums-small-desktop')},
254
- 1200: {items: _this.data('colums-desktop')},
255
- 1921: {items: _this.data('colums')}
256
- }
257
- });
258
- }
259
- });
260
- });
261
- </script><?php
262
- endif;
263
- }
264
-
265
- /**
266
- * Check if it should load frontend scripts
267
- *
268
- * @return mixed|void
269
- */
270
- private function should_load_scripts() {
271
- global $post;
272
- $load_scripts = is_active_widget( false, false, 'widget_carousel_slider', true ) || ( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'carousel_slide' ) ) || ( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'carousel' ) );
273
-
274
- return apply_filters( 'carousel_slider_load_scripts', $load_scripts );
275
- }
276
-
277
- /**
278
- * Add custom footer text on plugins page.
279
- *
280
- * @param string $text
281
- */
282
- public function admin_footer_text( $text )
283
- {
284
- global $post_type, $hook_suffix;
285
-
286
- $footer_text = sprintf(__('If you like %1$s Carousel Slider %2$s please leave us a %3$s rating. A huge thanks in advance!', 'carousel-slider' ), '<strong>', '</strong>', '<a href="https://wordpress.org/support/view/plugin-reviews/carousel-slider?filter=5#postform" target="_blank" data-rated="Thanks :)">&starf;&starf;&starf;&starf;&starf;</a>');
287
-
288
- if ($post_type == 'carousels' || $hook_suffix == 'carousels_page_carousel-slider-documentation') {
289
- return $footer_text;
290
- }
291
-
292
- return $text;
293
- }
294
-
295
- /**
296
- * Plugin path.
297
- *
298
- * @return string Plugin path
299
  */
300
- private function plugin_path() {
301
- if ( $this->plugin_path ) {
302
- return $this->plugin_path;
303
- }
304
-
305
- return $this->plugin_path = untrailingslashit( plugin_dir_path( __FILE__ ) );
306
  }
307
 
308
  /**
309
- * Plugin url.
310
- *
311
- * @return string Plugin url
312
  */
313
- private function plugin_url() {
314
- if ( $this->plugin_url ) {
315
- return $this->plugin_url;
316
- }
317
-
318
- return $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
319
  }
320
  }
321
-
322
- endif;
323
 
324
  /**
325
  * Begins execution of the plugin.
1
  <?php
2
+ /**
3
+ * Plugin Name: Carousel Slider
4
+ * Plugin URI: http://wordpress.org/plugins/carousel-slider
5
+ * Description: The Easiest Way to Create SEO friendly Image, Logo, Video, Post and WooCommerce Product Carousel.
6
+ * Version: 1.8.0
7
+ * Author: Sayful Islam
8
+ * Author URI: https://github.com/sayful1
9
+ * Requires at least: 4.4
10
+ * Tested up to: 4.8
11
+ *
12
+ * Text Domain: carousel-slider
13
+ *
14
+ * License: GPLv3
15
+ * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
16
+ *
17
+ * @package Carousel_Slider
18
+ * @author Sayful Islam
19
+ */
20
 
21
  // If this file is called directly, abort.
22
  if ( ! defined( 'WPINC' ) ) {
23
  die;
24
  }
25
 
26
+ if ( ! class_exists( 'Carousel_Slider' ) ) {
 
 
 
27
 
28
+ final class Carousel_Slider {
29
+ private $plugin_name = 'carousel-slider';
30
+ private $version = '1.8.0';
 
 
 
 
31
 
32
  protected static $instance = null;
33
 
34
  /**
35
  * Main Carousel_Slider Instance
 
36
  * Ensures only one instance of Carousel_Slider is loaded or can be loaded.
37
  *
38
  * @since 1.6.0
 
 
39
  * @return Carousel_Slider - Main instance
40
  */
41
  public static function instance() {
50
  * Carousel_Slider constructor.
51
  */
52
  public function __construct() {
53
+ $this->define_constants();
54
+ $this->includes();
55
 
56
  register_activation_hook( __FILE__, array( $this, 'activation' ) );
57
  register_deactivation_hook( __FILE__, array( $this, 'deactivation' ) );
58
 
59
+ do_action( 'carousel_slider_init' );
 
 
 
 
 
60
  }
61
 
62
+ public function define_constants() {
63
+ $this->define( 'CAROUSEL_SLIDER_VERSION', $this->version );
64
+ $this->define( 'CAROUSEL_SLIDER_FILE', __FILE__ );
65
+ $this->define( 'CAROUSEL_SLIDER_PATH', dirname( CAROUSEL_SLIDER_FILE ) );
66
+ $this->define( 'CAROUSEL_SLIDER_INCLUDES', CAROUSEL_SLIDER_PATH . '/includes' );
67
+ $this->define( 'CAROUSEL_SLIDER_TEMPLATES', CAROUSEL_SLIDER_PATH . '/templates' );
68
+ $this->define( 'CAROUSEL_SLIDER_WIDGETS', CAROUSEL_SLIDER_PATH . '/widgets' );
69
+ $this->define( 'CAROUSEL_SLIDER_URL', plugins_url( '', CAROUSEL_SLIDER_FILE ) );
70
+ $this->define( 'CAROUSEL_SLIDER_ASSETS', CAROUSEL_SLIDER_URL . '/assets' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
  /**
74
+ * Define constant if not already set.
75
+ *
76
+ * @param string $name
77
+ * @param string|bool $value
 
 
 
 
 
 
 
78
  */
79
+ private function define( $name, $value ) {
80
+ if ( ! defined( $name ) ) {
81
+ define( $name, $value );
82
+ }
83
  }
84
 
85
  /**
86
  * Include admin and front facing files
87
  */
88
  public function includes() {
89
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-i18n.php';
90
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-number-to-word.php';
91
+ require_once CAROUSEL_SLIDER_INCLUDES . '/functions-carousel-slider.php';
92
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-activator.php';
93
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-product.php';
94
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-script.php';
95
+ require_once CAROUSEL_SLIDER_WIDGETS . '/widget-carousel_slider.php';
96
+
97
  if ( is_admin() ) {
98
  $this->admin_includes();
99
  }
100
  if ( ! is_admin() ) {
101
  $this->frontend_includes();
102
  }
 
 
 
103
  }
104
 
105
  /**
106
  * Include admin files
107
  */
108
  public function admin_includes() {
109
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-credit.php';
110
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-vc-element.php';
111
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-documentation.php';
112
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-form.php';
113
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-admin.php';
114
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-content-carousel.php';
115
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-meta-box.php';
116
  }
117
 
118
  /**
119
  * Load front facing files
120
  */
121
  public function frontend_includes() {
122
+ require_once CAROUSEL_SLIDER_PATH . '/shortcodes/class-carousel-slider-shortcode.php';
123
+ require_once CAROUSEL_SLIDER_PATH . '/shortcodes/class-carousel-slider-deprecated-shortcode.php';
124
+ require_once CAROUSEL_SLIDER_INCLUDES . '/class-carousel-slider-structured-data.php';
 
 
 
125
  }
126
 
127
  /**
128
+ * To be run when the plugin is activated
129
+ * @return void
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  */
131
+ public function activation() {
132
+ do_action( 'carousel_slider_activation' );
133
+ flush_rewrite_rules();
 
 
 
134
  }
135
 
136
  /**
137
+ * To be run when the plugin is deactivated
138
+ * @return void
 
139
  */
140
+ public function deactivation() {
141
+ do_action( 'carousel_slider_deactivation' );
142
+ flush_rewrite_rules();
 
 
 
143
  }
144
  }
145
+ }
 
146
 
147
  /**
148
  * Begins execution of the plugin.
includes/class-carousel-slider-activation.php DELETED
@@ -1,53 +0,0 @@
1
- <?php
2
-
3
- if ( ! class_exists('Carousel_Slider_Activation') ):
4
-
5
- class Carousel_Slider_Activation
6
- {
7
- /**
8
- * Script that should load upon plugin activation
9
- */
10
- public static function activate()
11
- {
12
- $version = get_option( 'carousel_slider_version' );
13
-
14
- if ( $version == false ) {
15
- self::update_meta_160();
16
- }
17
-
18
- // Add plugin version to database
19
- update_option( 'carousel_slider_version', CAROUSEL_SLIDER_VERSION );
20
-
21
- // Flush the rewrite rules on activation
22
- flush_rewrite_rules();
23
- }
24
-
25
- /**
26
- * Update meta for prior to version 1.6.0
27
- */
28
- public static function update_meta_160()
29
- {
30
- $carousels = get_posts( array(
31
- 'post_type' => 'carousels',
32
- 'post_status' => 'any',
33
- ) );
34
-
35
- if ( count( $carousels ) > 0 ) {
36
- foreach ($carousels as $carousel) {
37
-
38
- $id = $carousel->ID;
39
- $_items_desktop = get_post_meta( $id, '_items', true );
40
- $_lazy_load = get_post_meta( $id, '_lazy_load_image', true );
41
- $_lazy_load = $_lazy_load == 'on' ? 'on' : 'off';
42
-
43
- update_post_meta( $id, '_lazy_load_image', $_lazy_load );
44
- update_post_meta( $id, '_items_desktop', $_items_desktop );
45
- update_post_meta( $id, '_slide_type', 'image-carousel' );
46
- update_post_meta( $id, '_video_width', '560' );
47
- update_post_meta( $id, '_video_height', '315' );
48
- }
49
- }
50
- }
51
- }
52
-
53
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-carousel-slider-activator.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fired during plugin activation.
4
+ * This class defines all code necessary to run during the plugin's activation.
5
+ *
6
+ * @since 1.6.0
7
+ * @author Sayful Islam <sayful.islam001@gmail.com>
8
+ */
9
+ if ( ! class_exists( 'Carousel_Slider_Activator' ) ):
10
+
11
+ class Carousel_Slider_Activator {
12
+
13
+ protected static $instance = null;
14
+
15
+ /**
16
+ * Ensures only one instance of this class is loaded or can be loaded.
17
+ *
18
+ * @return Carousel_Slider_Activator
19
+ */
20
+ public static function init() {
21
+ if ( is_null( self::$instance ) ) {
22
+ self::$instance = new self();
23
+ }
24
+
25
+ return self::$instance;
26
+ }
27
+
28
+ public function __construct() {
29
+ add_action( 'carousel_slider_activation', array( $this, 'activate' ) );
30
+ }
31
+
32
+ /**
33
+ * Script that should load upon plugin activation
34
+ */
35
+ public function activate() {
36
+ $version = get_option( 'carousel_slider_version' );
37
+
38
+ if ( $version == false ) {
39
+ $this->update_meta_160();
40
+ }
41
+
42
+ // Add plugin version to database
43
+ update_option( 'carousel_slider_version', CAROUSEL_SLIDER_VERSION );
44
+ }
45
+
46
+ /**
47
+ * Update meta for prior to version 1.6.0
48
+ */
49
+ public function update_meta_160() {
50
+ $carousels = get_posts( array(
51
+ 'post_type' => 'carousels',
52
+ 'post_status' => 'any',
53
+ ) );
54
+
55
+ if ( count( $carousels ) > 0 ) {
56
+ foreach ( $carousels as $carousel ) {
57
+
58
+ $id = $carousel->ID;
59
+ $_items_desktop = get_post_meta( $id, '_items', true );
60
+ $_lazy_load = get_post_meta( $id, '_lazy_load_image', true );
61
+ $_lazy_load = $_lazy_load == 'on' ? 'on' : 'off';
62
+
63
+ update_post_meta( $id, '_lazy_load_image', $_lazy_load );
64
+ update_post_meta( $id, '_items_desktop', $_items_desktop );
65
+ update_post_meta( $id, '_slide_type', 'image-carousel' );
66
+ update_post_meta( $id, '_video_width', '560' );
67
+ update_post_meta( $id, '_video_height', '315' );
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ endif;
74
+
75
+ Carousel_Slider_Activator::init();
includes/class-carousel-slider-admin.php CHANGED
@@ -4,406 +4,435 @@ if ( ! defined( 'WPINC' ) ) {
4
  die;
5
  }
6
 
7
- if( ! class_exists('Carousel_Slider_Admin') ):
8
-
9
- class Carousel_Slider_Admin
10
- {
11
- private $plugin_path;
12
- private $plugin_url;
13
- private $form;
14
-
15
- /**
16
- * Carousel_Slider_Admin constructor.
17
- *
18
- * @param $plugin_path
19
- * @param $plugin_url
20
- */
21
- public function __construct( $plugin_path, $plugin_url )
22
- {
23
- $this->plugin_path = $plugin_path;
24
- $this->plugin_url = $plugin_url;
25
- $this->form = new Carousel_Slider_Form();
26
-
27
- add_action('init', array( $this, 'carousel_post_type' ) );
28
- add_action('add_meta_boxes', array( $this, 'add_meta_boxes' ) );
29
- add_action('add_meta_boxes', array( $this, 'shortcode_usage_info' ) );
30
- add_filter( 'manage_edit-carousels_columns', array( $this, 'columns_head') );
31
- add_filter( 'manage_carousels_posts_custom_column', array( $this, 'columns_content'), 10, 2 );
32
- add_action( 'save_post', array( $this, 'save_meta_box' ) );
33
- add_action( 'wp_ajax_carousel_slider_save_images', array( $this, 'save_images' ) );
34
-
35
- // Remove view and Quick Edit from Carousels
36
- add_filter( 'post_row_actions', array( $this, 'post_row_actions'), 10, 2 );
37
-
38
- // Add custom link to media gallery
39
- add_filter("attachment_fields_to_edit", array( $this, "attachment_fields_to_edit" ), null, 2);
40
- add_filter("attachment_fields_to_save", array( $this, "attachment_fields_to_save" ), null, 2);
41
- }
42
 
43
- /**
44
- * Carousel slider post type
45
- */
46
- public function carousel_post_type() {
47
- $labels = array(
48
- 'name' => _x( 'Slides', 'Post Type General Name', 'carousel-slider' ),
49
- 'singular_name' => _x( 'Slide', 'Post Type Singular Name', 'carousel-slider' ),
50
- 'menu_name' => __( 'Carousel Slider', 'carousel-slider' ),
51
- 'parent_item_colon' => __( 'Parent Slide:', 'carousel-slider' ),
52
- 'all_items' => __( 'All Slides', 'carousel-slider' ),
53
- 'view_item' => __( 'View Slide', 'carousel-slider' ),
54
- 'add_new_item' => __( 'Add New Slide', 'carousel-slider' ),
55
- 'add_new' => __( 'Add New', 'carousel-slider' ),
56
- 'edit_item' => __( 'Edit Slide', 'carousel-slider' ),
57
- 'update_item' => __( 'Update Slide', 'carousel-slider' ),
58
- 'search_items' => __( 'Search Slide', 'carousel-slider' ),
59
- 'not_found' => __( 'Not found', 'carousel-slider' ),
60
- 'not_found_in_trash' => __( 'Not found in Trash', 'carousel-slider' ),
61
- );
62
- $args = array(
63
- 'label' => __( 'Slide', 'carousel-slider' ),
64
- 'description' => __( 'The easiest way to create carousel slide', 'carousel-slider' ),
65
- 'labels' => $labels,
66
- 'supports' => array( 'title' ),
67
- 'hierarchical' => false,
68
- 'public' => false,
69
- 'show_ui' => true,
70
- 'show_in_menu' => true,
71
- 'show_in_nav_menus' => true,
72
- 'show_in_admin_bar' => true,
73
- 'menu_position' => 5.55525,
74
- 'menu_icon' => 'dashicons-slides',
75
- 'can_export' => true,
76
- 'has_archive' => false,
77
- 'exclude_from_search' => true,
78
- 'publicly_queryable' => true,
79
- 'rewrite' => false,
80
- 'capability_type' => 'post',
81
- );
82
- register_post_type( 'carousels', $args );
83
- }
84
 
85
- /**
86
- * Hide view and quick edit from carousel slider admin
87
- *
88
- * @param $actions
89
- * @param $post
90
- *
91
- * @return mixed
92
- */
93
- public function post_row_actions( $actions, $post )
94
- {
95
- global $current_screen;
96
- if( $current_screen->post_type != 'carousels' ){
97
- return $actions;
98
- }
99
 
100
- unset( $actions['view'] );
101
- unset( $actions['inline hide-if-no-js'] );
102
- return $actions;
103
- }
 
 
 
 
 
104
 
105
- /**
106
- * Customize Carousel slider list table head
107
- *
108
- * @return array
109
- */
110
- public function columns_head(){
111
-
112
- $columns = array(
113
- 'cb' => '<input type="checkbox">',
114
- 'title' => __('Carousel Slide Title', 'carousel-slider'),
115
- 'usage' => __('Shortcode', 'carousel-slider'),
116
- 'slide_type' => __('Slide Type', 'carousel-slider')
117
- );
118
-
119
- return $columns;
120
 
121
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
- /**
124
- * Generate carousel slider list table content
125
- *
126
- * @param $column
127
- * @param $post_id
128
- */
129
- public function columns_content($column, $post_id) {
130
- switch ($column) {
131
-
132
- case 'usage':
133
- ?>
134
- <input
135
- type="text"
136
- onmousedown="this.clicked = 1;"
137
- onfocus="if (!this.clicked) this.select(); else this.clicked = 2;"
138
- onclick="if (this.clicked == 2) this.select(); this.clicked = 0;"
139
- value="[carousel_slide id='<?php echo $post_id; ?>']"
140
- style="background-color: #f1f1f1;font-family: monospace;min-width: 250px;padding: 5px 8px;"
141
- >
142
- <?php
143
-
144
- break;
145
-
146
- case 'slide_type':
147
- $slide_type = get_post_meta( get_the_ID(), '_slide_type', true);
148
- echo ucwords(str_replace('-', ' ', $slide_type));
149
-
150
- break;
151
- default :
152
- break;
153
- }
154
- }
 
 
 
 
 
 
 
155
 
156
- /**
157
- * Add carousel slider meta box
158
- */
159
- public function add_meta_boxes()
160
- {
161
- add_meta_box(
162
- "carousel-slider-meta-boxes",
163
- __("Carousel Slider", 'carousel-slider'),
164
- array( $this, 'carousel_slider_meta_boxes' ),
165
- "carousels",
166
- "normal",
167
- "high"
168
- );
169
- }
170
 
171
- /**
172
- * Load metabox content
173
- */
174
- public function carousel_slider_meta_boxes()
175
- {
176
- wp_nonce_field( 'carousel_slider_nonce', '_carousel_slider_nonce' );
177
-
178
- global $post;
179
- $slide_type = get_post_meta( $post->ID, '_slide_type', true );
180
- $slide_type = in_array($slide_type, array('image-carousel', 'post-carousel', 'image-carousel-url', 'video-carousel', 'product-carousel')) ? $slide_type : 'image-carousel';
181
-
182
- require_once $this->plugin_path . '/templates/admin/types.php';
183
- require_once $this->plugin_path . '/templates/admin/images-media.php';
184
- require_once $this->plugin_path . '/templates/admin/images-url.php';
185
- require_once $this->plugin_path . '/templates/admin/post-carousel.php';
186
- require_once $this->plugin_path . '/templates/admin/product-carousel.php';
187
- require_once $this->plugin_path . '/templates/admin/video-carousel.php';
188
- require_once $this->plugin_path . '/templates/admin/images-settings.php';
189
- require_once $this->plugin_path . '/templates/admin/general.php';
190
- require_once $this->plugin_path . '/templates/admin/navigation.php';
191
- require_once $this->plugin_path . '/templates/admin/autoplay.php';
192
- require_once $this->plugin_path . '/templates/admin/responsive.php';
193
- }
194
 
195
- /**
196
- * Metabox for shortcode information
197
- */
198
- public function shortcode_usage_info()
199
- {
200
- add_meta_box(
201
- "carousel-slider-shortcode-info",
202
- __("Usage (Shortcode)", 'carousel-slider'),
203
- array( $this, 'render_meta_box_shortcode_info' ),
204
- "carousels",
205
- "side",
206
- "low"
207
- );
208
- }
209
 
210
- /**
211
- * Render shortcode metabox content
212
- */
213
- public function render_meta_box_shortcode_info()
214
- {
215
- ob_start(); ?>
216
- <p><strong>
217
- <?php _e('Copy the following shortcode and paste in post or page where you want to show.', 'carousel-slider'); ?>
218
- </strong></p>
219
- <input
220
- type="text"
221
- onmousedown="this.clicked = 1;"
222
- onfocus="if (!this.clicked) this.select(); else this.clicked = 2;"
223
- onclick="if (this.clicked == 2) this.select(); this.clicked = 0;"
224
- value="[carousel_slide id='<?php echo get_the_ID(); ?>']"
225
- style="background-color: #f1f1f1; width: 100%; padding: 8px;"
226
- >
227
- <hr>
228
- <p>
229
- <?php _e('If you like this plugin or if you make money using this or if you want to help me to continue my contribution on open source projects, consider to make a small donation.', 'carousel-slider'); ?>
230
- </p>
231
- <p style="text-align: center;">
232
- <a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3LZWQTHEVYWCY">
233
- <img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="PayPal Donate">
234
- </a>
235
- </p>
236
- <?php echo ob_get_clean();
237
- }
238
 
239
- /**
240
- * Save custom meta box
241
- *
242
- * @method save_meta_box
243
- * @param int $post_id The post ID
244
- */
245
- public function save_meta_box( $post_id )
246
- {
247
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){
248
- return;
249
- }
250
- // Check if nonce is set.
251
- if ( ! isset( $_POST['_carousel_slider_nonce'], $_POST['carousel_slider'] ) ) {
252
- return;
253
- }
254
- // Check if nonce is valid.
255
- if ( ! wp_verify_nonce( $_POST['_carousel_slider_nonce'], 'carousel_slider_nonce' ) ) {
256
- return;
257
- }
258
- // Check if user has permissions to save data.
259
- if ( ! current_user_can( 'edit_post', $post_id ) ) {
260
- return;
261
- }
262
-
263
- foreach( $_POST['carousel_slider'] as $key => $val ){
264
- if (is_array($val)) {
265
- $val = implode(',', $val);
266
- }
267
-
268
- if ($key == '_margin_right' && $val == 0) {
269
- $val = 'zero';
270
- }
271
- update_post_meta( $post_id, $key, sanitize_text_field( $val ) );
272
- }
273
-
274
- if ( ! isset($_POST['carousel_slider']['_post_categories'])) {
275
- update_post_meta( $post_id, '_post_categories', '');
276
- }
277
-
278
- if ( ! isset($_POST['carousel_slider']['_post_tags'])) {
279
- update_post_meta( $post_id, '_post_tags', '');
280
- }
281
-
282
- if ( ! isset($_POST['carousel_slider']['_post_in'])) {
283
- update_post_meta( $post_id, '_post_in', '');
284
- }
285
-
286
- if (isset($_POST['_images_urls'])) {
287
- $this->save_images_urls( $post_id );
288
- }
289
- }
290
 
291
- /**
292
- * Save carousel slider gallery images
293
- *
294
- * @return string
295
- */
296
- public function save_images()
297
- {
298
- // Check if not an autosave.
299
- if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ){
300
- return;
301
- }
302
- // Check if required fields are set
303
- if ( ! isset( $_POST['ids'], $_POST['post_id'], $_POST['nonce'] ) ) {
304
- return;
305
- }
306
- // Check if nonce is valid.
307
- if ( ! wp_verify_nonce( $_POST['nonce'], 'carousel_slider_ajax' ) ) {
308
- return;
309
- }
310
- // Check if user has permissions to save data.
311
- if ( ! current_user_can( 'edit_posts' ) ) {
312
- return;
313
- }
314
-
315
- $ids = strip_tags(rtrim($_POST['ids'], ','));
316
- update_post_meta($_POST['post_id'], '_wpdh_image_ids', $ids);
317
-
318
- $thumbs = explode(',', $ids);
319
- $thumbs_output = '';
320
- foreach( $thumbs as $thumb ) {
321
- $thumbs_output .= '<li>' . wp_get_attachment_image( $thumb, array(75,75) ) . '</li>';
322
- }
323
-
324
- echo $thumbs_output;
325
-
326
- die();
327
- }
328
 
329
- /**
330
- * Save images urls
331
- *
332
- * @param integer $post_id
333
- * @return void
334
- */
335
- private function save_images_urls( $post_id )
336
- {
337
- if ( ! isset( $_POST['_images_urls'] ) ) {
338
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
  }
340
- $url = $_POST['_images_urls']['url'];
341
- $title = $_POST['_images_urls']['title'];
342
- $caption = $_POST['_images_urls']['caption'];
343
- $alt = $_POST['_images_urls']['alt'];
344
- $link_url = $_POST['_images_urls']['link_url'];
345
-
346
- $urls = array();
347
-
348
- for ($i=0; $i < count($url); $i++) {
349
- $urls[] = array(
350
- 'url' => esc_url_raw($url[$i]),
351
- 'title' => sanitize_text_field($title[$i]),
352
- 'caption' => sanitize_text_field($caption[$i]),
353
- 'alt' => sanitize_text_field($alt[$i]),
354
- 'link_url' => esc_url_raw($link_url[$i]),
355
  );
356
  }
357
- update_post_meta( $post_id, '_images_urls', $urls );
358
- }
359
 
360
- /**
361
- * Adding our custom fields to the $form_fields array
362
- *
363
- * @param array $form_fields
364
- * @param object $post
365
- * @return array
366
- */
367
- public function attachment_fields_to_edit( $form_fields, $post )
368
- {
369
- $form_fields["carousel_slider_link_url"]["label"] = __("Link to URL", "carousel-slider");
370
- $form_fields["carousel_slider_link_url"]["input"] = "textarea";
371
- $form_fields["carousel_slider_link_url"]["value"] = get_post_meta($post->ID, "_carousel_slider_link_url", true);
372
- $form_fields["carousel_slider_link_url"]["extra_rows"] = array(
373
- 'carouselSliderInfo' => __('"Link to URL" only works on Carousel Slider for linking image to a custom url.', 'carousel-slider'),
374
- );
375
-
376
- return $form_fields;
377
- }
 
 
 
 
 
 
378
 
379
- /**
380
- * Save custom field value
381
- *
382
- * @param array $post
383
- * @param array $attachment
384
- * @return object
385
- */
386
- public function attachment_fields_to_save( $post, $attachment )
387
- {
388
- $slider_link_url = isset($attachment['carousel_slider_link_url']) ? $attachment['carousel_slider_link_url'] : null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
389
 
390
- if( filter_var( $slider_link_url, FILTER_VALIDATE_URL ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
391
 
392
- update_post_meta( $post['ID'], '_carousel_slider_link_url', esc_url_raw( $slider_link_url ) );
393
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
 
395
- return $post;
396
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
397
 
398
- private function is_woocommerce_active()
399
- {
400
- if(in_array('woocommerce/woocommerce.php', get_option('active_plugins'))) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
 
402
- return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
  }
404
 
405
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
406
  }
407
- }
408
 
409
- endif;
 
 
4
  die;
5
  }
6
 
7
+ if ( ! class_exists( 'Carousel_Slider_Admin' ) ):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
+ class Carousel_Slider_Admin {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
+ private $form;
12
+ protected static $instance = null;
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
+ /**
15
+ * Ensures only one instance of this class is loaded or can be loaded.
16
+ *
17
+ * @return Carousel_Slider_Admin
18
+ */
19
+ public static function init() {
20
+ if ( is_null( self::$instance ) ) {
21
+ self::$instance = new self();
22
+ }
23
 
24
+ return self::$instance;
25
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
+ /**
28
+ * Carousel_Slider_Admin constructor.
29
+ */
30
+ public function __construct() {
31
+ $this->form = new Carousel_Slider_Form();
32
+
33
+ add_action( 'init', array( $this, 'carousel_post_type' ) );
34
+ add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
35
+ add_filter( 'manage_edit-carousels_columns', array( $this, 'columns_head' ) );
36
+ add_filter( 'manage_carousels_posts_custom_column', array( $this, 'columns_content' ), 10, 2 );
37
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
38
+ add_action( 'wp_ajax_carousel_slider_save_images', array( $this, 'save_images' ) );
39
+
40
+ // Remove view and Quick Edit from Carousels
41
+ add_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );
42
+
43
+ // Add custom link to media gallery
44
+ add_filter( "attachment_fields_to_edit", array( $this, "attachment_fields_to_edit" ), null, 2 );
45
+ add_filter( "attachment_fields_to_save", array( $this, "attachment_fields_to_save" ), null, 2 );
46
+ }
47
 
48
+ /**
49
+ * Carousel slider post type
50
+ */
51
+ public function carousel_post_type() {
52
+ $labels = array(
53
+ 'name' => _x( 'Slides', 'Post Type General Name', 'carousel-slider' ),
54
+ 'singular_name' => _x( 'Slide', 'Post Type Singular Name', 'carousel-slider' ),
55
+ 'menu_name' => __( 'Carousel Slider', 'carousel-slider' ),
56
+ 'parent_item_colon' => __( 'Parent Slide:', 'carousel-slider' ),
57
+ 'all_items' => __( 'All Slides', 'carousel-slider' ),
58
+ 'view_item' => __( 'View Slide', 'carousel-slider' ),
59
+ 'add_new_item' => __( 'Add New Slide', 'carousel-slider' ),
60
+ 'add_new' => __( 'Add New', 'carousel-slider' ),
61
+ 'edit_item' => __( 'Edit Slide', 'carousel-slider' ),
62
+ 'update_item' => __( 'Update Slide', 'carousel-slider' ),
63
+ 'search_items' => __( 'Search Slide', 'carousel-slider' ),
64
+ 'not_found' => __( 'Not found', 'carousel-slider' ),
65
+ 'not_found_in_trash' => __( 'Not found in Trash', 'carousel-slider' ),
66
+ );
67
+ $args = array(
68
+ 'label' => __( 'Slide', 'carousel-slider' ),
69
+ 'description' => __( 'The easiest way to create carousel slide', 'carousel-slider' ),
70
+ 'labels' => $labels,
71
+ 'supports' => array( 'title' ),
72
+ 'hierarchical' => false,
73
+ 'public' => false,
74
+ 'show_ui' => true,
75
+ 'show_in_menu' => true,
76
+ 'show_in_nav_menus' => true,
77
+ 'show_in_admin_bar' => true,
78
+ 'menu_position' => 5.55525,
79
+ 'menu_icon' => 'dashicons-slides',
80
+ 'can_export' => true,
81
+ 'has_archive' => false,
82
+ 'exclude_from_search' => true,
83
+ 'publicly_queryable' => true,
84
+ 'rewrite' => false,
85
+ 'capability_type' => 'post',
86
+ );
87
 
88
+ register_post_type( 'carousels', $args );
89
+ }
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
+ /**
92
+ * Hide view and quick edit from carousel slider admin
93
+ *
94
+ * @param array $actions
95
+ * @param WP_Post $post
96
+ *
97
+ * @return mixed
98
+ */
99
+ public function post_row_actions( $actions, $post ) {
100
+ if ( $post->post_type != 'carousels' ) {
101
+ return $actions;
102
+ }
103
+
104
+ unset( $actions['view'] );
105
+ unset( $actions['inline hide-if-no-js'] );
 
 
 
 
 
 
 
 
106
 
107
+ return $actions;
108
+ }
 
 
 
 
 
 
 
 
 
 
 
 
109
 
110
+ /**
111
+ * Customize Carousel slider list table head
112
+ *
113
+ * @return array
114
+ */
115
+ public function columns_head() {
116
+
117
+ $columns = array(
118
+ 'cb' => '<input type="checkbox">',
119
+ 'title' => __( 'Carousel Slide Title', 'carousel-slider' ),
120
+ 'usage' => __( 'Shortcode', 'carousel-slider' ),
121
+ 'slide_type' => __( 'Slide Type', 'carousel-slider' )
122
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
+ return $columns;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
+ /**
129
+ * Generate carousel slider list table content
130
+ *
131
+ * @param $column
132
+ * @param $post_id
133
+ */
134
+ public function columns_content( $column, $post_id ) {
135
+ switch ( $column ) {
136
+
137
+ case 'usage':
138
+ ?>
139
+ <input
140
+ type="text"
141
+ onmousedown="this.clicked = 1;"
142
+ onfocus="if (!this.clicked) this.select(); else this.clicked = 2;"
143
+ onclick="if (this.clicked === 2) this.select(); this.clicked = 0;"
144
+ value="[carousel_slide id='<?php echo $post_id; ?>']"
145
+ style="background-color: #f1f1f1;min-width: 250px;padding: 5px 8px;"
146
+ >
147
+ <?php
148
+
149
+ break;
150
+
151
+ case 'slide_type':
152
+ $slide_type = get_post_meta( get_the_ID(), '_slide_type', true );
153
+ echo ucwords( str_replace( '-', ' ', $slide_type ) );
154
+
155
+ break;
156
+ default :
157
+ break;
158
+ }
159
  }
160
+
161
+ /**
162
+ * Add carousel slider meta box
163
+ */
164
+ public function add_meta_boxes() {
165
+ add_meta_box(
166
+ "carousel-slider-meta-boxes",
167
+ __( "Carousel Slider", 'carousel-slider' ),
168
+ array( $this, 'carousel_slider_meta_boxes' ),
169
+ "carousels",
170
+ "normal",
171
+ "high"
 
 
 
172
  );
173
  }
 
 
174
 
175
+ /**
176
+ * Load meta box content
177
+ *
178
+ * @param WP_Post $post
179
+ */
180
+ public function carousel_slider_meta_boxes( $post ) {
181
+ wp_nonce_field( 'carousel_slider_nonce', '_carousel_slider_nonce' );
182
+
183
+ $slide_type = get_post_meta( $post->ID, '_slide_type', true );
184
+ $slide_type = in_array( $slide_type, carousel_slider_slide_type() ) ? $slide_type : 'image-carousel';
185
+
186
+ require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/types.php';
187
+ require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/images-media.php';
188
+ require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/images-url.php';
189
+ require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/post-carousel.php';
190
+ require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/product-carousel.php';
191
+ require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/video-carousel.php';
192
+ require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/hero-banner-slider.php';
193
+ require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/images-settings.php';
194
+
195
+ // require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/navigation.php';
196
+ // require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/autoplay.php';
197
+ // require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/responsive.php';
198
+ }
199
 
200
+ /**
201
+ * Save custom meta box
202
+ *
203
+ * @method save_meta_box
204
+ * @param int $post_id The post ID
205
+ */
206
+ public function save_meta_box( $post_id ) {
207
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
208
+ return;
209
+ }
210
+ // Check if nonce is set.
211
+ if ( ! isset( $_POST['_carousel_slider_nonce'], $_POST['carousel_slider'] ) ) {
212
+ return;
213
+ }
214
+ // Check if nonce is valid.
215
+ if ( ! wp_verify_nonce( $_POST['_carousel_slider_nonce'], 'carousel_slider_nonce' ) ) {
216
+ return;
217
+ }
218
+ // Check if user has permissions to save data.
219
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
220
+ return;
221
+ }
222
+
223
+ if ( isset( $_POST['carousel_slider_content'] ) ) {
224
+ $this->update_content_slider( $post_id );
225
+ }
226
+
227
+ if ( isset( $_POST['content_settings'] ) ) {
228
+ $this->update_content_settings( $post_id );
229
+ }
230
+
231
+ foreach ( $_POST['carousel_slider'] as $key => $val ) {
232
+ if ( is_array( $val ) ) {
233
+ $val = implode( ',', $val );
234
+ }
235
+
236
+ if ( $key == '_margin_right' && $val == 0 ) {
237
+ $val = 'zero';
238
+ }
239
+ update_post_meta( $post_id, $key, sanitize_text_field( $val ) );
240
+ }
241
+
242
+ if ( ! isset( $_POST['carousel_slider']['_post_categories'] ) ) {
243
+ update_post_meta( $post_id, '_post_categories', '' );
244
+ }
245
+
246
+ if ( ! isset( $_POST['carousel_slider']['_post_tags'] ) ) {
247
+ update_post_meta( $post_id, '_post_tags', '' );
248
+ }
249
+
250
+ if ( ! isset( $_POST['carousel_slider']['_post_in'] ) ) {
251
+ update_post_meta( $post_id, '_post_in', '' );
252
+ }
253
+
254
+ if ( isset( $_POST['_images_urls'] ) ) {
255
+ $this->save_images_urls( $post_id );
256
+ }
257
+ }
258
 
259
+ /**
260
+ * Save carousel slider gallery images
261
+ *
262
+ * @return string
263
+ */
264
+ public function save_images() {
265
+ // Check if not an autosave.
266
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
267
+ return;
268
+ }
269
+ // Check if required fields are set
270
+ if ( ! isset( $_POST['ids'], $_POST['post_id'] ) ) {
271
+ return;
272
+ }
273
+ // Check if user has permissions to save data.
274
+ if ( ! current_user_can( 'edit_posts' ) ) {
275
+ return;
276
+ }
277
+
278
+ $ids = strip_tags( rtrim( $_POST['ids'], ',' ) );
279
+ update_post_meta( $_POST['post_id'], '_wpdh_image_ids', $ids );
280
+
281
+ $thumbs = explode( ',', $ids );
282
+ $thumbs_output = '';
283
+ foreach ( $thumbs as $thumb ) {
284
+ $thumbs_output .= '<li>' . wp_get_attachment_image( $thumb, array( 75, 75 ) ) . '</li>';
285
+ }
286
+
287
+ echo $thumbs_output;
288
+
289
+ die();
290
+ }
291
 
292
+ /**
293
+ * Save images urls
294
+ *
295
+ * @param integer $post_id
296
+ *
297
+ * @return void
298
+ */
299
+ private function save_images_urls( $post_id ) {
300
+ if ( ! isset( $_POST['_images_urls'] ) ) {
301
+ return;
302
+ }
303
+ $url = $_POST['_images_urls']['url'];
304
+ $title = $_POST['_images_urls']['title'];
305
+ $caption = $_POST['_images_urls']['caption'];
306
+ $alt = $_POST['_images_urls']['alt'];
307
+ $link_url = $_POST['_images_urls']['link_url'];
308
+
309
+ $urls = array();
310
+
311
+ for ( $i = 0; $i < count( $url ); $i ++ ) {
312
+ $urls[] = array(
313
+ 'url' => esc_url_raw( $url[ $i ] ),
314
+ 'title' => sanitize_text_field( $title[ $i ] ),
315
+ 'caption' => sanitize_text_field( $caption[ $i ] ),
316
+ 'alt' => sanitize_text_field( $alt[ $i ] ),
317
+ 'link_url' => esc_url_raw( $link_url[ $i ] ),
318
+ );
319
+ }
320
+ update_post_meta( $post_id, '_images_urls', $urls );
321
+ }
322
 
323
+ /**
324
+ * Adding our custom fields to the $form_fields array
325
+ *
326
+ * @param array $form_fields
327
+ * @param WP_Post $post
328
+ *
329
+ * @return array
330
+ */
331
+ public function attachment_fields_to_edit( $form_fields, $post ) {
332
+ $form_fields["carousel_slider_link_url"]["label"] = __( "Link to URL", "carousel-slider" );
333
+ $form_fields["carousel_slider_link_url"]["input"] = "textarea";
334
+ $form_fields["carousel_slider_link_url"]["value"] = get_post_meta( $post->ID, "_carousel_slider_link_url", true );
335
+ $form_fields["carousel_slider_link_url"]["extra_rows"] = array(
336
+ 'carouselSliderInfo' => __( '"Link to URL" only works on Carousel Slider for linking image to a custom url.', 'carousel-slider' ),
337
+ );
338
 
339
+ return $form_fields;
340
+ }
341
+
342
+ /**
343
+ * Save custom field value
344
+ *
345
+ * @param array $post
346
+ * @param array $attachment
347
+ *
348
+ * @return object|array
349
+ */
350
+ public function attachment_fields_to_save( $post, $attachment ) {
351
+ $slider_link_url = isset( $attachment['carousel_slider_link_url'] ) ? $attachment['carousel_slider_link_url'] : null;
352
+
353
+ if ( filter_var( $slider_link_url, FILTER_VALIDATE_URL ) ) {
354
+
355
+ update_post_meta( $post['ID'], '_carousel_slider_link_url', esc_url_raw( $slider_link_url ) );
356
+ }
357
+
358
+ return $post;
359
+ }
360
 
361
+ /**
362
+ * Update content slider
363
+ *
364
+ * @param int $post_id
365
+ */
366
+ private function update_content_slider( $post_id ) {
367
+ $_content_slides = $_POST['carousel_slider_content'];
368
+ $_slides = array_map( function ( $slide ) {
369
+ $_slide = array(
370
+ // Slide Content
371
+ 'slide_heading' => wp_kses_post( $slide['slide_heading'] ),
372
+ 'slide_description' => wp_kses_post( $slide['slide_description'] ),
373
+ // Slide Background
374
+ 'img_id' => intval( $slide['img_id'] ),
375
+ 'img_bg_position' => sanitize_text_field( $slide['img_bg_position'] ),
376
+ 'img_bg_size' => sanitize_text_field( $slide['img_bg_size'] ),
377
+ 'bg_color' => carousel_slider_sanitize_color( $slide['bg_color'] ),
378
+ // Slide Style
379
+ 'content_alignment' => sanitize_text_field( $slide['content_alignment'] ),
380
+ 'heading_font_size' => intval( $slide['heading_font_size'] ),
381
+ 'heading_gutter' => sanitize_text_field( $slide['heading_gutter'] ),
382
+ 'heading_color' => carousel_slider_sanitize_color( $slide['heading_color'] ),
383
+ 'heading_background_color' => carousel_slider_sanitize_color( $slide['heading_background_color'] ),
384
+ 'description_font_size' => intval( $slide['description_font_size'] ),
385
+ 'description_gutter' => sanitize_text_field( $slide['description_gutter'] ),
386
+ 'description_color' => carousel_slider_sanitize_color( $slide['description_color'] ),
387
+ 'description_background_color' => carousel_slider_sanitize_color( $slide['description_background_color'] ),
388
+ // Slide Link
389
+ 'link_type' => sanitize_text_field( $slide['link_type'] ),
390
+ 'slide_link' => esc_url_raw( $slide['slide_link'] ),
391
+ 'link_target' => sanitize_text_field( $slide['link_target'] ),
392
+ // Slide Button #1
393
+ 'button_one_text' => sanitize_text_field( $slide['button_one_text'] ),
394
+ 'button_one_url' => esc_url_raw( $slide['button_one_url'] ),
395
+ 'button_one_target' => sanitize_text_field( $slide['button_one_target'] ),
396
+ 'button_one_type' => sanitize_text_field( $slide['button_one_type'] ),
397
+ 'button_one_size' => sanitize_text_field( $slide['button_one_size'] ),
398
+ 'button_one_border_width' => sanitize_text_field( $slide['button_one_border_width'] ),
399
+ 'button_one_border_radius' => sanitize_text_field( $slide['button_one_border_radius'] ),
400
+ 'button_one_bg_color' => carousel_slider_sanitize_color( $slide['button_one_bg_color'] ),
401
+ 'button_one_color' => carousel_slider_sanitize_color( $slide['button_one_color'] ),
402
+ // Slide Button #2
403
+ 'button_two_text' => sanitize_text_field( $slide['button_two_text'] ),
404
+ 'button_two_url' => esc_url_raw( $slide['button_two_url'] ),
405
+ 'button_two_target' => sanitize_text_field( $slide['button_two_target'] ),
406
+ 'button_two_type' => sanitize_text_field( $slide['button_two_type'] ),
407
+ 'button_two_size' => sanitize_text_field( $slide['button_two_size'] ),
408
+ 'button_two_border_width' => sanitize_text_field( $slide['button_two_border_width'] ),
409
+ 'button_two_border_radius' => sanitize_text_field( $slide['button_two_border_radius'] ),
410
+ 'button_two_bg_color' => carousel_slider_sanitize_color( $slide['button_two_bg_color'] ),
411
+ 'button_two_color' => carousel_slider_sanitize_color( $slide['button_two_color'] ),
412
+ );
413
+
414
+ return $_slide;
415
+ }, $_content_slides );
416
+
417
+ update_post_meta( $post_id, '_content_slider', $_slides );
418
  }
419
 
420
+ private function update_content_settings( $post_id ) {
421
+ $setting = $_POST['content_settings'];
422
+ $_settings = array(
423
+ 'slide_height' => sanitize_text_field( $setting['slide_height'] ),
424
+ 'content_width' => sanitize_text_field( $setting['content_width'] ),
425
+ 'slide_padding' => array(
426
+ 'top' => sanitize_text_field( $setting['slide_padding']['top'] ),
427
+ 'right' => sanitize_text_field( $setting['slide_padding']['right'] ),
428
+ 'bottom' => sanitize_text_field( $setting['slide_padding']['bottom'] ),
429
+ 'left' => sanitize_text_field( $setting['slide_padding']['left'] ),
430
+ ),
431
+ );
432
+ update_post_meta( $post_id, '_content_slider_settings', $_settings );
433
+ }
434
  }
 
435
 
436
+ endif;
437
+
438
+ Carousel_Slider_Admin::init();
includes/class-carousel-slider-content-carousel.php ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! class_exists( 'Carousel_Slider_Content_Carousel' ) ):
4
+
5
+ class Carousel_Slider_Content_Carousel {
6
+
7
+ protected static $instance = null;
8
+
9
+ /**
10
+ * Ensures only one instance of this class is loaded or can be loaded.
11
+ *
12
+ * @return Carousel_Slider_Content_Carousel
13
+ */
14
+ public static function init() {
15
+ if ( is_null( self::$instance ) ) {
16
+ self::$instance = new self();
17
+ }
18
+
19
+ return self::$instance;
20
+ }
21
+
22
+ public function __construct() {
23
+ add_action( 'wp_ajax_add_content_slide', array( $this, 'add_slide_template' ) );
24
+ }
25
+
26
+ public function add_slide_template() {
27
+ $post_id = absint( $_POST['post_id'] );
28
+ $task = isset( $_POST['task'] ) ? esc_attr( $_POST['task'] ) : 'add-slide';
29
+ $slide_pos = isset( $_POST['slide_pos'] ) ? absint( $_POST['slide_pos'] ) : null;
30
+
31
+ $slider = get_post_meta( $post_id, '_content_slider', true );
32
+
33
+ if ( $task == 'add-slide' ) {
34
+ $slider = $this->add_slide( $post_id, $slider );
35
+ }
36
+ if ( $task == 'delete-slide' && ! is_null( $slide_pos ) ) {
37
+ $slider = $this->delete_slide( $slide_pos, $post_id, $slider );
38
+ }
39
+ if ( $task == 'move-slide-top' && ! is_null( $slide_pos ) ) {
40
+ $slider = $this->move_slide_top( $slide_pos, $slider, $post_id );
41
+ }
42
+ if ( $task == 'move-slide-up' && ! is_null( $slide_pos ) ) {
43
+ $slider = $this->move_slide_up( $slide_pos, $slider, $post_id );
44
+ }
45
+ if ( $task == 'move-slide-down' && ! is_null( $slide_pos ) ) {
46
+ $slider = $this->move_slide_down( $slider, $slide_pos, $post_id );
47
+ }
48
+ if ( $task == 'move-slide-bottom' && ! is_null( $slide_pos ) ) {
49
+ $slider = $this->move_slide_bottom( $slider, $slide_pos, $post_id );
50
+ }
51
+
52
+ echo isset( $slider ) ? json_encode( $slider ) : '';
53
+ wp_die();
54
+ }
55
+
56
+ private function content_slide_default() {
57
+ $data = array(
58
+ 'content' => '',
59
+ 'bg_color' => 'rgba(0,0,0,0.6)',
60
+ 'img_id' => '',
61
+ 'img_bg_position' => 'center center',
62
+ 'img_bg_size' => 'contain',
63
+ 'link_url' => '',
64
+ 'link_target' => '',
65
+ 'popup_type' => 'image', // Image, Video, HTML
66
+ 'popup_img_id' => '',
67
+ 'popup_img_title' => '',
68
+ 'popup_video_id' => '',
69
+ 'popup_video_type' => '',
70
+ 'popup_html' => '',
71
+ 'popup_bg_color' => 'rgba(0,0,0,0.6)',
72
+ 'popup_width' => '',
73
+ );
74
+
75
+ return $data;
76
+ }
77
+
78
+ /**
79
+ * Add new slide
80
+ *
81
+ * @param $post_id
82
+ * @param $content_slider
83
+ *
84
+ * @return array
85
+ */
86
+ private function add_slide( $post_id, $content_slider ) {
87
+ $default = $this->content_slide_default();
88
+ if ( is_array( $content_slider ) && count( $content_slider ) > 0 ) {
89
+ $content_slider[] = $default;
90
+ } else {
91
+ $content_slider = array( $default );
92
+ }
93
+ update_post_meta( $post_id, '_content_slider', $content_slider );
94
+
95
+ return $content_slider;
96
+ }
97
+
98
+ /**
99
+ * Delete a slide
100
+ *
101
+ * @param $slide_position
102
+ * @param $post_id
103
+ * @param $slider
104
+ *
105
+ * @return mixed
106
+ */
107
+ private function delete_slide( $slide_position, $post_id, $slider ) {
108
+ array_splice( $slider, $slide_position, 1 );
109
+ update_post_meta( $post_id, '_content_slider', $slider );
110
+
111
+ return $slider;
112
+ }
113
+
114
+ /**
115
+ * Move array element position
116
+ *
117
+ * @param $array
118
+ * @param $current_index
119
+ * @param $new_index
120
+ *
121
+ * @return mixed
122
+ */
123
+ private function move_array_element( $array, $current_index, $new_index ) {
124
+ $output = array_splice( $array, $current_index, 1 );
125
+ array_splice( $array, $new_index, 0, $output );
126
+
127
+ return $array;
128
+ }
129
+
130
+ /**
131
+ * @param $slide_pos
132
+ * @param $slider
133
+ * @param $post_id
134
+ *
135
+ * @return mixed
136
+ */
137
+ private function move_slide_top( $slide_pos, $slider, $post_id ) {
138
+ if ( $slide_pos !== 0 ) {
139
+ $slider = $this->move_array_element( $slider, $slide_pos, 0 );
140
+ update_post_meta( $post_id, '_content_slider', $slider );
141
+ }
142
+
143
+ return $slider;
144
+ }
145
+
146
+ /**
147
+ * @param $slide_pos
148
+ * @param $slider
149
+ * @param $post_id
150
+ *
151
+ * @return mixed
152
+ */
153
+ private function move_slide_up( $slide_pos, $slider, $post_id ) {
154
+ if ( $slide_pos !== 0 ) {
155
+ $slider = $this->move_array_element( $slider, $slide_pos, ( $slide_pos - 1 ) );
156
+ update_post_meta( $post_id, '_content_slider', $slider );
157
+ }
158
+
159
+ return $slider;
160
+ }
161
+
162
+ /**
163
+ * @param $slider
164
+ * @param $slide_pos
165
+ * @param $post_id
166
+ *
167
+ * @return array
168
+ */
169
+ private function move_slide_down( $slider, $slide_pos, $post_id ) {
170
+ $last_index = count( $slider ) - 1;
171
+ if ( $slide_pos !== $last_index ) {
172
+ $slider = $this->move_array_element( $slider, $slide_pos, ( $slide_pos + 1 ) );
173
+ update_post_meta( $post_id, '_content_slider', $slider );
174
+ }
175
+
176
+ return $slider;
177
+ }
178
+
179
+ /**
180
+ * @param $slider
181
+ * @param $slide_pos
182
+ * @param $post_id
183
+ *
184
+ * @return array
185
+ */
186
+ private function move_slide_bottom( $slider, $slide_pos, $post_id ) {
187
+ $last_index = count( $slider ) - 1;
188
+ if ( $slide_pos !== $last_index ) {
189
+ $slider = $this->move_array_element( $slider, $slide_pos, $last_index );
190
+ update_post_meta( $post_id, '_content_slider', $slider );
191
+ }
192
+
193
+ return $slider;
194
+ }
195
+ }
196
+
197
+ endif;
198
+
199
+ Carousel_Slider_Content_Carousel::init();
includes/class-carousel-slider-credit.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! class_exists( 'Carousel_Slider_Credit' ) ):
3
+
4
+ class Carousel_Slider_Credit {
5
+
6
+ protected static $instance = null;
7
+
8
+ /**
9
+ * Ensures only one instance of this class is loaded or can be loaded.
10
+ *
11
+ * @return Carousel_Slider_Credit
12
+ */
13
+ public static function init() {
14
+ if ( is_null( self::$instance ) ) {
15
+ self::$instance = new self();
16
+ }
17
+
18
+ return self::$instance;
19
+ }
20
+
21
+ public function __construct() {
22
+ add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ) );
23
+ }
24
+
25
+ /**
26
+ * Add custom footer text on plugins page.
27
+ *
28
+ * @param string $text
29
+ *
30
+ * @return string
31
+ */
32
+ public function admin_footer_text( $text ) {
33
+ global $post_type, $hook_suffix;
34
+
35
+ $footer_text = sprintf(
36
+ __( 'If you like %1$s Carousel Slider %2$s please leave us a %3$s rating. A huge thanks in advance!', 'carousel-slider' ),
37
+ '<strong>',
38
+ '</strong>',
39
+ '<a href="https://wordpress.org/support/view/plugin-reviews/carousel-slider?filter=5#postform" target="_blank" data-rated="Thanks :)">&starf;&starf;&starf;&starf;&starf;</a>'
40
+ );
41
+
42
+ if ( $post_type == 'carousels' || $hook_suffix == 'carousels_page_carousel-slider-documentation' ) {
43
+ return $footer_text;
44
+ }
45
+
46
+ return $text;
47
+ }
48
+ }
49
+
50
+ endif;
51
+
52
+ Carousel_Slider_Credit::init();
includes/class-carousel-slider-documentation.php CHANGED
@@ -4,36 +4,45 @@ if ( ! defined( 'WPINC' ) ) {
4
  die;
5
  }
6
 
7
- if ( ! class_exists('Carousel_Slider_Documentation') ):
8
 
9
- class Carousel_Slider_Documentation
10
- {
11
- private $plugin_path;
12
 
13
- public function __construct( $plugin_path )
14
- {
15
- $this->plugin_path = $plugin_path;
16
- add_action( 'admin_menu', array( $this, 'admin_menu' ) );
17
- }
18
 
19
- public function admin_menu()
20
- {
21
- add_submenu_page(
22
- 'edit.php?post_type=carousels',
23
- 'Documentation',
24
- 'Documentation',
25
- 'manage_options',
26
- 'carousel-slider-documentation',
27
- array( $this, 'submenu_page_callback')
28
- );
29
- }
 
30
 
31
- public function submenu_page_callback()
32
- {
33
- include_once $this->plugin_path . '/templates/documentation.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
35
- }
36
 
37
  endif;
38
 
39
- new Carousel_Slider_Documentation( $this->plugin_path );
4
  die;
5
  }
6
 
7
+ if ( ! class_exists( 'Carousel_Slider_Documentation' ) ):
8
 
9
+ class Carousel_Slider_Documentation {
 
 
10
 
11
+ protected static $instance = null;
 
 
 
 
12
 
13
+ /**
14
+ * Ensures only one instance of this class is loaded or can be loaded.
15
+ *
16
+ * @return Carousel_Slider_Documentation
17
+ */
18
+ public static function init() {
19
+ if ( is_null( self::$instance ) ) {
20
+ self::$instance = new self();
21
+ }
22
+
23
+ return self::$instance;
24
+ }
25
 
26
+ public function __construct() {
27
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
28
+ }
29
+
30
+ public function admin_menu() {
31
+ add_submenu_page(
32
+ 'edit.php?post_type=carousels',
33
+ 'Documentation',
34
+ 'Documentation',
35
+ 'manage_options',
36
+ 'carousel-slider-documentation',
37
+ array( $this, 'submenu_page_callback' )
38
+ );
39
+ }
40
+
41
+ public function submenu_page_callback() {
42
+ include_once CAROUSEL_SLIDER_TEMPLATES . '/admin/documentation.php';
43
+ }
44
  }
 
45
 
46
  endif;
47
 
48
+ Carousel_Slider_Documentation::init();
includes/class-carousel-slider-form.php CHANGED
@@ -4,293 +4,400 @@ if ( ! defined( 'WPINC' ) ) {
4
  die;
5
  }
6
 
7
- if( ! class_exists('Carousel_Slider_Form') ):
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
- class Carousel_Slider_Form
10
- {
11
- public function text( array $args )
12
- {
13
- if( ! isset( $args['id'], $args['name'] ) ) return;
14
 
15
- list($name, $value) = $this->field_common( $args );
 
 
 
16
 
17
- echo $this->field_before( $args );
18
- echo sprintf( '<input type="text" class="sp-input-text" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name);
19
- echo $this->field_after();
20
- }
21
- public function textarea( array $args )
22
- {
23
- if( ! isset( $args['id'], $args['name'] ) ) return;
 
 
24
 
25
- list($name, $value) = $this->field_common( $args );
26
- $cols = isset( $args['cols'] ) ? $args['cols'] : 35;
27
- $rows = isset( $args['rows'] ) ? $args['rows'] : 6;
28
 
29
- echo $this->field_before( $args );
30
- echo sprintf( '<textarea class="sp-input-textarea" id="%2$s" name="%3$s" cols="%4$d" rows="%5$d">%1$s</textarea>', esc_textarea($value), $args['id'], $name, $cols, $rows);
31
- echo $this->field_after();
32
- }
33
 
34
- public function color( array $args )
35
- {
36
- if( ! isset( $args['id'], $args['name'] ) ) return;
 
 
 
 
 
 
37
 
38
- list($name, $value) = $this->field_common( $args );
39
- $std_value = isset($args['std']) ? $args['std'] : '';
40
 
41
- echo $this->field_before( $args );
42
- echo sprintf( '<input type="text" class="colorpicker" value="%1$s" id="%2$s" name="%3$s" data-default-color="%4$s">', $value, $args['id'], $name, $std_value);
43
- echo $this->field_after();
44
- }
45
-
46
- public function date( array $args )
47
- {
48
- if( ! isset( $args['id'], $args['name'] ) ) return;
49
 
50
- list($name, $value) = $this->field_common( $args );
51
- $std_value = isset($args['std']) ? $args['std'] : '';
 
 
 
 
 
 
 
52
 
53
- echo $this->field_before( $args );
54
- echo sprintf( '<input type="text" class="sp-input-text datepicker" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name, $std_value);
55
- echo $this->field_after();
56
- }
57
 
58
- public function number( array $args )
59
- {
60
- if( ! isset( $args['id'], $args['name'] ) ) return;
 
61
 
62
- list($name, $value) = $this->field_common( $args );
63
- $min = isset( $args['min'] ) ? $args['min'] : null;
64
- $max = isset( $args['max'] ) ? $args['max'] : null;
 
 
 
 
 
 
65
 
66
- echo $this->field_before( $args );
67
- echo sprintf( '<input type="number" class="sp-input-text" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name);
68
- echo $this->field_after();
69
- }
70
 
71
- public function checkbox( array $args )
72
- {
73
- if( ! isset( $args['id'], $args['name'] ) ) return;
 
74
 
75
- list($name, $value) = $this->field_common( $args );
76
- $checked = ( $value == 'on' ) ? ' checked' : '';
77
- $label = isset( $args['label'] ) ? $args['label'] : '';
 
 
 
 
 
 
78
 
79
- echo $this->field_before( $args );
80
- echo sprintf( '<input type="hidden" name="%1$s" value="off">', $name );
81
- echo sprintf('<label for="%2$s"><input type="checkbox" %4$s value="on" id="%2$s" name="%1$s">%3$s</label>',$name, $args['id'], $label, $checked);
82
- echo $this->field_after();
83
- }
84
 
85
- public function select( $args )
86
- {
87
- if( ! isset( $args['id'], $args['name'] ) ) return;
88
-
89
- list($name, $value) = $this->field_common( $args );
90
- $checked = ( $value == 'on' ) ? ' checked' : '';
91
- $multiple = isset($args['multiple']) ? 'multiple' : '';
92
-
93
- echo $this->field_before( $args );
94
- echo sprintf('<select name="%1$s" id="%2$s" class="select2 sp-input-text" %3$s>',$name, $args['id'], $multiple);
95
- foreach( $args['options'] as $key => $option ){
96
- $selected = ( $value == $key ) ? ' selected="selected"' : '';
97
- echo sprintf('<option value="%1$s" %3$s>%2$s</option>',$key, $option, $selected);
98
- }
99
- echo'</select>';
100
- echo $this->field_after();
101
- }
102
 
103
- public function posts_list( $args )
104
- {
105
- if( ! isset( $args['id'], $args['name'] ) ) return;
106
-
107
- list($name, $value) = $this->field_common( $args );
108
- $value = explode(',', $value);
109
- $multiple = isset($args['multiple']) ? 'multiple' : '';
110
- $post_type = isset($args['post_type']) ? $args['post_type'] : 'post';
111
-
112
- echo $this->field_before( $args );
113
- echo sprintf('<select name="%1$s" id="%2$s" class="select2 sp-input-text" %3$s>',$name, $args['id'], $multiple);
114
- $posts = get_posts( array( 'post_type' => $post_type, 'post_status' => 'publish', 'posts_per_page' => -1 ) );
115
-
116
- foreach( $posts as $post ){
117
- $selected = in_array($post->ID, $value) ? ' selected="selected"' : '';
118
- echo sprintf('<option value="%1$s" %3$s>%2$s</option>',$post->ID, $post->post_title, $selected);
119
- }
120
- echo'</select>';
121
- echo $this->field_after();
122
- }
123
 
124
- public function images_gallery( $args )
125
- {
126
- if( ! isset( $args['id'], $args['name'] ) ) return;
127
- list($name, $value) = $this->field_common( $args );
128
-
129
- $btn_text = $value ? 'Edit Gallery' : 'Add Gallery';
130
- $value = strip_tags(rtrim($value, ','));
131
- $output = '';
132
-
133
- if( $value ) {
134
- $thumbs = explode(',', $value);
135
- foreach( $thumbs as $thumb ) {
136
- $output .= '<li>' . wp_get_attachment_image( $thumb, array(50,50) ) . '</li>';
137
- }
138
- }
139
-
140
- $html = $this->field_before( $args );
141
- $html .= '<div class="carousel_slider_images">';
142
- $html .= sprintf('<input type="hidden" value="%1$s" id="_carousel_slider_images_ids" name="%2$s">', $value, $name);
143
- $html .= sprintf('<a href="#" id="carousel_slider_gallery_btn" class="carousel_slider_gallery_btn">%s</a>', $btn_text);
144
- $html .= sprintf('<ul class="carousel_slider_gallery_list">%s</ul>', $output);
145
- $html .= '</div>';
146
- $html .= $this->field_after();
147
- echo $html;
148
- }
149
 
150
- public function images_url( array $args )
151
- {
152
- if( ! isset( $args['id'], $args['name'] ) ) return;
153
- list($name, $value) = $this->field_common( $args );
 
 
 
 
 
154
 
155
- $btn_text = $value ? __('Edit URLs', 'carousel-slider') : __('Add URLs', 'carousel-slider');
 
 
 
 
 
 
 
 
 
156
 
157
- $html = $this->field_before( $args );
158
- $html .= sprintf('<a id="_images_urls_btn" class="button button-primary" href="#">%s</a>', $btn_text);
159
- $html .= '<ul class="carousel_slider_url_images_list">';
160
- if ( is_array($value) && count($value) > 0){
161
- foreach ($value as $image ) {
162
- $html .= sprintf('<li><img src="%s" alt="%s" width="75" height="75"></li>', $image['url'], $image['alt']);
 
 
 
 
 
 
 
 
 
 
163
  }
 
 
164
  }
165
- $html .= '</ul>';
166
- $html .= $this->field_after();
167
- echo $html;
168
- }
169
 
170
- public function file( array $args )
171
- {
172
- if( ! isset( $args['id'], $args['name'] ) ) return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
- list($name, $value) = $this->field_common( $args );
 
 
 
 
 
 
 
 
 
175
 
176
- echo $this->field_before( $args );
177
- echo sprintf( '<input type="text" class="sp-input-text" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name);
178
- echo sprintf('<input type="button" class="button" id="carousel_slider_video_btn" value="%s">', __('Browse', 'carousel-slider'));
179
- echo $this->field_after();
180
- }
181
 
182
- public function image_sizes( array $args )
183
- {
184
- if( ! isset( $args['id'], $args['name'] ) ) return;
 
 
 
 
 
 
 
 
 
185
 
186
- list($name, $value) = $this->field_common( $args );
 
 
 
187
 
188
- global $_wp_additional_image_sizes;
189
 
190
- $sizes = array();
 
 
 
 
191
 
192
- foreach ( get_intermediate_image_sizes() as $_size ) {
193
- if ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {
 
 
 
 
 
 
 
194
 
195
- $width = get_option( "{$_size}_size_w" );
196
- $height = get_option( "{$_size}_size_h" );
197
- $crop = (bool) get_option( "{$_size}_crop" ) ? 'hard' : 'soft';
198
 
199
- $sizes[$_size] = "{$_size} - {$width}x{$height}";
200
 
201
- } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
202
 
203
- $width = $_wp_additional_image_sizes[ $_size ]['width'];
204
- $height = $_wp_additional_image_sizes[ $_size ]['height'];
205
- $crop = $_wp_additional_image_sizes[ $_size ]['crop'] ? 'hard' : 'soft';
206
 
207
- $sizes[$_size] = "{$_size} - {$width}x{$height}";
208
- }
209
- }
210
 
211
- $sizes = array_merge($sizes, array('full' => 'original uploaded image'));
212
 
 
213
 
214
- echo $this->field_before( $args );
215
- echo sprintf('<select name="%1$s" id="%2$s" class="select2 sp-input-text">',$name, $args['id']);
216
- foreach( $sizes as $key => $option ){
217
- $selected = ( $value == $key ) ? ' selected="selected"' : '';
218
- echo sprintf('<option value="%1$s" %3$s>%2$s</option>',$key, $option, $selected);
219
- }
220
- echo'</select>';
221
- echo $this->field_after();
222
- }
223
 
224
- public function post_terms( array $args )
225
- {
226
- global $wp_version;
227
 
228
- if( ! isset( $args['id'], $args['name'] ) ) return;
229
- list($name, $value) = $this->field_common( $args );
230
 
231
- $value = explode(',', strip_tags(rtrim($value, ',') ) );
232
- $multiple = isset($args['multiple']) ? 'multiple' : '';
233
- $taxonomy = isset($args['taxonomy']) ? $args['taxonomy'] : 'category';
234
 
235
- if ( version_compare( $wp_version, '4.5.0', '>=' ) ) {
236
- $terms = get_terms( array( 'taxonomy' => $taxonomy ) );
237
- } else {
238
- $terms = get_terms( $taxonomy );
 
 
 
 
239
  }
240
 
241
- // var_dump($terms);
 
 
 
 
 
 
242
 
243
- echo $this->field_before( $args );
 
 
 
244
 
245
- echo sprintf('<select name="%1$s" id="%2$s" class="select2 sp-input-text" %3$s>',$name, $args['id'], $multiple);
 
 
246
 
247
- foreach( $terms as $term ){
248
- $title = sprintf('%s (%s)', $term->name, $term->count);
249
- $selected = in_array($term->term_id, $value) ? ' selected="selected"' : '';
250
- echo sprintf('<option value="%1$s" %3$s>%2$s</option>',$term->term_id, $title, $selected);
251
- }
252
- echo'</select>';
253
 
254
- echo $this->field_after();
255
- }
256
 
257
- private function field_common( $args )
258
- {
259
- global $post;
260
- // Meta Name
261
- $group = isset($args['group']) ? $args['group'] : 'carousel_slider';
262
- $multiple = isset($args['multiple']) ? '[]' : '';
263
- $name = sprintf('%s[%s]%s', $group, $args['id'], $multiple);
264
 
265
- // Meta Value
266
- $std_value = isset($args['std']) ? $args['std'] : '';
267
- $meta = get_post_meta( $post->ID, $args['id'], true );
268
- $value = ! empty($meta) ? $meta : $std_value;
269
 
270
- if ($value == 'zero') {
271
- $value = 0;
272
- }
 
 
 
273
 
274
- return array( $name, $value );
275
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
 
277
- private function field_before( $args )
278
- {
279
- $table = sprintf( '<div class="sp-input-group" id="field-%s">', $args['id'] );
280
- $table .= sprintf( '<div class="sp-input-label">' );
281
- $table .= sprintf( '<label for="%1$s">%2$s</label>', $args['id'], $args['name'] );
282
- if ( ! empty( $args['desc'] ) ) {
283
- $table .= sprintf( '<p class="sp-input-desc">%s</p>', $args['desc'] );
284
  }
285
- $table .= '</div>';
286
- $table .= sprintf( '<div class="sp-input-field">' );
287
- return $table;
288
- }
289
 
290
- private function field_after()
291
- {
292
- return '</div></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  }
294
- }
295
 
296
  endif;
4
  die;
5
  }
6
 
7
+ if ( ! class_exists( 'Carousel_Slider_Form' ) ):
8
+
9
+ class Carousel_Slider_Form {
10
+
11
+ /**
12
+ * Generate text field
13
+ *
14
+ * @param array $args
15
+ */
16
+ public function text( array $args ) {
17
+ if ( ! isset( $args['id'], $args['name'] ) ) {
18
+ return;
19
+ }
20
 
21
+ list( $name, $value ) = $this->field_common( $args );
 
 
 
 
22
 
23
+ echo $this->field_before( $args );
24
+ echo sprintf( '<input type="text" class="sp-input-text" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name );
25
+ echo $this->field_after();
26
+ }
27
 
28
+ /**
29
+ * Generate textarea field
30
+ *
31
+ * @param array $args
32
+ */
33
+ public function textarea( array $args ) {
34
+ if ( ! isset( $args['id'], $args['name'] ) ) {
35
+ return;
36
+ }
37
 
38
+ list( $name, $value ) = $this->field_common( $args );
39
+ $cols = isset( $args['cols'] ) ? $args['cols'] : 35;
40
+ $rows = isset( $args['rows'] ) ? $args['rows'] : 6;
41
 
42
+ echo $this->field_before( $args );
43
+ echo sprintf( '<textarea class="sp-input-textarea" id="%2$s" name="%3$s" cols="%4$d" rows="%5$d">%1$s</textarea>', esc_textarea( $value ), $args['id'], $name, $cols, $rows );
44
+ echo $this->field_after();
45
+ }
46
 
47
+ /**
48
+ * Generate color picker field
49
+ *
50
+ * @param array $args
51
+ */
52
+ public function color( array $args ) {
53
+ if ( ! isset( $args['id'], $args['name'] ) ) {
54
+ return;
55
+ }
56
 
57
+ list( $name, $value ) = $this->field_common( $args );
58
+ $std_value = isset( $args['std'] ) ? $args['std'] : '';
59
 
60
+ echo $this->field_before( $args );
61
+ echo sprintf( '<input type="text" class="color-picker" value="%1$s" id="%2$s" name="%3$s" data-default-color="%4$s">', $value, $args['id'], $name, $std_value );
62
+ echo $this->field_after();
63
+ }
 
 
 
 
64
 
65
+ /**
66
+ * Generate date picker field
67
+ *
68
+ * @param array $args
69
+ */
70
+ public function date( array $args ) {
71
+ if ( ! isset( $args['id'], $args['name'] ) ) {
72
+ return;
73
+ }
74
 
75
+ list( $name, $value ) = $this->field_common( $args );
76
+ $std_value = isset( $args['std'] ) ? $args['std'] : '';
 
 
77
 
78
+ echo $this->field_before( $args );
79
+ echo sprintf( '<input type="text" class="sp-input-text datepicker" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name, $std_value );
80
+ echo $this->field_after();
81
+ }
82
 
83
+ /**
84
+ * Generate number field
85
+ *
86
+ * @param array $args
87
+ */
88
+ public function number( array $args ) {
89
+ if ( ! isset( $args['id'], $args['name'] ) ) {
90
+ return;
91
+ }
92
 
93
+ list( $name, $value ) = $this->field_common( $args );
94
+ $min = isset( $args['min'] ) ? $args['min'] : null;
95
+ $max = isset( $args['max'] ) ? $args['max'] : null;
 
96
 
97
+ echo $this->field_before( $args );
98
+ echo sprintf( '<input type="number" class="sp-input-text" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name );
99
+ echo $this->field_after();
100
+ }
101
 
102
+ /**
103
+ * Generate checkbox field
104
+ *
105
+ * @param array $args
106
+ */
107
+ public function checkbox( array $args ) {
108
+ if ( ! isset( $args['id'], $args['name'] ) ) {
109
+ return;
110
+ }
111
 
112
+ list( $name, $value ) = $this->field_common( $args );
113
+ $checked = ( $value == 'on' ) ? ' checked' : '';
114
+ $label = isset( $args['label'] ) ? $args['label'] : '';
 
 
115
 
116
+ echo $this->field_before( $args );
117
+ echo sprintf( '<input type="hidden" name="%1$s" value="off">', $name );
118
+ echo sprintf( '<label for="%2$s"><input type="checkbox" %4$s value="on" id="%2$s" name="%1$s">%3$s</label>', $name, $args['id'], $label, $checked );
119
+ echo $this->field_after();
120
+ }
 
 
 
 
 
 
 
 
 
 
 
 
121
 
122
+ /**
123
+ * Generate select field
124
+ *
125
+ * @param $args
126
+ */
127
+ public function select( $args ) {
128
+ if ( ! isset( $args['id'], $args['name'] ) ) {
129
+ return;
130
+ }
 
 
 
 
 
 
 
 
 
 
 
131
 
132
+ list( $name, $value ) = $this->field_common( $args );
133
+ $checked = ( $value == 'on' ) ? ' checked' : '';
134
+ $multiple = isset( $args['multiple'] ) ? 'multiple' : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
+ echo $this->field_before( $args );
137
+ echo sprintf( '<select name="%1$s" id="%2$s" class="select2 sp-input-text" %3$s>', $name, $args['id'], $multiple );
138
+ foreach ( $args['options'] as $key => $option ) {
139
+ $selected = ( $value == $key ) ? ' selected="selected"' : '';
140
+ echo sprintf( '<option value="%1$s" %3$s>%2$s</option>', $key, $option, $selected );
141
+ }
142
+ echo '</select>';
143
+ echo $this->field_after();
144
+ }
145
 
146
+ /**
147
+ * Generate posts list dropdown
148
+ * Also support for any custom post type
149
+ *
150
+ * @param $args
151
+ */
152
+ public function posts_list( $args ) {
153
+ if ( ! isset( $args['id'], $args['name'] ) ) {
154
+ return;
155
+ }
156
 
157
+ list( $name, $value ) = $this->field_common( $args );
158
+ $value = explode( ',', $value );
159
+ $multiple = isset( $args['multiple'] ) ? 'multiple' : '';
160
+ $post_type = isset( $args['post_type'] ) ? $args['post_type'] : 'post';
161
+
162
+ echo $this->field_before( $args );
163
+ echo sprintf( '<select name="%1$s" id="%2$s" class="select2 sp-input-text" %3$s>', $name, $args['id'], $multiple );
164
+ $posts = get_posts( array(
165
+ 'post_type' => $post_type,
166
+ 'post_status' => 'publish',
167
+ 'posts_per_page' => - 1
168
+ ) );
169
+
170
+ foreach ( $posts as $post ) {
171
+ $selected = in_array( $post->ID, $value ) ? ' selected="selected"' : '';
172
+ echo sprintf( '<option value="%1$s" %3$s>%2$s</option>', $post->ID, $post->post_title, $selected );
173
  }
174
+ echo '</select>';
175
+ echo $this->field_after();
176
  }
 
 
 
 
177
 
178
+ /**
179
+ * Generate image gallery field
180
+ *
181
+ * @param $args
182
+ */
183
+ public function images_gallery( $args ) {
184
+ if ( ! isset( $args['id'], $args['name'] ) ) {
185
+ return;
186
+ }
187
+ list( $name, $value ) = $this->field_common( $args );
188
+
189
+ $btn_text = $value ? 'Edit Gallery' : 'Add Gallery';
190
+ $value = strip_tags( rtrim( $value, ',' ) );
191
+ $output = '';
192
+ global $post;
193
+
194
+ if ( $value ) {
195
+ $thumbs = explode( ',', $value );
196
+ foreach ( $thumbs as $thumb ) {
197
+ $output .= '<li>' . wp_get_attachment_image( $thumb, array( 50, 50 ) ) . '</li>';
198
+ }
199
+ }
200
+
201
+ $html = $this->field_before( $args );
202
+ $html .= '<div class="carousel_slider_images">';
203
+ $html .= sprintf( '<input type="hidden" value="%1$s" id="_carousel_slider_images_ids" name="%2$s">', $value, $name );
204
+ $html .= sprintf(
205
+ '<a href="#" id="%1$s" class="button" data-id="%2$s" data-ids="%3$s" data-create="%5$s" data-edit="%6$s" data-save="%7$s" data-progress="%8$s" data-insert="%9$s">%4$s</a>',
206
+ 'carousel_slider_gallery_btn',
207
+ $post->ID,
208
+ $value,
209
+ $btn_text,
210
+ esc_html__( 'Create Gallery', 'carousel-slider' ),
211
+ esc_html__( 'Edit Gallery', 'carousel-slider' ),
212
+ esc_html__( 'Save Gallery', 'carousel-slider' ),
213
+ esc_html__( 'Saving...', 'carousel-slider' ),
214
+ esc_html__( 'Insert', 'carousel-slider' )
215
+ );
216
+ $html .= sprintf( '<ul class="carousel_slider_gallery_list">%s</ul>', $output );
217
+ $html .= '</div>';
218
+ $html .= $this->field_after();
219
+ echo $html;
220
+ }
221
 
222
+ /**
223
+ * Generate image gallery list from images URL
224
+ *
225
+ * @param array $args
226
+ */
227
+ public function images_url( array $args ) {
228
+ if ( ! isset( $args['id'], $args['name'] ) ) {
229
+ return;
230
+ }
231
+ list( $name, $value ) = $this->field_common( $args );
232
 
233
+ $btn_text = $value ? __( 'Edit URLs', 'carousel-slider' ) : __( 'Add URLs', 'carousel-slider' );
 
 
 
 
234
 
235
+ $html = $this->field_before( $args );
236
+ $html .= sprintf( '<a id="_images_urls_btn" class="button" href="#">%s</a>', $btn_text );
237
+ $html .= '<ul class="carousel_slider_url_images_list">';
238
+ if ( is_array( $value ) && count( $value ) > 0 ) {
239
+ foreach ( $value as $image ) {
240
+ $html .= sprintf( '<li><img src="%s" alt="%s" width="75" height="75"></li>', $image['url'], $image['alt'] );
241
+ }
242
+ }
243
+ $html .= '</ul>';
244
+ $html .= $this->field_after();
245
+ echo $html;
246
+ }
247
 
248
+ public function file( array $args ) {
249
+ if ( ! isset( $args['id'], $args['name'] ) ) {
250
+ return;
251
+ }
252
 
253
+ list( $name, $value ) = $this->field_common( $args );
254
 
255
+ echo $this->field_before( $args );
256
+ echo sprintf( '<input type="text" class="sp-input-text" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name );
257
+ echo sprintf( '<input type="button" class="button" id="carousel_slider_video_btn" value="%s">', __( 'Browse', 'carousel-slider' ) );
258
+ echo $this->field_after();
259
+ }
260
 
261
+ /**
262
+ * Generate image sizes dropdown from available image sizes
263
+ *
264
+ * @param array $args
265
+ */
266
+ public function image_sizes( array $args ) {
267
+ if ( ! isset( $args['id'], $args['name'] ) ) {
268
+ return;
269
+ }
270
 
271
+ list( $name, $value ) = $this->field_common( $args );
 
 
272
 
273
+ global $_wp_additional_image_sizes;
274
 
275
+ $sizes = array();
276
 
277
+ foreach ( get_intermediate_image_sizes() as $_size ) {
278
+ if ( in_array( $_size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {
 
279
 
280
+ $width = get_option( "{$_size}_size_w" );
281
+ $height = get_option( "{$_size}_size_h" );
282
+ $crop = (bool) get_option( "{$_size}_crop" ) ? 'hard' : 'soft';
283
 
284
+ $sizes[ $_size ] = "{$_size} - {$width}x{$height}";
285
 
286
+ } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
287
 
288
+ $width = $_wp_additional_image_sizes[ $_size ]['width'];
289
+ $height = $_wp_additional_image_sizes[ $_size ]['height'];
290
+ $crop = $_wp_additional_image_sizes[ $_size ]['crop'] ? 'hard' : 'soft';
 
 
 
 
 
 
291
 
292
+ $sizes[ $_size ] = "{$_size} - {$width}x{$height}";
293
+ }
294
+ }
295
 
296
+ $sizes = array_merge( $sizes, array( 'full' => 'original uploaded image' ) );
 
297
 
 
 
 
298
 
299
+ echo $this->field_before( $args );
300
+ echo sprintf( '<select name="%1$s" id="%2$s" class="select2 sp-input-text">', $name, $args['id'] );
301
+ foreach ( $sizes as $key => $option ) {
302
+ $selected = ( $value == $key ) ? ' selected="selected"' : '';
303
+ echo sprintf( '<option value="%1$s" %3$s>%2$s</option>', $key, $option, $selected );
304
+ }
305
+ echo '</select>';
306
+ echo $this->field_after();
307
  }
308
 
309
+ /**
310
+ * Get post terms drowdown list
311
+ *
312
+ * @param array $args
313
+ */
314
+ public function post_terms( array $args ) {
315
+ global $wp_version;
316
 
317
+ if ( ! isset( $args['id'], $args['name'] ) ) {
318
+ return;
319
+ }
320
+ list( $name, $value ) = $this->field_common( $args );
321
 
322
+ $value = explode( ',', strip_tags( rtrim( $value, ',' ) ) );
323
+ $multiple = isset( $args['multiple'] ) ? 'multiple' : '';
324
+ $taxonomy = isset( $args['taxonomy'] ) ? $args['taxonomy'] : 'category';
325
 
326
+ if ( version_compare( $wp_version, '4.5.0', '>=' ) ) {
327
+ $terms = get_terms( array( 'taxonomy' => $taxonomy ) );
328
+ } else {
329
+ $terms = get_terms( $taxonomy );
330
+ }
 
331
 
 
 
332
 
333
+ echo $this->field_before( $args );
 
 
 
 
 
 
334
 
335
+ echo sprintf( '<select name="%1$s" id="%2$s" class="select2 sp-input-text" %3$s>', $name, $args['id'], $multiple );
 
 
 
336
 
337
+ foreach ( $terms as $term ) {
338
+ $title = sprintf( '%s (%s)', $term->name, $term->count );
339
+ $selected = in_array( $term->term_id, $value ) ? ' selected="selected"' : '';
340
+ echo sprintf( '<option value="%1$s" %3$s>%2$s</option>', $term->term_id, $title, $selected );
341
+ }
342
+ echo '</select>';
343
 
344
+ echo $this->field_after();
345
+ }
346
+
347
+ /**
348
+ * Generate field name and field value
349
+ *
350
+ * @param $args
351
+ *
352
+ * @return array
353
+ */
354
+ private function field_common( $args ) {
355
+ global $post;
356
+ // Meta Name
357
+ $group = isset( $args['group'] ) ? $args['group'] : 'carousel_slider';
358
+ $multiple = isset( $args['multiple'] ) ? '[]' : '';
359
+ $name = sprintf( '%s[%s]%s', $group, $args['id'], $multiple );
360
+
361
+ // Meta Value
362
+ $std_value = isset( $args['std'] ) ? $args['std'] : '';
363
+ $meta = get_post_meta( $post->ID, $args['id'], true );
364
+ $value = ! empty( $meta ) ? $meta : $std_value;
365
+
366
+ if ( $value == 'zero' ) {
367
+ $value = 0;
368
+ }
369
 
370
+ return array( $name, $value );
 
 
 
 
 
 
371
  }
 
 
 
 
372
 
373
+ /**
374
+ * Generate field before template
375
+ *
376
+ * @param $args
377
+ *
378
+ * @return string
379
+ */
380
+ private function field_before( $args ) {
381
+ $table = sprintf( '<div class="sp-input-group" id="field-%s">', $args['id'] );
382
+ $table .= sprintf( '<div class="sp-input-label">' );
383
+ $table .= sprintf( '<label for="%1$s">%2$s</label>', $args['id'], $args['name'] );
384
+ if ( ! empty( $args['desc'] ) ) {
385
+ $table .= sprintf( '<p class="sp-input-desc">%s</p>', $args['desc'] );
386
+ }
387
+ $table .= '</div>';
388
+ $table .= sprintf( '<div class="sp-input-field">' );
389
+
390
+ return $table;
391
+ }
392
+
393
+ /**
394
+ * Generate field after template
395
+ *
396
+ * @return string
397
+ */
398
+ private function field_after() {
399
+ return '</div></div>';
400
+ }
401
  }
 
402
 
403
  endif;
includes/class-carousel-slider-i18n.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+ /**
7
+ * Define the internationalization functionality.
8
+ *
9
+ * Loads and defines the internationalization files for this plugin
10
+ * so that it is ready for translation.
11
+ *
12
+ * @class Carousel_Slider_i8n
13
+ * @since 1.7.3
14
+ * @author Sayful Islam <sayful.islam001@gmail.com>
15
+ */
16
+ if ( ! class_exists( 'Carousel_Slider_i8n' ) ):
17
+
18
+ class Carousel_Slider_i8n {
19
+ protected static $instance = null;
20
+ protected $plugin_name = 'carousel-slider';
21
+
22
+ /**
23
+ * Ensures only one instance of this class is loaded or can be loaded.
24
+ *
25
+ * @return Carousel_Slider_i8n
26
+ */
27
+ public static function init() {
28
+ if ( is_null( self::$instance ) ) {
29
+ self::$instance = new self();
30
+ }
31
+
32
+ return self::$instance;
33
+ }
34
+
35
+ public function __construct() {
36
+ add_action( 'init', array( $this, 'load_textdomain' ) );
37
+ }
38
+
39
+ /**
40
+ * Load plugin textdomain
41
+ */
42
+ public function load_textdomain() {
43
+ $locale_file = sprintf( '%1$s-%2$s.mo', 'carousel-slider', get_locale() );
44
+ $global_file = join( DIRECTORY_SEPARATOR, array( WP_LANG_DIR, 'carousel-slider', $locale_file ) );
45
+
46
+ // Look in global /wp-content/languages/carousel-slider folder
47
+ if ( file_exists( $global_file ) ) {
48
+ load_textdomain( $this->plugin_name, $global_file );
49
+ }
50
+ }
51
+ }
52
+
53
+ endif;
54
+
55
+ Carousel_Slider_i8n::init();
includes/class-carousel-slider-meta-box.php ADDED
@@ -0,0 +1,393 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! class_exists( 'Carousel_Slider_Meta_Box' ) ):
4
+
5
+ class Carousel_Slider_Meta_Box {
6
+
7
+ protected static $instance = null;
8
+ private $post_type = 'carousels';
9
+ private $form;
10
+
11
+ /**
12
+ * Ensures only one instance of this class is loaded or can be loaded.
13
+ *
14
+ * @return Carousel_Slider_Meta_Box
15
+ */
16
+ public static function init() {
17
+ if ( is_null( self::$instance ) ) {
18
+ self::$instance = new self();
19
+ }
20
+
21
+ return self::$instance;
22
+ }
23
+
24
+ public function __construct() {
25
+ add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
26
+ }
27
+
28
+ /**
29
+ * Add carousel slider meta box
30
+ */
31
+ public function add_meta_boxes() {
32
+ add_meta_box(
33
+ "carousel-slider-usages-info",
34
+ __( "Usage (Shortcode)", 'carousel-slider' ),
35
+ array( $this, 'usages_callback' ),
36
+ "carousels",
37
+ "side",
38
+ "high"
39
+ );
40
+ add_meta_box(
41
+ "carousel-slider-navigation-settings",
42
+ __( "Navigation Settings", 'carousel-slider' ),
43
+ array( $this, 'navigation_settings_callback' ),
44
+ $this->post_type,
45
+ "side",
46
+ "low"
47
+ );
48
+ add_meta_box(
49
+ "carousel-slider-autoplay-settings",
50
+ __( "Autoplay Settings", 'carousel-slider' ),
51
+ array( $this, 'autoplay_settings_callback' ),
52
+ $this->post_type,
53
+ "side",
54
+ "low"
55
+ );
56
+ add_meta_box(
57
+ "carousel-slider-responsive-settings",
58
+ __( "Responsive Settings", 'carousel-slider' ),
59
+ array( $this, 'responsive_settings_callback' ),
60
+ $this->post_type,
61
+ "side",
62
+ "low"
63
+ );
64
+ add_meta_box(
65
+ "carousel-slider-general-settings",
66
+ __( "General Settings", 'carousel-slider' ),
67
+ array( $this, 'general_settings_callback' ),
68
+ $this->post_type,
69
+ "advanced",
70
+ "low"
71
+ );
72
+ }
73
+
74
+ /**
75
+ * @param WP_Post $post
76
+ */
77
+ public function general_settings_callback( $post ) {
78
+ $this->form = new Carousel_Slider_Form();
79
+ require_once CAROUSEL_SLIDER_TEMPLATES . '/admin/general.php';
80
+ }
81
+
82
+ /**
83
+ * Render short code meta box content
84
+ *
85
+ * @param WP_Post $post
86
+ */
87
+ public function usages_callback( $post ) {
88
+ ob_start(); ?>
89
+ <p><strong>
90
+ <?php esc_html_e( 'Copy the following shortcode and paste in post or page where you want to show.', 'carousel-slider' ); ?>
91
+ </strong>
92
+ </p>
93
+ <input
94
+ type="text"
95
+ onmousedown="this.clicked = 1;"
96
+ onfocus="if (!this.clicked) this.select(); else this.clicked = 2;"
97
+ onclick="if (this.clicked === 2) this.select(); this.clicked = 0;"
98
+ value="[carousel_slide id='<?php echo $post->ID; ?>']"
99
+ style="background-color: #f1f1f1; width: 100%; padding: 8px;"
100
+ >
101
+ <?php echo ob_get_clean();
102
+ }
103
+
104
+ public function navigation_settings_callback( $post ) {
105
+ $_nav_button = get_post_meta( $post->ID, '_nav_button', true );
106
+ $_nav_button = in_array( $_nav_button, array( 'on', 'off', 'always' ) ) ? $_nav_button : 'on';
107
+
108
+ $_dot_nav = get_post_meta( $post->ID, '_dot_nav', true );
109
+ $_dot_nav = in_array( $_dot_nav, array( 'on', 'off', 'hover' ) ) ? $_dot_nav : 'off';
110
+
111
+ $_slide_by = get_post_meta( $post->ID, '_slide_by', true );
112
+ $_slide_by = empty( $_slide_by ) ? 1 : $_slide_by;
113
+
114
+ $_nav_color = get_post_meta( $post->ID, '_nav_color', true );
115
+ $_nav_color = empty( $_nav_color ) ? '#f1f1f1' : $_nav_color;
116
+
117
+ $_nav_active_color = get_post_meta( $post->ID, '_nav_active_color', true );
118
+ $_nav_active_color = empty( $_nav_active_color ) ? '#00d1b2' : $_nav_active_color;
119
+
120
+ $_arrow_position = get_post_meta( $post->ID, '_arrow_position', true );
121
+ $_arrow_position = empty( $_arrow_position ) ? 'outside' : $_arrow_position;
122
+
123
+ $_arrow_size = get_post_meta( $post->ID, '_arrow_size', true );
124
+ $_arrow_size = empty( $_arrow_size ) ? 48 : absint( $_arrow_size );
125
+
126
+ $_bullet_size = get_post_meta( $post->ID, '_bullet_size', true );
127
+ $_bullet_size = empty( $_bullet_size ) ? 10 : absint( $_bullet_size );
128
+
129
+ $_bullet_position = get_post_meta( $post->ID, '_bullet_position', true );
130
+ $_bullet_position = empty( $_bullet_position ) ? 'center' : $_bullet_position;
131
+
132
+ $_bullet_shape = get_post_meta( $post->ID, '_bullet_shape', true );
133
+ $_bullet_shape = empty( $_bullet_shape ) ? 'square' : $_bullet_shape;
134
+ ?>
135
+ <p>
136
+ <label for="_nav_button">
137
+ <strong><?php esc_html_e( 'Show Arrow Nav', 'carousel-slider' ); ?></strong>
138
+ </label>
139
+ <select name="carousel_slider[_nav_button]" id="_nav_button" class="small-text">
140
+ <option value="off" <?php selected( $_nav_button, 'off' ); ?>><?php esc_html_e( 'Never', 'carousel-slider' ); ?></option>
141
+ <option value="on" <?php selected( $_nav_button, 'on' ); ?>><?php esc_html_e( 'Mouse Over', 'carousel-slider' ); ?></option>
142
+ <option value="always" <?php selected( $_nav_button, 'always' ); ?>><?php esc_html_e( 'Always', 'carousel-slider' ); ?></option>
143
+ </select>
144
+ <span class="cs-tooltip"
145
+ title="<?php esc_html_e( 'Choose when to show arrow navigator.', 'carousel-slider' ); ?>"></span>
146
+ </p><!-- Show Arrow Nav -->
147
+ <p>
148
+ <label for="_slide_by">
149
+ <strong><?php esc_html_e( 'Arrow Steps', 'carousel-slider' ); ?></strong>
150
+ </label>
151
+ <input class="small-text" id="_slide_by" name="carousel_slider[_slide_by]" type="text"
152
+ value="<?php echo esc_attr( $_slide_by ); ?>">
153
+ <span class="cs-tooltip"
154
+ title="<?php esc_html_e( 'Steps to go for each navigation request. Write "page" with inverted comma to slide by page.', 'carousel-slider' ); ?>"></span>
155
+ </p><!-- Arrow Steps -->
156
+ <p>
157
+ <label for="_arrow_position">
158
+ <strong><?php esc_html_e( 'Arrow Position', 'carousel-slider' ); ?></strong>
159
+ </label>
160
+ <select name="carousel_slider[_arrow_position]" id="_arrow_position" class="small-text">
161
+ <option value="outside" <?php selected( $_arrow_position, 'outside' ); ?>><?php esc_html_e( 'Outside', 'carousel-slider' ); ?></option>
162
+ <option value="inside" <?php selected( $_arrow_position, 'inside' ); ?>><?php esc_html_e( 'Inside', 'carousel-slider' ); ?></option>
163
+ </select>
164
+ <span class="cs-tooltip"
165
+ title="<?php esc_html_e( 'Choose where to show arrow. Inside slider or outside slider.', 'carousel-slider' ); ?>"></span>
166
+ </p><!-- Arrow Position -->
167
+ <p>
168
+ <label for="_arrow_size">
169
+ <strong><?php esc_html_e( 'Arrow Size', 'carousel-slider' ); ?></strong>
170
+ </label>
171
+ <input class="small-text" id="_arrow_size" name="carousel_slider[_arrow_size]" type="number"
172
+ value="<?php echo $_arrow_size; ?>">
173
+ <span class="cs-tooltip"
174
+ title="<?php esc_html_e( 'Enter arrow size in pixels.', 'carousel-slider' ); ?>"></span>
175
+ </p><!-- Arrow Size -->
176
+
177
+ <hr>
178
+ <p>
179
+ <label for="_dot_nav">
180
+ <strong><?php esc_html_e( 'Show Bullet Nav', 'carousel-slider' ); ?></strong>
181
+ </label>
182
+ <select name="carousel_slider[_dot_nav]" id="_dot_nav" class="small-text">
183
+ <option value="off" <?php selected( $_dot_nav, 'off' ); ?>><?php esc_html_e( 'Never', 'carousel-slider' ); ?></option>
184
+ <option value="on" <?php selected( $_dot_nav, 'on' ); ?>><?php esc_html_e( 'Always', 'carousel-slider' ); ?></option>
185
+ <option value="hover" <?php selected( $_dot_nav, 'hover' ); ?>><?php esc_html_e( 'Mouse Over', 'carousel-slider' ); ?></option>
186
+ </select>
187
+ <span class="cs-tooltip"
188
+ title="<?php esc_html_e( 'Choose when to show bullet navigator.', 'carousel-slider' ); ?>"></span>
189
+ </p><!-- Show Bullet Nav -->
190
+ <p>
191
+ <label for="_bullet_position">
192
+ <strong><?php esc_html_e( 'Bullet Position', 'carousel-slider' ); ?></strong>
193
+ </label>
194
+ <select name="carousel_slider[_bullet_position]" id="_bullet_position" class="small-text">
195
+ <option value="left" <?php selected( $_bullet_position, 'left' ); ?>><?php esc_html_e( 'Left', 'carousel-slider' ); ?></option>
196
+ <option value="center" <?php selected( $_bullet_position, 'center' ); ?>><?php esc_html_e( 'Center', 'carousel-slider' ); ?></option>
197
+ <option value="right" <?php selected( $_bullet_position, 'right' ); ?>><?php esc_html_e( 'Right', 'carousel-slider' ); ?></option>
198
+ </select>
199
+ <span class="cs-tooltip"
200
+ title="<?php esc_html_e( 'Choose where to show bullets.', 'carousel-slider' ); ?>"></span>
201
+ </p><!-- Arrow Position -->
202
+ <p>
203
+ <label for="_bullet_size">
204
+ <strong><?php esc_html_e( 'Bullet Size', 'carousel-slider' ); ?></strong>
205
+ </label>
206
+ <input class="small-text" id="_bullet_size" name="carousel_slider[_bullet_size]" type="number"
207
+ value="<?php echo $_bullet_size; ?>">
208
+ <span class="cs-tooltip"
209
+ title="<?php esc_html_e( 'Enter bullet size in pixels.', 'carousel-slider' ); ?>"></span>
210
+ </p><!-- Arrow Size -->
211
+ <p>
212
+ <label for="_bullet_shape">
213
+ <strong><?php esc_html_e( 'Bullet Shape', 'carousel-slider' ); ?></strong>
214
+ </label>
215
+ <select name="carousel_slider[_bullet_shape]" id="_bullet_shape" class="small-text">
216
+ <option value="square" <?php selected( $_bullet_shape, 'square' ); ?>><?php esc_html_e( 'Square', 'carousel-slider' ); ?></option>
217
+ <option value="circle" <?php selected( $_bullet_shape, 'circle' ); ?>><?php esc_html_e( 'Circle', 'carousel-slider' ); ?></option>
218
+ </select>
219
+ <span class="cs-tooltip"
220
+ title="<?php esc_html_e( 'Choose bullet nav shape.', 'carousel-slider' ); ?>"></span>
221
+ </p><!-- Arrow Position -->
222
+
223
+ <hr>
224
+ <p>
225
+ <label for="_nav_color">
226
+ <strong><?php esc_html_e( 'Arrows & Dots Color', 'carousel-slider' ); ?></strong>
227
+ </label>
228
+ <span class="cs-tooltip"
229
+ title="<?php esc_html_e( 'Pick a color for navigation and dots.', 'carousel-slider' ); ?>"></span>
230
+ <br>
231
+ <input type="text" class="color-picker" value="<?php echo $_nav_color; ?>" id="_nav_color"
232
+ name="carousel_slider[_nav_color]" data-alpha="true" data-default-color="#f1f1f1">
233
+ </p><!-- Arrows & Dots Color -->
234
+
235
+ <p>
236
+ <label for="_nav_active_color">
237
+ <strong><?php esc_html_e( 'Arrows & Dots Hover Color', 'carousel-slider' ); ?></strong>
238
+ </label>
239
+ <span class="cs-tooltip"
240
+ title="<?php esc_html_e( 'Pick a color for navigation and dots for active and hover effect.', 'carousel-slider' ); ?>"></span>
241
+ <br>
242
+ <input type="text" class="color-picker" value="<?php echo $_nav_active_color; ?>" id="_nav_active_color"
243
+ name="carousel_slider[_nav_active_color]" data-alpha="true" data-default-color="#00d1b2">
244
+ </p><!-- Arrows & Dots Hover Color -->
245
+ <?php
246
+ }
247
+
248
+ /**
249
+ * @param WP_Post $post
250
+ */
251
+ public function autoplay_settings_callback( $post ) {
252
+ $_autoplay = get_post_meta( $post->ID, '_autoplay', true );
253
+ $_autoplay = in_array( $_autoplay, array( 'on', 'off' ) ) ? $_autoplay : 'on';
254
+ $_autoplay_pause = get_post_meta( $post->ID, '_autoplay_pause', true );
255
+ $_autoplay_pause = in_array( $_autoplay_pause, array( 'on', 'off' ) ) ? $_autoplay : 'off';
256
+ $_autoplay_timeout = get_post_meta( $post->ID, '_autoplay_timeout', true );
257
+ $_autoplay_timeout = $_autoplay_timeout ? absint( $_autoplay_timeout ) : 5000;
258
+ $_autoplay_speed = get_post_meta( $post->ID, '_autoplay_speed', true );
259
+ $_autoplay_speed = $_autoplay_speed ? absint( $_autoplay_speed ) : 500;
260
+ ?>
261
+ <p>
262
+ <label for="_autoplay">
263
+ <strong><?php esc_html_e( 'AutoPlay', 'carousel-slider' ); ?></strong>
264
+ </label>
265
+ <select name="carousel_slider[_autoplay]" id="_autoplay" class="small-text">
266
+ <option value="on" <?php selected( $_autoplay, 'on' ); ?>><?php esc_html_e( 'Enable', 'carousel-slider' ); ?></option>
267
+ <option value="off" <?php selected( $_autoplay, 'off' ); ?>><?php esc_html_e( 'Disable', 'carousel-slider' ); ?></option>
268
+ </select>
269
+ <span class="cs-tooltip"
270
+ title="<?php esc_html_e( 'Choose whether slideshow should play automatically.', 'carousel-slider' ); ?>"></span>
271
+ </p>
272
+ <p>
273
+ <label for="_autoplay_pause">
274
+ <strong><?php esc_html_e( 'Pause On Hover', 'carousel-slider' ); ?></strong>
275
+ </label>
276
+ <select name="carousel_slider[_autoplay_pause]" id="_autoplay_pause" class="small-text">
277
+ <option value="on" <?php selected( $_autoplay_pause, 'on' ); ?>><?php esc_html_e( 'Enable', 'carousel-slider' ); ?></option>
278
+ <option value="off" <?php selected( $_autoplay_pause, 'off' ); ?>><?php esc_html_e( 'Disable', 'carousel-slider' ); ?></option>
279
+ </select>
280
+ <span class="cs-tooltip"
281
+ title="<?php esc_html_e( 'Pause automatic play on mouse hover.', 'carousel-slider' ); ?>"></span>
282
+ </p>
283
+ <p>
284
+ <label for="_autoplay_timeout">
285
+ <strong><?php esc_html_e( 'Autoplay Timeout', 'carousel-slider' ); ?></strong>
286
+ </label>
287
+ <input type="number" name="carousel_slider[_autoplay_timeout]" id="_autoplay_timeout" class="small-text"
288
+ value="<?php echo $_autoplay_timeout; ?>">
289
+ <span class="cs-tooltip"
290
+ title="<?php esc_html_e( 'Automatic play interval timeout in millisecond. Default: 5000', 'carousel-slider' ); ?>"></span>
291
+ </p><!-- Autoplay Timeout -->
292
+ <p>
293
+ <label for="_autoplay_speed">
294
+ <strong><?php esc_html_e( 'Autoplay Speed', 'carousel-slider' ); ?></strong>
295
+ </label>
296
+ <input type="number" name="carousel_slider[_autoplay_speed]" id="_autoplay_speed" class="small-text"
297
+ value="<?php echo $_autoplay_speed; ?>">
298
+ <span class="cs-tooltip"
299
+ title="<?php esc_html_e( 'Automatic play speed in millisecond. Default: 500', 'carousel-slider' ); ?>"></span>
300
+ </p><!-- Columns -->
301
+ <?php
302
+ }
303
+
304
+ /**
305
+ * Renders the meta box.
306
+ *
307
+ * @param WP_Post $post
308
+ */
309
+ public function responsive_settings_callback( $post ) {
310
+ $_items = get_post_meta( $post->ID, '_items', true );
311
+ $_items = $_items ? absint( $_items ) : 4;
312
+
313
+ $_items_desktop = get_post_meta( $post->ID, '_items_desktop', true );
314
+ $_items_desktop = $_items_desktop ? absint( $_items_desktop ) : 4;
315
+
316
+ $_items_small_desktop = get_post_meta( $post->ID, '_items_small_desktop', true );
317
+ $_items_small_desktop = $_items_small_desktop ? absint( $_items_small_desktop ) : 4;
318
+
319
+ $_items_tablet = get_post_meta( $post->ID, '_items_portrait_tablet', true );
320
+ $_items_tablet = $_items_tablet ? absint( $_items_tablet ) : 3;
321
+
322
+ $_items_small_tablet = get_post_meta( $post->ID, '_items_small_portrait_tablet', true );
323
+ $_items_small_tablet = $_items_small_tablet ? absint( $_items_small_tablet ) : 2;
324
+
325
+ $_items_mobile = get_post_meta( $post->ID, '_items_portrait_mobile', true );
326
+ $_items_mobile = $_items_mobile ? absint( $_items_mobile ) : 1;
327
+ ?>
328
+ <p>
329
+ <label for="_items">
330
+ <strong><?php esc_html_e( 'Columns', 'carousel-slider' ); ?></strong>
331
+ </label>
332
+ <input type="number" name="carousel_slider[_items]" id="_items" class="small-text"
333
+ value="<?php echo $_items; ?>">
334
+ <span class="cs-tooltip"
335
+ title="<?php esc_html_e( 'The number of items you want to see on the Extra Large Desktop Layout (Screens size greater than 1921 pixels DP)', 'carousel-slider' ); ?>"></span>
336
+ </p><!-- Columns -->
337
+ <p>
338
+ <label for="_items_desktop">
339
+ <strong><?php esc_html_e( 'Columns : Desktop', 'carousel-slider' ); ?></strong>
340
+ </label>
341
+ <input type="number" name="carousel_slider[_items_desktop]" id="_items_desktop" class="small-text"
342
+ value="<?php echo $_items_desktop; ?>">
343
+ <span class="cs-tooltip"
344
+ title="<?php esc_html_e( 'The number of items you want to see on the Desktop Layout (Screens size from 1200 pixels DP to 1920 pixels DP)', 'carousel-slider' ); ?>"></span>
345
+ </p><!-- Columns : Desktop -->
346
+ <p>
347
+ <label for="_items_small_desktop">
348
+ <strong><?php esc_html_e( 'Columns : Small Desktop', 'carousel-slider' ); ?></strong>
349
+ </label>
350
+ <input type="number" name="carousel_slider[_items_small_desktop]" id="_items_small_desktop"
351
+ class="small-text"
352
+ value="<?php echo $_items_small_desktop; ?>">
353
+ <span class="cs-tooltip"
354
+ title="<?php esc_html_e( 'The number of items you want to see on the Small Desktop Layout (Screens size from 993 pixels DP to 1199 pixels DP)', 'carousel-slider' ); ?>"></span>
355
+ </p><!-- Columns : Small Desktop -->
356
+ <p>
357
+ <label for="_items_portrait_tablet">
358
+ <strong><?php esc_html_e( 'Columns : Tablet', 'carousel-slider' ); ?></strong>
359
+ </label>
360
+ <input type="number" name="carousel_slider[_items_portrait_tablet]" id="_items_portrait_tablet"
361
+ class="small-text"
362
+ value="<?php echo $_items_tablet; ?>">
363
+ <span class="cs-tooltip"
364
+ title="<?php esc_html_e( 'The number of items you want to see on the Tablet Layout (Screens size from 768 pixels DP to 992 pixels DP)', 'carousel-slider' ); ?>"></span>
365
+ </p><!-- Columns : Tablet -->
366
+ <p>
367
+ <label for="_items_small_portrait_tablet">
368
+ <strong><?php esc_html_e( 'Columns : Small Tablet', 'carousel-slider' ); ?></strong>
369
+ </label>
370
+ <input type="number" name="carousel_slider[_items_small_portrait_tablet]"
371
+ id="_items_small_portrait_tablet"
372
+ class="small-text"
373
+ value="<?php echo $_items_small_tablet; ?>">
374
+ <span class="cs-tooltip"
375
+ title="<?php esc_html_e( 'The number of items you want to see on the Small Tablet Layout(Screens size from 600 pixels DP to 767 pixels DP)', 'carousel-slider' ); ?>"></span>
376
+ </p><!-- Columns : Small Tablet -->
377
+ <p>
378
+ <label for="_items_portrait_mobile">
379
+ <strong><?php esc_html_e( 'Columns : Mobile', 'carousel-slider' ); ?></strong>
380
+ </label>
381
+ <input type="number" name="carousel_slider[_items_portrait_mobile]"
382
+ id="_items_portrait_mobile"
383
+ class="small-text"
384
+ value="<?php echo $_items_mobile; ?>">
385
+ <span class="cs-tooltip"
386
+ title="<?php esc_html_e( 'The number of items you want to see on the Mobile Layout (Screens size from 320 pixels DP to 599 pixels DP)', 'carousel-slider' ); ?>"></span>
387
+ </p><!-- Columns : Mobile -->
388
+ <?php
389
+ }
390
+ }
391
+ endif;
392
+
393
+ Carousel_Slider_Meta_Box::init();
includes/class-carousel-slider-number-to-word.php ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Convert a number into English text.
5
+ */
6
+ class Carousel_Slider_Number_To_Word {
7
+
8
+ /**
9
+ * Carousel_Slider_Number_To_Word constructor.
10
+ *
11
+ * @param null $number
12
+ */
13
+ public function __construct( $number = null ) {
14
+ if ( is_integer( $number ) ) {
15
+ return $this->convert( $number );
16
+ }
17
+ }
18
+
19
+ /**
20
+ * Convert number into english word
21
+ *
22
+ * @param $number
23
+ *
24
+ * @return string
25
+ */
26
+ public function convert( $number ) {
27
+ $split_string = explode( ".", (string) $number );
28
+ $integer = isset( $split_string[0] ) ? $split_string[0] : null;
29
+ $fraction = isset( $split_string[1] ) ? $split_string[1] : null;
30
+ // list( $integer, $fraction ) = explode( ".", (string) $number );
31
+
32
+ $output = "";
33
+
34
+ if ( $integer{0} == "-" ) {
35
+ $output = "negative ";
36
+ $integer = ltrim( $integer, "-" );
37
+ } else if ( $integer{0} == "+" ) {
38
+ $output = "positive ";
39
+ $integer = ltrim( $integer, "+" );
40
+ }
41
+
42
+ if ( $integer{0} == "0" ) {
43
+ $output .= "zero";
44
+ } else {
45
+ $integer = str_pad( $integer, 36, "0", STR_PAD_LEFT );
46
+ $group = rtrim( chunk_split( $integer, 3, " " ), " " );
47
+ $groups = explode( " ", $group );
48
+
49
+ $groups2 = array();
50
+ foreach ( $groups as $g ) {
51
+ $groups2[] = $this->convert_three_digit( $g{0}, $g{1}, $g{2} );
52
+ }
53
+
54
+ for ( $z = 0; $z < count( $groups2 ); $z ++ ) {
55
+ if ( $groups2[ $z ] != "" ) {
56
+ $output .= $groups2[ $z ] . $this->convert_group( 11 - $z ) . (
57
+ $z < 11
58
+ && ! array_search( '', array_slice( $groups2, $z + 1, - 1 ) )
59
+ && $groups2[11] != ''
60
+ && $groups[11]{0} == '0'
61
+ ? " and "
62
+ : ", "
63
+ );
64
+ }
65
+ }
66
+
67
+ $output = rtrim( $output, ", " );
68
+ }
69
+
70
+ if ( $fraction > 0 ) {
71
+ $output .= " point";
72
+ for ( $i = 0; $i < strlen( $fraction ); $i ++ ) {
73
+ $output .= " " . $this->convert_digit( $fraction{$i} );
74
+ }
75
+ }
76
+
77
+ return $output;
78
+ }
79
+
80
+ /**
81
+ * Convert three digits into english word
82
+ *
83
+ * @param $digit1
84
+ * @param $digit2
85
+ * @param $digit3
86
+ *
87
+ * @return string
88
+ */
89
+ private function convert_three_digit( $digit1, $digit2, $digit3 ) {
90
+ $buffer = "";
91
+
92
+ if ( $digit1 == "0" && $digit2 == "0" && $digit3 == "0" ) {
93
+ return "";
94
+ }
95
+
96
+ if ( $digit1 != "0" ) {
97
+ $buffer .= $this->convert_digit( $digit1 ) . " hundred";
98
+ if ( $digit2 != "0" || $digit3 != "0" ) {
99
+ $buffer .= " and ";
100
+ }
101
+ }
102
+
103
+ if ( $digit2 != "0" ) {
104
+ $buffer .= $this->convert_two_digit( $digit2, $digit3 );
105
+ } else if ( $digit3 != "0" ) {
106
+ $buffer .= $this->convert_digit( $digit3 );
107
+ }
108
+
109
+ return $buffer;
110
+ }
111
+
112
+ /**
113
+ * Convert single digit into english word
114
+ *
115
+ * @param $digit
116
+ *
117
+ * @return string
118
+ */
119
+ private function convert_digit( $digit ) {
120
+ switch ( $digit ) {
121
+ case "0":
122
+ return "zero";
123
+ case "1":
124
+ return "one";
125
+ case "2":
126
+ return "two";
127
+ case "3":
128
+ return "three";
129
+ case "4":
130
+ return "four";
131
+ case "5":
132
+ return "five";
133
+ case "6":
134
+ return "six";
135
+ case "7":
136
+ return "seven";
137
+ case "8":
138
+ return "eight";
139
+ case "9":
140
+ return "nine";
141
+ }
142
+ }
143
+
144
+ /**
145
+ * Convert two digits into english word
146
+ *
147
+ * @param $digit1
148
+ * @param $digit2
149
+ *
150
+ * @return string
151
+ */
152
+ private function convert_two_digit( $digit1, $digit2 ) {
153
+ if ( $digit2 == "0" ) {
154
+ switch ( $digit1 ) {
155
+ case "1":
156
+ return "ten";
157
+ case "2":
158
+ return "twenty";
159
+ case "3":
160
+ return "thirty";
161
+ case "4":
162
+ return "forty";
163
+ case "5":
164
+ return "fifty";
165
+ case "6":
166
+ return "sixty";
167
+ case "7":
168
+ return "seventy";
169
+ case "8":
170
+ return "eighty";
171
+ case "9":
172
+ return "ninety";
173
+ }
174
+ } else if ( $digit1 == "1" ) {
175
+ switch ( $digit2 ) {
176
+ case "1":
177
+ return "eleven";
178
+ case "2":
179
+ return "twelve";
180
+ case "3":
181
+ return "thirteen";
182
+ case "4":
183
+ return "fourteen";
184
+ case "5":
185
+ return "fifteen";
186
+ case "6":
187
+ return "sixteen";
188
+ case "7":
189
+ return "seventeen";
190
+ case "8":
191
+ return "eighteen";
192
+ case "9":
193
+ return "nineteen";
194
+ }
195
+ } else {
196
+ $temp = $this->convert_digit( $digit2 );
197
+ switch ( $digit1 ) {
198
+ case "2":
199
+ return "twenty-$temp";
200
+ case "3":
201
+ return "thirty-$temp";
202
+ case "4":
203
+ return "forty-$temp";
204
+ case "5":
205
+ return "fifty-$temp";
206
+ case "6":
207
+ return "sixty-$temp";
208
+ case "7":
209
+ return "seventy-$temp";
210
+ case "8":
211
+ return "eighty-$temp";
212
+ case "9":
213
+ return "ninety-$temp";
214
+ }
215
+ }
216
+ }
217
+
218
+ /**
219
+ * Convert group into english word
220
+ *
221
+ * @param $index
222
+ *
223
+ * @return string
224
+ */
225
+ private function convert_group( $index ) {
226
+ switch ( $index ) {
227
+ case 11:
228
+ return " decillion";
229
+ case 10:
230
+ return " nonillion";
231
+ case 9:
232
+ return " octillion";
233
+ case 8:
234
+ return " septillion";
235
+ case 7:
236
+ return " sextillion";
237
+ case 6:
238
+ return " quintrillion";
239
+ case 5:
240
+ return " quadrillion";
241
+ case 4:
242
+ return " trillion";
243
+ case 3:
244
+ return " billion";
245
+ case 2:
246
+ return " million";
247
+ case 1:
248
+ return " thousand";
249
+ case 0:
250
+ return "";
251
+ }
252
+ }
253
+ }
includes/class-carousel-slider-product.php CHANGED
@@ -1,83 +1,517 @@
1
  <?php
2
- if ( ! class_exists('Carousel_Slider_Product')):
3
-
4
- class Carousel_Slider_Product
5
- {
6
- public function __construct()
7
- {
8
- add_action( 'wp_ajax_carousel_slider_quick_view', array( $this, 'quick_view') );
9
- add_action( 'wp_ajax_nopriv_carousel_slider_quick_view', array( $this, 'quick_view') );
10
- }
 
 
 
 
 
 
 
 
 
11
 
12
- public function quick_view()
13
- {
14
- if ( ! isset($_GET['_wpnonce'], $_GET['product_id'], $_GET['slide_id'])) {
15
- wp_die();
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
- if ( ! wp_verify_nonce($_GET['_wpnonce'], 'carousel_slider_quick_view')) {
19
- wp_die();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
 
22
- global $product;
23
- $product = get_product( $_GET['product_id'] );
 
 
 
 
 
 
 
 
24
 
25
- ?>
26
- <div id="pmid-<?php echo intval($_GET['slide_id']); ?>" class="product carousel-slider__product-modal">
 
 
 
27
 
28
- <div class="images">
29
- <?php echo get_the_post_thumbnail( $product->id, 'medium_large' ); ?>
30
- <?php if ( $product->is_on_sale() ) : ?>
31
- <?php echo apply_filters( 'woocommerce_sale_flash', '<span class="onsale">' . __( 'Sale!', 'carousel-slider' ) . '</span>', $post, $product ); ?>
32
- <?php endif; ?>
33
- </div>
34
 
35
- <div class="summary entry-summary">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- <h1 class="product_title entry-title">
38
- <?php echo esc_attr($product->get_title()); ?>
39
- </h1>
 
 
 
 
40
 
41
- <div class="woocommerce-product-rating">
42
- <?php
43
- if($product->get_rating_html()){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  echo $product->get_rating_html();
45
  }
46
- ?>
47
- </div>
48
 
49
- <div class="price">
50
- <?php
51
- if($product->get_price_html()){
52
  echo $product->get_price_html();
53
  }
54
- ?>
55
- </div>
56
 
57
- <div class="description">
58
- <?php
59
  echo '<div style="clear: both;"></div>';
60
  echo apply_filters( 'woocommerce_short_description', $product->post->post_excerpt );
61
- ?>
62
- </div>
63
 
64
- <div>
65
- <?php
66
- // Show button
67
  echo '<div style="clear: both;"></div>';
68
- if ( function_exists('woocommerce_template_loop_add_to_cart')) {
69
  woocommerce_template_loop_add_to_cart();
70
  }
71
- ?>
72
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
- </div>
75
- </div>
76
- <?php
77
- wp_die();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
79
- }
80
 
81
- new Carousel_Slider_Product();
82
 
83
- endif;
 
 
1
  <?php
2
+ /**!
3
+ * @package Carousel_Slider
4
+ * @subpackage Carousel_Slider_Product
5
+ *
6
+ * @method init()
7
+ * @method wish_list_button()
8
+ * @method quick_view_button()
9
+ * @method quick_view()
10
+ * @method products()
11
+ * @method recent_products()
12
+ * @method best_selling_products()
13
+ * @method featured_products()
14
+ * @method sale_products()
15
+ * @method top_rated_products()
16
+ * @method product_categories()
17
+ * @method products_by_categories()
18
+ * @method products_by_tags()
19
+ */
20
 
21
+ if ( ! class_exists( 'Carousel_Slider_Product' ) ):
22
+
23
+ class Carousel_Slider_Product {
24
+
25
+ /**
26
+ * Product carousel quick view
27
+ */
28
+ public static function init() {
29
+ add_action( 'carousel_slider_after_shop_loop_item', array( __CLASS__, 'wish_list_button' ), 12, 2 );
30
+ add_action( 'carousel_slider_after_shop_loop_item', array( __CLASS__, 'quick_view_button' ), 10, 2 );
31
+
32
+ add_action( 'wp_ajax_carousel_slider_quick_view', array( __CLASS__, 'quick_view' ) );
33
+ add_action( 'wp_ajax_nopriv_carousel_slider_quick_view', array( __CLASS__, 'quick_view' ) );
34
  }
35
 
36
+ /**
37
+ * Show YITH Wishlist button on product slider
38
+ *
39
+ * @param WC_Product $product
40
+ * @param $slider_id
41
+ */
42
+ public static function wish_list_button( $product, $slider_id ) {
43
+ $_product_wish_list = get_post_meta( $slider_id, '_product_wishlist', true );
44
+
45
+ if ( version_compare( WC_VERSION, '2.7.0', '>=' ) ) {
46
+ $product_id = $product->get_id();
47
+ } else {
48
+ $product_id = $product->id;
49
+ }
50
+
51
+ if ( class_exists( 'YITH_WCWL' ) && $_product_wish_list == 'on' ) {
52
+ echo do_shortcode( '[yith_wcwl_add_to_wishlist product_id="' . $product_id . '"]' );
53
+ }
54
  }
55
 
56
+ /**
57
+ * Show quick view button on product slider
58
+ *
59
+ * @param WC_Product $product
60
+ * @param $slider_id
61
+ */
62
+ public static function quick_view_button( $product, $slider_id ) {
63
+ $_show_btn = get_post_meta( $slider_id, '_product_quick_view', true );
64
+
65
+ if ( $_show_btn == 'on' ) {
66
 
67
+ if ( version_compare( WC_VERSION, '2.7.0', '>=' ) ) {
68
+ $product_id = $product->get_id();
69
+ } else {
70
+ $product_id = $product->id;
71
+ }
72
 
73
+ wp_enqueue_script( 'magnific-popup' );
 
 
 
 
 
74
 
75
+ $ajax_url = wp_nonce_url( add_query_arg( array(
76
+ 'ajax' => 'true',
77
+ 'action' => 'carousel_slider_quick_view',
78
+ 'product_id' => $product_id,
79
+ 'slide_id' => $slider_id
80
+ ), admin_url( 'admin-ajax.php' ) ), 'carousel_slider_quick_view' );
81
+
82
+ $quick_view_html = '<div style="clear: both;"></div>';
83
+ $quick_view_html .= sprintf(
84
+ '<a class="magnific-popup button quick_view" href="%1$s" data-product-id="%2$s">%3$s</a>',
85
+ $ajax_url,
86
+ $product_id,
87
+ __( 'Quick View', 'carousel-slider' )
88
+ );
89
+ echo apply_filters( 'carousel_slider_product_quick_view', $quick_view_html, $product );
90
+ }
91
+ }
92
 
93
+ /**
94
+ * Display quick view popup content
95
+ */
96
+ public static function quick_view() {
97
+ if ( ! isset( $_GET['_wpnonce'], $_GET['product_id'], $_GET['slide_id'] ) ) {
98
+ wp_die();
99
+ }
100
 
101
+ if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'carousel_slider_quick_view' ) ) {
102
+ wp_die();
103
+ }
104
+
105
+ global $product;
106
+ $product = wc_get_product( intval( $_GET['product_id'] ) );
107
+
108
+ ?>
109
+ <div id="pmid-<?php echo intval( $_GET['slide_id'] ); ?>" class="product carousel-slider__product-modal">
110
+
111
+ <div class="images">
112
+ <?php echo get_the_post_thumbnail( $product->get_id(), 'medium_large' ); ?>
113
+ <?php if ( $product->is_on_sale() ) : ?>
114
+ <?php echo apply_filters( 'woocommerce_sale_flash',
115
+ '<span class="onsale">' . __( 'Sale!', 'carousel-slider' ) . '</span>', $product ); ?>
116
+ <?php endif; ?>
117
+ </div>
118
+
119
+ <div class="summary entry-summary">
120
+
121
+ <h1 class="product_title entry-title">
122
+ <?php echo esc_attr( $product->get_title() ); ?>
123
+ </h1>
124
+
125
+ <div class="woocommerce-product-rating">
126
+ <?php
127
+ // Check if WooCommerce Version 3.0.0 or higher
128
+ if ( function_exists( 'wc_get_rating_html' ) ) {
129
+ echo wc_get_rating_html( $product->get_average_rating() );
130
+ } elseif ( method_exists( $product, 'get_rating_html' ) ) {
131
  echo $product->get_rating_html();
132
  }
133
+ ?>
134
+ </div>
135
 
136
+ <div class="price">
137
+ <?php
138
+ if ( $product->get_price_html() ) {
139
  echo $product->get_price_html();
140
  }
141
+ ?>
142
+ </div>
143
 
144
+ <div class="description">
145
+ <?php
146
  echo '<div style="clear: both;"></div>';
147
  echo apply_filters( 'woocommerce_short_description', $product->post->post_excerpt );
148
+ ?>
149
+ </div>
150
 
151
+ <div>
152
+ <?php
153
+ // Show button
154
  echo '<div style="clear: both;"></div>';
155
+ if ( function_exists( 'woocommerce_template_loop_add_to_cart' ) ) {
156
  woocommerce_template_loop_add_to_cart();
157
  }
158
+ ?>
159
+ </div>
160
+
161
+ </div>
162
+ </div>
163
+ <?php
164
+ wp_die();
165
+ }
166
+
167
+ /**
168
+ * Get WooCommerce version
169
+ *
170
+ * @return string
171
+ */
172
+ private function wc_version() {
173
+ if ( defined( 'WC_VERSION' ) ) {
174
+ return WC_VERSION;
175
+ }
176
 
177
+ return '0.0.0';
178
+ }
179
+
180
+ /**
181
+ * List multiple products by product ids
182
+ *
183
+ * Works with WooCommerce Version 2.5.*, 2.6.*, 3.0.*, 3.1.*
184
+ *
185
+ * @param array $args
186
+ *
187
+ * @return array
188
+ */
189
+ public function products( $args = array() ) {
190
+ $defaults = array(
191
+ 'orderby' => 'title',
192
+ 'order' => 'asc',
193
+ 'posts_per_page' => - 1,
194
+ 'post__in' => array(),
195
+ );
196
+ $args = wp_parse_args( $args, $defaults );
197
+
198
+ $query_args = array(
199
+ 'post_type' => 'product',
200
+ 'post_status' => 'publish',
201
+ 'ignore_sticky_posts' => 1,
202
+ 'posts_per_page' => $args['posts_per_page'],
203
+ 'orderby' => $args['orderby'],
204
+ 'order' => $args['order'],
205
+ 'post__in' => $args['post__in'],
206
+ 'meta_query' => WC()->query->get_meta_query(),
207
+ );
208
+
209
+ if ( version_compare( $this->wc_version(), '2.7.0', '>=' ) ) {
210
+ $query_args['tax_query'] = WC()->query->get_tax_query();
211
+ }
212
+
213
+ return get_posts( $query_args );
214
+ }
215
+
216
+ /**
217
+ * Get Recent Products
218
+ *
219
+ * Works with WooCommerce Version 2.5.*, 2.6.*, 3.0.*, 3.1.*
220
+ *
221
+ * @param array $args
222
+ *
223
+ * @return array
224
+ */
225
+ public function recent_products( $args = array() ) {
226
+
227
+ $defaults = array(
228
+ 'posts_per_page' => 12,
229
+ 'orderby' => 'date',
230
+ 'order' => 'desc',
231
+ );
232
+
233
+ $args = wp_parse_args( $args, $defaults );
234
+
235
+ $query_args = array(
236
+ 'post_type' => 'product',
237
+ 'post_status' => 'publish',
238
+ 'ignore_sticky_posts' => 1,
239
+ 'posts_per_page' => $args['posts_per_page'],
240
+ 'orderby' => $args['orderby'],
241
+ 'order' => $args['order'],
242
+ 'meta_query' => WC()->query->get_meta_query(),
243
+ );
244
+
245
+ if ( version_compare( $this->wc_version(), '2.7.0', '>=' ) ) {
246
+ $query_args['tax_query'] = WC()->query->get_tax_query();
247
+ }
248
+
249
+ return get_posts( $query_args );
250
+ }
251
+
252
+ /**
253
+ * List best selling products on sale.
254
+ *
255
+ * Works with WooCommerce Version 2.5.*, 2.6.*, 3.0.*, 3.1.*
256
+ *
257
+ * @param array $args
258
+ *
259
+ * @return array
260
+ */
261
+ public function best_selling_products( $args = array() ) {
262
+
263
+ $defaults = array(
264
+ 'posts_per_page' => 12,
265
+ );
266
+
267
+ $args = wp_parse_args( $args, $defaults );
268
+
269
+ $query_args = array(
270
+ 'post_type' => 'product',
271
+ 'post_status' => 'publish',
272
+ 'ignore_sticky_posts' => 1,
273
+ 'posts_per_page' => $args['posts_per_page'],
274
+ 'meta_key' => 'total_sales',
275
+ 'orderby' => 'meta_value_num',
276
+ 'meta_query' => WC()->query->get_meta_query(),
277
+ );
278
+
279
+ if ( version_compare( $this->wc_version(), '2.7.0', '>=' ) ) {
280
+ $query_args['tax_query'] = WC()->query->get_tax_query();
281
+ }
282
+
283
+ return get_posts( $query_args );
284
+ }
285
+
286
+ /**
287
+ * Get WooCommerce featured products
288
+ *
289
+ * Works with WooCommerce Version 2.5.*, 2.6.*, 3.0.*, 3.1.*
290
+ *
291
+ * @param array $args
292
+ *
293
+ * @return array
294
+ */
295
+ public function featured_products( $args = array() ) {
296
+
297
+ $defaults = array(
298
+ 'posts_per_page' => 12,
299
+ 'orderby' => 'date',
300
+ 'order' => 'desc',
301
+ );
302
+
303
+ $args = wp_parse_args( $args, $defaults );
304
+
305
+ $meta_query = WC()->query->get_meta_query();
306
+
307
+ if ( version_compare( $this->wc_version(), '2.7.0', '<' ) ) {
308
+ $meta_query[] = array(
309
+ 'key' => '_featured',
310
+ 'value' => 'yes'
311
+ );
312
+ }
313
+
314
+ $query_args = array(
315
+ 'post_type' => 'product',
316
+ 'post_status' => 'publish',
317
+ 'ignore_sticky_posts' => 1,
318
+ 'posts_per_page' => $args['posts_per_page'],
319
+ 'orderby' => $args['orderby'],
320
+ 'order' => $args['order'],
321
+ 'meta_query' => $meta_query,
322
+ );
323
+
324
+ if ( version_compare( $this->wc_version(), '2.7.0', '>=' ) ) {
325
+ $tax_query = WC()->query->get_tax_query();
326
+ $tax_query[] = array(
327
+ 'taxonomy' => 'product_visibility',
328
+ 'field' => 'name',
329
+ 'terms' => 'featured',
330
+ 'operator' => 'IN',
331
+ );
332
+ $query_args['tax_query'] = $tax_query;
333
+ }
334
+
335
+
336
+ return get_posts( $query_args );
337
+ }
338
+
339
+ /**
340
+ * List all products on sale.
341
+ *
342
+ * Works with WooCommerce Version 2.5.*, 2.6.*, 3.0.*, 3.1.*
343
+ *
344
+ * @param array $args
345
+ *
346
+ * @return array
347
+ */
348
+ public function sale_products( $args = array() ) {
349
+ $defaults = array(
350
+ 'posts_per_page' => 12,
351
+ 'orderby' => 'title',
352
+ 'order' => 'asc',
353
+ );
354
+
355
+ $args = wp_parse_args( $args, $defaults );
356
+
357
+ $query_args = array(
358
+ 'posts_per_page' => $args['posts_per_page'],
359
+ 'orderby' => $args['orderby'],
360
+ 'order' => $args['order'],
361
+ 'no_found_rows' => 1,
362
+ 'post_status' => 'publish',
363
+ 'post_type' => 'product',
364
+ 'meta_query' => WC()->query->get_meta_query(),
365
+ 'post__in' => array_merge( array( 0 ), wc_get_product_ids_on_sale() ),
366
+ );
367
+
368
+ if ( version_compare( $this->wc_version(), '2.7.0', '>=' ) ) {
369
+ $query_args['tax_query'] = WC()->query->get_tax_query();
370
+ }
371
+
372
+ return get_posts( $query_args );
373
+ }
374
+
375
+ /**
376
+ * Get top rated products
377
+ *
378
+ * Works with WooCommerce Version 2.5.*, 2.6.*, 3.0.*, 3.1.*
379
+ *
380
+ * @param array $args
381
+ *
382
+ * @return array
383
+ */
384
+ public function top_rated_products( $args = array() ) {
385
+ $defaults = array(
386
+ 'posts_per_page' => 12,
387
+ 'orderby' => 'title',
388
+ 'order' => 'asc',
389
+ );
390
+
391
+ $args = wp_parse_args( $args, $defaults );
392
+
393
+ if ( version_compare( $this->wc_version(), '2.7.0', '>=' ) ) {
394
+ $query_args = array(
395
+ 'posts_per_page' => $args['posts_per_page'],
396
+ 'no_found_rows' => 1,
397
+ 'post_status' => 'publish',
398
+ 'post_type' => 'product',
399
+ 'meta_key' => '_wc_average_rating',
400
+ 'orderby' => 'meta_value_num',
401
+ 'order' => 'DESC',
402
+ 'meta_query' => WC()->query->get_meta_query(),
403
+ 'tax_query' => WC()->query->get_tax_query(),
404
+ );
405
+ $_posts = new WP_Query( $query_args );
406
+
407
+ return $_posts->posts;
408
+ }
409
+
410
+ // For WooCommerce version is less than 2.7.0
411
+ add_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
412
+
413
+ $query_args = array(
414
+ 'post_type' => 'product',
415
+ 'post_status' => 'publish',
416
+ 'ignore_sticky_posts' => 1,
417
+ 'orderby' => $args['orderby'],
418
+ 'order' => $args['order'],
419
+ 'posts_per_page' => $args['posts_per_page'],
420
+ 'meta_query' => WC()->query->get_meta_query(),
421
+ );
422
+
423
+
424
+ $_posts = new WP_Query( $query_args );
425
+
426
+ remove_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
427
+
428
+ return $_posts->posts;
429
+ }
430
+
431
+
432
+ /**
433
+ * List all (or limited) product categories.
434
+ *
435
+ * Works with WooCommerce Version 2.5.*, 2.6.*, 3.0.*, 3.1.*
436
+ *
437
+ * @param array $args
438
+ *
439
+ * @return array|int|WP_Error
440
+ */
441
+ public function product_categories( $args = array() ) {
442
+
443
+ $default = array(
444
+ 'taxonomy' => 'product_cat',
445
+ 'hide_empty' => 1,
446
+ 'orderby' => 'name',
447
+ 'order' => 'ASC',
448
+ );
449
+
450
+ $args = wp_parse_args( $args, $default );
451
+
452
+ return get_terms( $args );
453
+ }
454
+
455
+ /**
456
+ * Get products by categories ids
457
+ *
458
+ * Works with WooCommerce Version 2.5.*, 2.6.*, 3.0.*, 3.1.*
459
+ *
460
+ * @param array $cat_ids
461
+ * @param int $per_page
462
+ *
463
+ * @return array
464
+ */
465
+ public function products_by_categories( $cat_ids = array(), $per_page = 12 ) {
466
+ $args = array(
467
+ 'post_type' => 'product',
468
+ 'post_status' => 'publish',
469
+ 'ignore_sticky_post' => 1,
470
+ 'posts_per_page' => $per_page,
471
+ 'tax_query' => array(
472
+ array(
473
+ 'taxonomy' => 'product_cat',
474
+ 'field' => 'term_id',
475
+ 'terms' => $cat_ids,
476
+ 'operator' => 'IN',
477
+ ),
478
+ ),
479
+ );
480
+
481
+ return get_posts( $args );
482
+ }
483
+
484
+ /**
485
+ * Get products by tags ids
486
+ *
487
+ * Works with WooCommerce Version 2.5.*, 2.6.*, 3.0.*, 3.1.*
488
+ *
489
+ * @param array $cat_ids
490
+ * @param int $per_page
491
+ *
492
+ * @return array
493
+ */
494
+ public function products_by_tags( $cat_ids = array(), $per_page = 12 ) {
495
+ $args = array(
496
+ 'post_type' => 'product',
497
+ 'post_status' => 'publish',
498
+ 'ignore_sticky_post' => 1,
499
+ 'posts_per_page' => $per_page,
500
+ 'tax_query' => array(
501
+ array(
502
+ 'taxonomy' => 'product_tag',
503
+ 'field' => 'term_id',
504
+ 'terms' => $cat_ids,
505
+ 'operator' => 'IN',
506
+ ),
507
+ ),
508
+ );
509
+
510
+ return get_posts( $args );
511
+ }
512
  }
 
513
 
 
514
 
515
+ endif;
516
+
517
+ Carousel_Slider_Product::init();
includes/class-carousel-slider-script.php ADDED
@@ -0,0 +1,265 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! class_exists( 'Carousel_Slider_Script' ) ):
3
+
4
+ class Carousel_Slider_Script {
5
+
6
+ protected static $instance = null;
7
+
8
+ /**
9
+ * Ensures only one instance of this class is loaded or can be loaded.
10
+ *
11
+ * @return Carousel_Slider_Script
12
+ */
13
+ public static function init() {
14
+ if ( is_null( self::$instance ) ) {
15
+ self::$instance = new self();
16
+ }
17
+
18
+ return self::$instance;
19
+ }
20
+
21
+ public function __construct() {
22
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_scripts' ), 15 );
23
+ add_action( 'wp_footer', array( $this, 'inline_script' ), 30 );
24
+
25
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 10 );
26
+ add_action( 'admin_footer', array( $this, 'gallery_url_template' ), 5 );
27
+ }
28
+
29
+ /**
30
+ * Load frontend scripts
31
+ */
32
+ public function frontend_scripts() {
33
+ wp_register_style(
34
+ 'carousel-slider',
35
+ CAROUSEL_SLIDER_ASSETS . '/css/style.css',
36
+ array(),
37
+ CAROUSEL_SLIDER_VERSION,
38
+ 'all'
39
+ );
40
+ wp_register_script(
41
+ 'owl-carousel',
42
+ CAROUSEL_SLIDER_ASSETS . '/js/vendors/owl.carousel.min.js',
43
+ array( 'jquery' ),
44
+ '2.2.1',
45
+ true
46
+ );
47
+ wp_register_script(
48
+ 'magnific-popup',
49
+ CAROUSEL_SLIDER_ASSETS . '/js/vendors/jquery.magnific-popup.min.js',
50
+ array(),
51
+ '1.1.0',
52
+ true
53
+ );
54
+ wp_register_script(
55
+ 'carousel-slider-hero',
56
+ CAROUSEL_SLIDER_ASSETS . '/js/public/script.js',
57
+ array(),
58
+ CAROUSEL_SLIDER_VERSION,
59
+ true
60
+ );
61
+
62
+ if ( $this->should_load_scripts() ) {
63
+ wp_enqueue_style( 'carousel-slider' );
64
+ wp_enqueue_script( 'owl-carousel' );
65
+ }
66
+ }
67
+
68
+ /**
69
+ * Load admin scripts
70
+ *
71
+ * @param $hook
72
+ */
73
+ public function admin_scripts( $hook ) {
74
+ global $post;
75
+
76
+ if ( $hook == 'post-new.php' || $hook == 'post.php' ) {
77
+
78
+ if ( is_a( $post, 'WP_Post' ) && 'carousels' == $post->post_type ) {
79
+ wp_enqueue_media();
80
+ wp_enqueue_style( 'wp-color-picker' );
81
+ wp_enqueue_style(
82
+ 'carousel-slider-admin',
83
+ CAROUSEL_SLIDER_ASSETS . '/css/admin.css',
84
+ array(),
85
+ CAROUSEL_SLIDER_VERSION,
86
+ 'all'
87
+ );
88
+ wp_enqueue_script(
89
+ 'select2',
90
+ CAROUSEL_SLIDER_ASSETS . '/js/vendors/select2.min.js',
91
+ array( 'jquery' ),
92
+ '4.0.3',
93
+ true
94
+ );
95
+ wp_enqueue_script(
96
+ 'tip-tip',
97
+ CAROUSEL_SLIDER_ASSETS . '/js/vendors/jquery.tipTip.min.js',
98
+ array( 'jquery' ),
99
+ CAROUSEL_SLIDER_VERSION,
100
+ true
101
+ );
102
+ wp_enqueue_script(
103
+ 'wp-color-picker-alpha',
104
+ CAROUSEL_SLIDER_ASSETS . '/js/vendors/wp-color-picker-alpha.min.js',
105
+ array( 'wp-color-picker' ),
106
+ '1.2.2',
107
+ true
108
+ );
109
+ wp_enqueue_script(
110
+ 'carousel-slider-admin',
111
+ CAROUSEL_SLIDER_ASSETS . '/js/admin.min.js',
112
+ array(
113
+ 'jquery',
114
+ 'wp-color-picker-alpha',
115
+ 'jquery-ui-accordion',
116
+ 'jquery-ui-datepicker',
117
+ 'jquery-ui-sortable',
118
+ 'jquery-ui-tabs',
119
+ 'tip-tip',
120
+ 'select2'
121
+ ),
122
+ CAROUSEL_SLIDER_VERSION,
123
+ true
124
+ );
125
+ }
126
+ }
127
+ }
128
+
129
+ /**
130
+ * Load front end inline script
131
+ */
132
+ public function inline_script() {
133
+ if ( $this->should_load_scripts() ):
134
+ ?>
135
+ <svg width="1" height="1" style="display: none;">
136
+ <symbol id="icon-arrow-left" viewBox="0 0 20 20">
137
+ <path d="M14 5l-5 5 5 5-1 2-7-7 7-7z"></path>
138
+ </symbol>
139
+ <symbol id="icon-arrow-right" viewBox="0 0 20 20">
140
+ <path d="M6 15l5-5-5-5 1-2 7 7-7 7z"></path>
141
+ </symbol>
142
+ </svg>
143
+ <script type="text/javascript">
144
+ jQuery(document).ready(function ($) {
145
+
146
+ $('body').find('.carousel-slider').each(function () {
147
+ var _this = $(this);
148
+ var isVideo = _this.data('slide-type') === 'video-carousel';
149
+ var videoWidth = isVideo ? _this.data('video-width') : false;
150
+ var videoHeight = isVideo ? _this.data('video-height') : false;
151
+ var autoWidth = isVideo;
152
+
153
+ if (jQuery().owlCarousel) {
154
+ _this.owlCarousel({
155
+ nav: _this.data('nav'),
156
+ dots: _this.data('dots'),
157
+ margin: _this.data('margin'),
158
+ loop: _this.data('loop'),
159
+ autoplay: _this.data('autoplay'),
160
+ autoplayTimeout: _this.data('autoplay-timeout'),
161
+ autoplaySpeed: _this.data('autoplay-speed'),
162
+ autoplayHoverPause: _this.data('autoplay-hover-pause'),
163
+ slideBy: _this.data('slide-by'),
164
+ lazyLoad: _this.data('lazy-load'),
165
+ video: isVideo,
166
+ videoWidth: videoWidth,
167
+ videoHeight: videoHeight,
168
+ autoWidth: autoWidth,
169
+ navText: [
170
+ '<svg class="carousel-slider-nav-icon" width="48" height="48"><use xlink:href="#icon-arrow-left"></use></svg>',
171
+ '<svg class="carousel-slider-nav-icon" width="48" height="48"><use xlink:href="#icon-arrow-right"></use></svg>'
172
+ ],
173
+ responsive: {
174
+ 320: {items: _this.data('colums-mobile')},
175
+ 600: {items: _this.data('colums-small-tablet')},
176
+ 768: {items: _this.data('colums-tablet')},
177
+ 993: {items: _this.data('colums-small-desktop')},
178
+ 1200: {items: _this.data('colums-desktop')},
179
+ 1921: {items: _this.data('colums')}
180
+ }
181
+ });
182
+ }
183
+
184
+ if (jQuery().magnificPopup) {
185
+ var popupType = _this.data('slide-type') === 'product-carousel' ? 'ajax' : 'image';
186
+ var popupGallery = _this.data('slide-type') !== 'product-carousel';
187
+ $(this).find('.magnific-popup').magnificPopup({
188
+ type: popupType,
189
+ gallery: {
190
+ enabled: popupGallery
191
+ },
192
+ zoom: {
193
+ enabled: popupGallery,
194
+ duration: 300,
195
+ easing: 'ease-in-out'
196
+ }
197
+ });
198
+ }
199
+ });
200
+ });
201
+ </script><?php
202
+ endif;
203
+ }
204
+
205
+ /**
206
+ * Carousel slider gallery url template
207
+ *
208
+ * @return void
209
+ */
210
+ public function gallery_url_template() {
211
+ global $post_type;
212
+ if ( $post_type != 'carousels' ) {
213
+ return;
214
+ }
215
+ ?>
216
+ <template id="carouselSliderGalleryUrlTemplate" style="display: none;">
217
+ <div class="carousel_slider-fields">
218
+ <label class="setting">
219
+ <span class="name"><?php esc_html_e( 'URL', 'carousel-slider' ); ?></span>
220
+ <input type="url" name="_images_urls[url][]" value="" autocomplete="off">
221
+ </label>
222
+ <label class="setting">
223
+ <span class="name"><?php esc_html_e( 'Title', 'carousel-slider' ); ?></span>
224
+ <input type="text" name="_images_urls[title][]" value="" autocomplete="off">
225
+ </label>
226
+ <label class="setting">
227
+ <span class="name"><?php esc_html_e( 'Caption', 'carousel-slider' ); ?></span>
228
+ <textarea name="_images_urls[caption][]"></textarea>
229
+ </label>
230
+ <label class="setting">
231
+ <span class="name"><?php esc_html_e( 'Alt Text', 'carousel-slider' ); ?></span>
232
+ <input type="text" name="_images_urls[alt][]" value="" autocomplete="off">
233
+ </label>
234
+ <label class="setting">
235
+ <span class="name"><?php esc_html_e( 'Link To URL', 'carousel-slider' ); ?></span>
236
+ <input type="text" name="_images_urls[link_url][]" value="" autocomplete="off">
237
+ </label>
238
+ <div class="actions">
239
+ <span><span class="dashicons dashicons-move"></span></span>
240
+ <span class="add_row"><span class="dashicons dashicons-plus-alt"></span></span>
241
+ <span class="delete_row"><span class="dashicons dashicons-trash"></span></span>
242
+ </div>
243
+ </div>
244
+ </template>
245
+ <?php
246
+ }
247
+
248
+ /**
249
+ * Check if it should load frontend scripts
250
+ *
251
+ * @return boolean
252
+ */
253
+ private function should_load_scripts() {
254
+ global $post;
255
+ $load_scripts = is_active_widget( false, false, 'widget_carousel_slider', true ) ||
256
+ ( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'carousel_slide' ) ) ||
257
+ ( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'carousel' ) );
258
+
259
+ return apply_filters( 'carousel_slider_load_scripts', $load_scripts );
260
+ }
261
+ }
262
+
263
+ endif;
264
+
265
+ Carousel_Slider_Script::init();
includes/class-carousel-slider-structured-data.php CHANGED
@@ -4,191 +4,313 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
- /**
8
- * Structured data's handler and generator using JSON-LD format.
9
- *
10
- * @class Carousel_Slider_Structured_Data
11
- * @since 1.7.2
12
- * @author Sayful Islam <sayful.islam001@gmail.com>
13
- */
14
- class Carousel_Slider_Structured_Data {
15
-
16
- private $_product_data = array();
17
- private $_image_data = array();
18
 
19
  /**
20
- * Constructor.
21
- */
22
- public function __construct() {
23
- add_action( 'carousel_slider_product_loop', array( $this, 'generate_product_data' ) );
24
- add_action( 'carousel_slider_image_gallery_loop', array( $this, 'generate_image_data' ) );
25
- // Output structured data.
26
- add_action( 'wp_footer', array( $this, 'output_structured_data' ), 10 );
27
- }
28
-
29
- /**
30
- * Outputs structured data.
31
  *
32
- * Hooked into `wp_footer` action hook.
 
 
33
  */
34
- public function output_structured_data()
35
- {
36
- $data = $this->get_structured_product_data();
37
- if ( $data ) {
38
- echo '<script type="application/ld+json">' . wp_json_encode( $data ) . '</script>' . "\n";
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
- $gallery_data = $this->get_structured_image_data();
41
- if ( $gallery_data ) {
42
- echo '<script type="application/ld+json">' . wp_json_encode( $gallery_data ) . '</script>' . "\n";
 
 
 
 
 
 
 
 
 
43
  }
44
- }
45
 
46
- /**
47
- * Sets data.
48
- *
49
- * @param array $data Structured data.
50
- * @return bool
51
- */
52
- public function set_data( $data ) {
53
- if ( ! isset( $data['@type'] ) || ! preg_match( '|^[a-zA-Z]{1,20}$|', $data['@type'] ) ) {
54
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  }
56
 
57
- if ( $data['@type'] == 'ImageObject' ) {
58
- if ( ! $this->maybe_image_added( $data['contentUrl'] ) ) {
59
- $this->_image_data[] = $data;
 
 
 
 
 
 
 
60
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
62
 
63
- if ( $data['@type'] == 'Product' ) {
64
- if ( ! $this->maybe_product_added( $data['@id'] ) ) {
65
- $this->_product_data[] = $data;
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
 
 
67
  }
68
 
69
- return true;
70
- }
 
 
 
 
 
 
 
 
 
 
 
71
 
72
- /**
73
- * Check if product is already added to list
74
- *
75
- * @param string $product_id
76
- * @return boolean
77
- */
78
- private function maybe_product_added( $product_id = null )
79
- {
80
- $product_data = $this->get_product_data();
81
- if ( count($product_data) > 0 ) {
82
- $product_data = array_map( function( $data ){ return $data['@id']; }, $product_data );
83
- return in_array( $product_id, $product_data );
84
  }
85
 
86
- return false;
87
- }
 
 
 
 
 
 
 
 
 
 
 
88
 
89
- /**
90
- * Check if image is already added to list
91
- *
92
- * @param string $image_id
93
- * @return boolean
94
- */
95
- private function maybe_image_added( $image_id = null )
96
- {
97
- $image_data = $this->get_image_data();
98
- if ( count($image_data) > 0 ) {
99
- $image_data = array_map( function( $data ){ return $data['contentUrl']; }, $image_data );
100
- return in_array( $image_id, $image_data );
101
  }
102
 
103
- return false;
104
- }
 
 
 
 
 
 
 
 
 
105
 
106
- /**
107
- * Gets product data.
108
- *
109
- * @return array
110
- */
111
- public function get_product_data() {
112
- return $this->_product_data;
113
- }
114
 
115
- /**
116
- * Get image data
117
- *
118
- * @return array
119
- */
120
- public function get_image_data()
121
- {
122
- return $this->_image_data;
123
- }
124
 
125
- /**
126
- * Structures and returns image data.
127
- * @return array
128
- */
129
- public function get_structured_image_data()
130
- {
131
- $data = array(
132
- '@context' => 'http://schema.org/',
133
- "@type" => "ImageGallery",
134
- "associatedMedia" => $this->get_image_data()
135
- );
136
- return $this->get_image_data() ? $data : array();
137
- }
138
 
139
- /**
140
- * Structures and returns product data.
141
- * @return array
142
- */
143
- public function get_structured_product_data()
144
- {
145
- $data = array(
146
- '@context' => 'http://schema.org/',
147
- "@graph" => $this->get_product_data()
148
- );
149
-
150
- return $this->get_product_data() ? $data : array();
151
- }
152
 
153
- /**
154
- * Generates Product structured data.
155
- *
156
- * Hooked into `carousel_slider_product_loop` action hook.
157
- *
158
- * @param WC_Product $product Product data (default: null).
159
- */
160
- public function generate_product_data( $product = null ) {
161
- if ( ! is_object( $product ) ) {
162
- global $product;
163
- }
164
 
165
- $markup['@type'] = 'Product';
166
- $markup['@id'] = get_permalink( $product->get_id() );
167
- $markup['url'] = $markup['@id'];
168
- $markup['name'] = $product->get_name();
169
 
170
- $this->set_data( apply_filters( 'carousel_slider_structured_data_product', $markup, $product ) );
171
- }
 
 
 
 
 
 
172
 
173
- /**
174
- * Generates Image structured data.
175
- *
176
- * Hooked into `carousel_slider_image_gallery_loop` action hook.
177
- *
178
- * @param WP_Post $cs_post Post data (default: null).
179
- */
180
- public function generate_image_data( $cs_post = null ) {
181
- if ( ! is_object( $cs_post ) ) {
182
- global $cs_post;
183
  }
184
 
185
- $image = wp_get_attachment_image_src( $cs_post->ID, 'full' );
186
- $markup['@type'] = 'ImageObject';
187
- $markup['contentUrl'] = $image[0];
188
- $markup['name'] = $cs_post->post_title;
 
 
 
 
 
 
 
189
 
190
- $this->set_data( apply_filters( 'carousel_slider_structured_data_image', $markup, $cs_post ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  }
192
- }
193
 
194
- new Carousel_Slider_Structured_Data();
 
 
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
+ if ( ! class_exists( 'Carousel_Slider_Structured_Data' ) ):
 
 
 
 
 
 
 
 
 
 
8
 
9
  /**
10
+ * Structured data's handler and generator using JSON-LD format.
 
 
 
 
 
 
 
 
 
 
11
  *
12
+ * @class Carousel_Slider_Structured_Data
13
+ * @since 1.7.2
14
+ * @author Sayful Islam <sayful.islam001@gmail.com>
15
  */
16
+ class Carousel_Slider_Structured_Data {
17
+
18
+ protected static $instance = null;
19
+ private $_product_data = array();
20
+ private $_image_data = array();
21
+ private $_post_data = array();
22
+
23
+ /**
24
+ * Constructor.
25
+ */
26
+ public function __construct() {
27
+ add_action( 'carousel_slider_image_gallery_loop', array( $this, 'generate_image_data' ) );
28
+ add_action( 'carousel_slider_post_loop', array( $this, 'generate_post_data' ) );
29
+ add_action( 'carousel_slider_product_loop', array( $this, 'generate_product_data' ) );
30
+ // Output structured data.
31
+ add_action( 'wp_footer', array( $this, 'output_structured_data' ), 90 );
32
  }
33
+
34
+ /**
35
+ * Ensures only one instance of this class is loaded or can be loaded.
36
+ *
37
+ * @return Carousel_Slider_Structured_Data
38
+ */
39
+ public static function init() {
40
+ if ( is_null( self::$instance ) ) {
41
+ self::$instance = new self();
42
+ }
43
+
44
+ return self::$instance;
45
  }
 
46
 
47
+ /**
48
+ * Outputs structured data.
49
+ *
50
+ * Hooked into `wp_footer` action hook.
51
+ */
52
+ public function output_structured_data() {
53
+ $data = $this->get_structured_product_data();
54
+ if ( $data ) {
55
+ echo '<script type="application/ld+json">' . wp_json_encode( $data ) . '</script>' . "\n";
56
+ }
57
+ $gallery_data = $this->get_structured_image_data();
58
+ if ( $gallery_data ) {
59
+ echo '<script type="application/ld+json">' . wp_json_encode( $gallery_data ) . '</script>' . "\n";
60
+ }
61
+ $post_data = $this->get_structured_post_data();
62
+ if ( $post_data ) {
63
+ echo '<script type="application/ld+json">' . wp_json_encode( $post_data ) . '</script>' . "\n";
64
+ }
65
+ }
66
+
67
+ /**
68
+ * Structures and returns product data.
69
+ * @return array
70
+ */
71
+ private function get_structured_product_data() {
72
+ $data = array(
73
+ '@context' => 'http://schema.org/',
74
+ "@graph" => $this->get_product_data()
75
+ );
76
+
77
+ return $this->get_product_data() ? $data : array();
78
+ }
79
+
80
+ /**
81
+ * Gets product data.
82
+ *
83
+ * @return array
84
+ */
85
+ private function get_product_data() {
86
+ return $this->_product_data;
87
+ }
88
+
89
+ /**
90
+ * Structures and returns image data.
91
+ * @return array
92
+ */
93
+ private function get_structured_image_data() {
94
+ $data = array(
95
+ '@context' => 'http://schema.org/',
96
+ "@type" => "ImageGallery",
97
+ "associatedMedia" => $this->get_image_data()
98
+ );
99
+
100
+ return $this->get_image_data() ? $data : array();
101
+ }
102
+
103
+ /**
104
+ * Get image data
105
+ *
106
+ * @return array
107
+ */
108
+ private function get_image_data() {
109
+ return $this->_image_data;
110
+ }
111
+
112
+ private function get_structured_post_data() {
113
+ $data = array(
114
+ '@context' => 'http://schema.org/',
115
+ "@graph" => $this->get_post_data()
116
+ );
117
+
118
+ return $this->get_post_data() ? $data : array();
119
+ }
120
+
121
+ private function get_post_data() {
122
+ return $this->_post_data;
123
+ }
124
+
125
+ /**
126
+ * Generates Image structured data.
127
+ *
128
+ * Hooked into `carousel_slider_image_gallery_loop` action hook.
129
+ *
130
+ * @param WP_Post $_post Post data (default: null).
131
+ */
132
+ public function generate_image_data( $_post ) {
133
+ $image = wp_get_attachment_image_src( $_post->ID, 'full' );
134
+ $markup['@type'] = 'ImageObject';
135
+ $markup['contentUrl'] = $image[0];
136
+ $markup['name'] = $_post->post_title;
137
+
138
+ $this->set_data( apply_filters( 'carousel_slider_structured_data_image', $markup, $_post ) );
139
  }
140
 
141
+ /**
142
+ * Sets data.
143
+ *
144
+ * @param array $data Structured data.
145
+ *
146
+ * @return bool
147
+ */
148
+ private function set_data( $data ) {
149
+ if ( ! isset( $data['@type'] ) || ! preg_match( '|^[a-zA-Z]{1,20}$|', $data['@type'] ) ) {
150
+ return false;
151
  }
152
+
153
+ if ( $data['@type'] == 'ImageObject' ) {
154
+ if ( ! $this->maybe_image_added( $data['contentUrl'] ) ) {
155
+ $this->_image_data[] = $data;
156
+ }
157
+ }
158
+
159
+ if ( $data['@type'] == 'Product' ) {
160
+ if ( ! $this->maybe_product_added( $data['@id'] ) ) {
161
+ $this->_product_data[] = $data;
162
+ }
163
+ }
164
+
165
+ if ( $data['@type'] == 'BlogPosting' ) {
166
+ if ( ! $this->maybe_post_added( $data['mainEntityOfPage']['@id'] ) ) {
167
+ $this->_post_data[] = $data;
168
+ }
169
+ }
170
+
171
+ return true;
172
  }
173
 
174
+ /**
175
+ * Check if image is already added to list
176
+ *
177
+ * @param string $image_id
178
+ *
179
+ * @return boolean
180
+ */
181
+ private function maybe_image_added( $image_id = null ) {
182
+ $image_data = $this->get_image_data();
183
+ if ( count( $image_data ) > 0 ) {
184
+ $image_data = array_map( function ( $data ) {
185
+ return $data['contentUrl'];
186
+ }, $image_data );
187
+
188
+ return in_array( $image_id, $image_data );
189
  }
190
+
191
+ return false;
192
  }
193
 
194
+ /**
195
+ * Check if product is already added to list
196
+ *
197
+ * @param string $product_id
198
+ *
199
+ * @return boolean
200
+ */
201
+ private function maybe_product_added( $product_id = null ) {
202
+ $product_data = $this->get_product_data();
203
+ if ( count( $product_data ) > 0 ) {
204
+ $product_data = array_map( function ( $data ) {
205
+ return $data['@id'];
206
+ }, $product_data );
207
 
208
+ return in_array( $product_id, $product_data );
209
+ }
210
+
211
+ return false;
 
 
 
 
 
 
 
 
212
  }
213
 
214
+ /**
215
+ * Check if post is already added to list
216
+ *
217
+ * @param string $post_id
218
+ *
219
+ * @return boolean
220
+ */
221
+ private function maybe_post_added( $post_id ) {
222
+ $post_data = $this->get_post_data();
223
+ if ( count( $post_data ) > 0 ) {
224
+ $post_data = array_map( function ( $data ) {
225
+ return $data['mainEntityOfPage']['@id'];
226
+ }, $post_data );
227
 
228
+ return in_array( $post_id, $post_data );
229
+ }
230
+
231
+ return false;
 
 
 
 
 
 
 
 
232
  }
233
 
234
+ /**
235
+ * Generates post structured data.
236
+ *
237
+ * Hooked into `carousel_slider_post_loop` action hook.
238
+ *
239
+ * @param WP_Post $_post
240
+ */
241
+ public function generate_post_data( $_post ) {
242
+ if ( ! $_post instanceof WP_Post ) {
243
+ return;
244
+ }
245
 
246
+ $image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'normal' );
 
 
 
 
 
 
 
247
 
248
+ $json['@type'] = 'BlogPosting';
 
 
 
 
 
 
 
 
249
 
250
+ $json['mainEntityOfPage'] = array(
251
+ '@type' => 'webpage',
252
+ '@id' => get_the_permalink(),
253
+ );
 
 
 
 
 
 
 
 
 
254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
 
256
+ $json['publisher'] = array(
257
+ '@type' => 'organization',
258
+ 'name' => get_bloginfo( 'name' ),
259
+ );
 
 
 
 
 
 
 
260
 
261
+ $json['author'] = array(
262
+ '@type' => 'person',
263
+ 'name' => get_the_author(),
264
+ );
265
 
266
+ if ( $image ) {
267
+ $json['image'] = array(
268
+ '@type' => 'ImageObject',
269
+ 'url' => $image[0],
270
+ 'width' => $image[1],
271
+ 'height' => $image[2],
272
+ );
273
+ }
274
 
275
+ $json['datePublished'] = get_post_time( 'c' );
276
+ $json['dateModified'] = get_the_modified_date( 'c' );
277
+ $json['name'] = get_the_title();
278
+ $json['headline'] = $json['name'];
279
+ $json['description'] = get_the_excerpt();
280
+
281
+
282
+ $this->set_data( apply_filters( 'carousel_slider_structured_data_post', $json, $_post ) );
 
 
283
  }
284
 
285
+ /**
286
+ * Generates Product structured data.
287
+ *
288
+ * Hooked into `carousel_slider_product_loop` action hook.
289
+ *
290
+ * @param WC_Product $product Product data (default: null).
291
+ */
292
+ public function generate_product_data( $product = null ) {
293
+ if ( ! is_object( $product ) ) {
294
+ global $product;
295
+ }
296
 
297
+ if ( version_compare( WC_VERSION, "3.0.0", ">=" ) ) {
298
+ $name = $product->get_name();
299
+ $permalink = get_permalink( $product->get_id() );
300
+ } else {
301
+ $name = get_the_title( $product->id );
302
+ $permalink = get_permalink( $product->id );
303
+ }
304
+
305
+ $markup['@type'] = 'Product';
306
+ $markup['@id'] = $permalink;
307
+ $markup['url'] = $markup['@id'];
308
+ $markup['name'] = $name;
309
+
310
+ $this->set_data( apply_filters( 'carousel_slider_structured_data_product', $markup, $product ) );
311
+ }
312
  }
 
313
 
314
+ endif;
315
+
316
+ Carousel_Slider_Structured_Data::init();
includes/class-carousel-slider-vc-element.php CHANGED
@@ -1,75 +1,91 @@
1
  <?php
2
  // If this file is called directly, abort.
3
  if ( ! defined( 'WPINC' ) ) {
4
- die;
5
  }
6
 
7
- if( ! class_exists('Carousel_Slider_VC_Element') ):
8
 
9
- class Carousel_Slider_VC_Element
10
- {
11
- /**
12
- * Carousel_Slider_VC_Element constructor.
13
- */
14
- public function __construct() {
15
- // We safely integrate with VC with this hook
16
- add_action( 'init', array( $this, 'integrate_with_vc' ) );
17
- }
18
 
19
- /**
20
- * Integrate with visual composer
21
- */
22
- public function integrate_with_vc() {
23
- // Check if Visual Composer is installed
24
- if ( ! defined( 'WPB_VC_VERSION' ) ) {
25
- return;
26
- }
27
 
28
- vc_map( array(
29
- "name" => __("Carousel Slider", 'carousel-slider'),
30
- "description" => __("Place Carousel Slider.", 'carousel-slider'),
31
- "base" => "carousel_slide",
32
- "controls" => "full",
33
- "icon" => plugins_url('assets/img/icon-images.svg', dirname(__FILE__)),
34
- "category" => __('Content', 'carousel-slider'),
35
- "params" => array(
36
- array(
37
- "type" => "dropdown",
38
- "holder" => "div",
39
- "class" => "carousel-slider-id",
40
- "param_name" => "id",
41
- "value" => $this->carousels_list(),
42
- "heading" => __("Choose Carousel Slide", 'carousel-slider'),
43
- ),
44
- ),
45
- ));
46
- }
47
 
48
- /**
49
- * Generate array for carousel slider
50
- *
51
- * @return array
52
- */
53
- private function carousels_list()
54
- {
55
- $carousels = get_posts( array(
56
- 'post_type' => 'carousels',
57
- 'post_status' => 'publish',
58
- ) );
59
 
60
- if ( count($carousels) < 1) {
61
- return array();
62
- }
 
 
 
 
63
 
64
- $result = array();
 
 
 
 
 
 
 
65
 
66
- foreach($carousels as $carousel) {
67
- $result[esc_html($carousel->post_title)] = $carousel->ID;
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
- return $result;
71
- }
72
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
  endif;
75
- new Carousel_Slider_VC_Element;
 
1
  <?php
2
  // If this file is called directly, abort.
3
  if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
  }
6
 
7
+ if ( ! class_exists( 'Carousel_Slider_Visual_Composer_Element' ) ):
8
 
9
+ class Carousel_Slider_Visual_Composer_Element {
 
 
 
 
 
 
 
 
10
 
11
+ protected static $instance = null;
 
 
 
 
 
 
 
12
 
13
+ /**
14
+ * Ensures only one instance of this class is loaded or can be loaded.
15
+ *
16
+ * @return Carousel_Slider_Visual_Composer_Element
17
+ */
18
+ public static function init() {
19
+ if ( is_null( self::$instance ) ) {
20
+ self::$instance = new self();
21
+ }
 
 
 
 
 
 
 
 
 
 
22
 
23
+ return self::$instance;
24
+ }
 
 
 
 
 
 
 
 
 
25
 
26
+ /**
27
+ * CarouselSliderVisualComposerElement constructor.
28
+ */
29
+ public function __construct() {
30
+ // We safely integrate with VC with this hook
31
+ add_action( 'init', array( $this, 'integrate_with_vc' ) );
32
+ }
33
 
34
+ /**
35
+ * Integrate with visual composer
36
+ */
37
+ public function integrate_with_vc() {
38
+ // Check if Visual Composer is installed
39
+ if ( ! function_exists( 'vc_map' ) ) {
40
+ return;
41
+ }
42
 
43
+ vc_map( array(
44
+ "name" => __( "Carousel Slider", 'carousel-slider' ),
45
+ "description" => __( "Place Carousel Slider.", 'carousel-slider' ),
46
+ "base" => "carousel_slide",
47
+ "controls" => "full",
48
+ "icon" => CAROUSEL_SLIDER_ASSETS . '/img/logo.svg',
49
+ "category" => __( 'Content', 'carousel-slider' ),
50
+ "params" => array(
51
+ array(
52
+ "type" => "dropdown",
53
+ "holder" => "div",
54
+ "class" => "carousel-slider-id",
55
+ "param_name" => "id",
56
+ "value" => $this->carousels_list(),
57
+ "heading" => __( "Choose Carousel Slide", 'carousel-slider' ),
58
+ ),
59
+ ),
60
+ ) );
61
+ }
62
 
63
+ /**
64
+ * Generate array for carousel slider
65
+ *
66
+ * @return array
67
+ */
68
+ private function carousels_list() {
69
+ $carousels = get_posts( array(
70
+ 'post_type' => 'carousels',
71
+ 'post_status' => 'publish',
72
+ 'posts_per_page' => - 1,
73
+ ) );
74
+
75
+ if ( count( $carousels ) < 1 ) {
76
+ return array();
77
+ }
78
+
79
+ $result = array();
80
+
81
+ foreach ( $carousels as $carousel ) {
82
+ $result[ esc_html( $carousel->post_title ) ] = $carousel->ID;
83
+ }
84
+
85
+ return $result;
86
+ }
87
+ }
88
 
89
  endif;
90
+
91
+ Carousel_Slider_Visual_Composer_Element::init();
includes/functions-carousel-slider.php ADDED
@@ -0,0 +1,560 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! function_exists( 'carousel_slider_is_url' ) ) {
4
+ /**
5
+ * Check if url is valid as per RFC 2396 Generic Syntax
6
+ *
7
+ * @param string $url
8
+ *
9
+ * @return boolean
10
+ */
11
+ function carousel_slider_is_url( $url ) {
12
+ if ( filter_var( $url, FILTER_VALIDATE_URL ) ) {
13
+
14
+ return true;
15
+ }
16
+
17
+ return false;
18
+ }
19
+ }
20
+
21
+ if ( ! function_exists( 'carousel_slider_sanitize_color' ) ) {
22
+ /**
23
+ * Sanitizes a Hex, RGB or RGBA color
24
+ *
25
+ * @param $color
26
+ *
27
+ * @return mixed|string
28
+ */
29
+ function carousel_slider_sanitize_color( $color ) {
30
+ if ( '' === $color ) {
31
+ return '';
32
+ }
33
+
34
+ // Trim unneeded whitespace
35
+ $color = str_replace( ' ', '', $color );
36
+
37
+ // If this is hex color, validate and return it
38
+ if ( 1 === preg_match( '|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) {
39
+ return $color;
40
+ }
41
+
42
+ // If this is rgb, validate and return it
43
+ if ( 'rgb(' === substr( $color, 0, 4 ) ) {
44
+ list( $red, $green, $blue ) = sscanf( $color, 'rgb(%d,%d,%d)' );
45
+
46
+ if ( ( $red >= 0 && $red <= 255 ) &&
47
+ ( $green >= 0 && $green <= 255 ) &&
48
+ ( $blue >= 0 && $blue <= 255 )
49
+ ) {
50
+ return "rgb({$red},{$green},{$blue})";
51
+ }
52
+ }
53
+
54
+ // If this is rgba, validate and return it
55
+ if ( 'rgba(' === substr( $color, 0, 5 ) ) {
56
+ list( $red, $green, $blue, $alpha ) = sscanf( $color, 'rgba(%d,%d,%d,%f)' );
57
+
58
+ if ( ( $red >= 0 && $red <= 255 ) &&
59
+ ( $green >= 0 && $green <= 255 ) &&
60
+ ( $blue >= 0 && $blue <= 255 ) &&
61
+ $alpha >= 0 && $alpha <= 1
62
+ ) {
63
+ return "rgba({$red},{$green},{$blue},{$alpha})";
64
+ }
65
+ }
66
+
67
+ return '';
68
+ }
69
+ }
70
+
71
+ if ( ! function_exists( 'carousel_slider_get_meta' ) ) {
72
+ /**
73
+ * Get post meta by id and key
74
+ *
75
+ * @param $id
76
+ * @param $key
77
+ * @param null $default
78
+ *
79
+ * @return string
80
+ */
81
+ function carousel_slider_get_meta( $id, $key, $default = null ) {
82
+ $meta = get_post_meta( $id, $key, true );
83
+
84
+ if ( empty( $meta ) && $default ) {
85
+ $meta = $default;
86
+ }
87
+
88
+ if ( $meta == 'zero' ) {
89
+ $meta = '0';
90
+ }
91
+ if ( $meta == 'on' ) {
92
+ $meta = 'true';
93
+ }
94
+ if ( $meta == 'off' ) {
95
+ $meta = 'false';
96
+ }
97
+ if ( $key == '_margin_right' && $meta == 0 ) {
98
+ $meta = '0';
99
+ }
100
+
101
+ return esc_attr( $meta );
102
+ }
103
+ }
104
+
105
+ if ( ! function_exists( 'carousel_slider_array_to_attribute' ) ) {
106
+ /**
107
+ * Convert array to html data attribute
108
+ *
109
+ * @param $array
110
+ *
111
+ * @return array|string
112
+ */
113
+ function carousel_slider_array_to_attribute( $array ) {
114
+ if ( ! is_array( $array ) ) {
115
+ return '';
116
+ }
117
+
118
+ $attribute = array_map( function ( $key, $value ) {
119
+ // If boolean value
120
+ if ( is_bool( $value ) ) {
121
+ if ( $value ) {
122
+
123
+ return sprintf( '%s="%s"', $key, 'true' );
124
+ } else {
125
+
126
+ return sprintf( '%s="%s"', $key, 'false' );
127
+ }
128
+ }
129
+ // If array value
130
+ if ( is_array( $value ) ) {
131
+
132
+ return sprintf( '%s="%s"', $key, implode( " ", $value ) );
133
+ }
134
+
135
+ // If string value
136
+ return sprintf( '%s="%s"', $key, esc_attr( $value ) );
137
+
138
+ }, array_keys( $array ), array_values( $array ) );
139
+
140
+ return $attribute;
141
+ }
142
+ }
143
+
144
+ if ( ! function_exists( 'carousel_slider_is_woocommerce_active' ) ) {
145
+ /**
146
+ * Check if WooCommerce is active
147
+ *
148
+ * @return bool
149
+ */
150
+ function carousel_slider_is_woocommerce_active() {
151
+
152
+ if ( in_array( 'woocommerce/woocommerce.php', get_option( 'active_plugins' ) ) ) {
153
+ return true;
154
+ }
155
+
156
+ if ( defined( 'WC_VERSION' ) || defined( 'WOOCOMMERCE_VERSION' ) ) {
157
+ return true;
158
+ }
159
+
160
+ return false;
161
+ }
162
+ }
163
+
164
+ if ( ! function_exists( 'carousel_slider_posts' ) ) {
165
+ /**
166
+ * Get posts by carousel slider ID
167
+ *
168
+ * @param $carousel_id
169
+ *
170
+ * @return array
171
+ */
172
+ function carousel_slider_posts( $carousel_id ) {
173
+ $id = $carousel_id;
174
+ // Get settings from carousel slider
175
+ $order = get_post_meta( $id, '_post_order', true );
176
+ $orderby = get_post_meta( $id, '_post_orderby', true );
177
+ $per_page = intval( get_post_meta( $id, '_posts_per_page', true ) );
178
+ $query_type = get_post_meta( $id, '_post_query_type', true );
179
+ $query_type = empty( $query_type ) ? 'latest_posts' : $query_type;
180
+
181
+ $args = array(
182
+ 'post_type' => 'post',
183
+ 'post_status' => 'publish',
184
+ 'order' => $order,
185
+ 'orderby' => $orderby,
186
+ 'posts_per_page' => $per_page
187
+ );
188
+
189
+ // Get posts by post IDs
190
+ if ( $query_type == 'specific_posts' ) {
191
+ $post_in = explode( ',', get_post_meta( $id, '_post_in', true ) );
192
+ $post_in = array_map( 'intval', $post_in );
193
+ unset( $args['posts_per_page'] );
194
+ $args = array_merge( $args, array( 'post__in' => $post_in ) );
195
+ }
196
+
197
+ // Get posts by post catagories IDs
198
+ if ( $query_type == 'post_categories' ) {
199
+ $post_categories = get_post_meta( $id, '_post_categories', true );
200
+ $args = array_merge( $args, array( 'cat' => $post_categories ) );
201
+ }
202
+
203
+ // Get posts by post tags IDs
204
+ if ( $query_type == 'post_tags' ) {
205
+ $post_tags = get_post_meta( $id, '_post_tags', true );
206
+ $post_tags = array_map( 'intval', explode( ',', $post_tags ) );
207
+ $args = array_merge( $args, array( 'tag__in' => $post_tags ) );
208
+ }
209
+
210
+ // Get posts by date range
211
+ if ( $query_type == 'date_range' ) {
212
+
213
+ $post_date_after = get_post_meta( $id, '_post_date_after', true );
214
+ $post_date_before = get_post_meta( $id, '_post_date_before', true );
215
+
216
+ if ( $post_date_after && $post_date_before ) {
217
+ $args = array_merge( $args, array(
218
+ 'date_query' => array(
219
+ array(
220
+ 'after' => $post_date_after,
221
+ 'before' => $post_date_before,
222
+ 'inclusive' => true,
223
+ ),
224
+ ),
225
+ ) );
226
+ } elseif ( $post_date_after ) {
227
+ $args = array_merge( $args, array(
228
+ 'date_query' => array(
229
+ array(
230
+ 'before' => $post_date_before,
231
+ 'inclusive' => true,
232
+ ),
233
+ ),
234
+ ) );
235
+ } elseif ( $post_date_before ) {
236
+ $args = array_merge( $args, array(
237
+ 'date_query' => array(
238
+ array(
239
+ 'before' => $post_date_before,
240
+ 'inclusive' => true,
241
+ ),
242
+ ),
243
+ ) );
244
+ }
245
+ }
246
+
247
+ $posts = get_posts( $args );
248
+
249
+ return $posts;
250
+ }
251
+ }
252
+
253
+ if ( ! function_exists( 'carousel_slider_products' ) ) {
254
+ /**
255
+ * Get products by carousel slider ID
256
+ *
257
+ * @param $carousel_id
258
+ *
259
+ * @return array
260
+ */
261
+ function carousel_slider_products( $carousel_id ) {
262
+ $id = $carousel_id;
263
+ $per_page = intval( get_post_meta( $id, '_products_per_page', true ) );
264
+ $query_type = get_post_meta( $id, '_product_query_type', true );
265
+ $query_type = empty( $query_type ) ? 'query_porduct' : $query_type;
266
+ $product_query = get_post_meta( $id, '_product_query', true );
267
+
268
+ $product_carousel = new Carousel_Slider_Product();
269
+
270
+ $args = array( 'posts_per_page' => $per_page );
271
+
272
+ if ( $query_type == 'query_porduct' ) {
273
+
274
+ // Get features products
275
+ if ( $product_query == 'featured' ) {
276
+ return $product_carousel->featured_products( $args );
277
+ }
278
+
279
+ // Get best_selling products
280
+ if ( $product_query == 'best_selling' ) {
281
+ return $product_carousel->best_selling_products( $args );
282
+ }
283
+
284
+ // Get recent products
285
+ if ( $product_query == 'recent' ) {
286
+ return $product_carousel->recent_products( $args );
287
+ }
288
+
289
+ // Get sale products
290
+ if ( $product_query == 'sale' ) {
291
+ return $product_carousel->sale_products( $args );
292
+ }
293
+
294
+ // Get top_rated products
295
+ if ( $product_query == 'top_rated' ) {
296
+ return $product_carousel->top_rated_products( $args );
297
+ }
298
+ }
299
+
300
+ // Get products by product IDs
301
+ if ( $query_type == 'specific_products' ) {
302
+ $product_in = get_post_meta( $id, '_product_in', true );
303
+ $product_in = array_map( 'intval', explode( ',', $product_in ) );
304
+
305
+ return $product_carousel->products( array( 'post__in' => $product_in ) );
306
+ }
307
+
308
+ // Get posts by post categories IDs
309
+ if ( $query_type == 'product_categories' ) {
310
+ $product_cat_ids = get_post_meta( $id, '_product_categories', true );
311
+ $product_cat_ids = array_map( 'intval', explode( ",", $product_cat_ids ) );
312
+
313
+ return $product_carousel->products_by_categories( $product_cat_ids, $per_page );
314
+ }
315
+
316
+ // Get posts by post tags IDs
317
+ if ( $query_type == 'product_tags' ) {
318
+ $product_tags = get_post_meta( $id, '_product_tags', true );
319
+ $product_tags = array_map( 'intval', explode( ',', $product_tags ) );
320
+
321
+ return $product_carousel->products_by_tags( $product_tags, $per_page );
322
+ }
323
+
324
+ return array();
325
+ }
326
+ }
327
+
328
+ if ( ! function_exists( 'carousel_slider_inline_style' ) ) {
329
+ /**
330
+ * Get carousel slider inline style
331
+ *
332
+ * @param $carousel_id
333
+ */
334
+ function carousel_slider_inline_style( $carousel_id ) {
335
+ $id = $carousel_id;
336
+ $_nav_color = get_post_meta( $id, '_nav_color', true );
337
+ $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
338
+ $_post_height = get_post_meta( $id, '_post_height', true );
339
+ $_product_title_color = get_post_meta( $id, '_product_title_color', true );
340
+ $_product_btn_bg_color = get_post_meta( $id, '_product_button_bg_color', true );
341
+ $_product_btn_text_color = get_post_meta( $id, '_product_button_text_color', true );
342
+ $content_sliders = get_post_meta( $id, '_content_slider', true );
343
+
344
+ $slide_type = get_post_meta( $id, '_slide_type', true );
345
+ $slide_type = in_array( $slide_type, carousel_slider_slide_type() ) ? $slide_type : 'image-carousel';
346
+
347
+ $_arrow_size = get_post_meta( $id, '_arrow_size', true );
348
+ $_arrow_size = empty( $_arrow_size ) ? 48 : absint( $_arrow_size );
349
+
350
+ $_bullet_size = get_post_meta( $id, '_bullet_size', true );
351
+ $_bullet_size = empty( $_bullet_size ) ? 10 : absint( $_bullet_size );
352
+
353
+ echo "<style type=\"text/css\">";
354
+
355
+ // Arrows Nav
356
+ echo "
357
+ #id-{$id} .carousel-slider-nav-icon {
358
+ fill: {$_nav_color}
359
+ }
360
+ #id-{$id} .carousel-slider-nav-icon:hover {
361
+ fill: {$_nav_active_color}
362
+ }
363
+ #id-{$id} .owl-prev,
364
+ #id-{$id} .owl-next,
365
+ #id-{$id} .carousel-slider-nav-icon {
366
+ height: {$_arrow_size}px;
367
+ width: {$_arrow_size}px
368
+ }
369
+ #id-{$id}.arrows-outside .owl-prev {
370
+ left: -{$_arrow_size}px
371
+ }
372
+ #id-{$id}.arrows-outside .owl-next {
373
+ right: -{$_arrow_size}px
374
+ }
375
+ ";
376
+
377
+ // Dots Nav
378
+ echo "
379
+ #id-{$id} .owl-dots .owl-dot span {
380
+ background-color: {$_nav_color};
381
+ width: {$_bullet_size}px;
382
+ height: {$_bullet_size}px;
383
+ }
384
+ #id-{$id} .owl-dots .owl-dot.active span,
385
+ #id-{$id} .owl-dots .owl-dot:hover span {
386
+ background-color: {$_nav_active_color}
387
+ }
388
+ ";
389
+
390
+ // Post Carousel Slider
391
+ if ( $slide_type == 'post-carousel' ) {
392
+
393
+ echo "
394
+ #id-{$id} .carousel-slider__post {
395
+ height: {$_post_height}px
396
+ }
397
+ ";
398
+ }
399
+
400
+ // Product Carousel Slider
401
+ if ( $slide_type == 'product-carousel' ) {
402
+ echo "
403
+ #id-{$id} .carousel-slider__product h3,
404
+ #id-{$id} .carousel-slider__product .price {
405
+ color: {$_product_title_color};
406
+ }
407
+
408
+ #id-{$id} .carousel-slider__product a.add_to_cart_button,
409
+ #id-{$id} .carousel-slider__product a.added_to_cart,
410
+ #id-{$id} .carousel-slider__product a.quick_view,
411
+ #id-{$id} .carousel-slider__product .onsale {
412
+ background-color: {$_product_btn_bg_color};
413
+ color: {$_product_btn_text_color};
414
+ }
415
+
416
+ #id-{$id} .carousel-slider__product .star-rating {
417
+ color: {$_product_btn_bg_color};
418
+ }
419
+ ";
420
+ }
421
+
422
+ // Content Carousel
423
+ if ( $slide_type == 'hero-banner-slider' && $content_sliders ) {
424
+ foreach ( $content_sliders as $slide_id => $slide ) {
425
+ if ( isset( $slide['link_type'] ) && ( $slide['link_type'] == 'button' ) ) {
426
+
427
+ $_btn_1_type = ! empty( $slide['button_one_type'] ) ? esc_attr( $slide['button_one_type'] ) : 'normal';
428
+ $_btn_1_bg_color = ! empty( $slide['button_one_bg_color'] ) ? carousel_slider_sanitize_color( $slide['button_one_bg_color'] ) : '#00d1b2';
429
+ $_btn_1_color = ! empty( $slide['button_one_color'] ) ? carousel_slider_sanitize_color( $slide['button_one_color'] ) : '#ffffff';
430
+ $_btn_1_border_width = ! empty( $slide['button_one_border_width'] ) ? esc_attr( $slide['button_one_border_width'] ) : '0px';
431
+ $_btn_1_border_radius = ! empty( $slide['button_one_border_radius'] ) ? esc_attr( $slide['button_one_border_radius'] ) : '3px';
432
+
433
+ if ( $_btn_1_type == 'stroke' ) {
434
+ echo "
435
+ #id-{$id} .cs-button-{$slide_id}-1 {
436
+ border: {$_btn_1_border_width} solid {$_btn_1_bg_color};
437
+ border-radius: {$_btn_1_border_radius};
438
+ background-color: transparent;
439
+ color: {$_btn_1_bg_color};
440
+ }
441
+ #id-{$id} .cs-button-{$slide_id}-1:hover {
442
+ border: {$_btn_1_border_width} solid {$_btn_1_bg_color};
443
+ background-color: {$_btn_1_bg_color};
444
+ color: {$_btn_1_color};
445
+ }
446
+ ";
447
+ } else {
448
+ echo "
449
+ #id-{$id} .cs-button-{$slide_id}-1 {
450
+ background-color: {$_btn_1_bg_color};
451
+ border: {$_btn_1_border_width} solid {$_btn_1_bg_color};
452
+ border-radius: {$_btn_1_border_radius};
453
+ color: {$_btn_1_color};
454
+ }
455
+ ";
456
+ }
457
+
458
+ $_btn_2_type = ! empty( $slide['button_two_type'] ) ? esc_attr( $slide['button_two_type'] ) : 'normal';
459
+ $_btn_2_bg_color = ! empty( $slide['button_two_bg_color'] ) ? carousel_slider_sanitize_color( $slide['button_two_bg_color'] ) : '#00d1b2';
460
+ $_btn_2_color = ! empty( $slide['button_two_color'] ) ? carousel_slider_sanitize_color( $slide['button_two_color'] ) : '#ffffff';
461
+ $_btn_2_border_width = ! empty( $slide['button_two_border_width'] ) ? esc_attr( $slide['button_two_border_width'] ) : '0px';
462
+ $_btn_2_border_radius = ! empty( $slide['button_two_border_radius'] ) ? esc_attr( $slide['button_two_border_radius'] ) : '3px';
463
+ if ( $_btn_2_type == 'stroke' ) {
464
+ echo "
465
+ #id-{$id} .cs-button-{$slide_id}-2 {
466
+ border: {$_btn_2_border_width} solid {$_btn_2_bg_color};
467
+ border-radius: {$_btn_2_border_radius};
468
+ background-color: transparent;
469
+ color: {$_btn_2_bg_color};
470
+ }
471
+ #id-{$id} .cs-button-{$slide_id}-2:hover {
472
+ border: {$_btn_2_border_width} solid {$_btn_2_bg_color};
473
+ background-color: {$_btn_2_bg_color};
474
+ color: {$_btn_2_color};
475
+ }
476
+ ";
477
+ } else {
478
+ echo "
479
+ #id-{$id} .cs-button-{$slide_id}-2 {
480
+ background-color: {$_btn_2_bg_color};
481
+ border: {$_btn_2_border_width} solid {$_btn_2_bg_color};
482
+ border-radius: {$_btn_2_border_radius};
483
+ color: {$_btn_2_color};
484
+ }
485
+ ";
486
+ }
487
+ }
488
+ }
489
+ }
490
+
491
+ echo "</style>";
492
+ }
493
+ }
494
+
495
+ if ( ! function_exists( 'carousel_slider_slide_type' ) ) {
496
+ /**
497
+ * Get carousel slider available slide type
498
+ *
499
+ * @return array
500
+ */
501
+ function carousel_slider_slide_type() {
502
+ return array(
503
+ 'image-carousel',
504
+ 'image-carousel-url',
505
+ 'post-carousel',
506
+ 'product-carousel',
507
+ 'video-carousel',
508
+ 'hero-banner-slider'
509
+ );
510
+ }
511
+ }
512
+
513
+ if ( ! function_exists( 'carousel_slider_background_position' ) ) {
514
+ /**
515
+ * @param bool $key_only
516
+ *
517
+ * @return array
518
+ */
519
+ function carousel_slider_background_position( $key_only = false ) {
520
+ $positions = array(
521
+ 'left top' => 'left top',
522
+ 'left center' => 'left center',
523
+ 'left bottom' => 'left bottom',
524
+ 'center top' => 'center top',
525
+ 'center center' => 'center', // Default
526
+ 'center bottom' => 'center bottom',
527
+ 'right top' => 'right top',
528
+ 'right center' => 'right center',
529
+ 'right bottom' => 'right bottom',
530
+ );
531
+ if ( $key_only ) {
532
+ return array_keys( $positions );
533
+ }
534
+
535
+ return $positions;
536
+ }
537
+ }
538
+
539
+ if ( ! function_exists( 'carousel_slider_background_size' ) ) {
540
+ /**
541
+ * @param bool $key_only
542
+ *
543
+ * @return array
544
+ */
545
+ function carousel_slider_background_size( $key_only = false ) {
546
+ $sizes = array(
547
+ 'auto' => 'auto',
548
+ 'contain' => 'contain',
549
+ 'cover' => 'cover', // Default
550
+ '100% 100%' => '100%',
551
+ '100% auto' => '100% width',
552
+ 'auto 100%' => '100% height',
553
+ );
554
+ if ( $key_only ) {
555
+ return array_keys( $sizes );
556
+ }
557
+
558
+ return $sizes;
559
+ }
560
+ }
languages/carousel-slider.pot DELETED
@@ -1,318 +0,0 @@
1
- # Copyright (C) 2014
2
- # This file is distributed under the same license as the package.
3
- #, fuzzy
4
- msgid ""
5
- msgstr ""
6
- "Project-Id-Version: Carousel Slider 1.5.2\n"
7
- "POT-Creation-Date: 2016-12-03 09:56+0600\n"
8
- "PO-Revision-Date: 2016-11-14 12:48+0600\n"
9
- "Last-Translator: \n"
10
- "Language-Team: Sayful Islam <sayful.islam001@gmail.com>\n"
11
- "Language: en\n"
12
- "MIME-Version: 1.0\n"
13
- "Content-Type: text/plain; charset=UTF-8\n"
14
- "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 1.8.7.1\n"
16
- "X-Poedit-Basepath: ..\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
19
- "X-Poedit-SearchPath-0: .\n"
20
-
21
- #: includes/Carousel_Slider_Admin.php:22
22
- msgctxt "Post Type General Name"
23
- msgid "Carousels"
24
- msgstr ""
25
-
26
- #: includes/Carousel_Slider_Admin.php:23
27
- msgctxt "Post Type Singular Name"
28
- msgid "Carousel"
29
- msgstr ""
30
-
31
- #: includes/Carousel_Slider_Admin.php:24
32
- msgid "Carousels"
33
- msgstr ""
34
-
35
- #: includes/Carousel_Slider_Admin.php:25
36
- msgid "Parent Carousel:"
37
- msgstr ""
38
-
39
- #: includes/Carousel_Slider_Admin.php:26
40
- msgid "All Carousels"
41
- msgstr ""
42
-
43
- #: includes/Carousel_Slider_Admin.php:27
44
- msgid "View Carousel"
45
- msgstr ""
46
-
47
- #: includes/Carousel_Slider_Admin.php:28
48
- msgid "Add New Carousel"
49
- msgstr ""
50
-
51
- #: includes/Carousel_Slider_Admin.php:29
52
- msgid "Add New"
53
- msgstr ""
54
-
55
- #: includes/Carousel_Slider_Admin.php:30
56
- msgid "Edit Carousel"
57
- msgstr ""
58
-
59
- #: includes/Carousel_Slider_Admin.php:31
60
- msgid "Update Carousel"
61
- msgstr ""
62
-
63
- #: includes/Carousel_Slider_Admin.php:32
64
- msgid "Search Carousel"
65
- msgstr ""
66
-
67
- #: includes/Carousel_Slider_Admin.php:33
68
- msgid "Not found"
69
- msgstr ""
70
-
71
- #: includes/Carousel_Slider_Admin.php:34
72
- msgid "Not found in Trash"
73
- msgstr ""
74
-
75
- #: includes/Carousel_Slider_Admin.php:37 includes/Carousel_Slider_Admin.php:38
76
- msgid "Carousel"
77
- msgstr ""
78
-
79
- #: includes/Carousel_Slider_Admin.php:63
80
- msgid "Carousel Slide Title"
81
- msgstr ""
82
-
83
- #: includes/Carousel_Slider_Admin.php:64
84
- msgid "Shortcode"
85
- msgstr ""
86
-
87
- #: includes/Carousel_Slider_Admin.php:65 includes/Carousel_Slider_Admin.php:149
88
- msgid "Carousel Images"
89
- msgstr ""
90
-
91
- #: includes/Carousel_Slider_Admin.php:106
92
- msgid "Usage (Shortcode)"
93
- msgstr ""
94
-
95
- #: includes/Carousel_Slider_Admin.php:119
96
- msgid ""
97
- "Copy the following shortcode and paste in post or page where you want to "
98
- "show."
99
- msgstr ""
100
-
101
- #: includes/Carousel_Slider_Admin.php:127
102
- msgid ""
103
- "If you like this plugin or if you make money using this or if you want to "
104
- "help me to continue my contribution on open source projects, consider to "
105
- "make a small donation."
106
- msgstr ""
107
-
108
- #: includes/Carousel_Slider_Admin.php:141
109
- msgid "Carousel Slider Settings"
110
- msgstr ""
111
-
112
- #: includes/Carousel_Slider_Admin.php:150
113
- msgid "Choose carousel images."
114
- msgstr ""
115
-
116
- #: includes/Carousel_Slider_Admin.php:155
117
- msgid "Carousel Image Size"
118
- msgstr ""
119
-
120
- #: includes/Carousel_Slider_Admin.php:156
121
- #, php-format
122
- msgid ""
123
- "Select \"full\" for full size image or your desired image size for carousel "
124
- "image. You can change the default size for thumbnail, medium and large from "
125
- "%1$s Settings >> Media %2$s."
126
- msgstr ""
127
-
128
- #: includes/Carousel_Slider_Admin.php:161
129
- msgid "Carousel items"
130
- msgstr ""
131
-
132
- #: includes/Carousel_Slider_Admin.php:162
133
- msgid ""
134
- "To set the maximum amount of items displayed at a time with the widest "
135
- "browser width (window >= 1200)"
136
- msgstr ""
137
-
138
- #: includes/Carousel_Slider_Admin.php:168
139
- msgid "Carousel items for small desktop"
140
- msgstr ""
141
-
142
- #: includes/Carousel_Slider_Admin.php:169
143
- msgid ""
144
- "This allows you to preset the number of slides visible with (window >= 980) "
145
- "browser width."
146
- msgstr ""
147
-
148
- #: includes/Carousel_Slider_Admin.php:175
149
- msgid "Carousel items for portrait Tablet"
150
- msgstr ""
151
-
152
- #: includes/Carousel_Slider_Admin.php:176
153
- msgid ""
154
- "This allows you to preset the number of slides visible with (window >= 768) "
155
- "browser width."
156
- msgstr ""
157
-
158
- #: includes/Carousel_Slider_Admin.php:182
159
- msgid "Carousel items for small portrait Tablet"
160
- msgstr ""
161
-
162
- #: includes/Carousel_Slider_Admin.php:183
163
- msgid ""
164
- "This allows you to preset the number of slides visible with (window >= 600) "
165
- "browser width."
166
- msgstr ""
167
-
168
- #: includes/Carousel_Slider_Admin.php:189
169
- msgid "Carousel items for portrait Mobile"
170
- msgstr ""
171
-
172
- #: includes/Carousel_Slider_Admin.php:190
173
- msgid ""
174
- "This allows you to preset the number of slides visible with (window >= 320) "
175
- "browser width."
176
- msgstr ""
177
-
178
- #: includes/Carousel_Slider_Admin.php:196
179
- msgid "Slide By"
180
- msgstr ""
181
-
182
- #: includes/Carousel_Slider_Admin.php:197
183
- msgid ""
184
- "Navigation slide by x number. Write \"page\" with inverted comma to slide by "
185
- "page. Default value is 1."
186
- msgstr ""
187
-
188
- #: includes/Carousel_Slider_Admin.php:203
189
- msgid "Margin Right(px) on item."
190
- msgstr ""
191
-
192
- #: includes/Carousel_Slider_Admin.php:204
193
- msgid "margin-right(px) on item. Default value is 10. Example: 20"
194
- msgstr ""
195
-
196
- #: includes/Carousel_Slider_Admin.php:210
197
- msgid "Display navigation buttons"
198
- msgstr ""
199
-
200
- #: includes/Carousel_Slider_Admin.php:211
201
- msgid "Display \"next\" and \"previous\" buttons"
202
- msgstr ""
203
-
204
- #: includes/Carousel_Slider_Admin.php:212
205
- msgid "Check to display \"next\" and \"previous\" buttons"
206
- msgstr ""
207
-
208
- #: includes/Carousel_Slider_Admin.php:217
209
- msgid "Show dots navigation"
210
- msgstr ""
211
-
212
- #: includes/Carousel_Slider_Admin.php:218
213
- msgid "Show dots navigation."
214
- msgstr ""
215
-
216
- #: includes/Carousel_Slider_Admin.php:219
217
- msgid "Check to show dots navigation."
218
- msgstr ""
219
-
220
- #: includes/Carousel_Slider_Admin.php:224
221
- msgid "Inifnity loop"
222
- msgstr ""
223
-
224
- #: includes/Carousel_Slider_Admin.php:225
225
- msgid "Inifnity loop."
226
- msgstr ""
227
-
228
- #: includes/Carousel_Slider_Admin.php:226
229
- msgid ""
230
- "Check to show inifnity loop. Duplicate last and first items to get loop "
231
- "illusion"
232
- msgstr ""
233
-
234
- #: includes/Carousel_Slider_Admin.php:232
235
- msgid "Autoplay"
236
- msgstr ""
237
-
238
- #: includes/Carousel_Slider_Admin.php:233
239
- msgid "Autoplay."
240
- msgstr ""
241
-
242
- #: includes/Carousel_Slider_Admin.php:234
243
- msgid "Check to enable autoplay"
244
- msgstr ""
245
-
246
- #: includes/Carousel_Slider_Admin.php:240
247
- msgid "Autoplay Timeout"
248
- msgstr ""
249
-
250
- #: includes/Carousel_Slider_Admin.php:241
251
- msgid "Autoplay interval timeout in millisecond. Default: 5000"
252
- msgstr ""
253
-
254
- #: includes/Carousel_Slider_Admin.php:248
255
- msgid "Autoplay Speed"
256
- msgstr ""
257
-
258
- #: includes/Carousel_Slider_Admin.php:249
259
- msgid "Autoplay speen in millisecond. Default: 500"
260
- msgstr ""
261
-
262
- #: includes/Carousel_Slider_Admin.php:255
263
- msgid "Autoplay Hover Pause"
264
- msgstr ""
265
-
266
- #: includes/Carousel_Slider_Admin.php:256
267
- msgid "Pause on mouse hover."
268
- msgstr ""
269
-
270
- #: includes/Carousel_Slider_Admin.php:257
271
- msgid "Pause autoplay on mouse hover."
272
- msgstr ""
273
-
274
- #: includes/Carousel_Slider_Admin.php:262
275
- msgid "Navigation Color\t"
276
- msgstr ""
277
-
278
- #: includes/Carousel_Slider_Admin.php:263
279
- #: includes/Carousel_Slider_Admin.php:271
280
- msgid "Enter hex value of color for carousel navigation."
281
- msgstr ""
282
-
283
- #: includes/Carousel_Slider_Admin.php:270
284
- msgid "Navigation Color: Hover & Active"
285
- msgstr ""
286
-
287
- #: includes/Carousel_Slider_Meta_Box.php:161
288
- msgid "Insert"
289
- msgstr ""
290
-
291
- #: includes/Carousel_Slider_VC_Element.php:23
292
- msgid "Carousel Slider"
293
- msgstr ""
294
-
295
- #: includes/Carousel_Slider_VC_Element.php:24
296
- msgid "Place Carousel Slider."
297
- msgstr ""
298
-
299
- #: includes/Carousel_Slider_VC_Element.php:28
300
- msgid "Content"
301
- msgstr ""
302
-
303
- #: includes/Carousel_Slider_VC_Element.php:35
304
- msgid "Carousel Slide ID"
305
- msgstr ""
306
-
307
- #: includes/Carousel_Slider_VC_Element.php:36
308
- #, php-format
309
- msgid "Place carousel slide id here. %s to go Carousels page"
310
- msgstr ""
311
-
312
- #: includes/Carousel_Slider_VC_Element.php:36
313
- msgid "Click here"
314
- msgstr ""
315
-
316
- #: widgets/widget-carousel_slider.php:79
317
- msgid "click here"
318
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,22 +1,35 @@
1
  === Carousel Slider ===
2
  Contributors: sayful
3
  Tags: woocommerce, shortcode, images, carousel, carousel slider, image carousel, product carousel, slider, owl carousel
4
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3LZWQTHEVYWCY
5
- Requires at least: 4.0
6
  Tested up to: 4.8
7
- Stable tag: 1.7.2
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
 
10
 
11
- The Easiest Way to Create SEO friendly Image, Logo, Video, Post and Product Carousel.
12
 
13
  == Description ==
14
 
15
- **The Easiest Way to Create SEO friendly Image, Logo, Video, Post and Product Carousel.**
16
  Carousel Slider is a touch enabled WordPress plugin that lets you create highly customizable, stylish responsive carousel slider. With Carousel Slider, you can create image carousel using media gallery or custom url, post carousel, video carousel. We have integrated [Owl Carousel 2](http://www.owlcarousel.owlgraphic.com/) into our plugin for the ultimate device support.
17
 
 
 
 
18
  **If you like this plugin, please give us [5 star](https://wordpress.org/support/plugin/carousel-slider/reviews/?rate=5#new-post) to encourage for future improvement.**
19
 
 
 
 
 
 
 
 
 
 
 
20
  = Full Feature Set =
21
 
22
  * **Multiple types carousel**, images from media gallery, images from URL, videos from youtube and vimeo, posts, and WooCommerce products carousel slider
@@ -106,6 +119,38 @@ Now you can use the following function at your theme template file replacing `YO
106
 
107
  == Changelog ==
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  = version 1.7.2 - 2017-04-07 =
110
  * New - Structured data generator using JSON-LD format for Product Carousel and Gallery Image Carousel.
111
 
1
  === Carousel Slider ===
2
  Contributors: sayful
3
  Tags: woocommerce, shortcode, images, carousel, carousel slider, image carousel, product carousel, slider, owl carousel
4
+ Requires at least: 4.5
 
5
  Tested up to: 4.8
6
+ Requires PHP: 5.3
7
+ Stable tag: 1.8.0
8
+ License: GPLv3
9
+ License URI: https://www.gnu.org/licenses/gpl-3.0.txt
10
 
11
+ Create SEO friendly Image, Logo, Video, Post, WooCommerce Product Carousel and Slider.
12
 
13
  == Description ==
14
 
15
+ **Create SEO friendly Image, Logo, Video, Post, WooCommerce Product Carousel and Slider.**
16
  Carousel Slider is a touch enabled WordPress plugin that lets you create highly customizable, stylish responsive carousel slider. With Carousel Slider, you can create image carousel using media gallery or custom url, post carousel, video carousel. We have integrated [Owl Carousel 2](http://www.owlcarousel.owlgraphic.com/) into our plugin for the ultimate device support.
17
 
18
+ > Looking for a free minimal WordPress theme. Try [Shapla](https://wordpress.org/themes/shapla/)
19
+
20
+
21
  **If you like this plugin, please give us [5 star](https://wordpress.org/support/plugin/carousel-slider/reviews/?rate=5#new-post) to encourage for future improvement.**
22
 
23
+
24
+ > What's new in version 1.8.0?
25
+
26
+ > **Hero Banner Slider(beta)** with background image, title, description, call to action buttons and more
27
+ > More control over Arrow Navigation
28
+ > More control over Bullet/Dot Navigation
29
+ > Alpha color picker for choosing color
30
+ > WooCommerce product categories list carousel.
31
+ > and more...
32
+
33
  = Full Feature Set =
34
 
35
  * **Multiple types carousel**, images from media gallery, images from URL, videos from youtube and vimeo, posts, and WooCommerce products carousel slider
119
 
120
  == Changelog ==
121
 
122
+ = version 1.8.0 - 2017-09-30 =
123
+ * Added - Hero banner slider(beta)
124
+ * Added - Hero banner slider: Add unlimited number of slide
125
+ * Added - Hero banner slider: Delete and sort(up, down, top, bottom) slide
126
+ * Added - Hero banner slider: Slide background with color, image and more
127
+ * Added - Hero banner slider: Slide title and description
128
+ * Added - Hero banner slider: Up to two call to action buttons with full style
129
+ * Added - Arrow Nav: Position (Inside or Outside)
130
+ * Added - Arrow Nav: Custom Size
131
+ * Tweak - Arrow Nav: Always visibility
132
+ * Added - Bullet Nav: Position (Left, Center or Right)
133
+ * Added - Bullet Nav: Custom Size
134
+ * Added - Bullet Nav: Square or Circle Shape
135
+ * Tweak - Arrow Nav: Option to enable visibility only on hover
136
+ * Tweak - Alpha color picker for choosing color
137
+ * Added - WooCommerce product categories list carousel.
138
+ * Fixed - Fix featured and top rated products on WooCommerce 3.x.x
139
+ * Fixed - Fix popup/modal not working always
140
+ * Tweak - Update owlCarousel version 2.2.1
141
+
142
+ = version 1.7.4 - 2017-08-26 =
143
+ * Fixed - Fixed syntax error for short array syntax on PHP 5.3
144
+
145
+ = version 1.7.3 - 2017-08-25 =
146
+ * Added - JSON-LD structured data for post carousel.
147
+ * Added - Added uninstall.php file to remove data on uninstall.
148
+ * Added - Added admin only notice for deprecated shortcode.
149
+ * Fixed - get_product() deprecated notice on WooCommerce version 3
150
+ * Fixed - Fixed error on WooCommerce version 2.6.* and 2.5.*
151
+ * Tweak - Remove dependency over jquery.livequery.js and update admin javascript.
152
+ * Tweak - Refactor code with WordPress coding style.
153
+
154
  = version 1.7.2 - 2017-04-07 =
155
  * New - Structured data generator using JSON-LD format for Product Carousel and Gallery Image Carousel.
156
 
screenshot-1.jpg DELETED
Binary file
screenshot-2.jpg DELETED
Binary file
screenshot-3.jpg DELETED
Binary file
screenshot-4.jpg DELETED
Binary file
screenshot-5.jpg DELETED
Binary file
screenshot-6.jpg DELETED
Binary file
screenshot-7.jpg DELETED
Binary file
shortcodes/class-carousel-slider-deprecated-shortcode.php CHANGED
@@ -4,122 +4,193 @@ if ( ! defined( 'WPINC' ) ) {
4
  die;
5
  }
6
 
7
- if( ! class_exists('Carousel_Slider_Deprecated_Shortcode') ):
8
-
9
- class Carousel_Slider_Deprecated_Shortcode
10
- {
11
- private $plugin_path;
12
-
13
- /**
14
- * Carousel_Slider_Deprecated_Shortcode constructor.
15
- *
16
- * @param $plugin_path
17
- */
18
- public function __construct( $plugin_path )
19
- {
20
- $this->plugin_path = $plugin_path;
21
- // Deprecated since version 1.6.0
22
- add_shortcode('carousel', array( $this, 'carousel' ) );
23
- add_shortcode('item', array( $this, 'item' ) );
24
- }
25
 
26
- /**
27
- * A shortcode for rendering the carousel slide.
28
- *
29
- * @param array $atts Shortcode attributes.
30
- * @param string $content The text content for shortcode. Not used.
31
- *
32
- * @return string The shortcode output
33
- */
34
- public function carousel( $atts, $content = null )
35
- {
36
- extract(shortcode_atts(array(
37
- 'id' => rand(1, 10),
38
- 'items_desktop_large' => '4',
39
- 'items' => '4',
40
- 'items_desktop' => '4',
41
- 'items_desktop_small' => '3',
42
- 'items_tablet' => '2',
43
- 'items_mobile' => '1',
44
- 'auto_play' => 'true',
45
- 'stop_on_hover' => 'true',
46
- 'navigation' => 'true',
47
- 'pagination' => 'false',
48
- 'nav_color' => '#f1f1f1',
49
- 'nav_active_color' => '#4caf50',
50
- 'margin_right' => '10',
51
- 'inifnity_loop' => 'true',
52
- 'autoplay_timeout' => '5000',
53
- 'autoplay_speed' => '500',
54
- 'slide_by' => '1',
55
- ), $atts ) );
56
-
57
- ob_start();
58
- require $this->plugin_path . '/templates/carousel.php';
59
- $html = ob_get_contents();
60
- ob_end_clean();
61
-
62
- return $html;
63
 
64
- }
65
 
66
- /**
67
- * A shortcode for rendering the carousel slide.
68
- *
69
- * @param array $attributes Shortcode attributes.
70
- * @param string $content The text content for shortcode. Not used.
71
- *
72
- * @return string The shortcode output
73
- */
74
- public function item( $attributes, $content = null )
75
- {
76
- extract(shortcode_atts(array(
77
- 'img_link' =>'',
78
- 'href' =>'',
79
- 'target' =>'_self',
80
- ), $attributes ) );
81
-
82
- if( ! $this->is_valid_url( $img_link ) ) return;
83
-
84
- if ( $this->is_valid_url( $href ) ) {
85
-
86
- return sprintf( '<div><a target="%3$s" href="%2$s"><img src="%1$s"></a></div>', esc_url( $img_link ), esc_url( $href ), $target );
87
- } else {
88
-
89
- return sprintf('<div><img src="%s"></div>', esc_url( $img_link ) );
90
- }
91
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
- /**
94
- * Check if url is valid as per RFC 2396 Generic Syntax
95
- *
96
- * @param string $url
97
- * @return boolean
98
- */
99
- private function is_valid_url( $url )
100
- {
101
- if ( filter_var( $url, FILTER_VALIDATE_URL ) ) {
102
- return true;
103
  }
104
- return false;
105
- }
106
 
107
- /**
108
- * Convert array to html attributes
109
- *
110
- * @param array $array
111
- * @return string
112
- */
113
- private function array_to_data( array $array )
114
- {
115
- $array_map = array_map( function( $key, $value )
116
- {
117
- return sprintf( '%s="%s"', $key, esc_attr($value) );
118
-
119
- }, array_keys($array), array_values( $array ) );
120
-
121
- return join(" ", $array_map );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
123
- }
124
 
125
- endif;
 
 
4
  die;
5
  }
6
 
7
+ if ( ! class_exists( 'Carousel_Slider_Deprecated_Shortcode' ) ):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
+ class Carousel_Slider_Deprecated_Shortcode {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
+ protected static $instance = null;
12
 
13
+ /**
14
+ * Ensures only one instance of this class is loaded or can be loaded.
15
+ *
16
+ * @return Carousel_Slider_Deprecated_Shortcode
17
+ */
18
+ public static function init() {
19
+ if ( is_null( self::$instance ) ) {
20
+ self::$instance = new self();
21
+ }
22
+
23
+ return self::$instance;
24
+ }
25
+
26
+ /**
27
+ * class constructor.
28
+ */
29
+ public function __construct() {
30
+ // Deprecated since version 1.6.0
31
+ add_shortcode( 'carousel', array( $this, 'carousel' ) );
32
+ add_shortcode( 'item', array( $this, 'item' ) );
33
+ }
34
+
35
+ /**
36
+ * A shortcode for rendering the carousel slide.
37
+ *
38
+ * @param array $atts Shortcode attributes.
39
+ * @param string $content The text content for shortcode. Not used.
40
+ *
41
+ * @return string The shortcode output
42
+ */
43
+ public function carousel( $atts, $content = null ) {
44
+ extract( shortcode_atts( array(
45
+ 'id' => rand( 1, 10 ),
46
+ 'items_desktop_large' => '4',
47
+ 'items' => '4',
48
+ 'items_desktop' => '4',
49
+ 'items_desktop_small' => '3',
50
+ 'items_tablet' => '2',
51
+ 'items_mobile' => '1',
52
+ 'auto_play' => 'true',
53
+ 'stop_on_hover' => 'true',
54
+ 'navigation' => 'true',
55
+ 'pagination' => 'false',
56
+ 'nav_color' => '#f1f1f1',
57
+ 'nav_active_color' => '#4caf50',
58
+ 'margin_right' => '10',
59
+ 'inifnity_loop' => 'true',
60
+ 'autoplay_timeout' => '5000',
61
+ 'autoplay_speed' => '500',
62
+ 'slide_by' => '1',
63
+ ), $atts ) );
64
+
65
+ ob_start();
66
+
67
+ $options_array = array(
68
+ 'id' => 'id-' . $id,
69
+ 'class' => 'owl-carousel carousel-slider',
70
+ // General
71
+ 'data-slide-type' => 'image-carousel-url',
72
+ 'data-margin' => $margin_right,
73
+ 'data-slide-by' => $slide_by,
74
+ 'data-loop' => $inifnity_loop,
75
+ 'data-lazy-load' => 'false',
76
+ // Navigation
77
+ 'data-nav' => $navigation,
78
+ 'data-dots' => $pagination,
79
+ 'data-nav-previous-icon' => '<svg class="carousel-slider-nav-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="48" viewBox="0 0 11 28"><path d="M9.8 8.5c0 0.1-0.1 0.3-0.2 0.4l-6.1 6.1 6.1 6.1c0.1 0.1 0.2 0.2 0.2 0.4s-0.1 0.3-0.2 0.4l-0.8 0.8c-0.1 0.1-0.2 0.2-0.4 0.2s-0.3-0.1-0.4-0.2l-7.3-7.3c-0.1-0.1-0.2-0.2-0.2-0.4s0.1-0.3 0.2-0.4l7.3-7.3c0.1-0.1 0.2-0.2 0.4-0.2s0.3 0.1 0.4 0.2l0.8 0.8c0.1 0.1 0.2 0.2 0.2 0.4z"/></svg>',
80
+ 'data-nav-next-icon' => '<svg class="carousel-slider-nav-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="48" viewBox="0 0 9 28"><path d="M9.3 15c0 0.1-0.1 0.3-0.2 0.4l-7.3 7.3c-0.1 0.1-0.2 0.2-0.4 0.2s-0.3-0.1-0.4-0.2l-0.8-0.8c-0.1-0.1-0.2-0.2-0.2-0.4 0-0.1 0.1-0.3 0.2-0.4l6.1-6.1-6.1-6.1c-0.1-0.1-0.2-0.2-0.2-0.4s0.1-0.3 0.2-0.4l0.8-0.8c0.1-0.1 0.2-0.2 0.4-0.2s0.3 0.1 0.4 0.2l7.3 7.3c0.1 0.1 0.2 0.2 0.2 0.4z"/></svg>',
81
+ // Video
82
+ 'data-video-width' => 'false',
83
+ 'data-video-height' => 'false',
84
+ // Autoplay
85
+ 'data-autoplay' => $auto_play,
86
+ 'data-autoplay-timeout' => $autoplay_timeout,
87
+ 'data-autoplay-speed' => $autoplay_speed,
88
+ 'data-autoplay-hover-pause' => $stop_on_hover,
89
+ // Responsive
90
+ 'data-colums' => $items_desktop_large,
91
+ 'data-colums-desktop' => $items,
92
+ 'data-colums-small-desktop' => $items_desktop,
93
+ 'data-colums-tablet' => $items_desktop_small,
94
+ 'data-colums-small-tablet' => $items_tablet,
95
+ 'data-colums-mobile' => $items_mobile,
96
+ );
97
+ ?>
98
+ <style>
99
+ #id-<?php echo $id; ?> .owl-dots .owl-dot span {
100
+ background-color: <?php echo $nav_color; ?>
101
+ }
102
+
103
+ #id-<?php echo $id; ?> .owl-dots .owl-dot.active span,
104
+ #id-<?php echo $id; ?> .owl-dots .owl-dot:hover span {
105
+ background-color: <?php echo $nav_active_color; ?>
106
+ }
107
+
108
+ #id-<?php echo $id; ?> .carousel-slider-nav-icon {
109
+ fill: <?php echo $nav_color; ?>;
110
+ }
111
+
112
+ #id-<?php echo $id; ?> .carousel-slider-nav-icon:hover {
113
+ fill: <?php echo $nav_active_color; ?>;
114
+ }
115
+ </style>
116
+ <?php
117
+ if ( current_user_can( 'manage_options' ) ) {
118
+ printf(
119
+ '<div style="background-color: #ffdddd;border-left: 0.375rem solid #f44336; margin-bottom: 1rem;
120
+ margin-top: 1rem;padding: 0.01rem 1rem;"><p><strong>%s</strong><br>%s<br>%s</p></div> ',
121
+ esc_html__( 'Admin Only Notice!', 'carousel-slider' ),
122
+ esc_html__( 'From carousel slider version 1.6.0, [carousel] and [item] shortcode has been deprecated.', 'carousel-slider' ),
123
+ esc_html__( 'Both [carousel] and [item] shortcode will be removed on carousel slider version 2.0.0', 'carousel-slider' )
124
+ );
125
+ }
126
+ ?>
127
+ <div <?php echo $this->array_to_data( $options_array ); ?>>
128
+ <?php echo do_shortcode( $content ); ?>
129
+ </div><!-- .carousel-slider -->
130
+ <?php
131
+ $html = ob_get_contents();
132
+ ob_end_clean();
133
+
134
+ return $html;
135
 
 
 
 
 
 
 
 
 
 
 
136
  }
 
 
137
 
138
+ /**
139
+ * A shortcode for rendering the carousel slide.
140
+ *
141
+ * @param array $attributes Shortcode attributes.
142
+ * @param string $content The text content for shortcode. Not used.
143
+ *
144
+ * @return string The shortcode output
145
+ */
146
+ public function item( $attributes, $content = null ) {
147
+ extract( shortcode_atts( array(
148
+ 'img_link' => '',
149
+ 'href' => '',
150
+ 'target' => '_self',
151
+ ), $attributes ) );
152
+
153
+ if ( ! $this->is_valid_url( $img_link ) ) {
154
+ return;
155
+ }
156
+
157
+ if ( $this->is_valid_url( $href ) ) {
158
+
159
+ return sprintf( '<div><a target="%3$s" href="%2$s"><img src="%1$s"></a></div>', esc_url( $img_link ), esc_url( $href ), $target );
160
+ } else {
161
+
162
+ return sprintf( '<div><img src="%s"></div>', esc_url( $img_link ) );
163
+ }
164
+ }
165
+
166
+ /**
167
+ * Check if url is valid as per RFC 2396 Generic Syntax
168
+ *
169
+ * @param string $url
170
+ *
171
+ * @return boolean
172
+ */
173
+ private function is_valid_url( $url ) {
174
+ return carousel_slider_is_url( $url );
175
+ }
176
+
177
+ /**
178
+ * Convert array to html attributes
179
+ *
180
+ * @param array $array
181
+ *
182
+ * @return string
183
+ */
184
+ private function array_to_data( array $array ) {
185
+ $array_map = array_map( function ( $key, $value ) {
186
+ return sprintf( '%s="%s"', $key, esc_attr( $value ) );
187
+
188
+ }, array_keys( $array ), array_values( $array ) );
189
+
190
+ return join( " ", $array_map );
191
+ }
192
  }
 
193
 
194
+ endif;
195
+
196
+ Carousel_Slider_Deprecated_Shortcode::init();
shortcodes/class-carousel-slider-shortcode.php CHANGED
@@ -4,298 +4,316 @@ if ( ! defined( 'WPINC' ) ) {
4
  die;
5
  }
6
 
7
- if( ! class_exists('Carousel_Slider_Shortcode') ):
8
-
9
- class Carousel_Slider_Shortcode
10
- {
11
- private $plugin_path;
12
- private $plugin_url;
13
-
14
- /**
15
- * Carousel_Slider_Shortcode constructor.
16
- *
17
- * @param $plugin_path
18
- * @param $plugin_url
19
- */
20
- public function __construct( $plugin_path, $plugin_url )
21
- {
22
- $this->plugin_path = $plugin_path;
23
- $this->plugin_url = $plugin_url;
24
-
25
- add_shortcode('carousel_slide', array( $this, 'carousel_slide' ) );
26
- }
27
 
28
- /**
29
- * A shortcode for rendering the carousel slide.
30
- *
31
- * @param array $attributes Shortcode attributes.
32
- * @param string $content The text content for shortcode. Not used.
33
- *
34
- * @return string The shortcode output
35
- */
36
- public function carousel_slide( $attributes, $content = null )
37
- {
38
- extract(
39
- shortcode_atts(
40
- array( 'id' =>'' ),
41
- $attributes
42
- )
43
- );
44
- if ( ! $id ) return;
45
-
46
- $slide_type = get_post_meta( $id, '_slide_type', true );
47
- $slide_type = in_array($slide_type, array('image-carousel', 'post-carousel', 'image-carousel-url', 'video-carousel', 'product-carousel')) ? $slide_type : 'image-carousel';
48
-
49
- if ($slide_type == 'post-carousel') {
50
- ob_start();
51
- require $this->plugin_path . '/templates/post-carousel.php';
52
- $html = ob_get_contents();
53
- ob_end_clean();
54
- return apply_filters( 'carousel_slider_posts_carousel', $html, $id, $posts );
55
  }
56
 
57
- if ($slide_type == 'video-carousel') {
58
- ob_start();
59
- require $this->plugin_path . '/templates/video-carousel.php';
60
- $html = ob_get_contents();
61
- ob_end_clean();
62
- return apply_filters( 'carousel_slider_videos_carousel', $html, $id );
63
  }
64
 
65
- if ($slide_type == 'image-carousel-url') {
66
- ob_start();
67
- require $this->plugin_path . '/templates/images-carousel-url.php';
68
- $html = ob_get_contents();
69
- ob_end_clean();
70
- return apply_filters( 'carousel_slider_link_images_carousel', $html, $id );
71
- }
72
-
73
- if ($slide_type == 'image-carousel') {
74
- ob_start();
75
- require $this->plugin_path . '/templates/images-carousel.php';
76
- $html = ob_get_contents();
77
- ob_end_clean();
78
- return apply_filters( 'carousel_slider_gallery_images_carousel', $html, $id );
79
- }
80
-
81
- if ($slide_type == 'product-carousel') {
82
- ob_start();
83
- require $this->plugin_path . '/templates/product-carousel.php';
84
- $html = ob_get_contents();
85
- ob_end_clean();
86
- return apply_filters( 'carousel_slider_product_carousel', $html, $id );
87
- }
88
 
89
- return;
90
- }
91
 
92
- /**
93
- * Generate carousel options for slider
94
- *
95
- * @param $id
96
- *
97
- * @return array
98
- */
99
- private function carousel_options( $id )
100
- {
101
- $_nav_color = get_post_meta( $id, '_nav_color', true );
102
- $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
103
-
104
- $options_array = array(
105
- 'id' => 'id-' . $id,
106
- 'class' => 'owl-carousel carousel-slider',
107
- // General
108
- 'data-slide-type' => $this->get_meta( $id, '_slide_type', 'image-carousel' ),
109
- 'data-margin' => $this->get_meta( $id, '_margin_right', '10' ),
110
- 'data-slide-by' => $this->get_meta( $id, '_slide_by', '1' ),
111
- 'data-loop' => $this->get_meta( $id, '_inifnity_loop', 'true' ),
112
- 'data-lazy-load' => $this->get_meta( $id, '_lazy_load_image', 'false' ),
113
- // Navigation
114
- 'data-dots' => $this->get_meta( $id, '_dot_nav', 'false' ),
115
- 'data-nav' => $this->get_meta( $id, '_nav_button', 'false' ),
116
- 'data-nav-previous-icon' => $this->nav_previous_icon(),
117
- 'data-nav-next-icon' => $this->nav_next_icon(),
118
- // Video
119
- 'data-video-width' => $this->get_meta( $id, '_video_width', 'false' ),
120
- 'data-video-height' => $this->get_meta( $id, '_video_height', 'false' ),
121
- // Autoplay
122
- 'data-autoplay' => $this->get_meta( $id, '_autoplay', 'true' ),
123
- 'data-autoplay-timeout' => $this->get_meta( $id, '_autoplay_timeout', '5000' ),
124
- 'data-autoplay-speed' => $this->get_meta( $id, '_autoplay_speed', '500' ),
125
- 'data-autoplay-hover-pause' => $this->get_meta( $id, '_autoplay_pause', 'false' ),
126
- // Responsive
127
- 'data-colums' => $this->get_meta( $id, '_items', '4' ),
128
- 'data-colums-desktop' => $this->get_meta( $id, '_items_desktop', '4' ),
129
- 'data-colums-small-desktop' => $this->get_meta( $id, '_items_small_desktop', '4' ),
130
- 'data-colums-tablet' => $this->get_meta( $id, '_items_portrait_tablet', '3' ),
131
- 'data-colums-small-tablet' => $this->get_meta( $id, '_items_small_portrait_tablet', '2' ),
132
- 'data-colums-mobile' => $this->get_meta( $id, '_items_portrait_mobile', '1' ),
133
- );
134
-
135
- return $this->array_to_data( $options_array );
136
- }
137
 
138
- /**
139
- * Get post meta by id and key
140
- *
141
- * @param $id
142
- * @param $key
143
- * @param null $default
144
- *
145
- * @return string|void
146
- */
147
- public function get_meta( $id, $key, $default = null )
148
- {
149
- $meta = get_post_meta( $id, $key, true );
150
-
151
- if ( empty($meta) && $default ) {
152
- $meta = $default;
153
- }
154
 
155
- if ($meta == 'zero') { $meta = '0'; }
156
- if ($meta == 'on') { $meta = 'true'; }
157
- if ($meta == 'off') { $meta = 'false'; }
158
- if ($key == '_margin_right' && $meta == 0) { $meta = '0'; }
159
 
160
- return esc_attr( $meta );
161
- }
 
 
 
162
 
163
- /**
164
- * Convert array to html data attribute
165
- *
166
- * @param $array
167
- *
168
- * @return array
169
- */
170
- public function array_to_data( $array )
171
- {
172
-
173
- $array_map = array_map( function( $key, $value )
174
- {
175
-
176
- if( is_bool( $value ) )
177
- {
178
- if ($value) {
179
-
180
- return sprintf( '%s="%s"', $key, 'true' );
181
- } else {
182
-
183
- return sprintf( '%s="%s"', $key, 'false' );
184
- }
185
  }
186
 
187
- if ( is_array( $value ) ) {
 
 
 
 
188
 
189
- return sprintf( '%s="%s"', $key, implode(" ", $value ) );
190
  }
191
 
192
- return sprintf( '%s="%s"', $key, esc_attr( $value ) );
 
 
 
 
193
 
194
- }, array_keys($array), array_values( $array ) );
 
195
 
196
- return $array_map;
197
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
 
199
- /**
200
- * Check if url is valid as per RFC 2396 Generic Syntax
201
- *
202
- * @param string $url
203
- * @return boolean
204
- */
205
- public function is_valid_url( $url )
206
- {
207
- if ( filter_var( $url, FILTER_VALIDATE_URL ) ) {
208
-
209
- return true;
 
 
 
210
  }
211
 
212
- return false;
213
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
 
215
- /**
216
- * Convert url to youtube and vimeo video link
217
- *
218
- * @param $url
219
- *
220
- * @return string|void
221
- */
222
- public function video_url( $url ) {
223
- if( ! $this->is_valid_url( $url )){
224
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  }
226
 
227
- $url = esc_url( $url );
 
 
 
 
 
 
 
 
 
 
 
228
 
229
- if (strpos($url, 'youtube.com') > 0) {
230
- return '<div class="item-video"><a class="owl-video" href="'.$url.'"></a></div>';
231
- }
 
 
 
 
 
 
 
232
 
233
- if (strpos($url, 'vimeo.com') > 0) {
234
- return '<div class="item-video"><a class="owl-video" href="'.$url.'"></a></div>';
235
- }
 
 
 
 
 
 
 
236
 
237
- return;
238
- }
 
 
 
 
 
 
 
 
 
239
 
240
- /**
241
- * Previous navigation icon
242
- *
243
- * @return string
244
- */
245
- public function nav_previous_icon()
246
- {
247
- return '<svg class="carousel-slider-nav-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="48" viewBox="0 0 11 28"><path d="M9.8 8.5c0 0.1-0.1 0.3-0.2 0.4l-6.1 6.1 6.1 6.1c0.1 0.1 0.2 0.2 0.2 0.4s-0.1 0.3-0.2 0.4l-0.8 0.8c-0.1 0.1-0.2 0.2-0.4 0.2s-0.3-0.1-0.4-0.2l-7.3-7.3c-0.1-0.1-0.2-0.2-0.2-0.4s0.1-0.3 0.2-0.4l7.3-7.3c0.1-0.1 0.2-0.2 0.4-0.2s0.3 0.1 0.4 0.2l0.8 0.8c0.1 0.1 0.2 0.2 0.2 0.4z"/></svg>';
248
- }
249
 
250
- /**
251
- * Next navigation icon
252
- *
253
- * @return string
254
- */
255
- public function nav_next_icon()
256
- {
257
- return '<svg class="carousel-slider-nav-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="48" viewBox="0 0 9 28"><path d="M9.3 15c0 0.1-0.1 0.3-0.2 0.4l-7.3 7.3c-0.1 0.1-0.2 0.2-0.4 0.2s-0.3-0.1-0.4-0.2l-0.8-0.8c-0.1-0.1-0.2-0.2-0.2-0.4 0-0.1 0.1-0.3 0.2-0.4l6.1-6.1-6.1-6.1c-0.1-0.1-0.2-0.2-0.2-0.4s0.1-0.3 0.2-0.4l0.8-0.8c0.1-0.1 0.2-0.2 0.4-0.2s0.3 0.1 0.4 0.2l7.3 7.3c0.1 0.1 0.2 0.2 0.2 0.4z"/></svg>';
258
- }
259
 
260
- /**
261
- * Filter posts data
262
- *
263
- * @param $posts
264
- *
265
- * @return array|void
266
- */
267
- public function filter_posts( $posts )
268
- {
269
- if ( ! is_array( $posts ) ) {
270
  return;
271
  }
272
- return array_map(function( $value ){
273
 
274
- $category = get_the_category( $value->ID );
275
- $category = (object) array(
276
- 'link' => isset($category[0]->term_id) ? esc_url( get_category_link( $category[0]->term_id ) ) : '',
277
- 'title' => isset($category[0]->name) ? esc_html( $category[0]->name ) : '',
278
- );
 
 
 
279
 
280
- return (object) array(
281
- 'id' => $value->ID,
282
- 'title' => esc_attr($value->post_title),
283
- 'permalink' => esc_url( get_permalink( $value->ID ) ),
284
- 'excerpt' => wp_trim_words(
285
- strip_tags($value->post_content), '19', ' ...'
286
- ),
287
- 'thumbnail_id' => intval(get_post_thumbnail_id( $value->ID )),
288
- 'category' => $category,
289
- 'author' => (object) array(
290
- 'id' => intval($value->post_author),
291
- 'posts_url' => esc_url(get_author_posts_url(intval($value->post_author))),
292
- 'display_name' => esc_html(get_the_author_meta( 'display_name', intval($value->post_author))),
293
- ),
294
- 'created' => strtotime($value->post_date),
295
- 'modified' => strtotime($value->post_modified),
296
- );
297
- }, $posts);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  }
299
- }
300
 
301
- endif;
 
 
4
  die;
5
  }
6
 
7
+ if ( ! class_exists( 'Carousel_Slider_Shortcode' ) ):
8
+
9
+ class Carousel_Slider_Shortcode {
10
+ protected static $instance = null;
11
+
12
+ /**
13
+ * Ensures only one instance of this class is loaded or can be loaded.
14
+ *
15
+ * @return Carousel_Slider_Shortcode
16
+ */
17
+ public static function init() {
18
+ if ( is_null( self::$instance ) ) {
19
+ self::$instance = new self();
20
+ }
 
 
 
 
 
 
21
 
22
+ return self::$instance;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  }
24
 
25
+ /**
26
+ * CarouselSliderShortcode constructor.
27
+ */
28
+ public function __construct() {
29
+ add_shortcode( 'carousel_slide', array( $this, 'carousel_slide' ) );
 
30
  }
31
 
32
+ /**
33
+ * A shortcode for rendering the carousel slide.
34
+ *
35
+ * @param array $attributes Shortcode attributes.
36
+ * @param string $content The text content for shortcode. Not used.
37
+ *
38
+ * @return string The shortcode output
39
+ */
40
+ public function carousel_slide( $attributes, $content = null ) {
41
+ if ( empty( $attributes['id'] ) ) {
42
+ return '';
43
+ }
 
 
 
 
 
 
 
 
 
 
 
44
 
45
+ $id = intval( $attributes['id'] );
 
46
 
47
+ $slide_type = get_post_meta( $id, '_slide_type', true );
48
+ $slide_type = in_array( $slide_type, carousel_slider_slide_type() ) ? $slide_type : 'image-carousel';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
+ if ( $slide_type == 'post-carousel' ) {
51
+ ob_start();
52
+ require CAROUSEL_SLIDER_TEMPLATES . '/public/post-carousel.php';
53
+ $html = ob_get_contents();
54
+ ob_end_clean();
 
 
 
 
 
 
 
 
 
 
 
55
 
56
+ return apply_filters( 'carousel_slider_posts_carousel', $html, $id );
57
+ }
 
 
58
 
59
+ if ( $slide_type == 'video-carousel' ) {
60
+ ob_start();
61
+ require CAROUSEL_SLIDER_TEMPLATES . '/public/video-carousel.php';
62
+ $html = ob_get_contents();
63
+ ob_end_clean();
64
 
65
+ return apply_filters( 'carousel_slider_videos_carousel', $html, $id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
+ if ( $slide_type == 'image-carousel-url' ) {
69
+ ob_start();
70
+ require CAROUSEL_SLIDER_TEMPLATES . '/public/images-carousel-url.php';
71
+ $html = ob_get_contents();
72
+ ob_end_clean();
73
 
74
+ return apply_filters( 'carousel_slider_link_images_carousel', $html, $id );
75
  }
76
 
77
+ if ( $slide_type == 'image-carousel' ) {
78
+ ob_start();
79
+ require CAROUSEL_SLIDER_TEMPLATES . '/public/images-carousel.php';
80
+ $html = ob_get_contents();
81
+ ob_end_clean();
82
 
83
+ return apply_filters( 'carousel_slider_gallery_images_carousel', $html, $id );
84
+ }
85
 
86
+ if ( $slide_type == 'product-carousel' ) {
87
+
88
+ $query_type = get_post_meta( $id, '_product_query_type', true );
89
+ $query_type = empty( $query_type ) ? 'query_porduct' : $query_type;
90
+ $product_query = get_post_meta( $id, '_product_query', true );
91
+
92
+ if ( $query_type == 'query_porduct' && $product_query == 'product_categories_list' ) {
93
+ ob_start();
94
+
95
+ echo $this->product_categories( $id );
96
+ $html = ob_get_contents();
97
+ ob_end_clean();
98
+
99
+ return apply_filters( 'carousel_slider_product_carousel', $html, $id );
100
+ }
101
+
102
+ ob_start();
103
+ require CAROUSEL_SLIDER_TEMPLATES . '/public/product-carousel.php';
104
+ $html = ob_get_contents();
105
+ ob_end_clean();
106
 
107
+ return apply_filters( 'carousel_slider_product_carousel', $html, $id );
108
+ }
109
+
110
+ if ( $slide_type == 'hero-banner-slider' ) {
111
+
112
+ wp_enqueue_script( 'carousel-slider-hero' );
113
+ ob_start();
114
+ require CAROUSEL_SLIDER_TEMPLATES . '/public/hero-banner-slider.php';
115
+ $html = ob_get_contents();
116
+ ob_end_clean();
117
+ return apply_filters( 'carousel_slider_content_carousel', $html, $id );
118
+ }
119
+
120
+ return '';
121
  }
122
 
123
+ /**
124
+ * Generate carousel options for slider
125
+ *
126
+ * @param $id
127
+ *
128
+ * @return array
129
+ */
130
+ private function carousel_options( $id ) {
131
+ $_nav_color = get_post_meta( $id, '_nav_color', true );
132
+ $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
133
+ $_nav_button = get_post_meta( $id, '_nav_button', true );
134
+ $_arrow_position = get_post_meta( $id, '_arrow_position', true );
135
+ $_dot_nav = get_post_meta( $id, '_dot_nav', true );
136
+ $_bullet_position = get_post_meta( $id, '_bullet_position', true );
137
+ $_bullet_shape = get_post_meta( $id, '_bullet_shape', true );
138
+
139
+ $class = 'owl-carousel carousel-slider';
140
+
141
+ // Arrows position
142
+ if ( $_arrow_position == 'inside' ) {
143
+ $class .= ' arrows-inside';
144
+ } else {
145
+ $class .= ' arrows-outside';
146
+ }
147
 
148
+ // Arrows visibility
149
+ if ( $_nav_button == 'always' ) {
150
+ $class .= ' arrows-visible-always';
151
+ } elseif ( $_nav_button == 'off' ) {
152
+ $class .= ' arrows-hidden';
153
+ } else {
154
+ $class .= ' arrows-visible-hover';
155
+ }
156
+
157
+ // Dots visibility
158
+ if ( $_dot_nav == 'on' ) {
159
+ $class .= ' dots-visible-always';
160
+ } elseif ( $_dot_nav == 'off' ) {
161
+ $class .= ' dots-hidden';
162
+ } else {
163
+ $class .= ' dots-visible-hover';
164
+ }
165
+
166
+ // Dots position
167
+ if ( $_bullet_position == 'left' ) {
168
+ $class .= ' dots-left';
169
+ } elseif ( $_bullet_position == 'right' ) {
170
+ $class .= ' dots-right';
171
+ } else {
172
+ $class .= ' dots-center';
173
+ }
174
+
175
+ // Dots shape
176
+ if ( $_bullet_shape == 'circle' ) {
177
+ $class .= ' dots-circle';
178
+ } else {
179
+ $class .= ' dots-square';
180
+ }
181
+
182
+ $options_array = array(
183
+ 'id' => 'id-' . $id,
184
+ 'class' => $class,
185
+ // General
186
+ 'data-slide-type' => $this->get_meta( $id, '_slide_type', 'image-carousel' ),
187
+ 'data-margin' => $this->get_meta( $id, '_margin_right', '10' ),
188
+ 'data-slide-by' => $this->get_meta( $id, '_slide_by', '1' ),
189
+ 'data-loop' => $this->get_meta( $id, '_inifnity_loop', 'true' ),
190
+ 'data-lazy-load' => $this->get_meta( $id, '_lazy_load_image', 'false' ),
191
+ // Navigation
192
+ 'data-dots' => $this->get_meta( $id, '_dot_nav', 'false' ),
193
+ 'data-nav' => $this->get_meta( $id, '_nav_button', 'false' ),
194
+ // Video
195
+ 'data-video-width' => $this->get_meta( $id, '_video_width', 'false' ),
196
+ 'data-video-height' => $this->get_meta( $id, '_video_height', 'false' ),
197
+ // Autoplay
198
+ 'data-autoplay' => $this->get_meta( $id, '_autoplay', 'true' ),
199
+ 'data-autoplay-timeout' => $this->get_meta( $id, '_autoplay_timeout', '5000' ),
200
+ 'data-autoplay-speed' => $this->get_meta( $id, '_autoplay_speed', '500' ),
201
+ 'data-autoplay-hover-pause' => $this->get_meta( $id, '_autoplay_pause', 'false' ),
202
+ // Responsive
203
+ 'data-colums' => $this->get_meta( $id, '_items', '4' ),
204
+ 'data-colums-desktop' => $this->get_meta( $id, '_items_desktop', '4' ),
205
+ 'data-colums-small-desktop' => $this->get_meta( $id, '_items_small_desktop', '4' ),
206
+ 'data-colums-tablet' => $this->get_meta( $id, '_items_portrait_tablet', '3' ),
207
+ 'data-colums-small-tablet' => $this->get_meta( $id, '_items_small_portrait_tablet', '2' ),
208
+ 'data-colums-mobile' => $this->get_meta( $id, '_items_portrait_mobile', '1' ),
209
+ );
210
+
211
+ return $this->array_to_data( $options_array );
212
  }
213
 
214
+ /**
215
+ * Get post meta by id and key
216
+ *
217
+ * @param $id
218
+ * @param $key
219
+ * @param null $default
220
+ *
221
+ * @return string
222
+ */
223
+ public function get_meta( $id, $key, $default = null ) {
224
+ return carousel_slider_get_meta( $id, $key, $default );
225
+ }
226
 
227
+ /**
228
+ * Convert array to html data attribute
229
+ *
230
+ * @param $array
231
+ *
232
+ * @return array
233
+ */
234
+ public function array_to_data( $array ) {
235
+ return carousel_slider_array_to_attribute( $array );
236
+ }
237
 
238
+ /**
239
+ * Check if url is valid as per RFC 2396 Generic Syntax
240
+ *
241
+ * @param string $url
242
+ *
243
+ * @return boolean
244
+ */
245
+ public function is_valid_url( $url ) {
246
+ return carousel_slider_is_url( $url );
247
+ }
248
 
249
+ /**
250
+ * Convert url to youtube and vimeo video link
251
+ *
252
+ * @param $url
253
+ *
254
+ * @return string
255
+ */
256
+ public function video_url( $url ) {
257
+ if ( ! $this->is_valid_url( $url ) ) {
258
+ return;
259
+ }
260
 
261
+ $url = esc_url( $url );
 
 
 
 
 
 
 
 
262
 
263
+ if ( strpos( $url, 'youtube.com' ) > 0 ) {
264
+ return '<div class="item-video"><a class="owl-video" href="' . $url . '"></a></div>';
265
+ }
266
+
267
+ if ( strpos( $url, 'vimeo.com' ) > 0 ) {
268
+ return '<div class="item-video"><a class="owl-video" href="' . $url . '"></a></div>';
269
+ }
 
 
270
 
 
 
 
 
 
 
 
 
 
 
271
  return;
272
  }
 
273
 
274
+ /**
275
+ * Get product categories list carousel
276
+ *
277
+ * @param int $id
278
+ *
279
+ * @return string
280
+ */
281
+ private function product_categories( $id = 0 ) {
282
 
283
+ $product_carousel = new Carousel_Slider_Product();
284
+ $product_categories = $product_carousel->product_categories();
285
+
286
+ $options = $this->carousel_options( $id );
287
+ $options = join( " ", $options );
288
+
289
+ ob_start();
290
+ if ( $product_categories ) {
291
+ echo '<div class="carousel-slider-outer carousel-slider-outer-products carousel-slider-outer-' . $id . '">';
292
+ carousel_slider_inline_style( $id );
293
+ echo '<div ' . $options . '>';
294
+
295
+
296
+ foreach ( $product_categories as $category ) {
297
+ echo '<div class="product carousel-slider__product">';
298
+ do_action( 'woocommerce_before_subcategory', $category );
299
+ do_action( 'woocommerce_before_subcategory_title', $category );
300
+ do_action( 'woocommerce_shop_loop_subcategory_title', $category );
301
+ do_action( 'woocommerce_after_subcategory_title', $category );
302
+ do_action( 'woocommerce_after_subcategory', $category );
303
+ echo '</div>';
304
+ }
305
+
306
+ echo '</div>';
307
+ echo '</div>';
308
+ }
309
+
310
+ $html = ob_get_contents();
311
+ ob_end_clean();
312
+
313
+ return $html;
314
+ }
315
  }
 
316
 
317
+ endif;
318
+
319
+ Carousel_Slider_Shortcode::init();
templates/admin/autoplay.php CHANGED
@@ -1,37 +1,37 @@
1
  <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
  <span class="shapla-toggle-title">
3
- <?php _e('Autoplay Settings', 'carousel-slider'); ?>
4
  </span>
5
- <div class="shapla-toggle-inner">
6
- <div class="shapla-toggle-content">
7
- <?php
8
- $this->form->checkbox( array(
9
- 'id' => '_autoplay',
10
- 'name' => __('Autoplay', 'carousel-slider'),
11
- 'label' => __('Autoplay.', 'carousel-slider'),
12
- 'desc' => __('Check to enable autoplay', 'carousel-slider'),
13
- 'std' => 'on'
14
- ));
15
- $this->form->number( array(
16
- 'id' => '_autoplay_timeout',
17
- 'name' => __('Autoplay Timeout', 'carousel-slider'),
18
- 'desc' => __('Autoplay interval timeout in millisecond. Default: 5000', 'carousel-slider'),
19
- 'std' => 5000
20
- ));
21
 
22
- $this->form->number( array(
23
- 'id' => '_autoplay_speed',
24
- 'name' => __('Autoplay Speed', 'carousel-slider'),
25
- 'desc' => __('Autoplay speen in millisecond. Default: 500', 'carousel-slider'),
26
- 'std' => 500
27
- ));
28
- $this->form->checkbox( array(
29
- 'id' => '_autoplay_pause',
30
- 'name' => __('Autoplay Hover Pause', 'carousel-slider'),
31
- 'label' => __('Pause on mouse hover.', 'carousel-slider'),
32
- 'desc' => __('Pause autoplay on mouse hover.', 'carousel-slider'),
33
- ));
34
- ?>
35
- </div>
36
- </div>
37
  </div>
1
  <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
  <span class="shapla-toggle-title">
3
+ <?php esc_html_e( 'Autoplay Settings', 'carousel-slider' ); ?>
4
  </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->form->checkbox( array(
9
+ 'id' => '_autoplay',
10
+ 'name' => esc_html__( 'Autoplay', 'carousel-slider' ),
11
+ 'label' => esc_html__( 'Autoplay.', 'carousel-slider' ),
12
+ 'desc' => esc_html__( 'Check to enable autoplay', 'carousel-slider' ),
13
+ 'std' => 'on'
14
+ ) );
15
+ $this->form->number( array(
16
+ 'id' => '_autoplay_timeout',
17
+ 'name' => esc_html__( 'Autoplay Timeout', 'carousel-slider' ),
18
+ 'desc' => esc_html__( 'Autoplay interval timeout in millisecond. Default: 5000', 'carousel-slider' ),
19
+ 'std' => 5000
20
+ ) );
21
 
22
+ $this->form->number( array(
23
+ 'id' => '_autoplay_speed',
24
+ 'name' => esc_html__( 'Autoplay Speed', 'carousel-slider' ),
25
+ 'desc' => esc_html__( 'Autoplay speed in millisecond. Default: 500', 'carousel-slider' ),
26
+ 'std' => 500
27
+ ) );
28
+ $this->form->checkbox( array(
29
+ 'id' => '_autoplay_pause',
30
+ 'name' => esc_html__( 'Autoplay Hover Pause', 'carousel-slider' ),
31
+ 'label' => esc_html__( 'Pause on mouse hover.', 'carousel-slider' ),
32
+ 'desc' => esc_html__( 'Pause autoplay on mouse hover.', 'carousel-slider' ),
33
+ ) );
34
+ ?>
35
+ </div>
36
+ </div>
37
  </div>
templates/admin/documentation.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+ ?>
7
+ <style type="text/css">
8
+ .carousel_slider_iframe {
9
+ position: relative;
10
+ padding-bottom: 56.25%; /* height / width * 100 */
11
+ padding-top: 25px;
12
+ height: 0;
13
+ }
14
+
15
+ .carousel_slider_iframe > iframe {
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+
23
+ .carousel_slider_columns {
24
+ display: flex;
25
+ flex-wrap: wrap;
26
+ box-sizing: border-box;
27
+ }
28
+
29
+ .carousel_slider_column {
30
+ flex: 0 0 100%;
31
+ padding: 1rem;
32
+ box-sizing: border-box;
33
+ }
34
+
35
+ @media screen and (min-width: 601px) {
36
+ .carousel_slider_column {
37
+ flex: 0 0 50%;
38
+ }
39
+ }
40
+
41
+ @media screen and (min-width: 1025px) {
42
+ .carousel_slider_column {
43
+ flex: 0 0 33.333333%;
44
+ }
45
+ }
46
+
47
+ @media screen and (min-width: 1400px) {
48
+ .carousel_slider_column {
49
+ flex: 0 0 25%;
50
+ }
51
+ }
52
+ </style>
53
+ <div class="wrap">
54
+ <h1 class="wp-heading">
55
+ <?php esc_html_e( 'Carousel Slider Documentation', 'carousel-slider' ); ?>
56
+ </h1>
57
+ <hr class="clear">
58
+ <div class="postbox">
59
+ <div class="inside">
60
+ <div class="carousel_slider_columns">
61
+ <div class="carousel_slider_column">
62
+ <div class="carousel_slider_iframe">
63
+ <iframe width="1280" height="720"
64
+ src="https://www.youtube.com/embed/ZzI1JhElrxc"
65
+ frameborder="0"
66
+ allowfullscreen></iframe>
67
+ </div>
68
+ <label><?php esc_html_e( 'Images Carousel', 'carousel-slider' ); ?></label>
69
+ <p class="description"><?php esc_html_e( 'Image carousel using gallery images', 'carousel-slider' ); ?></p>
70
+ </div>
71
+ <div class="carousel_slider_column">
72
+ <div class="carousel_slider_iframe">
73
+ <iframe width="1280" height="720"
74
+ src="https://www.youtube.com/embed/a7hqn1yNzwM" frameborder="0"
75
+ allowfullscreen></iframe>
76
+ </div>
77
+ <label><?php esc_html_e( 'Images Carousel', 'carousel-slider' ); ?></label>
78
+ <p class="description"><?php esc_html_e( 'Image carousel using custom URLs', 'carousel-slider' ); ?></p>
79
+ </div>
80
+ <div class="carousel_slider_column">
81
+ <div class="carousel_slider_iframe">
82
+ <iframe width="1280" height="720"
83
+ src="https://www.youtube.com/embed/ImJB946azy0" frameborder="0"
84
+ allowfullscreen></iframe>
85
+ </div>
86
+ <label><?php esc_html_e( 'Posts Carousel', 'carousel-slider' ); ?></label>
87
+ </div>
88
+ <div class="carousel_slider_column">
89
+ <div class="carousel_slider_iframe">
90
+ <iframe width="1280" height="720"
91
+ src="https://www.youtube.com/embed/yiAkvXyfakg" frameborder="0"
92
+ allowfullscreen></iframe>
93
+ </div>
94
+ <label><?php esc_html_e( 'WooCommerce Products Carousel', 'carousel-slider' ); ?></label>
95
+ </div>
96
+ <div class="carousel_slider_column">
97
+ <div class="carousel_slider_iframe">
98
+ <iframe width="1280" height="720"
99
+ src="https://www.youtube.com/embed/kYgp6wp27lM" frameborder="0"
100
+ allowfullscreen></iframe>
101
+ </div>
102
+ <label><?php esc_html_e( 'In Widget Areas', 'carousel-slider' ); ?></label>
103
+ </div>
104
+ <div class="carousel_slider_column">
105
+ <div class="carousel_slider_iframe">
106
+ <iframe width="1280" height="720"
107
+ src="https://www.youtube.com/embed/-OaYQZfr1RM" frameborder="0"
108
+ allowfullscreen></iframe>
109
+ </div>
110
+ <label><?php esc_html_e( 'With Page Builder by SiteOrigin', 'carousel-slider' ); ?></label>
111
+ </div>
112
+ <div class="carousel_slider_column">
113
+ <div class="carousel_slider_iframe">
114
+ <iframe width="1280" height="720"
115
+ src="https://www.youtube.com/embed/4LhDXH81whk" frameborder="0"
116
+ allowfullscreen></iframe>
117
+ </div>
118
+ <label><?php esc_html_e( 'With WPBakery Visual Composer', 'carousel-slider' ); ?></label>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ <br class="clear">
124
+ </div>
templates/admin/general.php CHANGED
@@ -1,42 +1,36 @@
1
- <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
- <span class="shapla-toggle-title">
3
- <?php _e('General Settings', 'carousel-slider'); ?>
4
- </span>
5
- <div class="shapla-toggle-inner">
6
- <div class="shapla-toggle-content">
7
- <?php
8
- $this->form->image_sizes(array(
9
- 'id' => __('_image_size', 'carousel-slider'),
10
- 'name' => __('Carousel Image size', 'carousel-slider'),
11
- 'desc' => sprintf(__( 'Select "original uploaded image" for full size image or your desired image size for carousel image. You can change the default size for thumbnail, medium and large from %1$s Settings >> Media %2$s.', 'carousel-slider' ),'<a target="_blank" href="'.get_admin_url().'options-media.php">','</a>'),
12
- ));
13
- $this->form->checkbox(array(
14
- 'id' => '_lazy_load_image',
15
- 'name' => __('Lazy load image', 'carousel-slider'),
16
- 'label' => __('Lazy load image.', 'carousel-slider'),
17
- 'desc' => __('Check to enable image lazy load.', 'carousel-slider'),
18
- 'std' => 'off'
19
- ));
20
- $this->form->text( array(
21
- 'id' => '_slide_by',
22
- 'name' => __('Slide By', 'carousel-slider'),
23
- 'desc' => __('Navigation slide by x number. Write "page" with inverted comma to slide by page. Default value is 1.', 'carousel-slider'),
24
- 'std' => 1
25
- ));
26
- $this->form->number( array(
27
- 'id' => '_margin_right',
28
- 'name' => __('Margin Right(px) on item.', 'carousel-slider'),
29
- 'desc' => __('margin-right(px) on item. Default value is 10. Example: 20', 'carousel-slider'),
30
- 'std' => 10
31
- ));
32
- $this->form->checkbox( array(
33
- 'id' => '_inifnity_loop',
34
- 'name' => __('Inifnity loop', 'carousel-slider'),
35
- 'label' => __('Inifnity loop.', 'carousel-slider'),
36
- 'desc' => __('Check to show inifnity loop. Duplicate last and first items to get loop illusion', 'carousel-slider'),
37
- 'std' => 'on'
38
- ));
39
- ?>
40
- </div>
41
- </div>
42
- </div>
1
+ <?php
2
+
3
+ $this->form->image_sizes( array(
4
+ 'id' => esc_html__( '_image_size', 'carousel-slider' ),
5
+ 'name' => esc_html__( 'Carousel Image size', 'carousel-slider' ),
6
+ 'desc' => sprintf(
7
+ esc_html__( 'Select "original uploaded image" for full size image or your desired image size for carousel image. You can change the default size for thumbnail, medium and large from %1$s Settings >> Media %2$s.', 'carousel-slider' ),
8
+ '<a target="_blank" href="' . get_admin_url() . 'options-media.php">', '</a>'
9
+ ),
10
+ ) );
11
+ $this->form->select( array(
12
+ 'id' => '_lazy_load_image',
13
+ 'name' => esc_html__( 'Lazy Loading', 'carousel-slider' ),
14
+ 'desc' => esc_html__( 'Enable image with lazy loading.', 'carousel-slider' ),
15
+ 'std' => 'off',
16
+ 'options' => array(
17
+ 'on' => esc_html__( 'Enable' ),
18
+ 'off' => esc_html__( 'Disable' ),
19
+ ),
20
+ ) );
21
+ $this->form->number( array(
22
+ 'id' => '_margin_right',
23
+ 'name' => esc_html__( 'Item Spacing.', 'carousel-slider' ),
24
+ 'desc' => esc_html__( 'Space between two slide. Enter 10 for 10px', 'carousel-slider' ),
25
+ 'std' => 10
26
+ ) );
27
+ $this->form->select( array(
28
+ 'id' => '_inifnity_loop',
29
+ 'name' => esc_html__( 'Infinity loop', 'carousel-slider' ),
30
+ 'desc' => esc_html__( 'Enable or disable loop(circular) of carousel.', 'carousel-slider' ),
31
+ 'std' => 'on',
32
+ 'options' => array(
33
+ 'on' => esc_html__( 'Enable' ),
34
+ 'off' => esc_html__( 'Disable' ),
35
+ ),
36
+ ) );
 
 
 
 
 
 
templates/admin/hero-banner-slider.php ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="open" id="section_content_carousel" class="shapla-toggle shapla-toggle--stroke"
2
+ style="display: <?php echo $slide_type != 'hero-banner-slider' ? 'none' : 'block'; ?>">
3
+ <span class="shapla-toggle-title">
4
+ <?php esc_html_e( 'Hero Banner Slider', 'carousel-slider' ); ?>
5
+ </span>
6
+ <div class="shapla-toggle-inner">
7
+ <div class="shapla-toggle-content">
8
+ <button class="button carousel-slider__add-slide" data-post-id="<?php echo $post->ID; ?>">Add Slide</button>
9
+ <div id="carouselSliderContentInside">
10
+ <?php
11
+ $content_sliders = get_post_meta( $post->ID, '_content_slider', true );
12
+ $content_settings = get_post_meta( $post->ID, '_content_slider_settings', true );
13
+ $_slide_height = isset( $content_settings['slide_height'] ) ? $content_settings['slide_height'] : '400px';
14
+ $_content_width = isset( $content_settings['content_width'] ) ? $content_settings['content_width'] : '850px';
15
+ $_slide_animation = isset( $content_settings['slide_animation'] ) ? $content_settings['slide_animation'] : 'fadeOut';
16
+ $_slide_padding = isset( $content_settings['slide_padding'] ) ? $content_settings['slide_padding'] : array();
17
+
18
+
19
+ // Get WordPress media upload URL
20
+ $upload_link = esc_url( get_upload_iframe_src( 'image', $post->ID ) );
21
+ $num_to_word = new Carousel_Slider_Number_To_Word;
22
+
23
+ if ( is_array( $content_sliders ) && count( $content_sliders ) > 0 ) {
24
+ $total_sliders = count( $content_sliders );
25
+ foreach ( $content_sliders as $slide_num => $content_slider ) {
26
+ $_to_word = str_replace( array( ' ', ' - ' ), '_', $num_to_word->convert( $slide_num ) );
27
+
28
+
29
+ $_all_bg_position = carousel_slider_background_position();
30
+ $_all_bg_size = carousel_slider_background_size();
31
+ // Slide Content
32
+ $_slide_heading = isset( $content_slider['slide_heading'] ) ? $content_slider['slide_heading'] : '';
33
+ $_slide_description = isset( $content_slider['slide_description'] ) ? $content_slider['slide_description'] : '';
34
+ // Slide Background
35
+ $_img_bg_position = ! empty( $content_slider['img_bg_position'] ) ? esc_attr( $content_slider['img_bg_position'] ) : 'center center';
36
+ $_img_bg_size = ! empty( $content_slider['img_bg_size'] ) ? esc_attr( $content_slider['img_bg_size'] ) : 'cover';
37
+ $_bg_color = ! empty( $content_slider['bg_color'] ) ? esc_attr( $content_slider['bg_color'] ) : '';
38
+ $_img_id = ! empty( $content_slider['img_id'] ) ? absint( $content_slider['img_id'] ) : 0;
39
+ $_img_src = wp_get_attachment_image_src( $_img_id, 'full' );
40
+ $_have_img = is_array( $_img_src );
41
+ // Slide Link
42
+ $_link_type = ! empty( $content_slider['link_type'] ) ? esc_attr( $content_slider['link_type'] ) : 'full';
43
+ $_slide_link = ! empty( $content_slider['slide_link'] ) ? esc_url( $content_slider['slide_link'] ) : '';
44
+ $_link_target = ! empty( $content_slider['link_target'] ) ? esc_attr( $content_slider['link_target'] ) : '_blank';
45
+ // Slide Style
46
+ $_content_alignment = ! empty( $content_slider['content_alignment'] ) ? esc_attr( $content_slider['content_alignment'] ) : 'left';
47
+ $_heading_font_size = ! empty( $content_slider['heading_font_size'] ) ? absint( $content_slider['heading_font_size'] ) : '60';
48
+ $_heading_gutter = ! empty( $content_slider['heading_gutter'] ) ? esc_attr( $content_slider['heading_gutter'] ) : '1rem';
49
+ $_heading_color = ! empty( $content_slider['heading_color'] ) ? esc_attr( $content_slider['heading_color'] ) : '#ffffff';
50
+ $_heading_bg_color = ! empty( $content_slider['heading_background_color'] ) ? esc_attr( $content_slider['heading_background_color'] ) : '';
51
+ $_desc_font_size = ! empty( $content_slider['description_font_size'] ) ? absint( $content_slider['description_font_size'] ) : '24';
52
+ $_description_gutter = ! empty( $content_slider['description_gutter'] ) ? esc_attr( $content_slider['description_gutter'] ) : '1rem';
53
+ $_desc_color = ! empty( $content_slider['description_color'] ) ? esc_attr( $content_slider['description_color'] ) : '#ffffff';
54
+ $_desc_bg_color = ! empty( $content_slider['description_background_color'] ) ? esc_attr( $content_slider['description_background_color'] ) : '';
55
+
56
+ $_btn_1_text = ! empty( $content_slider['button_one_text'] ) ? esc_attr( $content_slider['button_one_text'] ) : '';
57
+ $_btn_1_url = ! empty( $content_slider['button_one_url'] ) ? esc_attr( $content_slider['button_one_url'] ) : '';
58
+ $_btn_1_target = ! empty( $content_slider['button_one_target'] ) ? esc_attr( $content_slider['button_one_target'] ) : '_self';
59
+ $_btn_1_type = ! empty( $content_slider['button_one_type'] ) ? esc_attr( $content_slider['button_one_type'] ) : 'normal';
60
+ $_btn_1_size = ! empty( $content_slider['button_one_size'] ) ? esc_attr( $content_slider['button_one_size'] ) : 'medium';
61
+ $_btn_1_bg_color = ! empty( $content_slider['button_one_bg_color'] ) ? esc_attr( $content_slider['button_one_bg_color'] ) : '#00d1b2';
62
+ $_btn_1_color = ! empty( $content_slider['button_one_color'] ) ? esc_attr( $content_slider['button_one_color'] ) : '#ffffff';
63
+ $_btn_1_border_width = ! empty( $content_slider['button_one_border_width'] ) ? esc_attr( $content_slider['button_one_border_width'] ) : '0px';
64
+ $_btn_1_border_radius = ! empty( $content_slider['button_one_border_radius'] ) ? esc_attr( $content_slider['button_one_border_radius'] ) : '3px';
65
+
66
+ $_btn_2_text = ! empty( $content_slider['button_two_text'] ) ? esc_attr( $content_slider['button_two_text'] ) : '';
67
+ $_btn_2_url = ! empty( $content_slider['button_two_url'] ) ? esc_attr( $content_slider['button_two_url'] ) : '';
68
+ $_btn_2_target = ! empty( $content_slider['button_two_target'] ) ? esc_attr( $content_slider['button_two_target'] ) : '_self';
69
+ $_btn_2_type = ! empty( $content_slider['button_two_type'] ) ? esc_attr( $content_slider['button_two_type'] ) : 'normal';
70
+ $_btn_2_size = ! empty( $content_slider['button_two_size'] ) ? esc_attr( $content_slider['button_two_size'] ) : 'medium';
71
+ $_btn_2_bg_color = ! empty( $content_slider['button_two_bg_color'] ) ? esc_attr( $content_slider['button_two_bg_color'] ) : '#00d1b2';
72
+ $_btn_2_color = ! empty( $content_slider['button_two_color'] ) ? esc_attr( $content_slider['button_two_color'] ) : '#ffffff';
73
+ $_btn_2_border_width = ! empty( $content_slider['button_two_border_width'] ) ? esc_attr( $content_slider['button_two_border_width'] ) : '0px';
74
+ $_btn_2_border_radius = ! empty( $content_slider['button_two_border_radius'] ) ? esc_attr( $content_slider['button_two_border_radius'] ) : '3px';
75
+
76
+
77
+ // Canvas style
78
+ $canvas_style = 'background-repeat: no-repeat;';
79
+ $canvas_style .= 'background-position: ' . $_img_bg_position . ';';
80
+ $canvas_style .= 'background-size: ' . $_img_bg_size . ';';
81
+ $canvas_style .= 'background-color: ' . $_bg_color . ';';
82
+ if ( $_have_img ) {
83
+ $canvas_style .= 'background-image: url(' . $_img_src[0] . ')';
84
+ }
85
+ ?>
86
+ <div class="shapla-toggle shapla-toggle--normal" data-id="closed">
87
+ <div class="shapla-toggle-title">
88
+ <?php printf( '%s %s', esc_html__( 'Slide', 'carousel-slider' ), $slide_num + 1 ); ?>
89
+ </div>
90
+ <div class="shapla-toggle-inner">
91
+ <div class="shapla-toggle-content">
92
+
93
+ <div class="carousel_slider__slide_actions">
94
+
95
+ <button class="button carousel_slider__delete_slide"
96
+ data-post-id="<?php echo $post->ID; ?>"
97
+ data-slide-pos="<?php echo $slide_num; ?>"
98
+ title="<?php esc_html_e( 'Delete current slide',
99
+ 'carousel-slider' ); ?>"
100
+ >
101
+ <svg class="icon icon-trash" width="20" height="26">
102
+ <use xlink:href="#icon-trash"></use>
103
+ </svg>
104
+ </button>
105
+
106
+ <?php if ( $slide_num !== 0 ): ?>
107
+ <?php if ( $total_sliders > 2 && $slide_num > 1 ): ?>
108
+ <button class="button carousel_slider__move_top"
109
+ data-post-id="<?php echo $post->ID; ?>"
110
+ data-slide-pos="<?php echo $slide_num; ?>"
111
+ title="<?php esc_html_e( 'Move Slide to Top',
112
+ 'carousel-slider' ); ?>"
113
+ >
114
+ <svg class="icon icon-trash" width="20" height="26">
115
+ <use xlink:href="#icon-angle-up-alt"></use>
116
+ </svg>
117
+ </button>
118
+ <?php endif; ?>
119
+ <button class="button carousel_slider__move_up"
120
+ data-post-id="<?php echo $post->ID; ?>"
121
+ data-slide-pos="<?php echo $slide_num; ?>"
122
+ title="<?php esc_html_e( 'Move Slide Up', 'carousel-slider' ); ?>"
123
+ >
124
+ <svg class="icon icon-trash" width="20" height="26">
125
+ <use xlink:href="#icon-angle-up"></use>
126
+ </svg>
127
+ </button>
128
+ <?php endif; ?>
129
+
130
+ <?php if ( $slide_num !== ( $total_sliders - 1 ) ): ?>
131
+ <button class="button carousel_slider__move_down"
132
+ data-post-id="<?php echo $post->ID; ?>"
133
+ data-slide-pos="<?php echo $slide_num; ?>"
134
+ title="<?php esc_html_e( 'Move Slide Down', 'carousel-slider' ); ?>"
135
+ >
136
+ <svg class="icon icon-trash" width="20" height="26">
137
+ <use xlink:href="#icon-angle-down"></use>
138
+ </svg>
139
+ </button>
140
+ <?php if ( $total_sliders > 2 && $slide_num < ( $total_sliders - 2 ) ): ?>
141
+ <button class="button carousel_slider__move_bottom"
142
+ data-post-id="<?php echo $post->ID; ?>"
143
+ data-slide-pos="<?php echo $slide_num; ?>"
144
+ title="<?php esc_html_e( 'Move Slide to Bottom',
145
+ 'carousel-slider' ); ?>"
146
+ >
147
+ <svg class="icon icon-trash" width="20" height="26">
148
+ <use xlink:href="#icon-angle-down-alt"></use>
149
+ </svg>
150
+ </button>
151
+ <?php endif; ?>
152
+ <?php endif; ?>
153
+
154
+ </div>
155
+ <div class="clear" style="width: 100%; margin-bottom: 1rem; height: 1px;"></div>
156
+
157
+ <div class="shapla-section shapla-tabs shapla-tabs--stroke">
158
+ <div class="shapla-tab-inner">
159
+
160
+ <ul class="shapla-nav shapla-clearfix">
161
+ <li>
162
+ <a href="#carousel-slider-tab-background"><?php esc_html_e( 'Slide Background',
163
+ 'carousel-slider' ); ?></a>
164
+ </li>
165
+ <li>
166
+ <a href="#carousel-slider-tab-content"><?php esc_html_e( 'Slide Content',
167
+ 'carousel-slider' ); ?></a>
168
+ </li>
169
+ <li>
170
+ <a href="#carousel-slider-tab-link"><?php esc_html_e( 'Slide Link',
171
+ 'carousel-slider' ); ?></a>
172
+ </li>
173
+ <li>
174
+ <a href="#carousel-slider-tab-style"><?php esc_html_e( 'Slide Style',
175
+ 'carousel-slider' ); ?></a>
176
+ </li>
177
+ </ul>
178
+
179
+ <?php
180
+ include CAROUSEL_SLIDER_TEMPLATES . '/admin/parts/hero-banner/tab-content.php';
181
+ include CAROUSEL_SLIDER_TEMPLATES . '/admin/parts/hero-banner/tab-link.php';
182
+ include CAROUSEL_SLIDER_TEMPLATES . '/admin/parts/hero-banner/tab-background.php';
183
+ include CAROUSEL_SLIDER_TEMPLATES . '/admin/parts/hero-banner/tab-style.php';
184
+ ?>
185
+
186
+ </div>
187
+ </div>
188
+
189
+ <div class="clear"></div>
190
+ </div>
191
+ </div>
192
+ </div>
193
+ <?php
194
+ }
195
+ }
196
+ ?>
197
+ </div>
198
+
199
+ <div class="content_settings">
200
+ <div class="sp-input-group" id="field-_content_slide_height">
201
+ <div class="sp-input-label">
202
+ <label for="_content_slide_height"><?php esc_html_e( 'Slide Height',
203
+ 'carousel-slider' ); ?></label>
204
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter a px, em, rem or vh value for slide height. ex: 100vh',
205
+ 'carousel-slider' ); ?></p>
206
+ </div>
207
+ <div class="sp-input-field">
208
+ <input type="text" name="content_settings[slide_height]" id="_content_slide_height"
209
+ class="sp-input-text" value="<?php echo $_slide_height; ?>">
210
+ </div>
211
+ </div>
212
+ <div class="sp-input-group" id="field-_content_slide_height">
213
+ <div class="sp-input-label">
214
+ <label for="_content_slide_height"><?php esc_html_e( 'Slider Content Max Width',
215
+ 'carousel-slider' ); ?></label>
216
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter a px, em, rem or % value for slide height. ex: 960px',
217
+ 'carousel-slider' ); ?></p>
218
+ </div>
219
+ <div class="sp-input-field">
220
+ <input type="text" name="content_settings[content_width]" id="_content_content_width"
221
+ class="sp-input-text" value="<?php echo $_content_width; ?>">
222
+ </div>
223
+ </div>
224
+ <div class="sp-input-group" id="field-_content_slide_padding">
225
+ <div class="sp-input-label">
226
+ <label for="_content_slide_padding"><?php esc_html_e( 'Slider Padding',
227
+ 'carousel-slider' ); ?></label>
228
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter padding around slide in px, em or rem.',
229
+ 'carousel-slider' ); ?></p>
230
+ </div>
231
+ <div class="sp-input-field">
232
+ <span class="dashicons dashicons-arrow-up-alt"></span>
233
+ <input name="content_settings[slide_padding][top]" class="spacing-text" placeholder="Top"
234
+ value="<?php echo isset( $_slide_padding['top'] ) ? $_slide_padding['top'] : '1rem'; ?>">
235
+
236
+ <span class="dashicons dashicons-arrow-right-alt"></span>
237
+ <input name="content_settings[slide_padding][right]" class="spacing-text" placeholder="Right"
238
+ value="<?php echo isset( $_slide_padding['right'] ) ? $_slide_padding['right'] : '3rem'; ?>">
239
+
240
+ <span class="dashicons dashicons-arrow-down-alt"></span>
241
+ <input name="content_settings[slide_padding][bottom]" class="spacing-text" placeholder="Bottom"
242
+ value="<?php echo isset( $_slide_padding['bottom'] ) ? $_slide_padding['bottom'] : '1rem'; ?>">
243
+
244
+ <span class="dashicons dashicons-arrow-left-alt"></span>
245
+ <input name="content_settings[slide_padding][left]" class="spacing-text" placeholder="Left"
246
+ value="<?php echo isset( $_slide_padding['left'] ) ? $_slide_padding['left'] : '3rem'; ?>">
247
+ </div>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </div>
252
+ </div>
253
+
254
+ <svg width="1" height="1" style="display: none;">
255
+ <symbol id="icon-trash" viewBox="0 0 20 20">
256
+ <path d="M12 4h3c0.55 0 1 0.45 1 1v1h-13v-1c0-0.55 0.45-1 1-1h3c0.23-1.14 1.29-2 2.5-2s2.27 0.86 2.5 2zM8 4h3c-0.21-0.58-0.85-1-1.5-1s-1.29 0.42-1.5 1zM4 7h11v10c0 0.55-0.45 1-1 1h-9c-0.55 0-1-0.45-1-1v-10zM7 16v-7h-1v7h1zM10 16v-7h-1v7h1zM13 16v-7h-1v7h1z"></path>
257
+ </symbol>
258
+ <symbol id="icon-angle-down" viewBox="0 0 20 20">
259
+ <path d="M5 6l5 5 5-5 2 1-7 7-7-7z"></path>
260
+ </symbol>
261
+ <symbol id="icon-angle-up" viewBox="0 0 20 20">
262
+ <path d="M15 14l-5-5-5 5-2-1 7-7 7 7z"></path>
263
+ </symbol>
264
+ <symbol id="icon-angle-down-alt" viewBox="0 0 20 20">
265
+ <path d="M9 2h2v12l4-4 2 1-7 7-7-7 2-1 4 4v-12z"></path>
266
+ </symbol>
267
+ <symbol id="icon-angle-up-alt" viewBox="0 0 20 20">
268
+ <path d="M11 18h-2v-12l-4 4-2-1 7-7 7 7-2 1-4-4v12z"></path>
269
+ </symbol>
270
+ </svg>
templates/admin/images-media.php CHANGED
@@ -1,16 +1,17 @@
1
- <div data-id="open" id="section_images_settings" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo $slide_type != 'image-carousel' ? 'none' : 'block'; ?>">
 
2
  <span class="shapla-toggle-title">
3
- <?php _e('Media Images', 'carousel-slider'); ?>
4
  </span>
5
- <div class="shapla-toggle-inner">
6
- <div class="shapla-toggle-content">
7
- <?php
8
- $this->form->images_gallery(array(
9
- 'id' => '_wpdh_image_ids',
10
- 'name' => __('Carousel Images', 'carousel-slider'),
11
- 'desc' => __('Choose carousel images from media library.', 'carousel-slider'),
12
- ));
13
- ?>
14
- </div>
15
- </div>
16
  </div>
1
+ <div data-id="open" id="section_images_settings" class="shapla-toggle shapla-toggle--stroke"
2
+ style="display: <?php echo $slide_type != 'image-carousel' ? 'none' : 'block'; ?>">
3
  <span class="shapla-toggle-title">
4
+ <?php esc_html_e( 'Media Images', 'carousel-slider' ); ?>
5
  </span>
6
+ <div class="shapla-toggle-inner">
7
+ <div class="shapla-toggle-content">
8
+ <?php
9
+ $this->form->images_gallery( array(
10
+ 'id' => '_wpdh_image_ids',
11
+ 'name' => esc_html__( 'Carousel Images', 'carousel-slider' ),
12
+ 'desc' => esc_html__( 'Choose carousel images from media library.', 'carousel-slider' ),
13
+ ) );
14
+ ?>
15
+ </div>
16
+ </div>
17
  </div>
templates/admin/images-settings.php CHANGED
@@ -1,43 +1,44 @@
1
- <?php $img_settings = ($slide_type == 'image-carousel') || ($slide_type == 'image-carousel-url') ? true : false;?>
2
- <div data-id="open" id="section_images_general_settings" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo !$img_settings ? 'none' : 'block'; ?>">
 
3
  <span class="shapla-toggle-title">
4
- <?php _e('Image Carousel Settings', 'carousel-slider'); ?>
5
  </span>
6
- <div class="shapla-toggle-inner">
7
- <div class="shapla-toggle-content">
8
- <?php
9
- $this->form->checkbox(array(
10
- 'id' => '_show_attachment_title',
11
- 'name' => __('Show Image Title', 'carousel-slider'),
12
- 'label' => __('Show Image Title', 'carousel-slider'),
13
- 'desc' => __('Check to show title below image. Only works with image carousel.', 'carousel-slider'),
14
- 'std' => 'off'
15
- ));
16
- $this->form->checkbox(array(
17
- 'id' => '_show_attachment_caption',
18
- 'name' => __('Show Image Caption', 'carousel-slider'),
19
- 'label' => __('Show Image Caption', 'carousel-slider'),
20
- 'desc' => __('Check to show caption below image. Only works with image carousel.', 'carousel-slider'),
21
- 'std' => 'off'
22
- ));
23
- $this->form->select(array(
24
- 'id' => '_image_target',
25
- 'name' => __('Image Target', 'carousel-slider'),
26
- 'desc' => __('Choose where to open the linked image.', 'carousel-slider'),
27
- 'std' => '_self',
28
  'options' => array(
29
- '_self' => __('Open in the same frame as it was clicked', 'carousel-slider'),
30
- '_blank' => __('Open in a new window or tab', 'carousel-slider'),
31
  ),
32
- ));
33
- $this->form->checkbox(array(
34
- 'id' => '_image_lightbox',
35
- 'name' => __('Show Lightbox Gallery', 'carousel-slider'),
36
- 'label' => __('Show Lightbox Gallery', 'carousel-slider'),
37
- 'desc' => __('Check to show lightbox gallery.', 'carousel-slider'),
38
- 'std' => 'off'
39
- ));
40
- ?>
41
- </div>
42
- </div>
43
  </div>
1
+ <?php $img_settings = ( $slide_type == 'image-carousel' ) || ( $slide_type == 'image-carousel-url' ) ? true : false; ?>
2
+ <div data-id="open" id="section_images_general_settings" class="shapla-toggle shapla-toggle--stroke"
3
+ style="display: <?php echo ! $img_settings ? 'none' : 'block'; ?>">
4
  <span class="shapla-toggle-title">
5
+ <?php esc_html_e( 'Image Carousel Settings', 'carousel-slider' ); ?>
6
  </span>
7
+ <div class="shapla-toggle-inner">
8
+ <div class="shapla-toggle-content">
9
+ <?php
10
+ $this->form->checkbox( array(
11
+ 'id' => '_show_attachment_title',
12
+ 'name' => esc_html__( 'Show Image Title', 'carousel-slider' ),
13
+ 'label' => esc_html__( 'Show Image Title', 'carousel-slider' ),
14
+ 'desc' => esc_html__( 'Check to show title below image. Only works with image carousel.', 'carousel-slider' ),
15
+ 'std' => 'off'
16
+ ) );
17
+ $this->form->checkbox( array(
18
+ 'id' => '_show_attachment_caption',
19
+ 'name' => esc_html__( 'Show Image Caption', 'carousel-slider' ),
20
+ 'label' => esc_html__( 'Show Image Caption', 'carousel-slider' ),
21
+ 'desc' => esc_html__( 'Check to show caption below image. Only works with image carousel.', 'carousel-slider' ),
22
+ 'std' => 'off'
23
+ ) );
24
+ $this->form->select( array(
25
+ 'id' => '_image_target',
26
+ 'name' => esc_html__( 'Image Target', 'carousel-slider' ),
27
+ 'desc' => esc_html__( 'Choose where to open the linked image.', 'carousel-slider' ),
28
+ 'std' => '_self',
29
  'options' => array(
30
+ '_self' => esc_html__( 'Open in the same frame as it was clicked', 'carousel-slider' ),
31
+ '_blank' => esc_html__( 'Open in a new window or tab', 'carousel-slider' ),
32
  ),
33
+ ) );
34
+ $this->form->checkbox( array(
35
+ 'id' => '_image_lightbox',
36
+ 'name' => esc_html__( 'Show Lightbox Gallery', 'carousel-slider' ),
37
+ 'label' => esc_html__( 'Show Lightbox Gallery', 'carousel-slider' ),
38
+ 'desc' => esc_html__( 'Check to show lightbox gallery.', 'carousel-slider' ),
39
+ 'std' => 'off'
40
+ ) );
41
+ ?>
42
+ </div>
43
+ </div>
44
  </div>
templates/admin/images-url.php CHANGED
@@ -1,99 +1,104 @@
1
  <?php
2
  $_images_urls = get_post_meta( $post->ID, '_images_urls', true );
3
- $btn_text = $_images_urls ? 'Edit URLs' : 'Add URLs';
4
  ?>
5
- <div data-id="open" id="section_url_images_settings" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo $slide_type != 'image-carousel-url' ? 'none' : 'block'; ?>">
 
6
  <span class="shapla-toggle-title">
7
- <?php _e('URL Images', 'carousel-slider'); ?>
8
  </span>
9
- <div class="shapla-toggle-inner">
10
- <div class="shapla-toggle-content">
11
  <?php
12
- $this->form->images_url( array(
13
- 'id' => '_images_urls',
14
- 'name' => __('Images URLs', 'carousel-slider'),
15
- 'desc' => __('Enter external images URLs.', 'carousel-slider'),
16
- ) );
17
  ?>
18
- </div>
19
- </div>
20
  </div>
21
 
22
  <!-- The Modal -->
23
  <div id="CarouselSliderModal" class="carousel_slider-modal">
24
 
25
- <!-- Modal content -->
26
- <div class="carousel_slider-modal-content">
27
- <div class="carousel_slider-modal-header">
28
- <span class="carousel_slider-close">&times;</span>
29
- <?php _e('Image Carousel - from URL', 'carousel-slider'); ?>
30
- </div>
31
- <div class="carousel_slider-modal-body">
32
- <div id="carousel_slider_form" class="carousel_slider-form">
33
- <?php if ( is_array($_images_urls)): foreach ($_images_urls as $image ): ?>
34
- <div class="carousel_slider-fields">
35
- <label class="setting">
36
- <span class="name"><?php _e('URL', 'carousel-slider'); ?></span>
37
- <input type="url" name="_images_urls[url][]" value="<?php echo $image['url']; ?>" autocomplete="off">
38
- </label>
39
- <label class="setting">
40
- <span class="name"><?php _e('Title', 'carousel-slider'); ?></span>
41
- <input type="text" name="_images_urls[title][]" value="<?php echo $image['title']; ?>" autocomplete="off">
42
- </label>
43
- <label class="setting">
44
- <span class="name"><?php _e('Caption', 'carousel-slider'); ?></span>
45
- <textarea name="_images_urls[caption][]"><?php echo $image['caption']; ?></textarea>
46
- </label>
47
- <label class="setting">
48
- <span class="name"><?php _e('Alt Text', 'carousel-slider'); ?></span>
49
- <input type="text" name="_images_urls[alt][]" value="<?php echo $image['alt']; ?>" autocomplete="off">
50
- </label>
51
- <label class="setting">
52
- <span class="name"><?php _e('Link To URL', 'carousel-slider'); ?></span>
53
- <input type="text" name="_images_urls[link_url][]" value="<?php echo $image['link_url']; ?>" autocomplete="off">
54
- </label>
55
- <div class="actions">
56
- <span><span class="dashicons dashicons-move"></span></span>
57
- <span class="add_row"><span class="dashicons dashicons-plus-alt"></span></span>
58
- <span class="delete_row"><span class="dashicons dashicons-trash"></span></span>
59
- </div>
60
- </div>
61
- <?php endforeach; else: ?>
62
- <div class="carousel_slider-fields">
63
- <label class="setting">
64
- <span class="name"><?php _e('URL', 'carousel-slider'); ?></span>
65
- <input type="url" name="_images_urls[url][]" value="">
66
- </label>
67
- <label class="setting">
68
- <span class="name"><?php _e('Title', 'carousel-slider'); ?></span>
69
- <input type="text" name="_images_urls[title][]" value="">
70
- </label>
71
- <label class="setting">
72
- <span class="name"><?php _e('Caption', 'carousel-slider'); ?></span>
73
- <textarea name="_images_urls[caption][]"></textarea>
74
- </label>
75
- <label class="setting">
76
- <span class="name"><?php _e('Alt Text', 'carousel-slider'); ?></span>
77
- <input type="text" name="_images_urls[alt][]" value="">
78
- </label>
79
- <label class="setting">
80
- <span class="name"><?php _e('Link To URL', 'carousel-slider'); ?></span>
81
- <input type="text" name="_images_urls[link_url][]" value="">
82
- </label>
83
- <div class="actions">
84
- <span><span class="dashicons dashicons-move"></span></span>
85
- <span class="add_row"><span class="dashicons dashicons-plus-alt"></span></span>
86
- <span class="delete_row"><span class="dashicons dashicons-trash"></span></span>
87
- </div>
88
- </div>
89
- <?php endif; ?>
90
- </div>
91
- </div>
92
- <div class="carousel_slider-modal-footer">
93
- <button class="button button-primary" id="save_carousel_images_urls">
94
- <?php _e('Save', 'carousel-slider'); ?>
95
- </button>
96
- </div>
97
- </div>
 
 
 
 
98
 
99
  </div>
1
  <?php
2
  $_images_urls = get_post_meta( $post->ID, '_images_urls', true );
3
+ $btn_text = $_images_urls ? 'Edit URLs' : 'Add URLs';
4
  ?>
5
+ <div data-id="open" id="section_url_images_settings" class="shapla-toggle shapla-toggle--stroke"
6
+ style="display: <?php echo $slide_type != 'image-carousel-url' ? 'none' : 'block'; ?>">
7
  <span class="shapla-toggle-title">
8
+ <?php esc_html_e( 'URL Images', 'carousel-slider' ); ?>
9
  </span>
10
+ <div class="shapla-toggle-inner">
11
+ <div class="shapla-toggle-content">
12
  <?php
13
+ $this->form->images_url( array(
14
+ 'id' => '_images_urls',
15
+ 'name' => esc_html__( 'Images URLs', 'carousel-slider' ),
16
+ 'desc' => esc_html__( 'Enter external images URLs.', 'carousel-slider' ),
17
+ ) );
18
  ?>
19
+ </div>
20
+ </div>
21
  </div>
22
 
23
  <!-- The Modal -->
24
  <div id="CarouselSliderModal" class="carousel_slider-modal">
25
 
26
+ <!-- Modal content -->
27
+ <div class="carousel_slider-modal-content">
28
+ <div class="carousel_slider-modal-header">
29
+ <span class="carousel_slider-close">&times;</span>
30
+ <?php esc_html_e( 'Image Carousel - from URL', 'carousel-slider' ); ?>
31
+ </div>
32
+ <div class="carousel_slider-modal-body">
33
+ <div id="carousel_slider_form" class="carousel_slider-form">
34
+ <?php if ( is_array( $_images_urls ) ): foreach ( $_images_urls as $image ): ?>
35
+ <div class="carousel_slider-fields">
36
+ <label class="setting">
37
+ <span class="name"><?php esc_html_e( 'URL', 'carousel-slider' ); ?></span>
38
+ <input type="url" name="_images_urls[url][]" value="<?php echo $image['url']; ?>"
39
+ autocomplete="off">
40
+ </label>
41
+ <label class="setting">
42
+ <span class="name"><?php esc_html_e( 'Title', 'carousel-slider' ); ?></span>
43
+ <input type="text" name="_images_urls[title][]" value="<?php echo $image['title']; ?>"
44
+ autocomplete="off">
45
+ </label>
46
+ <label class="setting">
47
+ <span class="name"><?php esc_html_e( 'Caption', 'carousel-slider' ); ?></span>
48
+ <textarea name="_images_urls[caption][]"><?php echo $image['caption']; ?></textarea>
49
+ </label>
50
+ <label class="setting">
51
+ <span class="name"><?php esc_html_e( 'Alt Text', 'carousel-slider' ); ?></span>
52
+ <input type="text" name="_images_urls[alt][]" value="<?php echo $image['alt']; ?>"
53
+ autocomplete="off">
54
+ </label>
55
+ <label class="setting">
56
+ <span class="name"><?php esc_html_e( 'Link To URL', 'carousel-slider' ); ?></span>
57
+ <input type="text" name="_images_urls[link_url][]" value="<?php echo $image['link_url']; ?>"
58
+ autocomplete="off">
59
+ </label>
60
+ <div class="actions">
61
+ <span><span class="dashicons dashicons-move"></span></span>
62
+ <span class="add_row"><span class="dashicons dashicons-plus-alt"></span></span>
63
+ <span class="delete_row"><span class="dashicons dashicons-trash"></span></span>
64
+ </div>
65
+ </div>
66
+ <?php endforeach; else: ?>
67
+ <div class="carousel_slider-fields">
68
+ <label class="setting">
69
+ <span class="name"><?php esc_html_e( 'URL', 'carousel-slider' ); ?></span>
70
+ <input type="url" name="_images_urls[url][]" value="">
71
+ </label>
72
+ <label class="setting">
73
+ <span class="name"><?php esc_html_e( 'Title', 'carousel-slider' ); ?></span>
74
+ <input type="text" name="_images_urls[title][]" value="">
75
+ </label>
76
+ <label class="setting">
77
+ <span class="name"><?php esc_html_e( 'Caption', 'carousel-slider' ); ?></span>
78
+ <textarea name="_images_urls[caption][]"></textarea>
79
+ </label>
80
+ <label class="setting">
81
+ <span class="name"><?php esc_html_e( 'Alt Text', 'carousel-slider' ); ?></span>
82
+ <input type="text" name="_images_urls[alt][]" value="">
83
+ </label>
84
+ <label class="setting">
85
+ <span class="name"><?php esc_html_e( 'Link To URL', 'carousel-slider' ); ?></span>
86
+ <input type="text" name="_images_urls[link_url][]" value="">
87
+ </label>
88
+ <div class="actions">
89
+ <span><span class="dashicons dashicons-move"></span></span>
90
+ <span class="add_row"><span class="dashicons dashicons-plus-alt"></span></span>
91
+ <span class="delete_row"><span class="dashicons dashicons-trash"></span></span>
92
+ </div>
93
+ </div>
94
+ <?php endif; ?>
95
+ </div>
96
+ </div>
97
+ <div class="carousel_slider-modal-footer">
98
+ <button class="button button-primary" id="save_carousel_images_urls">
99
+ <?php esc_html_e( 'Save', 'carousel-slider' ); ?>
100
+ </button>
101
+ </div>
102
+ </div>
103
 
104
  </div>
templates/admin/navigation.php CHANGED
@@ -1,36 +1,36 @@
1
  <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
  <span class="shapla-toggle-title">
3
- <?php _e('Navigation Settings', 'carousel-slider'); ?>
4
  </span>
5
- <div class="shapla-toggle-inner">
6
- <div class="shapla-toggle-content">
7
- <?php
8
- $this->form->checkbox(array(
9
- 'id' => '_nav_button',
10
- 'name' => __('Navigation', 'carousel-slider'),
11
- 'label' => __('Navigation', 'carousel-slider'),
12
- 'desc' => __('Check to show next/prev icons.', 'carousel-slider'),
13
- ));
14
- $this->form->checkbox(array(
15
- 'id' => '_dot_nav',
16
- 'name' => __('Dots', 'carousel-slider'),
17
- 'label' => __('Dots', 'carousel-slider'),
18
- 'desc' => __('Check to show dots navigation.', 'carousel-slider'),
19
- ));
20
- $this->form->color(array(
21
- 'id' => '_nav_color',
22
- 'type' => 'color',
23
- 'name' => __('Navigation & Dots Color ', 'carousel-slider'),
24
- 'desc' => __('Pick a color for navigation and dots.', 'carousel-slider'),
25
- 'std' => '#f1f1f1'
26
- ));
27
- $this->form->color(array(
28
- 'id' => '_nav_active_color',
29
- 'name' => __('Navigation & Dots Color: Hover & Active', 'carousel-slider'),
30
- 'desc' => __('Pick a color for navigation and dots for active and hover effect.', 'carousel-slider'),
31
- 'std' => '#4caf50'
32
- ));
33
- ?>
34
- </div>
35
- </div>
36
  </div>
1
  <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
  <span class="shapla-toggle-title">
3
+ <?php esc_html_e( 'Navigation Settings', 'carousel-slider' ); ?>
4
  </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->form->checkbox( array(
9
+ 'id' => '_nav_button',
10
+ 'name' => esc_html__( 'Navigation', 'carousel-slider' ),
11
+ 'label' => esc_html__( 'Navigation', 'carousel-slider' ),
12
+ 'desc' => esc_html__( 'Check to show next/prev icons.', 'carousel-slider' ),
13
+ ) );
14
+ $this->form->checkbox( array(
15
+ 'id' => '_dot_nav',
16
+ 'name' => esc_html__( 'Dots', 'carousel-slider' ),
17
+ 'label' => esc_html__( 'Dots', 'carousel-slider' ),
18
+ 'desc' => esc_html__( 'Check to show dots navigation.', 'carousel-slider' ),
19
+ ) );
20
+ $this->form->color( array(
21
+ 'id' => '_nav_color',
22
+ 'type' => 'color',
23
+ 'name' => esc_html__( 'Navigation & Dots Color ', 'carousel-slider' ),
24
+ 'desc' => esc_html__( 'Pick a color for navigation and dots.', 'carousel-slider' ),
25
+ 'std' => '#f1f1f1'
26
+ ) );
27
+ $this->form->color( array(
28
+ 'id' => '_nav_active_color',
29
+ 'name' => esc_html__( 'Navigation & Dots Color: Hover & Active', 'carousel-slider' ),
30
+ 'desc' => esc_html__( 'Pick a color for navigation and dots for active and hover effect.', 'carousel-slider' ),
31
+ 'std' => '#4caf50'
32
+ ) );
33
+ ?>
34
+ </div>
35
+ </div>
36
  </div>
templates/admin/parts/hero-banner/tab-background.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="carousel-slider-tab-background" class="shapla-tab tab-background">
2
+ <div class="slide_bg_wrapper">
3
+ <div class="slide-media-left">
4
+ <div class="slide_thumb">
5
+ <div class="content_slide_canvas"
6
+ style="<?php echo $canvas_style; ?>"></div>
7
+ <span class="delete-bg-img<?php echo ! $_have_img ? ' hidden' : ''; ?>"
8
+ title="<?php esc_html_e( 'Delete the background image for this slide', 'carousel-slider' ); ?>">&times;</span>
9
+ </div>
10
+ </div>
11
+ <div class="slide-media-right">
12
+
13
+ <div class="slide_image_settings_line">
14
+ <a href="<?php echo esc_url( $upload_link ); ?>"
15
+ data-title="<?php esc_html_e( 'Select or Upload Slide Background Image', 'carousel-slider' ); ?>"
16
+ data-button-text="<?php esc_html_e( 'Set Background Image', 'carousel-slider' ); ?>"
17
+ class="button slide_image_add"><?php esc_html_e( 'Set Background Image', 'carousel-slider' ); ?></a>
18
+ <input type="hidden" class="background_image_id"
19
+ name="carousel_slider_content[<?php echo $slide_num; ?>][img_id]"
20
+ value="<?php echo $_img_id; ?>">
21
+ </div>
22
+
23
+ <div class="slide_image_settings_line">
24
+ <span><?php esc_html_e( 'Background Position:', 'carousel-slider' ); ?></span>
25
+ <select class="background_image_position"
26
+ name="carousel_slider_content[<?php echo $slide_num; ?>][img_bg_position]">
27
+ <?php
28
+ foreach ( $_all_bg_position as $key => $label ) {
29
+ $selected = $key == $_img_bg_position ? 'selected' : '';
30
+ printf(
31
+ '<option value="%s" %s>%s</option>',
32
+ $key,
33
+ $selected,
34
+ $label
35
+ );
36
+ }
37
+ ?>
38
+ </select>
39
+ </div>
40
+
41
+ <div class="slide_image_settings_line">
42
+ <span><?php esc_html_e( 'Background Size:', 'carousel-slider' ); ?></span>
43
+ <select class="background_image_size"
44
+ name="carousel_slider_content[<?php echo $slide_num; ?>][img_bg_size]">
45
+ <?php
46
+ foreach ( $_all_bg_size as $key => $label ) {
47
+ $selected = $key == $_img_bg_size ? 'selected' : '';
48
+ printf( '<option value="%s" %s>%s</option>', $key, $selected, $label );
49
+ }
50
+ ?>
51
+ </select>
52
+ </div>
53
+
54
+ <div class="slide_image_settings_line">
55
+ <span><?php esc_html_e( 'Background Color:', 'carousel-slider' ); ?></span>
56
+ <input type="text" name="carousel_slider_content[<?php echo $slide_num; ?>][bg_color]"
57
+ class="slide-color-picker" value="<?php echo $_bg_color; ?>"
58
+ data-alpha="true" data-default-color="rgba(255,255,255,0.5)">
59
+ </div>
60
+ </div>
61
+
62
+ </div>
63
+ </div>
64
+ <!-- .tab-background -->
templates/admin/parts/hero-banner/tab-content.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="carousel-slider-tab-content" class="shapla-tab tab-content">
2
+
3
+ <div class="sp-input-group" id="field-_slide_heading">
4
+ <div class="sp-input-label">
5
+ <label for="_slide_heading"><?php esc_html_e( 'Slide Heading', 'carousel-slider' ); ?></label>
6
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter the heading for your slide. This field can take HTML markup.', 'carousel-slider' ); ?></p>
7
+ </div>
8
+ <div class="sp-input-field">
9
+ <textarea name="carousel_slider_content[<?php echo $slide_num; ?>][slide_heading]"
10
+ id="_slide_heading" cols="30" rows="3"
11
+ class="regular-text"><?php echo esc_textarea( $_slide_heading ); ?></textarea>
12
+ </div>
13
+ </div>
14
+
15
+ <div class="sp-input-group" id="field-_slide_description">
16
+ <div class="sp-input-label">
17
+ <label for="_slide_description"><?php esc_html_e( 'Slide Description', 'carousel-slider' ); ?></label>
18
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter the description for your slide. This field can take HTML markup.', 'carousel-slider' ); ?></p>
19
+ </div>
20
+ <div class="sp-input-field">
21
+ <textarea name="carousel_slider_content[<?php echo $slide_num; ?>][slide_description]"
22
+ id="_slide_description" cols="30" rows="5"
23
+ class="regular-text"><?php echo esc_textarea( $_slide_description ); ?></textarea>
24
+ </div>
25
+ </div><!-- Slide Description -->
26
+
27
+ </div>
28
+ <!-- .tab-content -->
templates/admin/parts/hero-banner/tab-link-button-one.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="closed" id="content_carousel_button_one" class="shapla-toggle shapla-toggle--stroke">
2
+ <span class="shapla-toggle-title">
3
+ <?php esc_html_e( 'Button #1', 'carousel-slider' ); ?>
4
+ </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+
8
+ <div class="sp-input-group" id="field-button_one_text">
9
+ <div class="sp-input-label">
10
+ <label for="button_one_text"><?php esc_html_e( 'Button Text', 'carousel-slider' ); ?></label>
11
+ <p class="sp-input-desc"><?php esc_html_e( 'Add the button text', 'carousel-slider' ); ?></p>
12
+ </div>
13
+ <div class="sp-input-field">
14
+ <input name="carousel_slider_content[<?php echo $slide_num; ?>][button_one_text]"
15
+ id="button_one_text" class="sp-input-text" value="<?php echo $_btn_1_text; ?>">
16
+ </div>
17
+ </div><!-- Button Text -->
18
+
19
+ <div class="sp-input-group" id="field-button_one_url">
20
+ <div class="sp-input-label">
21
+ <label for="button_one_url"><?php esc_html_e( 'Button URL', 'carousel-slider' ); ?></label>
22
+ <p class="sp-input-desc"><?php esc_html_e( 'Add the button url e.g. http://example.com', 'carousel-slider' ); ?></p>
23
+ </div>
24
+ <div class="sp-input-field">
25
+ <input name="carousel_slider_content[<?php echo $slide_num; ?>][button_one_url]"
26
+ id="button_one_url" class="sp-input-text" value="<?php echo $_btn_1_url; ?>">
27
+ </div>
28
+ </div><!-- Button URL -->
29
+
30
+ <div class="sp-input-group" id="field-button_one_target">
31
+ <div class="sp-input-label">
32
+ <label for="button_one_target"><?php esc_html_e( 'Open Button Link In', 'carousel-slider' ); ?></label>
33
+ </div>
34
+ <div class="sp-input-field">
35
+ <select name="carousel_slider_content[<?php echo $slide_num; ?>][button_one_target]"
36
+ id="button_one_target" class="sp-input-text">
37
+ <option value="_blank" <?php selected( $_btn_1_target, '_blank' ); ?>><?php esc_html_e( 'New Window', 'carousel-slider' ); ?></option>
38
+ <option value="_self" <?php selected( $_btn_1_target, '_self' ); ?>><?php esc_html_e( 'Same window', 'carousel-slider' ); ?></option>
39
+ </select>
40
+ </div>
41
+ </div><!-- Open Button Link In -->
42
+
43
+ <div class="sp-input-group" id="field-button_one_target">
44
+ <div class="sp-input-label">
45
+ <label for="button_one_type"><?php esc_html_e( 'Button Type', 'carousel-slider' ); ?></label>
46
+ </div>
47
+ <div class="sp-input-field">
48
+ <select name="carousel_slider_content[<?php echo $slide_num; ?>][button_one_type]"
49
+ id="button_one_target" class="sp-input-text">
50
+ <option value="normal" <?php selected( $_btn_1_type, 'normal' ); ?>><?php esc_html_e( 'Normal', 'carousel-slider' ); ?></option>
51
+ <option value="stroke" <?php selected( $_btn_1_type, 'stroke' ); ?>><?php esc_html_e( 'Stroke', 'carousel-slider' ); ?></option>
52
+ </select>
53
+ </div>
54
+ </div><!-- Button Type -->
55
+
56
+ <div class="sp-input-group" id="field-button_one_size">
57
+ <div class="sp-input-label">
58
+ <label for="button_one_type"><?php esc_html_e( 'Button Size', 'carousel-slider' ); ?></label>
59
+ </div>
60
+ <div class="sp-input-field">
61
+ <select name="carousel_slider_content[<?php echo $slide_num; ?>][button_one_size]"
62
+ id="button_one_size" class="sp-input-text">
63
+ <option value="large" <?php selected( $_btn_1_size, 'large' ); ?>><?php esc_html_e( 'Large', 'carousel-slider' ); ?></option>
64
+ <option value="medium" <?php selected( $_btn_1_size, 'medium' ); ?>><?php esc_html_e( 'Medium', 'carousel-slider' ); ?></option>
65
+ <option value="small" <?php selected( $_btn_1_size, 'small' ); ?>><?php esc_html_e( 'Small', 'carousel-slider' ); ?></option>
66
+ </select>
67
+ </div>
68
+ </div><!-- Button Size -->
69
+
70
+ <div class="sp-input-group" id="field-button_one_border_width">
71
+ <div class="sp-input-label">
72
+ <label for="button_one_border_width"><?php esc_html_e( 'Border Width', 'carousel-slider' ); ?></label>
73
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter border width in pixel. e.g. 2px', 'carousel-slider' ); ?></p>
74
+ </div>
75
+ <div class="sp-input-field">
76
+ <input name="carousel_slider_content[<?php echo $slide_num; ?>][button_one_border_width]"
77
+ id="button_one_border_width" class="sp-input-text"
78
+ value="<?php echo $_btn_1_border_width; ?>">
79
+ </div>
80
+ </div><!-- Border Width -->
81
+
82
+ <div class="sp-input-group" id="field-button_one_border_radius">
83
+ <div class="sp-input-label">
84
+ <label for="button_one_border_radius"><?php esc_html_e( 'Border Radius', 'carousel-slider' ); ?></label>
85
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter border radius in pixel. e.g. 3px', 'carousel-slider' ); ?></p>
86
+ </div>
87
+ <div class="sp-input-field">
88
+ <input name="carousel_slider_content[<?php echo $slide_num; ?>][button_one_border_radius]"
89
+ id="button_one_border_radius" class="sp-input-text"
90
+ value="<?php echo $_btn_1_border_radius; ?>">
91
+ </div>
92
+ </div><!-- Border Radius -->
93
+
94
+ <div class="sp-input-group" id="field-button_one_bg_color">
95
+ <div class="sp-input-label">
96
+ <label for="button_one_bg_color"><?php esc_html_e( 'Button Color', 'carousel-slider' ); ?></label>
97
+ </div>
98
+ <div class="sp-input-field">
99
+ <input id="button_one_bg_color" class="color-picker" value="<?php echo $_btn_1_bg_color; ?>"
100
+ name="carousel_slider_content[<?php echo $slide_num; ?>][button_one_bg_color]"
101
+ data-alpha="true" data-default-color="#00d1b2">
102
+ </div>
103
+ </div><!-- Button Color -->
104
+
105
+ <div class="sp-input-group" id="field-button_one_color">
106
+ <div class="sp-input-label">
107
+ <label for="button_one_color"><?php esc_html_e( 'Button Text Color', 'carousel-slider' ); ?></label>
108
+ </div>
109
+ <div class="sp-input-field">
110
+ <input id="button_one_color" class="color-picker" value="<?php echo $_btn_1_color; ?>"
111
+ name="carousel_slider_content[<?php echo $slide_num; ?>][button_one_color]"
112
+ data-alpha="true" data-default-color="#ffffff">
113
+ </div>
114
+ </div><!-- Button Text Color -->
115
+
116
+ </div>
117
+ </div>
118
+ </div>
templates/admin/parts/hero-banner/tab-link-button-two.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="closed" id="content_carousel_button_one" class="shapla-toggle shapla-toggle--stroke">
2
+ <span class="shapla-toggle-title">
3
+ <?php esc_html_e( 'Button #2', 'carousel-slider' ); ?>
4
+ </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+
8
+ <div class="sp-input-group" id="field-button_two_text">
9
+ <div class="sp-input-label">
10
+ <label for="button_two_text"><?php esc_html_e( 'Button Text', 'carousel-slider' ); ?></label>
11
+ <p class="sp-input-desc"><?php esc_html_e( 'Add the button text', 'carousel-slider' ); ?></p>
12
+ </div>
13
+ <div class="sp-input-field">
14
+ <input name="carousel_slider_content[<?php echo $slide_num; ?>][button_two_text]"
15
+ id="button_two_text" class="sp-input-text" value="<?php echo $_btn_2_text; ?>">
16
+ </div>
17
+ </div><!-- Button Text -->
18
+
19
+ <div class="sp-input-group" id="field-button_two_url">
20
+ <div class="sp-input-label">
21
+ <label for="button_two_url"><?php esc_html_e( 'Button URL', 'carousel-slider' ); ?></label>
22
+ <p class="sp-input-desc"><?php esc_html_e( 'Add the button url e.g. http://example.com', 'carousel-slider' ); ?></p>
23
+ </div>
24
+ <div class="sp-input-field">
25
+ <input name="carousel_slider_content[<?php echo $slide_num; ?>][button_two_url]"
26
+ id="button_two_url" class="sp-input-text" value="<?php echo $_btn_2_url; ?>">
27
+ </div>
28
+ </div><!-- Button URL -->
29
+
30
+ <div class="sp-input-group" id="field-button_two_target">
31
+ <div class="sp-input-label">
32
+ <label for="button_two_target"><?php esc_html_e( 'Open Button Link In', 'carousel-slider' ); ?></label>
33
+ </div>
34
+ <div class="sp-input-field">
35
+ <select name="carousel_slider_content[<?php echo $slide_num; ?>][button_two_target]"
36
+ id="button_two_target" class="sp-input-text">
37
+ <option value="_blank" <?php selected( $_btn_2_target, '_blank' ); ?>><?php esc_html_e( 'New Window', 'carousel-slider' ); ?></option>
38
+ <option value="_self" <?php selected( $_btn_2_target, '_self' ); ?>><?php esc_html_e( 'Same window', 'carousel-slider' ); ?></option>
39
+ </select>
40
+ </div>
41
+ </div><!-- Open Button Link In -->
42
+
43
+ <div class="sp-input-group" id="field-button_two_target">
44
+ <div class="sp-input-label">
45
+ <label for="button_two_type"><?php esc_html_e( 'Button Type', 'carousel-slider' ); ?></label>
46
+ </div>
47
+ <div class="sp-input-field">
48
+ <select name="carousel_slider_content[<?php echo $slide_num; ?>][button_two_type]"
49
+ id="button_two_target" class="sp-input-text">
50
+ <option value="normal" <?php selected( $_btn_2_type, 'normal' ); ?>><?php esc_html_e( 'Normal', 'carousel-slider' ); ?></option>
51
+ <option value="stroke" <?php selected( $_btn_2_type, 'stroke' ); ?>><?php esc_html_e( 'Stroke', 'carousel-slider' ); ?></option>
52
+ </select>
53
+ </div>
54
+ </div><!-- Button Type -->
55
+
56
+ <div class="sp-input-group" id="field-button_two_size">
57
+ <div class="sp-input-label">
58
+ <label for="button_two_type"><?php esc_html_e( 'Button Size', 'carousel-slider' ); ?></label>
59
+ </div>
60
+ <div class="sp-input-field">
61
+ <select name="carousel_slider_content[<?php echo $slide_num; ?>][button_two_size]"
62
+ id="button_two_size" class="sp-input-text">
63
+ <option value="large" <?php selected( $_btn_2_size, 'large' ); ?>><?php esc_html_e( 'Large', 'carousel-slider' ); ?></option>
64
+ <option value="medium" <?php selected( $_btn_2_size, 'medium' ); ?>><?php esc_html_e( 'Medium', 'carousel-slider' ); ?></option>
65
+ <option value="small" <?php selected( $_btn_2_size, 'small' ); ?>><?php esc_html_e( 'Small', 'carousel-slider' ); ?></option>
66
+ </select>
67
+ </div>
68
+ </div><!-- Button Size -->
69
+
70
+
71
+ <div class="sp-input-group" id="field-button_two_border_width">
72
+ <div class="sp-input-label">
73
+ <label for="button_two_border_width"><?php esc_html_e( 'Border Width', 'carousel-slider' ); ?></label>
74
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter border width in pixel. e.g. 2px', 'carousel-slider' ); ?></p>
75
+ </div>
76
+ <div class="sp-input-field">
77
+ <input name="carousel_slider_content[<?php echo $slide_num; ?>][button_two_border_width]"
78
+ id="button_two_border_width" class="sp-input-text"
79
+ value="<?php echo $_btn_2_border_width; ?>">
80
+ </div>
81
+ </div><!-- Border Width -->
82
+
83
+ <div class="sp-input-group" id="field-button_two_border_radius">
84
+ <div class="sp-input-label">
85
+ <label for="button_two_border_radius"><?php esc_html_e( 'Border Radius', 'carousel-slider' ); ?></label>
86
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter border radius in pixel. e.g. 3px', 'carousel-slider' ); ?></p>
87
+ </div>
88
+ <div class="sp-input-field">
89
+ <input name="carousel_slider_content[<?php echo $slide_num; ?>][button_two_border_radius]"
90
+ id="button_two_border_radius" class="sp-input-text"
91
+ value="<?php echo $_btn_2_border_radius; ?>">
92
+ </div>
93
+ </div><!-- Border Radius -->
94
+
95
+ <div class="sp-input-group" id="field-button_two_bg_color">
96
+ <div class="sp-input-label">
97
+ <label for="button_two_bg_color"><?php esc_html_e( 'Button Color', 'carousel-slider' ); ?></label>
98
+ </div>
99
+ <div class="sp-input-field">
100
+ <input id="button_two_bg_color" class="color-picker" value="<?php echo $_btn_2_bg_color; ?>"
101
+ name="carousel_slider_content[<?php echo $slide_num; ?>][button_two_bg_color]"
102
+ data-alpha="true" data-default-color="#00d1b2">
103
+ </div>
104
+ </div><!-- Button Color -->
105
+
106
+ <div class="sp-input-group" id="field-button_two_color">
107
+ <div class="sp-input-label">
108
+ <label for="button_two_color"><?php esc_html_e( 'Button Text Color', 'carousel-slider' ); ?></label>
109
+ </div>
110
+ <div class="sp-input-field">
111
+ <input id="button_two_color" class="color-picker" value="<?php echo $_btn_2_color; ?>"
112
+ name="carousel_slider_content[<?php echo $slide_num; ?>][button_two_color]"
113
+ data-alpha="true" data-default-color="#ffffff">
114
+ </div>
115
+ </div><!-- Button Text Color -->
116
+
117
+ </div>
118
+ </div>
119
+ </div>
templates/admin/parts/hero-banner/tab-link.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="carousel-slider-tab-link" class="shapla-tab tab-content-link">
2
+
3
+ <div class="sp-input-group" id="field-_link_type">
4
+ <div class="sp-input-label">
5
+ <label for="_link_type"><?php esc_html_e( 'Slide Link Type', 'carousel-slider' ); ?></label>
6
+ <p class="sp-input-desc"><?php esc_html_e( 'Select how the slide will link.', 'carousel-slider' ); ?></p>
7
+ </div>
8
+ <div class="sp-input-field">
9
+ <select name="carousel_slider_content[<?php echo $slide_num; ?>][link_type]"
10
+ id="_link_type" class="sp-input-text link_type">
11
+ <option value="none" <?php selected( $_link_type, 'none' ); ?>><?php esc_html_e( 'No Link', 'carousel-slider' ); ?></option>
12
+ <option value="full" <?php selected( $_link_type, 'full' ); ?>><?php esc_html_e( 'Full Slide', 'carousel-slider' ); ?></option>
13
+ <option value="button" <?php selected( $_link_type, 'button' ); ?>><?php esc_html_e( 'Button', 'carousel-slider' ); ?></option>
14
+ </select>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="ContentCarouselLinkFull" style="display: <?php echo ( $_link_type == 'full' ) ? 'block' : 'none'; ?>">
19
+ <div class="sp-input-group" id="field-_slide_link">
20
+ <div class="sp-input-label">
21
+ <label for="_slide_link"><?php esc_html_e( 'Slide Link', 'carousel-slider' ); ?></label>
22
+ <p class="sp-input-desc"><?php esc_html_e( 'Please enter your URL that will be used to link the full slide.', 'carousel-slider' ); ?></p>
23
+ </div>
24
+ <div class="sp-input-field">
25
+ <input type="url" id="_slide_link"
26
+ class="sp-input-text" value="<?php echo $_slide_link; ?>"
27
+ name="carousel_slider_content[<?php echo $slide_num; ?>][slide_link]">
28
+ </div>
29
+ </div>
30
+
31
+ <div class="sp-input-group" id="field-_link_target">
32
+ <div class="sp-input-label">
33
+ <label for="_link_target"><?php esc_html_e( 'Open Slide Link In New Window', 'carousel-slider' ); ?></label>
34
+ </div>
35
+ <div class="sp-input-field">
36
+ <select name="carousel_slider_content[<?php echo $slide_num; ?>][link_target]"
37
+ id="_link_target" class="sp-input-text">
38
+ <option value="_blank" <?php selected( $_link_target, '_blank' ); ?>><?php esc_html_e( 'Yes', 'carousel-slider' ); ?></option>
39
+ <option value="_self" <?php selected( $_link_target, '_self' ); ?>><?php esc_html_e( 'No', 'carousel-slider' ); ?></option>
40
+ </select>
41
+ </div>
42
+ </div>
43
+ </div>
44
+
45
+ <div class="ContentCarouselLinkButtons"
46
+ style="display: <?php echo ( $_link_type == 'button' ) ? 'block' : 'none'; ?>">
47
+ <?php include CAROUSEL_SLIDER_TEMPLATES . '/admin/parts/hero-banner/tab-link-button-one.php';; ?>
48
+ <?php include CAROUSEL_SLIDER_TEMPLATES . '/admin/parts/hero-banner/tab-link-button-two.php';; ?>
49
+ </div>
50
+
51
+ </div>
templates/admin/parts/hero-banner/tab-style.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="carousel-slider-tab-style" class="shapla-tab tab-style">
2
+
3
+ <div class="sp-input-group" id="field-_content_alignment">
4
+ <div class="sp-input-label">
5
+ <label for="_content_alignment"><?php esc_html_e( 'Content Alignment', 'carousel-slider' ); ?></label>
6
+ <p class="sp-input-desc"><?php esc_html_e( 'Select how the heading, description and buttons will be aligned', 'carousel-slider' ); ?></p>
7
+ </div>
8
+ <div class="sp-input-field">
9
+ <select name="carousel_slider_content[<?php echo $slide_num; ?>][content_alignment]"
10
+ id="_content_alignment" class="sp-input-text">
11
+ <option value="left" <?php selected( $_content_alignment, 'left' ); ?>>Left</option>
12
+ <option value="center" <?php selected( $_content_alignment, 'center' ); ?>>Center</option>
13
+ <option value="right" <?php selected( $_content_alignment, 'right' ); ?>>Right</option>
14
+ </select>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="sp-input-group" id="field-_heading_font_size">
19
+ <div class="sp-input-label">
20
+ <label for="_heading_font_size"><?php esc_html_e( 'Heading Font Size', 'carousel-slider' ); ?></label>
21
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter heading font size without px unit. In pixels, ex: 50 instead of 50px. Default: 60', 'carousel-slider' ); ?></p>
22
+ </div>
23
+ <div class="sp-input-field">
24
+ <input type="number" id="_heading_font_size"
25
+ class="regular-text" value="<?php echo $_heading_font_size; ?>"
26
+ name="carousel_slider_content[<?php echo $slide_num; ?>][heading_font_size]">
27
+ </div>
28
+ </div>
29
+
30
+ <div class="sp-input-group" id="field-_heading_gutter">
31
+ <div class="sp-input-label">
32
+ <label for="_heading_gutter"><?php esc_html_e( 'Spacing/Gutter', 'carousel-slider' ); ?></label>
33
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter gutter (space between description and heading) in px, em or rem, ex: 3rem', 'carousel-slider' ); ?></p>
34
+ </div>
35
+ <div class="sp-input-field">
36
+ <input type="text" id="_heading_gutter" class="regular-text" value="<?php echo $_heading_gutter; ?>"
37
+ name="carousel_slider_content[<?php echo $slide_num; ?>][heading_gutter]">
38
+ </div>
39
+ </div>
40
+
41
+ <div class="sp-input-group" id="field-_heading_color">
42
+ <div class="sp-input-label">
43
+ <label for="_heading_color"><?php esc_html_e( 'Heading Color', 'carousel-slider' ); ?></label>
44
+ <p class="sp-input-desc"><?php esc_html_e( 'Select a color for the heading font. Default: #fff', 'carousel-slider' ); ?></p>
45
+ </div>
46
+ <div class="sp-input-field">
47
+ <input type="text" id="_heading_color"
48
+ class="color-picker"
49
+ data-default-color="#ffffff" data-alpha="true" value="<?php echo $_heading_color; ?>"
50
+ name="carousel_slider_content[<?php echo $slide_num; ?>][heading_color]">
51
+ </div>
52
+ </div>
53
+
54
+ <div class="sp-input-group" id="field-_heading_background_color">
55
+ <div class="sp-input-label">
56
+ <label for="_heading_background_color"><?php esc_html_e( 'Heading Background Color', 'carousel-slider' ); ?></label>
57
+ <p class="sp-input-desc"><?php esc_html_e( 'If you would like a semi-transparent background behind your heading, Choose from here. If you would not like, leave it blank. Default: rgba(0,0,0, 0.4)', 'carousel-slider' ); ?></p>
58
+ </div>
59
+ <div class="sp-input-field">
60
+ <input type="text" id="_heading_background_color"
61
+ class="color-picker" data-alpha="true"
62
+ data-default-color="rgba(0,0,0, 0.4)" value="<?php echo $_heading_bg_color; ?>"
63
+ name="carousel_slider_content[<?php echo $slide_num; ?>][heading_background_color]">
64
+ </div>
65
+ </div>
66
+
67
+ <div class="sp-input-group" id="field-_description_font_size">
68
+ <div class="sp-input-label">
69
+ <label for="_description_font_size"><?php esc_html_e( 'Description Font Size', 'carousel-slider' ); ?></label>
70
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter description font size without px unit. In pixels, ex: 20 instead of 20px. Default: 24', 'carousel-slider' ); ?></p>
71
+ </div>
72
+ <div class="sp-input-field">
73
+ <input type="number" id="_description_font_size"
74
+ class="regular-text" value="<?php echo $_desc_font_size; ?>"
75
+ name="carousel_slider_content[<?php echo $slide_num; ?>][description_font_size]">
76
+ </div>
77
+ </div><!-- Description Font Size -->
78
+
79
+ <div class="sp-input-group" id="field-_description_gutter">
80
+ <div class="sp-input-label">
81
+ <label for="_description_gutter"><?php esc_html_e( 'Description Spacing/Gutter', 'carousel-slider' ); ?></label>
82
+ <p class="sp-input-desc"><?php esc_html_e( 'Enter gutter (space between description and buttons) in px, em or rem, ex: 3rem', 'carousel-slider' ); ?></p>
83
+ </div>
84
+ <div class="sp-input-field">
85
+ <input type="text" id="_description_gutter" class="regular-text" value="<?php echo $_description_gutter; ?>"
86
+ name="carousel_slider_content[<?php echo $slide_num; ?>][description_gutter]">
87
+ </div>
88
+ </div>
89
+
90
+ <div class="sp-input-group" id="field-_description_color">
91
+ <div class="sp-input-label">
92
+ <label for="_description_color"><?php esc_html_e( 'Description Color', 'carousel-slider' ); ?></label>
93
+ <p class="sp-input-desc"><?php esc_html_e( 'Select a color for the description font. Default: #fff', 'carousel-slider' ); ?></p>
94
+ </div>
95
+ <div class="sp-input-field">
96
+ <input type="text" id="_description_color"
97
+ class="color-picker" value="<?php echo $_desc_color; ?>"
98
+ data-default-color="#ffffff" data-alpha="true"
99
+ name="carousel_slider_content[<?php echo $slide_num; ?>][description_color]">
100
+ </div>
101
+ </div>
102
+
103
+ <div class="sp-input-group" id="field-_description_background_color">
104
+ <div class="sp-input-label">
105
+ <label for="_description_background_color"><?php esc_html_e( 'Description Background Color', 'carousel-slider' ); ?></label>
106
+ <p class="sp-input-desc"><?php esc_html_e( 'If you would like a semi-transparent background behind your description, Choose from here. If you would not like, leave it blank. Default: rgba(0,0,0, 0.4)', 'carousel-slider' ); ?></p>
107
+ </div>
108
+ <div class="sp-input-field">
109
+ <input type="text" id="_description_background_color"
110
+ class="color-picker" data-alpha="true"
111
+ data-default-color="rgba(0,0,0, 0.4)" value="<?php echo $_desc_bg_color; ?>"
112
+ name="carousel_slider_content[<?php echo $slide_num; ?>][description_background_color]">
113
+ </div>
114
+ </div>
115
+
116
+ </div>
117
+ <!-- .tab-style -->
templates/admin/parts/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
templates/admin/post-carousel.php CHANGED
@@ -1,88 +1,89 @@
1
- <div data-id="open" id="section_post_query" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo $slide_type != 'post-carousel' ? 'none' : 'block'; ?>">
 
2
  <span class="shapla-toggle-title">
3
- <?php _e('Post Query', 'carousel-slider'); ?>
4
  </span>
5
- <div class="shapla-toggle-inner">
6
- <div class="shapla-toggle-content">
7
  <?php
8
- $this->form->select(array(
9
- 'id' => '_post_query_type',
10
- 'name' => __('Query Type', 'carousel-slider'),
11
- 'std' => 'latest_posts',
12
- 'options' => array(
13
- 'latest_posts' => __('Latest Posts', 'carousel-slider'),
14
- 'date_range' => __('Date Range', 'carousel-slider'),
15
- 'post_categories' => __('Post Categories', 'carousel-slider'),
16
- 'post_tags' => __('Post Tags', 'carousel-slider'),
17
- 'specific_posts' => __('Specific posts', 'carousel-slider'),
18
- ),
19
- ));
20
- $this->form->date(array(
21
- 'id' => '_post_date_after',
22
- 'name' => __('Date from', 'carousel-slider'),
23
- 'desc' => sprintf(__('Example: %s', 'carousel-slider'), date('F d, Y', strtotime('-3 months'))),
24
- ));
25
- $this->form->date(array(
26
- 'id' => '_post_date_before',
27
- 'name' => __('Date to', 'carousel-slider'),
28
- 'desc' => sprintf(__('Example: %s', 'carousel-slider'), date('F d, Y', strtotime('-7 days'))),
29
- ));
30
- $this->form->post_terms(array(
31
- 'id' => '_post_categories',
32
- 'taxonomy' => 'category',
33
- 'multiple' => true,
34
- 'name' => __('Post Categories', 'carousel-slider'),
35
- 'desc' => __('Show posts associated with selected categories.', 'carousel-slider'),
36
- ));
37
- $this->form->post_terms(array(
38
- 'id' => '_post_tags',
39
- 'taxonomy' => 'post_tag',
40
- 'multiple' => true,
41
- 'name' => __('Post Tags', 'carousel-slider'),
42
- 'desc' => __('Show posts associated with selected tags.', 'carousel-slider'),
43
- ));
44
- $this->form->posts_list(array(
45
- 'id' => '_post_in',
46
- 'multiple' => true,
47
- 'name' => __('Specific posts', 'carousel-slider'),
48
- 'desc' => __('Select posts that you want to show as slider. Select at least 5 posts', 'carousel-slider'),
49
- ));
50
- $this->form->number(array(
51
- 'id' => '_posts_per_page',
52
- 'name' => __('Posts per page', 'carousel-slider'),
53
- 'std' => 12,
54
- 'desc' => __('How many post you want to show on carousel slide.', 'carousel-slider'),
55
- ));
56
- $this->form->select(array(
57
- 'id' => '_post_order',
58
- 'name' => __('Order', 'carousel-slider'),
59
- 'std' => 'DESC',
60
- 'options' => array(
61
- 'ASC' => __('Ascending Order', 'carousel-slider'),
62
- 'DESC' => __('Descending Order', 'carousel-slider'),
63
- ),
64
- ));
65
- $this->form->select(array(
66
- 'id' => '_post_orderby',
67
- 'name' => __('Order by', 'carousel-slider'),
68
- 'std' => 'ID',
69
- 'options' => array(
70
- 'none' => __('No order', 'carousel-slider'),
71
- 'ID' => __('Post id', 'carousel-slider'),
72
- 'author' => __('Post author', 'carousel-slider'),
73
- 'title' => __('Post title', 'carousel-slider'),
74
- 'modified' => __('Last modified date', 'carousel-slider'),
75
- 'rand' => __('Random order', 'carousel-slider'),
76
- 'comment_count' => __('Number of comments', 'carousel-slider'),
77
- ),
78
- ));
79
- $this->form->number(array(
80
- 'id' => '_post_height',
81
- 'name' => __('Colums Height', 'carousel-slider'),
82
- 'std' => 450,
83
- 'desc' => __('Enter colums height for posts carousel in numbers. 450 (px) is perfect when columns width is around 300px or higher. Otherwise you need to change it for perfection.', 'carousel-slider'),
84
- ));
85
  ?>
86
- </div>
87
- </div>
88
  </div>
1
+ <div data-id="open" id="section_post_query" class="shapla-toggle shapla-toggle--stroke"
2
+ style="display: <?php echo $slide_type != 'post-carousel' ? 'none' : 'block'; ?>">
3
  <span class="shapla-toggle-title">
4
+ <?php esc_html_e( 'Post Query', 'carousel-slider' ); ?>
5
  </span>
6
+ <div class="shapla-toggle-inner">
7
+ <div class="shapla-toggle-content">
8
  <?php
9
+ $this->form->select( array(
10
+ 'id' => '_post_query_type',
11
+ 'name' => esc_html__( 'Query Type', 'carousel-slider' ),
12
+ 'std' => 'latest_posts',
13
+ 'options' => array(
14
+ 'latest_posts' => esc_html__( 'Latest Posts', 'carousel-slider' ),
15
+ 'date_range' => esc_html__( 'Date Range', 'carousel-slider' ),
16
+ 'post_categories' => esc_html__( 'Post Categories', 'carousel-slider' ),
17
+ 'post_tags' => esc_html__( 'Post Tags', 'carousel-slider' ),
18
+ 'specific_posts' => esc_html__( 'Specific posts', 'carousel-slider' ),
19
+ ),
20
+ ) );
21
+ $this->form->date( array(
22
+ 'id' => '_post_date_after',
23
+ 'name' => esc_html__( 'Date from', 'carousel-slider' ),
24
+ 'desc' => sprintf( esc_html__( 'Example: %s', 'carousel-slider' ), date( 'F d, Y', strtotime( '-3 months' ) ) ),
25
+ ) );
26
+ $this->form->date( array(
27
+ 'id' => '_post_date_before',
28
+ 'name' => esc_html__( 'Date to', 'carousel-slider' ),
29
+ 'desc' => sprintf( esc_html__( 'Example: %s', 'carousel-slider' ), date( 'F d, Y', strtotime( '-7 days' ) ) ),
30
+ ) );
31
+ $this->form->post_terms( array(
32
+ 'id' => '_post_categories',
33
+ 'taxonomy' => 'category',
34
+ 'multiple' => true,
35
+ 'name' => esc_html__( 'Post Categories', 'carousel-slider' ),
36
+ 'desc' => esc_html__( 'Show posts associated with selected categories.', 'carousel-slider' ),
37
+ ) );
38
+ $this->form->post_terms( array(
39
+ 'id' => '_post_tags',
40
+ 'taxonomy' => 'post_tag',
41
+ 'multiple' => true,
42
+ 'name' => esc_html__( 'Post Tags', 'carousel-slider' ),
43
+ 'desc' => esc_html__( 'Show posts associated with selected tags.', 'carousel-slider' ),
44
+ ) );
45
+ $this->form->posts_list( array(
46
+ 'id' => '_post_in',
47
+ 'multiple' => true,
48
+ 'name' => esc_html__( 'Specific posts', 'carousel-slider' ),
49
+ 'desc' => esc_html__( 'Select posts that you want to show as slider. Select at least 5 posts', 'carousel-slider' ),
50
+ ) );
51
+ $this->form->number( array(
52
+ 'id' => '_posts_per_page',
53
+ 'name' => esc_html__( 'Posts per page', 'carousel-slider' ),
54
+ 'std' => 12,
55
+ 'desc' => esc_html__( 'How many post you want to show on carousel slide.', 'carousel-slider' ),
56
+ ) );
57
+ $this->form->select( array(
58
+ 'id' => '_post_order',
59
+ 'name' => esc_html__( 'Order', 'carousel-slider' ),
60
+ 'std' => 'DESC',
61
+ 'options' => array(
62
+ 'ASC' => esc_html__( 'Ascending Order', 'carousel-slider' ),
63
+ 'DESC' => esc_html__( 'Descending Order', 'carousel-slider' ),
64
+ ),
65
+ ) );
66
+ $this->form->select( array(
67
+ 'id' => '_post_orderby',
68
+ 'name' => esc_html__( 'Order by', 'carousel-slider' ),
69
+ 'std' => 'ID',
70
+ 'options' => array(
71
+ 'none' => esc_html__( 'No order', 'carousel-slider' ),
72
+ 'ID' => esc_html__( 'Post id', 'carousel-slider' ),
73
+ 'author' => esc_html__( 'Post author', 'carousel-slider' ),
74
+ 'title' => esc_html__( 'Post title', 'carousel-slider' ),
75
+ 'modified' => esc_html__( 'Last modified date', 'carousel-slider' ),
76
+ 'rand' => esc_html__( 'Random order', 'carousel-slider' ),
77
+ 'comment_count' => esc_html__( 'Number of comments', 'carousel-slider' ),
78
+ ),
79
+ ) );
80
+ $this->form->number( array(
81
+ 'id' => '_post_height',
82
+ 'name' => esc_html__( 'Colums Height', 'carousel-slider' ),
83
+ 'desc' => esc_html__( 'Enter colums height for posts carousel in numbers. 450 (px) is perfect when columns width is around 300px or higher. Otherwise you need to change it for perfection.', 'carousel-slider' ),
84
+ 'std' => 450,
85
+ ) );
86
  ?>
87
+ </div>
88
+ </div>
89
  </div>
templates/admin/product-carousel.php CHANGED
@@ -1,131 +1,133 @@
1
- <div data-id="open" id="section_product_query" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo $slide_type != 'product-carousel' ? 'none' : 'block'; ?>">
 
2
  <span class="shapla-toggle-title">
3
- <?php _e('Product Query', 'carousel-slider'); ?>
4
  </span>
5
- <div class="shapla-toggle-inner">
6
- <div class="shapla-toggle-content">
7
  <?php
8
- $this->form->select(array(
9
- 'id' => '_product_query_type',
10
- 'name' => __('Query Type', 'carousel-slider'),
11
- 'std' => 'query_porduct',
12
- 'options' => array(
13
- 'query_porduct' => __('Query Products', 'carousel-slider'),
14
- 'product_categories' => __('Product Categories', 'carousel-slider'),
15
- 'product_tags' => __('Product Tags', 'carousel-slider'),
16
- 'specific_products' => __('Specific Products', 'carousel-slider'),
17
- ),
18
- ));
19
- $this->form->select(array(
20
- 'id' => '_product_query',
21
- 'name' => __('Choose Query', 'carousel-slider'),
22
- 'std' => 'featured',
23
- 'options' => array(
24
- 'featured' => __('Featured Products', 'carousel-slider'),
25
- 'recent' => __('Recent Products', 'carousel-slider'),
26
- 'sale' => __('Sale Products', 'carousel-slider'),
27
- 'best_selling' => __('Best-Selling Products', 'carousel-slider'),
28
- 'top_rated' => __('Top Rated Products', 'carousel-slider'),
29
- ),
30
- ));
31
- $this->form->post_terms(array(
32
- 'id' => '_product_categories',
33
- 'taxonomy' => 'product_cat',
34
- 'multiple' => true,
35
- 'name' => __('Product Categories', 'carousel-slider'),
36
- 'desc' => __('Show products associated with selected categories.', 'carousel-slider'),
37
- ));
38
- $this->form->post_terms(array(
39
- 'id' => '_product_tags',
40
- 'taxonomy' => 'product_tag',
41
- 'multiple' => true,
42
- 'name' => __('Product Tags', 'carousel-slider'),
43
- 'desc' => __('Show products associated with selected tags.', 'carousel-slider'),
44
- ));
45
- $this->form->posts_list(array(
46
- 'id' => '_product_in',
47
- 'post_type' => 'product',
48
- 'multiple' => true,
49
- 'name' => __('Specific products', 'carousel-slider'),
50
- 'desc' => __('Select products that you want to show as slider. Select at least 5 products', 'carousel-slider'),
51
- ));
52
- $this->form->number(array(
53
- 'id' => '_products_per_page',
54
- 'name' => __('Product per page', 'carousel-slider'),
55
- 'std' => 12,
56
- 'desc' => __('How many products you want to show on carousel slide.', 'carousel-slider'),
57
- ));
58
- $this->form->checkbox( array(
59
- 'id' => '_product_title',
60
- 'name' => __('Show Title', 'carousel-slider'),
61
- 'label' => __('Show Title.', 'carousel-slider'),
62
- 'desc' => __('Check to show product title.', 'carousel-slider'),
63
- 'std' => 'on'
64
- ));
65
- $this->form->checkbox( array(
66
- 'id' => '_product_rating',
67
- 'name' => __('Show Rating', 'carousel-slider'),
68
- 'label' => __('Show Rating.', 'carousel-slider'),
69
- 'desc' => __('Check to show product rating.', 'carousel-slider'),
70
- 'std' => 'on'
71
- ));
72
- $this->form->checkbox( array(
73
- 'id' => '_product_price',
74
- 'name' => __('Show Price', 'carousel-slider'),
75
- 'label' => __('Show Price.', 'carousel-slider'),
76
- 'desc' => __('Check to show product price.', 'carousel-slider'),
77
- 'std' => 'on'
78
- ));
79
- $this->form->checkbox( array(
80
- 'id' => '_product_cart_button',
81
- 'name' => __('Show Cart Button', 'carousel-slider'),
82
- 'label' => __('Show Cart Button.', 'carousel-slider'),
83
- 'desc' => __('Check to show product add to cart button.', 'carousel-slider'),
84
- 'std' => 'on'
85
- ));
86
- $this->form->checkbox( array(
87
- 'id' => '_product_onsale',
88
- 'name' => __('Show Sale Tag', 'carousel-slider'),
89
- 'label' => __('Show Sale Tag', 'carousel-slider'),
90
- 'desc' => __('Check to show product sale tag for onsale products.', 'carousel-slider'),
91
- 'std' => 'on'
92
- ));
93
- $this->form->checkbox( array(
94
- 'id' => '_product_wishlist',
95
- 'name' => __('Show Wishlist Button', 'carousel-slider'),
96
- 'label' => __('Show Wishlist Button', 'carousel-slider'),
97
- 'std' => 'off',
98
- 'desc' => sprintf( esc_html__('Check to show wishlist button. This feature needs %s plugin to be installed.', 'carousel-slider'), sprintf('<a href="https://wordpress.org/plugins/yith-woocommerce-wishlist/" target="_blank" >%s</a>', __('YITH WooCommerce Wishlist', 'carousel-slider'))),
99
- ));
100
- $this->form->checkbox( array(
101
- 'id' => '_product_quick_view',
102
- 'name' => __('Show Quick View', 'carousel-slider'),
103
- 'label' => __('Show Quick View', 'carousel-slider'),
104
- 'desc' => __('Check to show quick view button.', 'carousel-slider'),
105
- 'std' => 'on'
106
- ));
107
- $this->form->color(array(
108
- 'id' => '_product_title_color',
109
- 'type' => 'color',
110
- 'name' => __('Title Color', 'carousel-slider'),
111
- 'desc' => __('Pick a color for product title. This color will also apply to sale tag and price.', 'carousel-slider'),
112
- 'std' => '#333333'
113
- ));
114
- $this->form->color(array(
115
- 'id' => '_product_button_bg_color',
116
- 'type' => 'color',
117
- 'name' => __('Button Background Color', 'carousel-slider'),
118
- 'desc' => __('Pick a color for button background color. This color will also apply to product rating.', 'carousel-slider'),
119
- 'std' => '#96588a'
120
- ));
121
- $this->form->color(array(
122
- 'id' => '_product_button_text_color',
123
- 'type' => 'color',
124
- 'name' => __('Button Text Color', 'carousel-slider'),
125
- 'desc' => __('Pick a color for button text color.', 'carousel-slider'),
126
- 'std' => '#f1f1f1'
127
- ));
 
128
  ?>
129
- </div>
130
- </div>
131
  </div>
1
+ <div data-id="open" id="section_product_query" class="shapla-toggle shapla-toggle--stroke"
2
+ style="display: <?php echo $slide_type != 'product-carousel' ? 'none' : 'block'; ?>">
3
  <span class="shapla-toggle-title">
4
+ <?php esc_html_e( 'Product Query', 'carousel-slider' ); ?>
5
  </span>
6
+ <div class="shapla-toggle-inner">
7
+ <div class="shapla-toggle-content">
8
  <?php
9
+ $this->form->select( array(
10
+ 'id' => '_product_query_type',
11
+ 'name' => esc_html__( 'Query Type', 'carousel-slider' ),
12
+ 'std' => 'query_porduct',
13
+ 'options' => array(
14
+ 'query_porduct' => esc_html__( 'Query Products', 'carousel-slider' ),
15
+ 'product_categories' => esc_html__( 'Product Categories', 'carousel-slider' ),
16
+ 'product_tags' => esc_html__( 'Product Tags', 'carousel-slider' ),
17
+ 'specific_products' => esc_html__( 'Specific Products', 'carousel-slider' ),
18
+ ),
19
+ ) );
20
+ $this->form->select( array(
21
+ 'id' => '_product_query',
22
+ 'name' => esc_html__( 'Choose Query', 'carousel-slider' ),
23
+ 'std' => 'featured',
24
+ 'options' => array(
25
+ 'featured' => esc_html__( 'Featured Products', 'carousel-slider' ),
26
+ 'recent' => esc_html__( 'Recent Products', 'carousel-slider' ),
27
+ 'sale' => esc_html__( 'Sale Products', 'carousel-slider' ),
28
+ 'best_selling' => esc_html__( 'Best-Selling Products', 'carousel-slider' ),
29
+ 'top_rated' => esc_html__( 'Top Rated Products', 'carousel-slider' ),
30
+ 'product_categories_list' => esc_html__( 'Product Categories List', 'carousel-slider' ),
31
+ ),
32
+ ) );
33
+ $this->form->post_terms( array(
34
+ 'id' => '_product_categories',
35
+ 'taxonomy' => 'product_cat',
36
+ 'multiple' => true,
37
+ 'name' => esc_html__( 'Product Categories', 'carousel-slider' ),
38
+ 'desc' => esc_html__( 'Show products associated with selected categories.', 'carousel-slider' ),
39
+ ) );
40
+ $this->form->post_terms( array(
41
+ 'id' => '_product_tags',
42
+ 'taxonomy' => 'product_tag',
43
+ 'multiple' => true,
44
+ 'name' => esc_html__( 'Product Tags', 'carousel-slider' ),
45
+ 'desc' => esc_html__( 'Show products associated with selected tags.', 'carousel-slider' ),
46
+ ) );
47
+ $this->form->posts_list( array(
48
+ 'id' => '_product_in',
49
+ 'post_type' => 'product',
50
+ 'multiple' => true,
51
+ 'name' => esc_html__( 'Specific products', 'carousel-slider' ),
52
+ 'desc' => esc_html__( 'Select products that you want to show as slider. Select at least 5 products', 'carousel-slider' ),
53
+ ) );
54
+ $this->form->number( array(
55
+ 'id' => '_products_per_page',
56
+ 'name' => esc_html__( 'Product per page', 'carousel-slider' ),
57
+ 'std' => 12,
58
+ 'desc' => esc_html__( 'How many products you want to show on carousel slide.', 'carousel-slider' ),
59
+ ) );
60
+ $this->form->checkbox( array(
61
+ 'id' => '_product_title',
62
+ 'name' => esc_html__( 'Show Title', 'carousel-slider' ),
63
+ 'label' => esc_html__( 'Show Title.', 'carousel-slider' ),
64
+ 'desc' => esc_html__( 'Check to show product title.', 'carousel-slider' ),
65
+ 'std' => 'on'
66
+ ) );
67
+ $this->form->checkbox( array(
68
+ 'id' => '_product_rating',
69
+ 'name' => esc_html__( 'Show Rating', 'carousel-slider' ),
70
+ 'label' => esc_html__( 'Show Rating.', 'carousel-slider' ),
71
+ 'desc' => esc_html__( 'Check to show product rating.', 'carousel-slider' ),
72
+ 'std' => 'on'
73
+ ) );
74
+ $this->form->checkbox( array(
75
+ 'id' => '_product_price',
76
+ 'name' => esc_html__( 'Show Price', 'carousel-slider' ),
77
+ 'label' => esc_html__( 'Show Price.', 'carousel-slider' ),
78
+ 'desc' => esc_html__( 'Check to show product price.', 'carousel-slider' ),
79
+ 'std' => 'on'
80
+ ) );
81
+ $this->form->checkbox( array(
82
+ 'id' => '_product_cart_button',
83
+ 'name' => esc_html__( 'Show Cart Button', 'carousel-slider' ),
84
+ 'label' => esc_html__( 'Show Cart Button.', 'carousel-slider' ),
85
+ 'desc' => esc_html__( 'Check to show product add to cart button.', 'carousel-slider' ),
86
+ 'std' => 'on'
87
+ ) );
88
+ $this->form->checkbox( array(
89
+ 'id' => '_product_onsale',
90
+ 'name' => esc_html__( 'Show Sale Tag', 'carousel-slider' ),
91
+ 'label' => esc_html__( 'Show Sale Tag', 'carousel-slider' ),
92
+ 'desc' => esc_html__( 'Check to show product sale tag for onsale products.', 'carousel-slider' ),
93
+ 'std' => 'on'
94
+ ) );
95
+ $this->form->checkbox( array(
96
+ 'id' => '_product_wishlist',
97
+ 'name' => esc_html__( 'Show Wishlist Button', 'carousel-slider' ),
98
+ 'label' => esc_html__( 'Show Wishlist Button', 'carousel-slider' ),
99
+ 'std' => 'off',
100
+ 'desc' => sprintf( esc_html__( 'Check to show wishlist button. This feature needs %s plugin to be installed.', 'carousel-slider' ), sprintf( '<a href="https://wordpress.org/plugins/yith-woocommerce-wishlist/" target="_blank" >%s</a>', __( 'YITH WooCommerce Wishlist', 'carousel-slider' ) ) ),
101
+ ) );
102
+ $this->form->checkbox( array(
103
+ 'id' => '_product_quick_view',
104
+ 'name' => esc_html__( 'Show Quick View', 'carousel-slider' ),
105
+ 'label' => esc_html__( 'Show Quick View', 'carousel-slider' ),
106
+ 'desc' => esc_html__( 'Check to show quick view button.', 'carousel-slider' ),
107
+ 'std' => 'on'
108
+ ) );
109
+ $this->form->color( array(
110
+ 'id' => '_product_title_color',
111
+ 'type' => 'color',
112
+ 'name' => esc_html__( 'Title Color', 'carousel-slider' ),
113
+ 'desc' => esc_html__( 'Pick a color for product title. This color will also apply to sale tag and price.', 'carousel-slider' ),
114
+ 'std' => '#333333'
115
+ ) );
116
+ $this->form->color( array(
117
+ 'id' => '_product_button_bg_color',
118
+ 'type' => 'color',
119
+ 'name' => esc_html__( 'Button Background Color', 'carousel-slider' ),
120
+ 'desc' => esc_html__( 'Pick a color for button background color. This color will also apply to product rating.', 'carousel-slider' ),
121
+ 'std' => '#96588a'
122
+ ) );
123
+ $this->form->color( array(
124
+ 'id' => '_product_button_text_color',
125
+ 'type' => 'color',
126
+ 'name' => esc_html__( 'Button Text Color', 'carousel-slider' ),
127
+ 'desc' => esc_html__( 'Pick a color for button text color.', 'carousel-slider' ),
128
+ 'std' => '#f1f1f1'
129
+ ) );
130
  ?>
131
+ </div>
132
+ </div>
133
  </div>
templates/admin/responsive.php CHANGED
@@ -1,50 +1,50 @@
1
  <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
  <span class="shapla-toggle-title">
3
- <?php _e('Responsive Settings', 'carousel-slider'); ?>
4
  </span>
5
- <div class="shapla-toggle-inner">
6
- <div class="shapla-toggle-content">
7
- <?php
8
- $this->form->number(array(
9
- 'id' => '_items',
10
- 'type' => 'number',
11
- 'name' => __('Colums', 'carousel-slider'),
12
- 'desc' => __('The number of items you want to see on the Extra Large Desktop Layout (Screens size greater than 1921 pixels DP)', 'carousel-slider'),
13
- 'std' => 4
14
- ));
15
- $this->form->number(array(
16
- 'id' => '_items_desktop',
17
- 'type' => 'number',
18
- 'name' => __('Colums : Desktop', 'carousel-slider'),
19
- 'desc' => __('The number of items you want to see on the Desktop Layout (Screens size from 1200 pixels DP to 1920 pixels DP)', 'carousel-slider'),
20
- 'std' => 4
21
- ));
22
- $this->form->number(array(
23
- 'id' => '_items_small_desktop',
24
- 'type' => 'number',
25
- 'name' => __('Colums : Small Desktop', 'carousel-slider'),
26
- 'desc' => __('The number of items you want to see on the Small Desktop Layout (Screens size from 993 pixels DP to 1199 pixels DP)', 'carousel-slider'),
27
- 'std' => 4
28
- ));
29
- $this->form->number(array(
30
- 'id' => '_items_portrait_tablet',
31
- 'name' => __('Colums : Tablet', 'carousel-slider'),
32
- 'desc' => __('The number of items you want to see on the Tablet Layout (Screens size from 768 pixels DP to 992 pixels DP)', 'carousel-slider'),
33
- 'std' => 3
34
- ));
35
- $this->form->number(array(
36
- 'id' => '_items_small_portrait_tablet',
37
- 'name' => __('Colums : Small Tablet', 'carousel-slider'),
38
- 'desc' => __('The number of items you want to see on the Small Tablet Layout(Screens size from 600 pixels DP to 767 pixels DP)', 'carousel-slider'),
39
- 'std' => 2
40
- ));
41
- $this->form->number(array(
42
- 'id' => '_items_portrait_mobile',
43
- 'name' => __('Colums : Mobile', 'carousel-slider'),
44
- 'desc' => __('The number of items you want to see on the Mobile Layout (Screens size from 320 pixels DP to 599 pixels DP)', 'carousel-slider'),
45
- 'std' => 1
46
- ));
47
- ?>
48
- </div>
49
- </div>
50
  </div>
1
  <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
  <span class="shapla-toggle-title">
3
+ <?php esc_html_e( 'Responsive Settings', 'carousel-slider' ); ?>
4
  </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->form->number( array(
9
+ 'id' => '_items',
10
+ 'type' => 'number',
11
+ 'name' => esc_html__( 'Columns', 'carousel-slider' ),
12
+ 'desc' => esc_html__( 'The number of items you want to see on the Extra Large Desktop Layout (Screens size greater than 1921 pixels DP)', 'carousel-slider' ),
13
+ 'std' => 4
14
+ ) );
15
+ $this->form->number( array(
16
+ 'id' => '_items_desktop',
17
+ 'type' => 'number',
18
+ 'name' => esc_html__( 'Columns : Desktop', 'carousel-slider' ),
19
+ 'desc' => esc_html__( 'The number of items you want to see on the Desktop Layout (Screens size from 1200 pixels DP to 1920 pixels DP)', 'carousel-slider' ),
20
+ 'std' => 4
21
+ ) );
22
+ $this->form->number( array(
23
+ 'id' => '_items_small_desktop',
24
+ 'type' => 'number',
25
+ 'name' => esc_html__( 'Columns : Small Desktop', 'carousel-slider' ),
26
+ 'desc' => esc_html__( 'The number of items you want to see on the Small Desktop Layout (Screens size from 993 pixels DP to 1199 pixels DP)', 'carousel-slider' ),
27
+ 'std' => 4
28
+ ) );
29
+ $this->form->number( array(
30
+ 'id' => '_items_portrait_tablet',
31
+ 'name' => esc_html__( 'Columns : Tablet', 'carousel-slider' ),
32
+ 'desc' => esc_html__( 'The number of items you want to see on the Tablet Layout (Screens size from 768 pixels DP to 992 pixels DP)', 'carousel-slider' ),
33
+ 'std' => 3
34
+ ) );
35
+ $this->form->number( array(
36
+ 'id' => '_items_small_portrait_tablet',
37
+ 'name' => esc_html__( 'Columns : Small Tablet', 'carousel-slider' ),
38
+ 'desc' => esc_html__( 'The number of items you want to see on the Small Tablet Layout(Screens size from 600 pixels DP to 767 pixels DP)', 'carousel-slider' ),
39
+ 'std' => 2
40
+ ) );
41
+ $this->form->number( array(
42
+ 'id' => '_items_portrait_mobile',
43
+ 'name' => esc_html__( 'Columns : Mobile', 'carousel-slider' ),
44
+ 'desc' => esc_html__( 'The number of items you want to see on the Mobile Layout (Screens size from 320 pixels DP to 599 pixels DP)', 'carousel-slider' ),
45
+ 'std' => 1
46
+ ) );
47
+ ?>
48
+ </div>
49
+ </div>
50
  </div>
templates/admin/types.php CHANGED
@@ -1,27 +1,30 @@
1
  <div class="sp-input-group" style="margin: 10px 0 30px;">
2
- <div class="sp-input-label">
3
- <label for="_carousel_slider_slide_type">
4
- <?php _e('Slide Type', 'carousel-slider'); ?>
5
- </label>
6
- </div>
7
- <div class="sp-input-field">
8
- <select name="carousel_slider[_slide_type]" id="_carousel_slider_slide_type" class="sp-input-text">
9
- <option value="image-carousel" <?php echo $slide_type == 'image-carousel' ? 'selected': ''; ?>>
10
- <?php _e('Image Carousel - from Media Library', 'carousel-slider'); ?>
11
- </option>
12
- <option value="image-carousel-url" <?php echo $slide_type == 'image-carousel-url' ? 'selected': ''; ?>>
13
- <?php _e('Image Carousel - from URL', 'carousel-slider'); ?>
14
- </option>
15
- <option value="post-carousel" <?php echo $slide_type == 'post-carousel' ? 'selected': ''; ?>>
16
- <?php _e('Post Carousel', 'carousel-slider'); ?>
17
- </option>
18
- <option value="video-carousel"<?php echo $slide_type == 'video-carousel' ? 'selected': ''; ?>>
19
- <?php _e('Video Carousel', 'carousel-slider'); ?>
20
- </option>
21
- <?php $disabled = $this->is_woocommerce_active() ? '' : 'disabled'; ?>
22
- <option value="product-carousel" <?php echo $slide_type == 'product-carousel' ? 'selected': ''; ?> <?php echo $disabled; ?>>
23
- <?php _e('WooCommerce Product Carousel', 'carousel-slider'); ?>
24
- </option>
25
- </select>
26
- </div>
 
 
 
27
  </div>
1
  <div class="sp-input-group" style="margin: 10px 0 30px;">
2
+ <div class="sp-input-label">
3
+ <label for="_carousel_slider_slide_type">
4
+ <?php esc_html_e( 'Slide Type', 'carousel-slider' ); ?>
5
+ </label>
6
+ </div>
7
+ <div class="sp-input-field">
8
+ <select name="carousel_slider[_slide_type]" id="_carousel_slider_slide_type" class="sp-input-text">
9
+ <option value="image-carousel" <?php echo $slide_type == 'image-carousel' ? 'selected' : ''; ?>>
10
+ <?php esc_html_e( 'Image Carousel - from Media Library', 'carousel-slider' ); ?>
11
+ </option>
12
+ <option value="image-carousel-url" <?php echo $slide_type == 'image-carousel-url' ? 'selected' : ''; ?>>
13
+ <?php esc_html_e( 'Image Carousel - from URL', 'carousel-slider' ); ?>
14
+ </option>
15
+ <option value="post-carousel" <?php echo $slide_type == 'post-carousel' ? 'selected' : ''; ?>>
16
+ <?php esc_html_e( 'Post Carousel', 'carousel-slider' ); ?>
17
+ </option>
18
+ <option value="video-carousel"<?php echo $slide_type == 'video-carousel' ? 'selected' : ''; ?>>
19
+ <?php esc_html_e( 'Video Carousel', 'carousel-slider' ); ?>
20
+ </option>
21
+ <?php $disabled = carousel_slider_is_woocommerce_active() ? '' : 'disabled'; ?>
22
+ <option value="product-carousel" <?php echo $slide_type == 'product-carousel' ? 'selected' : ''; ?> <?php echo $disabled; ?>>
23
+ <?php esc_html_e( 'WooCommerce Product Carousel', 'carousel-slider' ); ?>
24
+ </option>
25
+ <option value="hero-banner-slider"<?php echo $slide_type == 'hero-banner-slider' ? 'selected' : ''; ?>>
26
+ <?php esc_html_e( 'Hero Banner Slider (beta)', 'carousel-slider' ); ?>
27
+ </option>
28
+ </select>
29
+ </div>
30
  </div>
templates/admin/video-carousel.php CHANGED
@@ -1,28 +1,33 @@
1
- <div data-id="open" id="section_video_settings" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo $slide_type != 'video-carousel' ? 'none' : 'block'; ?>">
 
2
  <span class="shapla-toggle-title">
3
- <?php _e('Video Settings', 'carousel-slider'); ?>
4
  </span>
5
- <div class="shapla-toggle-inner">
6
- <div class="shapla-toggle-content">
7
  <?php
8
- $this->form->textarea(array(
9
- 'id' => '_video_url',
10
- 'name' => __('Video URLs', 'carousel-slider'),
11
- 'desc' => sprintf('%s<br><br>Example: %s', __('Only support youtube and vimeo. Enter video URL from youtube or vimeo separating each by comma', 'carousel-slider'), __('https://www.youtube.com/watch?v=O4-EM32h7b4,https://www.youtube.com/watch?v=72IO4gzB8mU,https://vimeo.com/193773669,https://vimeo.com/193517656', 'carousel-slider')),
12
- ));
13
- $this->form->number(array(
14
- 'id' => '_video_width',
15
- 'name' => __('Video Width', 'carousel-slider'),
16
- 'std' => 560,
17
- 'desc' => __('Enter video width in numbers.', 'carousel-slider'),
18
- ));
19
- $this->form->number(array(
20
- 'id' => '_video_height',
21
- 'name' => __('Video Height', 'carousel-slider'),
22
- 'std' => 315,
23
- 'desc' => __('Enter video height in numbers.', 'carousel-slider'),
24
- ));
 
 
 
 
25
  ?>
26
- </div>
27
- </div>
28
  </div>
1
+ <div data-id="open" id="section_video_settings" class="shapla-toggle shapla-toggle--stroke"
2
+ style="display: <?php echo $slide_type != 'video-carousel' ? 'none' : 'block'; ?>">
3
  <span class="shapla-toggle-title">
4
+ <?php esc_html_e( 'Video Settings', 'carousel-slider' ); ?>
5
  </span>
6
+ <div class="shapla-toggle-inner">
7
+ <div class="shapla-toggle-content">
8
  <?php
9
+ $this->form->textarea( array(
10
+ 'id' => '_video_url',
11
+ 'name' => esc_html__( 'Video URLs', 'carousel-slider' ),
12
+ 'desc' => sprintf(
13
+ '%s<br><br>Example: %s',
14
+ esc_html__( 'Only support youtube and vimeo. Enter video URL from youtube or vimeo separating each by comma', 'carousel-slider' ),
15
+ 'https://www.youtube.com/watch?v=O4-EM32h7b4,https://www.youtube.com/watch?v=72IO4gzB8mU,https://vimeo.com/193773669,https://vimeo.com/193517656'
16
+ ),
17
+ ) );
18
+ $this->form->number( array(
19
+ 'id' => '_video_width',
20
+ 'name' => esc_html__( 'Video Width', 'carousel-slider' ),
21
+ 'std' => 560,
22
+ 'desc' => esc_html__( 'Enter video width in numbers.', 'carousel-slider' ),
23
+ ) );
24
+ $this->form->number( array(
25
+ 'id' => '_video_height',
26
+ 'name' => esc_html__( 'Video Height', 'carousel-slider' ),
27
+ 'std' => 315,
28
+ 'desc' => esc_html__( 'Enter video height in numbers.', 'carousel-slider' ),
29
+ ) );
30
  ?>
31
+ </div>
32
+ </div>
33
  </div>
templates/carousel.php DELETED
@@ -1,55 +0,0 @@
1
- <?php
2
- // If this file is called directly, abort.
3
- if ( ! defined( 'WPINC' ) ) {
4
- die;
5
- }
6
-
7
- $options_array = array(
8
- 'id' => 'id-' . $id,
9
- 'class' => 'owl-carousel carousel-slider',
10
- // General
11
- 'data-slide-type' => 'image-carousel-url',
12
- 'data-margin' => $margin_right,
13
- 'data-slide-by' => $slide_by,
14
- 'data-loop' => $inifnity_loop,
15
- 'data-lazy-load' => 'false',
16
- // Navigation
17
- 'data-nav' => $navigation,
18
- 'data-dots' => $pagination,
19
- 'data-nav-previous-icon' => '<svg class="carousel-slider-nav-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="48" viewBox="0 0 11 28"><path d="M9.8 8.5c0 0.1-0.1 0.3-0.2 0.4l-6.1 6.1 6.1 6.1c0.1 0.1 0.2 0.2 0.2 0.4s-0.1 0.3-0.2 0.4l-0.8 0.8c-0.1 0.1-0.2 0.2-0.4 0.2s-0.3-0.1-0.4-0.2l-7.3-7.3c-0.1-0.1-0.2-0.2-0.2-0.4s0.1-0.3 0.2-0.4l7.3-7.3c0.1-0.1 0.2-0.2 0.4-0.2s0.3 0.1 0.4 0.2l0.8 0.8c0.1 0.1 0.2 0.2 0.2 0.4z"/></svg>',
20
- 'data-nav-next-icon' => '<svg class="carousel-slider-nav-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="48" viewBox="0 0 9 28"><path d="M9.3 15c0 0.1-0.1 0.3-0.2 0.4l-7.3 7.3c-0.1 0.1-0.2 0.2-0.4 0.2s-0.3-0.1-0.4-0.2l-0.8-0.8c-0.1-0.1-0.2-0.2-0.2-0.4 0-0.1 0.1-0.3 0.2-0.4l6.1-6.1-6.1-6.1c-0.1-0.1-0.2-0.2-0.2-0.4s0.1-0.3 0.2-0.4l0.8-0.8c0.1-0.1 0.2-0.2 0.4-0.2s0.3 0.1 0.4 0.2l7.3 7.3c0.1 0.1 0.2 0.2 0.2 0.4z"/></svg>',
21
- // Video
22
- 'data-video-width' => 'false',
23
- 'data-video-height' => 'false',
24
- // Autoplay
25
- 'data-autoplay' => $auto_play,
26
- 'data-autoplay-timeout' => $autoplay_timeout,
27
- 'data-autoplay-speed' => $autoplay_speed,
28
- 'data-autoplay-hover-pause' => $stop_on_hover,
29
- // Responsive
30
- 'data-colums' => $items_desktop_large,
31
- 'data-colums-desktop' => $items,
32
- 'data-colums-small-desktop' => $items_desktop,
33
- 'data-colums-tablet' => $items_desktop_small,
34
- 'data-colums-small-tablet' => $items_tablet,
35
- 'data-colums-mobile' => $items_mobile,
36
- );
37
- ?>
38
- <style>
39
- #id-<?php echo $id; ?> .owl-dots .owl-dot span {
40
- background-color: <?php echo $nav_color; ?>
41
- }
42
- #id-<?php echo $id; ?> .owl-dots .owl-dot.active span,
43
- #id-<?php echo $id; ?> .owl-dots .owl-dot:hover span {
44
- background-color: <?php echo $nav_active_color; ?>
45
- }
46
- #id-<?php echo $id; ?> .carousel-slider-nav-icon {
47
- fill: <?php echo $nav_color; ?>;
48
- }
49
- #id-<?php echo $id; ?> .carousel-slider-nav-icon:hover {
50
- fill: <?php echo $nav_active_color; ?>;
51
- }
52
- </style>
53
- <div <?php echo $this->array_to_data( $options_array ); ?>>
54
- <?php echo do_shortcode($content); ?>
55
- </div><!-- .carousel-slider -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/documentation.php DELETED
@@ -1,119 +0,0 @@
1
- <?php
2
- // If this file is called directly, abort.
3
- if ( ! defined( 'WPINC' ) ) {
4
- die;
5
- }
6
- ?>
7
- <style type="text/css">
8
- .iframe_wrapper {
9
- position: relative;
10
- padding-bottom: 56.25%; /* height / width * 100 */
11
- padding-top: 25px;
12
- height: 0;
13
- }
14
- .iframe_wrapper > iframe {
15
- position: absolute;
16
- top: 0;
17
- left: 0;
18
- width: 100%;
19
- height: 100%;
20
- }
21
- </style>
22
- <div class="wrap">
23
- <h1 class="wp-heading"><?php _e('Carousel Slider Documentation', 'carousel-slider' ); ?></h1>
24
- <div id="poststuff">
25
- <div id="post-body" class="metabox-holder columns-2">
26
- <div id="post-body-content">
27
- <div class="postbox">
28
- <div class="inside">
29
- <table class="form-table">
30
- <tr>
31
- <th scope="row">
32
- <label>Images Carousel</label>
33
- <p class="description">Image carousel using gallery images</p>
34
- </th>
35
- <td>
36
- <div class="iframe_wrapper">
37
- <iframe width="1280" height="720" src="https://www.youtube.com/embed/ZzI1JhElrxc" frameborder="0" allowfullscreen></iframe>
38
- </div>
39
- </td>
40
- </tr>
41
- <tr>
42
- <th scope="row">
43
- <label>Images Carousel</label>
44
- <p class="description">Image carousel using custom URLs</p>
45
- </th>
46
- <td>
47
- <div class="iframe_wrapper">
48
- <iframe width="1280" height="720" src="https://www.youtube.com/embed/a7hqn1yNzwM" frameborder="0" allowfullscreen></iframe>
49
- </div>
50
- </td>
51
- </tr>
52
- <tr>
53
- <th scope="row">
54
- <label>Posts Carousel</label>
55
- </th>
56
- <td>
57
- <div class="iframe_wrapper">
58
- <iframe width="1280" height="720" src="https://www.youtube.com/embed/ImJB946azy0" frameborder="0" allowfullscreen></iframe>
59
- </div>
60
- </td>
61
- </tr>
62
- <tr>
63
- <th scope="row">
64
- <label>WooCommerce Products Carousel</label>
65
- </th>
66
- <td>
67
- <div class="iframe_wrapper">
68
- <iframe width="1280" height="720" src="https://www.youtube.com/embed/yiAkvXyfakg" frameborder="0" allowfullscreen></iframe>
69
- </div>
70
- </td>
71
- </tr>
72
- <tr>
73
- <th scope="row">
74
- <label>In Widget Areas</label>
75
- </th>
76
- <td>
77
- <div class="iframe_wrapper">
78
- <iframe width="1280" height="720" src="https://www.youtube.com/embed/kYgp6wp27lM" frameborder="0" allowfullscreen></iframe>
79
- </div>
80
- </td>
81
- </tr>
82
- <tr>
83
- <th scope="row">
84
- <label>With Page Builder by SiteOrigin</label>
85
- </th>
86
- <td>
87
- <div class="iframe_wrapper">
88
- <iframe width="1280" height="720" src="https://www.youtube.com/embed/-OaYQZfr1RM" frameborder="0" allowfullscreen></iframe>
89
- </div>
90
- </td>
91
- </tr>
92
- <tr>
93
- <th scope="row">
94
- <label>With WPBakery Visual Composer</label>
95
- </th>
96
- <td>
97
- <div class="iframe_wrapper">
98
- <iframe width="1280" height="720" src="https://www.youtube.com/embed/4LhDXH81whk" frameborder="0" allowfullscreen></iframe>
99
- </div>
100
- </td>
101
- </tr>
102
- </table>
103
- </div>
104
- </div>
105
- </div><!-- #post-body-content -->
106
-
107
- <div id="postbox-container-1" class="postbox-container">
108
- <div class="postbox ">
109
- <div class="inside">
110
- <p><strong>If you like this plugin or if you make money using this or if you want to help me to continue my contribution on open source projects, consider to make a small donation.</strong></p>
111
- <p style="text-align: center;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3LZWQTHEVYWCY" target="_blank"><img alt="PayPal Donate" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"></a></p>
112
- </div>
113
- </div>
114
- </div><!-- #postbox-container-1 -->
115
-
116
- </div><!-- #post-body -->
117
- </div><!-- #poststuff -->
118
- <br class="clear">
119
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/images-carousel-url.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- // If this file is called directly, abort.
3
- if ( ! defined( 'WPINC' ) ) {
4
- die;
5
- }
6
-
7
- $_image_target = get_post_meta( $id, '_image_target', true );
8
- $_image_target = empty($_image_target) ? '_self' : $_image_target;
9
- $_nav_color = get_post_meta( $id, '_nav_color', true );
10
- $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
11
- $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
12
- $_show_attachment_title = get_post_meta( $id, '_show_attachment_title', true );
13
- $_show_attachment_caption = get_post_meta( $id, '_show_attachment_caption', true );
14
- $_images_urls = get_post_meta( $id, '_images_urls', true );
15
- ?>
16
- <style>
17
- #id-<?php echo $id; ?> .owl-dots .owl-dot span {
18
- background-color: <?php echo $_nav_color; ?>
19
- }
20
- #id-<?php echo $id; ?> .owl-dots .owl-dot.active span,
21
- #id-<?php echo $id; ?> .owl-dots .owl-dot:hover span {
22
- background-color: <?php echo $_nav_active_color; ?>
23
- }
24
- #id-<?php echo $id; ?> .carousel-slider-nav-icon {
25
- fill: <?php echo $_nav_color; ?>;
26
- }
27
- #id-<?php echo $id; ?> .carousel-slider-nav-icon:hover {
28
- fill: <?php echo $_nav_active_color; ?>;
29
- }
30
- </style>
31
- <div <?php echo join(" ", $this->carousel_options($id)); ?>>
32
- <?php
33
- foreach ( $_images_urls as $imageInfo ):
34
-
35
- echo '<div class="carousel-slider__item">';
36
-
37
- $title = sprintf( '<h4 class="title">%1$s</h4>', $imageInfo['title'] );
38
- $caption = sprintf( '<p class="caption">%1$s</p>', $imageInfo['caption'] );
39
-
40
- if ( $_show_attachment_title == 'on' && $_show_attachment_caption == 'on' ) {
41
-
42
- $full_caption = sprintf('<div class="carousel-slider__caption">%1$s%2$s</div>', $title, $caption);
43
-
44
- } elseif( $_show_attachment_title == 'on' ){
45
-
46
- $full_caption = sprintf('<div class="carousel-slider__caption">%s</div>', $title);
47
-
48
- } elseif( $_show_attachment_caption == 'on' ){
49
-
50
- $full_caption = sprintf('<div class="carousel-slider__caption">%s</div>', $caption);
51
-
52
- } else {
53
- $full_caption = '';
54
- }
55
-
56
- if ( $_lazy_load_image == 'on' ) {
57
-
58
- $image = sprintf( '<img class="owl-lazy" data-src="%1$s" alt="%2$s" />', $imageInfo['url'], $imageInfo['alt'] );
59
-
60
- } else {
61
- $image = sprintf( '<img src="%1$s" alt="%2$s" />', $imageInfo['url'], $imageInfo['alt'] );
62
- }
63
-
64
- if ( filter_var( $imageInfo['link_url'], FILTER_VALIDATE_URL) ) {
65
-
66
- echo sprintf('<a href="%1$s" target="%4$s">%2$s %3$s</a>', $imageInfo['link_url'], $image, $full_caption, $_image_target);
67
-
68
- } else {
69
-
70
- echo $image . $full_caption ;
71
- }
72
-
73
- echo '</div>';
74
- endforeach;
75
- ?>
76
-
77
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/images-carousel.php DELETED
@@ -1,104 +0,0 @@
1
- <?php
2
- // If this file is called directly, abort.
3
- if ( ! defined( 'WPINC' ) ) {
4
- die;
5
- }
6
-
7
- $images_ids = array_filter( explode( ',', get_post_meta( $id, '_wpdh_image_ids', true ) ) );
8
- if (count( $images_ids ) < 1 ) {
9
- return;
10
- }
11
- $_image_target = get_post_meta( $id, '_image_target', true );
12
- $_image_target = empty($_image_target) ? '_self' : $_image_target;
13
- $_image_size = get_post_meta( $id, '_image_size', true );
14
- $_nav_color = get_post_meta( $id, '_nav_color', true );
15
- $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
16
- $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
17
- $_show_attachment_title = get_post_meta( $id, '_show_attachment_title', true );
18
- $_show_attachment_caption = get_post_meta( $id, '_show_attachment_caption', true );
19
- $_show_lightbox = get_post_meta( $id, '_image_lightbox', true );
20
- ?>
21
- <style>
22
- #id-<?php echo $id; ?> .owl-dots .owl-dot span {
23
- background-color: <?php echo $_nav_color; ?>
24
- }
25
- #id-<?php echo $id; ?> .owl-dots .owl-dot.active span,
26
- #id-<?php echo $id; ?> .owl-dots .owl-dot:hover span {
27
- background-color: <?php echo $_nav_active_color; ?>
28
- }
29
- #id-<?php echo $id; ?> .carousel-slider-nav-icon {
30
- fill: <?php echo $_nav_color; ?>;
31
- }
32
- #id-<?php echo $id; ?> .carousel-slider-nav-icon:hover {
33
- fill: <?php echo $_nav_active_color; ?>;
34
- }
35
- </style>
36
- <div <?php echo join(" ", $this->carousel_options($id)); ?>>
37
- <?php
38
- foreach ( $images_ids as $image_id ):
39
-
40
- $get_post = get_post( $image_id );
41
- $GLOBALS['cs_post'] = $get_post;
42
- do_action( 'carousel_slider_image_gallery_loop' );
43
-
44
- $image_title = $get_post->post_title;
45
- $image_caption = $get_post->post_excerpt;
46
- $image_description = $get_post->post_content;
47
- $image_alt_text = trim( strip_tags( get_post_meta( $image_id, '_wp_attachment_image_alt', true ) ) );
48
- $image_link_url = get_post_meta( $image_id, "_carousel_slider_link_url", true);
49
-
50
- echo '<div class="carousel-slider__item">';
51
-
52
- $title = sprintf( '<h4 class="title">%1$s</h4>', $image_title );
53
- $caption = sprintf( '<p class="caption">%1$s</p>', $image_caption );
54
-
55
- if ( $_show_attachment_title == 'on' && $_show_attachment_caption == 'on' ) {
56
-
57
- $full_caption = sprintf('<div class="carousel-slider__caption">%1$s%2$s</div>', $title, $caption);
58
-
59
- } elseif( $_show_attachment_title == 'on' ){
60
-
61
- $full_caption = sprintf('<div class="carousel-slider__caption">%s</div>', $title);
62
-
63
- } elseif( $_show_attachment_caption == 'on' ){
64
-
65
- $full_caption = sprintf('<div class="carousel-slider__caption">%s</div>', $caption);
66
-
67
- } else {
68
- $full_caption = '';
69
- }
70
-
71
- if ( $_lazy_load_image == 'on' ) {
72
-
73
- $image_src = wp_get_attachment_image_src( $image_id, $_image_size );
74
- $image = sprintf(
75
- '<img class="owl-lazy" data-src="%1$s" width="%2$s" height="%3$s" alt="%4$s" />',
76
- $image_src[0],
77
- $image_src[1],
78
- $image_src[2],
79
- $image_alt_text
80
- );
81
-
82
- } else {
83
- $image = wp_get_attachment_image( $image_id, $_image_size, false, array( 'alt' => $image_alt_text ) );
84
- }
85
-
86
- if ( $_show_lightbox == 'on' ) {
87
- wp_enqueue_script( 'magnific-popup' );
88
- $image_src = wp_get_attachment_image_src( $image_id, 'full' );
89
- echo sprintf('<a href="%1$s" class="magnific-popup">%2$s%3$s</a>', esc_url($image_src[0]), $image, $full_caption, $id );
90
- }
91
- elseif ( filter_var( $image_link_url, FILTER_VALIDATE_URL) ) {
92
-
93
- echo sprintf('<a href="%1$s" target="%4$s">%2$s%3$s</a>', esc_url($image_link_url), $image, $full_caption, $_image_target);
94
-
95
- } else {
96
-
97
- echo $image . $full_caption ;
98
- }
99
-
100
- echo '</div>';
101
-
102
- endforeach;
103
- ?>
104
- </div><!-- #id-## -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/post-carousel.php DELETED
@@ -1,172 +0,0 @@
1
- <?php
2
- // If this file is called directly, abort.
3
- if ( ! defined( 'WPINC' ) ) {
4
- die;
5
- }
6
-
7
- $args = array(
8
- 'post_type' => 'post',
9
- 'post_status' => 'publish',
10
- 'order' => get_post_meta( $id, '_post_order', true ),
11
- 'orderby' => get_post_meta( $id, '_post_orderby', true ),
12
- 'posts_per_page' => intval(get_post_meta( $id, '_posts_per_page', true ))
13
- );
14
-
15
- $query_type = get_post_meta( $id, '_post_query_type', true );
16
- $query_type = empty($query_type) ? 'latest_posts' : $query_type;
17
-
18
- // Get posts by post IDs
19
- if ( $query_type == 'specific_posts' ) {
20
- $post_in = explode(',', get_post_meta( $id, '_post_in', true ));
21
- $post_in = array_map(function($value){ return intval($value);}, $post_in);
22
- unset($args['posts_per_page']);
23
- $args = array_merge($args, array('post__in' => $post_in ));
24
- }
25
-
26
- // Get posts by post catagories IDs
27
- if ( $query_type == 'post_categories' ) {
28
- $post_categories = get_post_meta( $id, '_post_categories', true );
29
- $args = array_merge($args, array('cat' => $post_categories));
30
- }
31
-
32
- // Get posts by post tags IDs
33
- if ( $query_type == 'post_tags' ) {
34
- $post_tags = get_post_meta( $id, '_post_tags', true );
35
- $post_tags = array_map('intval', explode(',', $post_tags));
36
- $args = array_merge( $args, array( 'tag__in' => $post_tags ) );
37
- }
38
-
39
- // Get posts by date range
40
- if( $query_type == 'date_range' ){
41
-
42
- $post_date_after = get_post_meta( $id, '_post_date_after', true );
43
- $post_date_before = get_post_meta( $id, '_post_date_before', true );
44
-
45
- if ( $post_date_after && $post_date_before ) {
46
- $args = array_merge($args, array(
47
- 'date_query' => array(
48
- array(
49
- 'after' => $post_date_after,
50
- 'before' => $post_date_before,
51
- 'inclusive' => true,
52
- ),
53
- ),
54
- ));
55
- } elseif ($post_date_after ) {
56
- $args = array_merge($args, array(
57
- 'date_query' => array(
58
- array(
59
- 'before' => $post_date_before,
60
- 'inclusive' => true,
61
- ),
62
- ),
63
- ));
64
- } elseif ($post_date_before ) {
65
- $args = array_merge($args, array(
66
- 'date_query' => array(
67
- array(
68
- 'before' => $post_date_before,
69
- 'inclusive' => true,
70
- ),
71
- ),
72
- ));
73
- }
74
- }
75
-
76
- $posts = get_posts( $args );
77
- $carousels = $this->filter_posts( $posts );
78
-
79
- $_image_size = get_post_meta( $id, '_image_size', true );
80
- $_nav_color = get_post_meta( $id, '_nav_color', true );
81
- $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
82
- $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
83
- $_post_height = get_post_meta( $id, '_post_height', true );
84
- ?>
85
- <style>
86
- #id-<?php echo $id; ?> .owl-dots .owl-dot span {
87
- background-color: <?php echo $_nav_color; ?>
88
- }
89
- #id-<?php echo $id; ?> .owl-dots .owl-dot.active span,
90
- #id-<?php echo $id; ?> .owl-dots .owl-dot:hover span {
91
- background-color: <?php echo $_nav_active_color; ?>
92
- }
93
- #id-<?php echo $id; ?> .carousel-slider-nav-icon {
94
- fill: <?php echo $_nav_color; ?>;
95
- }
96
- #id-<?php echo $id; ?> .carousel-slider-nav-icon:hover {
97
- fill: <?php echo $_nav_active_color; ?>;
98
- }
99
- #id-<?php echo $id; ?> .carousel-slider__post {
100
- height: <?php echo $_post_height; ?>px;
101
- }
102
- </style>
103
- <div <?php echo join(" ", $this->carousel_options($id)); ?>>
104
- <?php
105
- foreach ( $carousels as $query ):
106
- echo '<div class="carousel-slider__post">';
107
- echo '<div class="carousel-slider__post-content">';
108
- echo '<div class="carousel-slider__post-header">';
109
- // Post Thumbnail
110
- if( $query->thumbnail_id ) {
111
- $image_src = wp_get_attachment_image_src( $query->thumbnail_id, $_image_size );
112
-
113
- if ( $_lazy_load_image == 'on' ) {
114
-
115
- echo sprintf('<a href="%s" class="carousel-slider__post-image owl-lazy" data-src="%s"></a>', $query->permalink, $image_src[0]);
116
- } else {
117
-
118
- echo sprintf('<a href="%s" class="carousel-slider__post-image" style="background-image: url(%s)"></a>', $query->permalink, $image_src[0]);
119
- }
120
-
121
- } else {
122
-
123
- echo sprintf('<a href="%s" class="carousel-slider__post-image"></a>', $query->permalink );
124
- }
125
-
126
- // Post Title
127
- echo sprintf('<a class="carousel-slider__post-title" href="%s"><h1>%s</h1></a>', $query->permalink, $query->title );
128
- echo '</div>'; // End Post Header
129
- echo '<div class="carousel-slider__post-excerpt">' . $query->excerpt . '</div>';
130
- echo '<footer class="carousel-slider__post-meta">';
131
- echo '<div class="carousel-slider__post-excerpt-overlay"></div>';
132
- echo '<div class="carousel-slider__post-publication-meta">';
133
- echo '<div class="carousel-slider__post-details-info">';
134
-
135
- // Post author
136
- echo sprintf('<div class="carousel-slider__post-author"><a class="carousel-slider__post-author-link" href="%s">%s</a></div>',
137
- $query->author->posts_url,
138
- $query->author->display_name
139
- );
140
- // Post date
141
- if ( $query->created !== $query->modified ) {
142
-
143
- echo sprintf('<time class="carousel-slider__post-publication-date" datetime="%s">%s</time>',
144
- date_i18n( 'c', $query->modified ),
145
- date_i18n( get_option( 'date_format' ), $query->modified )
146
- );
147
-
148
- } else {
149
-
150
- echo sprintf('<time class="carousel-slider__post-publication-date" datetime="%s">%s</time>',
151
- date_i18n( 'c', $query->created ),
152
- date_i18n( get_option( 'date_format' ), $query->created )
153
- );
154
- }
155
- echo '</div>';
156
- echo '</div>';
157
-
158
- // Post catagory
159
- echo '<div class="carousel-slider__post-category">';
160
- if ( isset($query->category->link) ) {
161
- echo sprintf('<a class="carousel-slider__post-category-link" href="%s">%s</a>',
162
- $query->category->link,
163
- $query->category->title
164
- );
165
- }
166
- echo '</div>';
167
- echo '</footer>';
168
- echo '</div>';
169
- echo '</div>';
170
- endforeach;
171
- ?>
172
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/product-carousel.php DELETED
@@ -1,246 +0,0 @@
1
- <?php
2
- // If this file is called directly, abort.
3
- if ( ! defined( 'WPINC' ) ) {
4
- die;
5
- }
6
-
7
- if ( ! defined( 'WC_VERSION' ) ) {
8
- if ( current_user_can( 'manage_options' ) ){
9
- echo sprintf( esc_html__( 'Carousel Slider needs %s to work for products carousel.', 'carousel-slider' ), sprintf('<a href="https://wordpress.org/plugins/woocommerce/" target="_blank" >%s</a>', __('WooCommerce', 'carousel-slider')) );
10
- }
11
- return;
12
- }
13
-
14
- $args = array(
15
- 'post_type' => 'product',
16
- 'post_status' => 'publish',
17
- 'ignore_sticky_post' => 1,
18
- 'posts_per_page' => intval(get_post_meta( $id, '_products_per_page', true ))
19
- );
20
-
21
-
22
- $order = get_post_meta( $id, '_product_order', true );
23
- $orderby = get_post_meta( $id, '_product_orderby', true );
24
- $posts_per_page = intval(get_post_meta( $id, '_products_per_page', true ));
25
-
26
- $query_type = get_post_meta( $id, '_product_query_type', true );
27
- $query_type = empty($query_type) ? 'query_porduct' : $query_type;
28
- $product_query = get_post_meta( $id, '_product_query', true );
29
- $products = array();
30
-
31
- // Get products by product IDs
32
- if ( $query_type == 'specific_products' ) {
33
- $products_ids = explode(',', get_post_meta( $id, '_product_in', true ));
34
-
35
- $posts = array_map(function($value){
36
- return get_post( intval( $value ) );
37
- }, $products_ids);
38
- }
39
-
40
- if ( $query_type == 'query_porduct' ) {
41
-
42
- // Get features products
43
- if ( $product_query == 'featured' ) {
44
- $args = array_merge($args, array(
45
- 'meta_key' => '_featured',
46
- 'meta_value' => 'yes',
47
- 'orderby' => 'date',
48
- 'order' => 'desc'
49
- ));
50
- $posts = get_posts( $args );
51
- }
52
-
53
- // Get recent products
54
- if ( $product_query == 'recent' ) {
55
- $args = array_merge($args, array(
56
- 'ignore_sticky_posts' => 1,
57
- 'orderby' => 'date',
58
- 'order' => 'desc',
59
- 'meta_query' => WC()->query->get_meta_query()
60
- ));
61
- $posts = get_posts( $args );
62
- }
63
-
64
- // Get sale products
65
- if ( $product_query == 'sale' ) {
66
-
67
- $args = array_merge($args, array(
68
- 'orderby' => 'title',
69
- 'order' => 'asc',
70
- 'no_found_rows' => 1,
71
- 'meta_query' => WC()->query->get_meta_query(),
72
- 'post__in' => array_merge( array( 0 ), wc_get_product_ids_on_sale() )
73
- ));
74
- $posts = get_posts( $args );
75
- }
76
-
77
- // Get best_selling products
78
- if ( $product_query == 'best_selling' ) {
79
- $args = array(
80
- 'ignore_sticky_posts' => 1,
81
- 'meta_key' => 'total_sales',
82
- 'orderby' => 'meta_value_num',
83
- 'meta_query' => WC()->query->get_meta_query()
84
- );
85
- $posts = get_posts( $args );
86
- }
87
-
88
- // Get top_rated products
89
- if ( $product_query == 'top_rated' ) {
90
-
91
- add_filter( 'posts_clauses', array( WC()->query, 'order_by_rating_post_clauses' ) );
92
- $args = array_merge($args, array(
93
- 'no_found_rows' => 1,
94
- 'meta_query' => WC()->query->get_meta_query(),
95
- ));
96
- $posts = get_posts( $args );
97
- }
98
-
99
- }
100
-
101
- // Get posts by post catagories IDs
102
- if ( $query_type == 'product_categories' ) {
103
- $product_categories = get_post_meta( $id, '_product_categories', true );
104
- $args = array_merge($args, array(
105
- 'tax_query' => array(
106
- array(
107
- 'taxonomy' => 'product_cat',
108
- 'field' => 'term_id',
109
- 'terms' => explode(",", $product_categories),
110
- 'operator' => 'IN',
111
- ),
112
- ),
113
- ));
114
- $posts = get_posts( $args );
115
- }
116
-
117
- // Get posts by post tags IDs
118
- if ( $query_type == 'product_tags' ) {
119
- $product_tags = get_post_meta( $id, '_product_tags', true );
120
- $product_tags = array_map('intval', explode(',', $product_tags));
121
- $args = array_merge( $args, array(
122
- 'tax_query' => array(
123
- array(
124
- 'taxonomy' => 'product_tag',
125
- 'field' => 'term_id',
126
- 'terms' => $product_tags,
127
- 'operator' => 'IN',
128
- ),
129
- ),
130
- ));
131
- $posts = get_posts( $args );
132
- }
133
-
134
-
135
- $_image_size = get_post_meta( $id, '_image_size', true );
136
- $_nav_color = get_post_meta( $id, '_nav_color', true );
137
- $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
138
- $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
139
-
140
- $_product_title = get_post_meta( $id, '_product_title', true );
141
- $_product_rating = get_post_meta( $id, '_product_rating', true );
142
- $_product_price = get_post_meta( $id, '_product_price', true );
143
- $_product_cart_btn = get_post_meta( $id, '_product_cart_button', true );
144
- $_product_onsale = get_post_meta( $id, '_product_onsale', true );
145
- $_product_wishlist = get_post_meta( $id, '_product_wishlist', true );
146
- $_product_quick_view = get_post_meta( $id, '_product_quick_view', true );
147
-
148
- $_product_title_color = get_post_meta( $id, '_product_title_color', true );
149
- $_product_btn_bg_color = get_post_meta( $id, '_product_button_bg_color', true );
150
- $_product_btn_text_color = get_post_meta( $id, '_product_button_text_color', true );
151
- ?>
152
- <style>
153
- #id-<?php echo $id; ?> .owl-dots .owl-dot span {
154
- background-color: <?php echo esc_attr($_nav_color); ?>
155
- }
156
- #id-<?php echo $id; ?> .owl-dots .owl-dot.active span,
157
- #id-<?php echo $id; ?> .owl-dots .owl-dot:hover span {
158
- background-color: <?php echo esc_attr($_nav_active_color); ?>
159
- }
160
- #id-<?php echo $id; ?> .carousel-slider-nav-icon {
161
- fill: <?php echo esc_attr($_nav_color); ?>;
162
- }
163
- #id-<?php echo $id; ?> .carousel-slider-nav-icon:hover {
164
- fill: <?php echo esc_attr($_nav_active_color); ?>;
165
- }
166
- #id-<?php echo $id; ?> .carousel-slider__product h3,
167
- #id-<?php echo $id; ?> .carousel-slider__product .price {
168
- color: <?php echo esc_attr($_product_title_color); ?>;
169
- }
170
- #id-<?php echo $id; ?> .carousel-slider__product a.add_to_cart_button,
171
- #id-<?php echo $id; ?> .carousel-slider__product a.added_to_cart,
172
- #id-<?php echo $id; ?> .carousel-slider__product a.quick_view,
173
- #id-<?php echo $id; ?> .carousel-slider__product .onsale {
174
- background-color: <?php echo esc_attr($_product_btn_bg_color); ?>;
175
- color: <?php echo esc_attr($_product_btn_text_color); ?>;
176
- }
177
- #id-<?php echo $id; ?> .carousel-slider__product .star-rating {
178
- color: <?php echo esc_attr($_product_btn_bg_color); ?>;
179
- }
180
- </style>
181
- <div <?php echo join(" ", $this->carousel_options($id)); ?>>
182
- <?php foreach ( $posts as $post ): setup_postdata( $post );?>
183
- <?php
184
- $product = wc_get_product( $post->ID );
185
- do_action( 'carousel_slider_product_loop' );
186
- ?>
187
- <div class="product carousel-slider__product">
188
- <?php
189
- echo sprintf('<a class="woocommerce-LoopProduct-link" href="%s">', get_the_permalink( $post->ID ));
190
- // Post Thumbnail
191
- if( has_post_thumbnail($post->ID) ) {
192
- if ( $_lazy_load_image == 'on' ) {
193
- $image_src = get_the_post_thumbnail_url( $post->ID, $_image_size );
194
- echo sprintf( '<img class="owl-lazy" data-src="%1$s" />', $image_src );
195
- }
196
- else {
197
- $image_src = get_the_post_thumbnail_url( $post->ID, $_image_size );
198
- echo sprintf( '<img src="%1$s" />', $image_src );
199
- }
200
- }
201
- echo "</a>";
202
-
203
- // Show title
204
- if ($_product_title == 'on') {
205
- echo sprintf('<a href="%1$s"><h3>%2$s</h3></a>', get_the_permalink( $post->ID ), get_the_title( $post->ID ));
206
- }
207
-
208
- // Show Rating
209
- if($_product_rating == 'on'){
210
- if ( version_compare( WC_VERSION, "3.0.0", ">=" )) {
211
- echo wc_get_rating_html( $product->get_average_rating() );
212
- } else {
213
- echo $product->get_rating_html();
214
- }
215
-
216
- }
217
- // Sale Product batch
218
- if ( $product->is_on_sale() && $_product_onsale == 'on' ){
219
- echo apply_filters( 'woocommerce_sale_flash', '<span class="onsale">' . __( 'Sale!', 'carousel-slider' ) . '</span>', $product );
220
- }
221
- // Show Price
222
- if($_product_price == 'on'){
223
- echo '<span class="price">' . $product->get_price_html() . '</span>';
224
- }
225
- // Show button
226
- if($_product_cart_btn == 'on'){
227
- echo '<div style="clear: both;"></div>';
228
- if ( function_exists('woocommerce_template_loop_add_to_cart')) {
229
- woocommerce_template_loop_add_to_cart();
230
- }
231
- }
232
-
233
- if ( $_product_quick_view == 'on' ) {
234
- wp_enqueue_script( 'magnific-popup' );
235
- $ajax_url = wp_nonce_url( add_query_arg( array( 'ajax' => 'true', 'action' => 'carousel_slider_quick_view', 'product_id' => $post->ID, 'slide_id' => $id ), admin_url( 'admin-ajax.php' ) ), 'carousel_slider_quick_view');
236
- echo sprintf('<a class="magnific-popup button quick_view" href="%1$s" data-product-id="%2$s">%3$s</a>', $ajax_url, $post->ID, __('Quick View', 'carousel-slider'));
237
- }
238
-
239
- // WooCommerce Wishlist
240
- if ( class_exists( 'YITH_WCWL' ) && $_product_wishlist == 'on') {
241
- echo do_shortcode('[yith_wcwl_add_to_wishlist]');
242
- }
243
- ?>
244
- </div>
245
- <?php endforeach; wp_reset_postdata();?>
246
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/public/hero-banner-slider.php ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ $content_sliders = get_post_meta( $id, '_content_slider', true );
8
+ $settings = get_post_meta( $id, '_content_slider_settings', true );
9
+ $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
10
+ $_be_lazy = in_array( $_lazy_load_image, array( 'on', 'off' ) ) ? $_lazy_load_image : 'on';
11
+ ?>
12
+ <div class="carousel-slider-outer carousel-slider-outer-contents carousel-slider-outer-<?php echo $id; ?>">
13
+ <?php carousel_slider_inline_style( $id ); ?>
14
+ <div <?php echo join( " ", $this->carousel_options( $id ) ); ?>>
15
+ <?php
16
+ foreach ( $content_sliders as $slide_id => $slide ):
17
+
18
+ // Slide Content
19
+ $_slide_heading = isset( $slide['slide_heading'] ) ? $slide['slide_heading'] : '';
20
+ $_slide_description = isset( $slide['slide_description'] ) ? $slide['slide_description'] : '';
21
+ // Slide Style
22
+ $_content_alignment = ! empty( $slide['content_alignment'] ) ? esc_attr( $slide['content_alignment'] ) : 'left';
23
+ $_heading_font_size = ! empty( $slide['heading_font_size'] ) ? esc_attr( $slide['heading_font_size'] ) : '60px';
24
+ $_heading_gutter = ! empty( $slide['heading_gutter'] ) ? esc_attr( $slide['heading_gutter'] ) : '1rem';
25
+ $_heading_color = ! empty( $slide['heading_color'] ) ? esc_attr( $slide['heading_color'] ) : '#ffffff';
26
+ $_heading_bg_color = ! empty( $slide['heading_background_color'] ) ? esc_attr( $slide['heading_background_color'] ) : '';
27
+ $_desc_font_size = ! empty( $slide['description_font_size'] ) ? esc_attr( $slide['description_font_size'] ) : '24px';
28
+ $_description_gutter = ! empty( $slide['description_gutter'] ) ? esc_attr( $slide['description_gutter'] ) : '1rem';
29
+ $_desc_color = ! empty( $slide['description_color'] ) ? esc_attr( $slide['description_color'] ) : '#ffffff';
30
+ $_desc_bg_color = ! empty( $slide['description_background_color'] ) ? esc_attr( $slide['description_background_color'] ) : '';
31
+
32
+ // Slide Background
33
+ $_img_bg_position = ! empty( $slide['img_bg_position'] ) ? esc_attr( $slide['img_bg_position'] ) : 'center center';
34
+ $_img_bg_size = ! empty( $slide['img_bg_size'] ) ? esc_attr( $slide['img_bg_size'] ) : 'contain';
35
+ $_bg_color = ! empty( $slide['bg_color'] ) ? esc_attr( $slide['bg_color'] ) : '';
36
+ $_img_id = ! empty( $slide['img_id'] ) ? absint( $slide['img_id'] ) : 0;
37
+ $_img_src = wp_get_attachment_image_src( $_img_id, 'full' );
38
+ $_have_img = is_array( $_img_src );
39
+
40
+ $_link_type = isset( $slide['link_type'] ) && in_array( $slide['link_type'],
41
+ array( 'full', 'button' ) ) ? $slide['link_type'] : 'full';
42
+ $_slide_link = ! empty( $slide['slide_link'] ) ? esc_url( $slide['slide_link'] ) : '';
43
+ $_link_target = ! empty( $slide['link_target'] ) && in_array( $slide['link_target'],
44
+ array( '_self', '_blank' ) ) ? esc_url( $slide['link_target'] ) : '_self';
45
+
46
+ // Slide Button One
47
+ $_btn_1_text = ! empty( $slide['button_one_text'] ) ? esc_attr( $slide['button_one_text'] ) : '';
48
+ $_btn_1_url = ! empty( $slide['button_one_url'] ) ? esc_url( $slide['button_one_url'] ) : '';
49
+ $_btn_1_target = ! empty( $slide['button_one_target'] ) ? esc_attr( $slide['button_one_target'] ) : '_self';
50
+ $_btn_1_type = ! empty( $slide['button_one_type'] ) ? esc_attr( $slide['button_one_type'] ) : 'normal';
51
+ $_btn_1_size = ! empty( $slide['button_one_size'] ) ? esc_attr( $slide['button_one_size'] ) : 'medium';
52
+ $_btn_1_bg_color = ! empty( $slide['button_one_bg_color'] ) ? carousel_slider_sanitize_color( $slide['button_one_bg_color'] ) : '#00d1b2';
53
+ $_btn_1_color = ! empty( $slide['button_one_color'] ) ? carousel_slider_sanitize_color( $slide['button_one_color'] ) : '#ffffff';
54
+
55
+ // Slide Button Two
56
+ $_btn_2_text = ! empty( $slide['button_two_text'] ) ? esc_attr( $slide['button_two_text'] ) : '';
57
+ $_btn_2_url = ! empty( $slide['button_two_url'] ) ? esc_url( $slide['button_two_url'] ) : '';
58
+ $_btn_2_target = ! empty( $slide['button_two_target'] ) ? esc_attr( $slide['button_two_target'] ) : '_self';
59
+ $_btn_2_size = ! empty( $slide['button_two_size'] ) ? esc_attr( $slide['button_two_size'] ) : 'medium';
60
+ $_btn_2_type = ! empty( $slide['button_two_type'] ) ? esc_attr( $slide['button_two_type'] ) : 'normal';
61
+ $_btn_2_bg_color = ! empty( $slide['button_two_bg_color'] ) ? carousel_slider_sanitize_color( $slide['button_two_bg_color'] ) : '#00d1b2';
62
+ $_btn_2_color = ! empty( $slide['button_two_color'] ) ? carousel_slider_sanitize_color( $slide['button_two_color'] ) : '#ffffff';
63
+
64
+ // Slide background style
65
+ $canvas_style = '';
66
+ $canvas_style .= 'background-repeat: no-repeat;';
67
+ $canvas_style .= 'background-position: ' . $_img_bg_position . ';';
68
+ $canvas_style .= 'background-size: ' . $_img_bg_size . ';';
69
+ if ( $_have_img && $_be_lazy == 'off' ) {
70
+ $canvas_style .= 'background-image: url(' . $_img_src[0] . ')';
71
+ }
72
+
73
+ $content_inner_style = $_bg_color ? 'background-color: ' . $_bg_color . ';' : '';
74
+
75
+ $content_style = '';
76
+ if ( $_content_alignment == 'left' ) {
77
+ $content_style .= '-webkit-align-items: flex-start; align-items: flex-start;';
78
+ } elseif ( $_content_alignment == 'right' ) {
79
+ $content_style .= '-webkit-align-items: flex-end; align-items: flex-end;';
80
+ } else {
81
+ $content_style .= '-webkit-align-items: center; align-items: center;';
82
+ }
83
+
84
+ $slide_padding = isset( $settings['slide_padding'] ) && is_array( $settings['slide_padding'] ) ? $settings['slide_padding'] : array();
85
+ $_padding_top = isset( $slide_padding['top'] ) ? esc_attr( $slide_padding['top'] ) : '1rem';
86
+ $_padding_right = isset( $slide_padding['right'] ) ? esc_attr( $slide_padding['right'] ) : '3rem';
87
+ $_padding_bottom = isset( $slide_padding['bottom'] ) ? esc_attr( $slide_padding['bottom'] ) : '1rem';
88
+ $_padding_left = isset( $slide_padding['left'] ) ? esc_attr( $slide_padding['left'] ) : '3rem';
89
+
90
+ $content_style .= isset( $settings['slide_height'] ) ? 'min-height: ' . $settings['slide_height'] . ';' : '';
91
+ $content_style .= isset( $settings['content_width'] ) ? 'max-width: ' . $settings['content_width'] . ';' : '850px';
92
+ $content_style .= 'padding: ' . $_padding_top . ' ' . $_padding_right . ' ' . $_padding_bottom . ' ' . $_padding_left . '';
93
+
94
+ $html = '';
95
+
96
+ if ( $_link_type == 'full' && carousel_slider_is_url( $_slide_link ) ) {
97
+ $html .= '<a href="' . $_slide_link . '" target="' . $_link_target . '">';
98
+ }
99
+
100
+ if ( $_be_lazy == 'on' ) {
101
+ $html .= '<div class="carousel-slider__content owl-lazy" data-src="' . $_img_src[0] . '" id="slide-item-' . $id . '-' . $slide_id . '" style="' . $canvas_style . '">';
102
+ } else {
103
+ $html .= '<div class="carousel-slider__content" id="slide-item-' . $id . '-' . $slide_id . '" style="' . $canvas_style . '">';
104
+ }
105
+ $html .= '<div class="slide-content-inner" style="' . $content_inner_style . '">';
106
+ $html .= '<div class="slide-content" style="' . $content_style . '">';
107
+
108
+ // Slide heading
109
+ if ( $_slide_heading ) {
110
+ $heading_style = '';
111
+ $heading_wrapper_style = '';
112
+ $heading_style .= 'font-size: ' . $_heading_font_size . ';';
113
+ $heading_style .= 'color: ' . $_heading_color . ';';
114
+ if ( ! empty( $_heading_bg_color ) ) {
115
+ $heading_wrapper_style .= 'background-color: ' . $_heading_bg_color . ';';
116
+ $heading_wrapper_style .= 'padding: 0 1rem;';
117
+ }
118
+
119
+ $heading_wrapper_style .= 'margin-bottom: ' . $_heading_gutter . ';';
120
+
121
+ $html .= '<div class="heading">';
122
+ $html .= '<div class="heading-title-wrapper" style="' . $heading_wrapper_style . '">';
123
+ $html .= '<h2 class="heading-title" data-font-size="' . absint( $_heading_font_size ) . '" style="' . $heading_style . '">' . wp_kses_post( $_slide_heading ) . "</h2>";
124
+ $html .= '</div>';
125
+ $html .= '</div>';
126
+ }
127
+
128
+ // Slide description
129
+ if ( $_slide_description ) {
130
+ $desc_style = '';
131
+ $desc_wrapper_style = '';
132
+ $desc_style .= 'font-size: ' . $_desc_font_size . ';';
133
+ $desc_style .= 'color: ' . $_desc_color . ';';
134
+
135
+ $desc_wrapper_style .= 'margin-bottom: ' . $_description_gutter . ';';
136
+ if ( ! empty( $_desc_bg_color ) ) {
137
+ $desc_wrapper_style .= 'background-color: ' . $_desc_bg_color . ';';
138
+ $desc_wrapper_style .= 'padding: 0 1rem;';
139
+ }
140
+
141
+ $html .= '<div class="description">';
142
+ $html .= '<div class="description-title-wrapper" style="' . $desc_wrapper_style . '">';
143
+ $html .= '<h3 class="description-title" data-font-size="' . absint( $_desc_font_size ) . '" style="' . $desc_style . '">' . wp_kses_post( $_slide_description ) . "</h3>";
144
+ $html .= '</div>';
145
+ $html .= '</div>';
146
+ }
147
+
148
+ // Buttons
149
+ if ( $_link_type == 'button' ) {
150
+ $html .= '<div class="buttons">';
151
+ $html .= '<div class="buttons-wrapper">';
152
+ // Slide Button #1
153
+ if ( carousel_slider_is_url( $_btn_1_url ) ) {
154
+ $_btn_1_class = 'button cs-button';
155
+ $_btn_1_class .= ' cs-button-' . $slide_id . '-1';
156
+ $_btn_1_class .= ' cs-button--' . $_btn_1_type;
157
+ $_btn_1_class .= ' cs-button--' . $_btn_1_size;
158
+
159
+ $html .= '<span class="buttons-wrapper-one">';
160
+ $html .= '<a class="' . $_btn_1_class . '" data-btn-type="' . $_btn_1_type . '" data-btn-bg-color="' .
161
+ $_btn_1_bg_color . '" data-btn-color="' . $_btn_1_color . '" href="' .
162
+ $_btn_1_url . '" target="' . $_btn_1_target . '">' . esc_attr( $_btn_1_text ) . "</a>";
163
+ $html .= '</span>';
164
+ }
165
+ // Slide Button #2
166
+ if ( carousel_slider_is_url( $_btn_2_url ) ) {
167
+ $_btn_2_class = 'button cs-button';
168
+ $_btn_2_class .= ' cs-button-' . $slide_id . '-2';
169
+ $_btn_2_class .= ' cs-button--' . $_btn_2_type;
170
+ $_btn_2_class .= ' cs-button--' . $_btn_2_size;
171
+
172
+ $html .= '<span class="buttons-wrapper-two">';
173
+ $html .= '<a class="' . $_btn_2_class . '" href="' . $_btn_2_url . '" target="' . $_btn_2_target . '">' . esc_attr( $_btn_2_text ) . "</a>";
174
+ $html .= '</span>';
175
+ }
176
+ $html .= '</div>';
177
+ $html .= '</div>';
178
+ }
179
+
180
+ $html .= '</div>'; // .slide-content
181
+ $html .= '</div>'; // .slide-content-inner
182
+ $html .= '</div>'; // .carousel-slider__content
183
+
184
+ if ( $_link_type == 'full' && carousel_slider_is_url( $_slide_link ) ) {
185
+ $html .= '</a>';
186
+ }
187
+
188
+ echo apply_filters( 'carousel_slider_content', $html, $slide_id, $slide );
189
+ endforeach;
190
+ ?>
191
+
192
+ </div>
193
+ </div>
templates/public/images-carousel-url.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ $_image_target = get_post_meta( $id, '_image_target', true );
8
+ $_image_target = empty( $_image_target ) ? '_self' : $_image_target;
9
+ $_nav_color = get_post_meta( $id, '_nav_color', true );
10
+ $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
11
+ $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
12
+ $_show_attachment_title = get_post_meta( $id, '_show_attachment_title', true );
13
+ $_show_attachment_caption = get_post_meta( $id, '_show_attachment_caption', true );
14
+ $_images_urls = get_post_meta( $id, '_images_urls', true );
15
+ ?>
16
+ <div class="carousel-slider-outer carousel-slider-outer-images carousel-slider-outer-<?php echo $id; ?>">
17
+ <?php carousel_slider_inline_style( $id ); ?>
18
+ <div <?php echo join( " ", $this->carousel_options( $id ) ); ?>>
19
+ <?php
20
+ foreach ( $_images_urls as $imageInfo ):
21
+
22
+ echo '<div class="carousel-slider__item">';
23
+
24
+ $title = sprintf( '<h4 class="title">%1$s</h4>', $imageInfo['title'] );
25
+ $caption = sprintf( '<p class="caption">%1$s</p>', $imageInfo['caption'] );
26
+
27
+ if ( $_show_attachment_title == 'on' && $_show_attachment_caption == 'on' ) {
28
+
29
+ $full_caption = sprintf( '<div class="carousel-slider__caption">%1$s%2$s</div>', $title, $caption );
30
+
31
+ } elseif ( $_show_attachment_title == 'on' ) {
32
+
33
+ $full_caption = sprintf( '<div class="carousel-slider__caption">%s</div>', $title );
34
+
35
+ } elseif ( $_show_attachment_caption == 'on' ) {
36
+
37
+ $full_caption = sprintf( '<div class="carousel-slider__caption">%s</div>', $caption );
38
+
39
+ } else {
40
+ $full_caption = '';
41
+ }
42
+
43
+ if ( $_lazy_load_image == 'on' ) {
44
+
45
+ $image = sprintf( '<img class="owl-lazy" data-src="%1$s" alt="%2$s" />', $imageInfo['url'], $imageInfo['alt'] );
46
+
47
+ } else {
48
+ $image = sprintf( '<img src="%1$s" alt="%2$s" />', $imageInfo['url'], $imageInfo['alt'] );
49
+ }
50
+
51
+ if ( filter_var( $imageInfo['link_url'], FILTER_VALIDATE_URL ) ) {
52
+
53
+ echo sprintf( '<a href="%1$s" target="%4$s">%2$s %3$s</a>', $imageInfo['link_url'], $image, $full_caption, $_image_target );
54
+
55
+ } else {
56
+
57
+ echo $image . $full_caption;
58
+ }
59
+
60
+ echo '</div>';
61
+ endforeach;
62
+ ?>
63
+
64
+ </div>
65
+ </div>
templates/public/images-carousel.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ $images_ids = array_filter( explode( ',', get_post_meta( $id, '_wpdh_image_ids', true ) ) );
8
+ if ( count( $images_ids ) < 1 ) {
9
+ return;
10
+ }
11
+ $_image_target = get_post_meta( $id, '_image_target', true );
12
+ $_image_target = empty( $_image_target ) ? '_self' : $_image_target;
13
+ $_image_size = get_post_meta( $id, '_image_size', true );
14
+ $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
15
+ $_show_attachment_title = get_post_meta( $id, '_show_attachment_title', true );
16
+ $_show_attachment_caption = get_post_meta( $id, '_show_attachment_caption', true );
17
+ $_show_lightbox = get_post_meta( $id, '_image_lightbox', true );
18
+
19
+ ?>
20
+ <div class="carousel-slider-outer carousel-slider-outer-images carousel-slider-outer-<?php echo $id; ?>">
21
+ <?php carousel_slider_inline_style( $id ); ?>
22
+ <div <?php echo join( " ", $this->carousel_options( $id ) ); ?>>
23
+ <?php
24
+ foreach ( $images_ids as $image_id ):
25
+
26
+ $_post = get_post( $image_id );
27
+ do_action( 'carousel_slider_image_gallery_loop', $_post );
28
+
29
+ $image_title = $_post->post_title;
30
+ $image_caption = $_post->post_excerpt;
31
+ $image_description = $_post->post_content;
32
+ $image_alt_text = trim( strip_tags( get_post_meta( $image_id, '_wp_attachment_image_alt', true ) ) );
33
+ $image_link_url = get_post_meta( $image_id, "_carousel_slider_link_url", true );
34
+
35
+ echo '<div class="carousel-slider__item">';
36
+
37
+ $title = sprintf( '<h4 class="title">%1$s</h4>', $image_title );
38
+ $caption = sprintf( '<p class="caption">%1$s</p>', $image_caption );
39
+
40
+ if ( $_show_attachment_title == 'on' && $_show_attachment_caption == 'on' ) {
41
+
42
+ $full_caption = sprintf( '<div class="carousel-slider__caption">%1$s%2$s</div>', $title, $caption );
43
+
44
+ } elseif ( $_show_attachment_title == 'on' ) {
45
+
46
+ $full_caption = sprintf( '<div class="carousel-slider__caption">%s</div>', $title );
47
+
48
+ } elseif ( $_show_attachment_caption == 'on' ) {
49
+
50
+ $full_caption = sprintf( '<div class="carousel-slider__caption">%s</div>', $caption );
51
+
52
+ } else {
53
+ $full_caption = '';
54
+ }
55
+
56
+ if ( $_lazy_load_image == 'on' ) {
57
+
58
+ $image_src = wp_get_attachment_image_src( $image_id, $_image_size );
59
+ $image = sprintf(
60
+ '<img class="owl-lazy" data-src="%1$s" width="%2$s" height="%3$s" alt="%4$s" />',
61
+ $image_src[0],
62
+ $image_src[1],
63
+ $image_src[2],
64
+ $image_alt_text
65
+ );
66
+
67
+ } else {
68
+ $image = wp_get_attachment_image( $image_id, $_image_size, false, array( 'alt' => $image_alt_text ) );
69
+ }
70
+
71
+ if ( $_show_lightbox == 'on' ) {
72
+ wp_enqueue_script( 'magnific-popup' );
73
+ $image_src = wp_get_attachment_image_src( $image_id, 'full' );
74
+ echo sprintf( '<a href="%1$s" class="magnific-popup">%2$s%3$s</a>', esc_url( $image_src[0] ), $image, $full_caption, $id );
75
+ } elseif ( filter_var( $image_link_url, FILTER_VALIDATE_URL ) ) {
76
+
77
+ echo sprintf( '<a href="%1$s" target="%4$s">%2$s%3$s</a>', esc_url( $image_link_url ), $image, $full_caption, $_image_target );
78
+
79
+ } else {
80
+
81
+ echo $image . $full_caption;
82
+ }
83
+
84
+ echo '</div>';
85
+
86
+ endforeach;
87
+ ?>
88
+ </div><!-- #id-## -->
89
+ </div>
templates/public/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
templates/public/post-carousel.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ $_image_size = get_post_meta( $id, '_image_size', true );
8
+ $_nav_color = get_post_meta( $id, '_nav_color', true );
9
+ $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
10
+ $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
11
+ ?>
12
+ <div class="carousel-slider-outer carousel-slider-outer-posts carousel-slider-outer-<?php echo $id; ?>">
13
+ <?php carousel_slider_inline_style( $id ); ?>
14
+ <div <?php echo join( " ", $this->carousel_options( $id ) ); ?>>
15
+ <?php
16
+ $posts = carousel_slider_posts( $id );
17
+ foreach ( $posts as $_post ):
18
+ global $post;
19
+ $post = $_post;
20
+ setup_postdata( $post );
21
+ $category = get_the_category( $post->ID );
22
+
23
+ do_action( 'carousel_slider_post_loop', $post, $category );
24
+
25
+ $html = '<div class="carousel-slider__post">';
26
+ $html .= '<div class="carousel-slider__post-content">';
27
+ $html .= '<div class="carousel-slider__post-header">';
28
+ // Post Thumbnail
29
+ $_permalink = esc_url( get_permalink( $post->ID ) );
30
+ $_thumb_id = get_post_thumbnail_id( $post->ID );
31
+ $_excerpt = wp_trim_words( wp_strip_all_tags( $post->post_content ), '20', ' ...' );
32
+
33
+ if ( has_post_thumbnail( $post ) ) {
34
+ $image_src = wp_get_attachment_image_src( $_thumb_id, $_image_size );
35
+
36
+ if ( $_lazy_load_image == 'on' ) {
37
+
38
+ $html .= sprintf( '<a href="%s" class="carousel-slider__post-image owl-lazy" data-src="%s"></a>', $_permalink, $image_src[0] );
39
+ } else {
40
+
41
+ $html .= sprintf( '<a href="%s" class="carousel-slider__post-image" style="background-image: url(%s)"></a>', $_permalink, $image_src[0] );
42
+ }
43
+
44
+ } else {
45
+
46
+ $html .= sprintf( '<a href="%s" class="carousel-slider__post-image"></a>', $_permalink );
47
+ }
48
+
49
+ // Post Title
50
+ $html .= sprintf( '<a class="carousel-slider__post-title" href="%s"><h1>%s</h1></a>', $_permalink, $post->post_title );
51
+ $html .= '</div>'; // End Post Header
52
+ $html .= '<div class="carousel-slider__post-excerpt">' . $_excerpt . '</div>';
53
+ $html .= '<footer class="carousel-slider__post-meta">';
54
+ $html .= '<div class="carousel-slider__post-excerpt-overlay"></div>';
55
+ $html .= '<div class="carousel-slider__post-publication-meta">';
56
+ $html .= '<div class="carousel-slider__post-details-info">';
57
+
58
+ // Post author
59
+ $_author_url = esc_url( get_author_posts_url( intval( $post->post_author ) ) );
60
+ $_author_name = esc_html( get_the_author_meta( 'display_name', intval( $post->post_author ) ) );
61
+
62
+ $html .= sprintf( '<div class="carousel-slider__post-author"><a class="carousel-slider__post-author-link" href="%s">%s</a></div>',
63
+ $_author_url,
64
+ $_author_name
65
+ );
66
+ // Post date
67
+ $_created = strtotime( $post->post_date );
68
+ $_modified = strtotime( $post->post_modified );
69
+
70
+ if ( $_created !== $_modified ) {
71
+
72
+ $html .= sprintf( '<time class="carousel-slider__post-publication-date" datetime="%s">%s</time>',
73
+ date_i18n( 'c', $_modified ),
74
+ date_i18n( get_option( 'date_format' ), $_modified )
75
+ );
76
+
77
+ } else {
78
+
79
+ $html .= sprintf( '<time class="carousel-slider__post-publication-date" datetime="%s">%s</time>',
80
+ date_i18n( 'c', $_created ),
81
+ date_i18n( get_option( 'date_format' ), $_created )
82
+ );
83
+ }
84
+ $html .= '</div>';
85
+ $html .= '</div>';
86
+
87
+ // Post catagory
88
+ $cat_link = isset( $category[0]->term_id ) ? esc_url( get_category_link( $category[0]->term_id ) ) : '';
89
+ $cat_title = isset( $category[0]->name ) ? esc_html( $category[0]->name ) : '';
90
+ $html .= '<div class="carousel-slider__post-category">';
91
+ if ( isset( $cat_link ) ) {
92
+ $html .= sprintf( '<a class="carousel-slider__post-category-link" href="%s">%s</a>',
93
+ $cat_link,
94
+ $cat_title
95
+ );
96
+ }
97
+ $html .= '</div>';
98
+ $html .= '</footer>';
99
+ $html .= '</div>';
100
+ $html .= '</div>';
101
+
102
+ echo apply_filters( 'carousel_slider_post', $html, $post, $category );
103
+ endforeach;
104
+ wp_reset_postdata();
105
+ ?>
106
+ </div>
107
+ </div>
templates/public/product-carousel-2.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ if ( ! carousel_slider_is_woocommerce_active() ) {
8
+ if ( current_user_can( 'manage_options' ) ) {
9
+ printf(
10
+ esc_html__( 'Carousel Slider needs %s to work for products carousel.', 'carousel-slider' ),
11
+ sprintf( '<a href="https://wordpress.org/plugins/woocommerce/" target="_blank" >%s</a>',
12
+ __( 'WooCommerce', 'carousel-slider' )
13
+ )
14
+ );
15
+ }
16
+
17
+ return;
18
+ }
19
+ ?>
20
+ <div class="products carousel-slider-outer carousel-slider-outer-products carousel-slider-outer-<?php echo $id; ?>">
21
+ <?php carousel_slider_inline_style( $id ); ?>
22
+ <div <?php echo join( " ", $this->carousel_options( $id ) ); ?>>
23
+ <?php
24
+ global $post;
25
+ global $product;
26
+ $posts = carousel_slider_products( $id );
27
+
28
+ foreach ( $posts as $post ):
29
+ setup_postdata( $post );
30
+ $product = wc_get_product( $post );
31
+
32
+ echo '<div class="product carousel-slider__product">';
33
+
34
+ do_action( 'carousel_slider_product_loop', $product );
35
+ do_action( 'carousel_slider_before_shop_loop_item', $product );
36
+
37
+ do_action( 'woocommerce_before_shop_loop_item' );
38
+ do_action( 'woocommerce_before_shop_loop_item_title' );
39
+ do_action( 'woocommerce_shop_loop_item_title' );
40
+ do_action( 'woocommerce_after_shop_loop_item_title' );
41
+ do_action( 'woocommerce_after_shop_loop_item' );
42
+
43
+ do_action( 'carousel_slider_after_shop_loop_item', $product, $id );
44
+
45
+ echo '</div>';
46
+
47
+ endforeach;
48
+ wp_reset_postdata();
49
+
50
+ ?>
51
+ </div>
52
+ </div>
templates/public/product-carousel.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ if ( ! carousel_slider_is_woocommerce_active() ) {
8
+ if ( current_user_can( 'manage_options' ) ) {
9
+ printf(
10
+ esc_html__( 'Carousel Slider needs %s to work for products carousel.', 'carousel-slider' ),
11
+ sprintf( '<a href="https://wordpress.org/plugins/woocommerce/" target="_blank" >%s</a>',
12
+ __( 'WooCommerce', 'carousel-slider' )
13
+ )
14
+ );
15
+ }
16
+
17
+ return;
18
+ }
19
+
20
+ $posts = carousel_slider_products( $id );
21
+
22
+
23
+ $_image_size = get_post_meta( $id, '_image_size', true );
24
+ $_nav_color = get_post_meta( $id, '_nav_color', true );
25
+ $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
26
+ $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
27
+
28
+ $_product_title = get_post_meta( $id, '_product_title', true );
29
+ $_product_rating = get_post_meta( $id, '_product_rating', true );
30
+ $_product_price = get_post_meta( $id, '_product_price', true );
31
+ $_product_cart_btn = get_post_meta( $id, '_product_cart_button', true );
32
+ $_product_onsale = get_post_meta( $id, '_product_onsale', true );
33
+ $_product_wishlist = get_post_meta( $id, '_product_wishlist', true );
34
+ $_product_quick_view = get_post_meta( $id, '_product_quick_view', true );
35
+ ?>
36
+ <div class="carousel-slider-outer carousel-slider-outer-products carousel-slider-outer-<?php echo $id; ?>">
37
+ <?php carousel_slider_inline_style( $id ); ?>
38
+ <div <?php echo join( " ", $this->carousel_options( $id ) ); ?>>
39
+ <?php foreach ( $posts as $post ): setup_postdata( $post ); ?>
40
+ <?php
41
+ $product = wc_get_product( $post->ID );
42
+ do_action( 'carousel_slider_product_loop', $product );
43
+ ?>
44
+ <div class="product carousel-slider__product">
45
+ <?php
46
+ echo sprintf( '<a class="woocommerce-LoopProduct-link" href="%s">', get_the_permalink( $post->ID ) );
47
+ // Post Thumbnail
48
+ if ( has_post_thumbnail( $post->ID ) ) {
49
+ if ( $_lazy_load_image == 'on' ) {
50
+ $image_src = get_the_post_thumbnail_url( $post->ID, $_image_size );
51
+ echo sprintf( '<img class="owl-lazy" data-src="%1$s" />', $image_src );
52
+ } else {
53
+ $image_src = get_the_post_thumbnail_url( $post->ID, $_image_size );
54
+ echo sprintf( '<img src="%1$s" />', $image_src );
55
+ }
56
+ }
57
+ echo "</a>";
58
+
59
+ // Show title
60
+ if ( $_product_title == 'on' ) {
61
+ echo sprintf( '<a href="%1$s"><h3>%2$s</h3></a>', get_the_permalink( $post->ID ), get_the_title( $post->ID ) );
62
+ }
63
+
64
+ // Show Rating
65
+ if ( $_product_rating == 'on' ) {
66
+ if ( version_compare( WC_VERSION, "3.0.0", ">=" ) ) {
67
+ echo wc_get_rating_html( $product->get_average_rating() );
68
+ } else {
69
+ echo $product->get_rating_html();
70
+ }
71
+
72
+ }
73
+ // Sale Product batch
74
+ if ( $product->is_on_sale() && $_product_onsale == 'on' ) {
75
+ echo apply_filters( 'woocommerce_sale_flash', '<span class="onsale">' . __( 'Sale!', 'carousel-slider' ) . '</span>', $product );
76
+ }
77
+ // Show Price
78
+ if ( $_product_price == 'on' ) {
79
+ $price_html = '<span class="price">' . $product->get_price_html() . '</span>';
80
+ echo apply_filters( 'carousel_slider_product_price', $price_html, $product );
81
+ }
82
+ // Show button
83
+ if ( $_product_cart_btn == 'on' ) {
84
+ $button_html = '<div style="clear: both;"></div>';
85
+ ob_start();
86
+ if ( function_exists( 'woocommerce_template_loop_add_to_cart' ) ) {
87
+ woocommerce_template_loop_add_to_cart();
88
+ }
89
+ $button_html .= ob_get_contents();
90
+ ob_end_clean();
91
+ echo apply_filters( 'carousel_slider_product_add_to_cart', $button_html, $product );
92
+ }
93
+
94
+ if ( $_product_quick_view == 'on' ) {
95
+ wp_enqueue_script( 'magnific-popup' );
96
+ $ajax_url = wp_nonce_url( add_query_arg( array(
97
+ 'ajax' => 'true',
98
+ 'action' => 'carousel_slider_quick_view',
99
+ 'product_id' => $post->ID,
100
+ 'slide_id' => $id
101
+ ), admin_url( 'admin-ajax.php' ) ), 'carousel_slider_quick_view' );
102
+ $quick_view_html = '<div style="clear: both;"></div>';
103
+ $quick_view_html .= sprintf(
104
+ '<a class="magnific-popup button quick_view" href="%1$s" data-product-id="%2$s">%3$s</a>',
105
+ $ajax_url,
106
+ $post->ID,
107
+ __( 'Quick View', 'carousel-slider' )
108
+ );
109
+ echo apply_filters( 'carousel_slider_product_quick_view', $quick_view_html, $product );
110
+ }
111
+
112
+ // WooCommerce Wishlist
113
+ if ( class_exists( 'YITH_WCWL' ) && $_product_wishlist == 'on' ) {
114
+ echo do_shortcode( '[yith_wcwl_add_to_wishlist]' );
115
+ }
116
+ ?>
117
+ </div>
118
+ <?php endforeach;
119
+ wp_reset_postdata(); ?>
120
+ </div>
121
+ </div>
templates/public/video-carousel.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ $_nav_color = get_post_meta( $id, '_nav_color', true );
8
+ $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
9
+ $_video_width = $this->get_meta( $id, '_video_width' );
10
+ $_video_height = $this->get_meta( $id, '_video_height' );
11
+ $_video_urls = array_filter( explode( ',', $this->get_meta( $id, '_video_url' ) ) );
12
+
13
+ if ( count( $_video_urls ) < 1 ) {
14
+ return;
15
+ }
16
+ ?>
17
+ <div class="carousel-slider-outer carousel-slider-outer-videos carousel-slider-outer-<?php echo $id; ?>">
18
+ <?php carousel_slider_inline_style( $id ); ?>
19
+ <div <?php echo join( " ", $this->carousel_options( $id ) ); ?>>
20
+ <?php
21
+ foreach ( $_video_urls as $url ) {
22
+ echo $this->video_url( $url );
23
+ }
24
+ ?>
25
+ </div>
26
+ </div>
templates/video-carousel.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
- // If this file is called directly, abort.
3
- if ( ! defined( 'WPINC' ) ) {
4
- die;
5
- }
6
-
7
- $_nav_color = get_post_meta( $id, '_nav_color', true );
8
- $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
9
- $_video_width = $this->get_meta( $id, '_video_width' );
10
- $_video_height = $this->get_meta( $id, '_video_height' );
11
- $_video_urls = array_filter( explode( ',', $this->get_meta( $id, '_video_url' )));
12
-
13
- if ( count($_video_urls) < 1 ) {
14
- return;
15
- }
16
- ?>
17
- <style>
18
- #id-<?php echo $id; ?> .owl-dots .owl-dot span {
19
- background-color: <?php echo $_nav_color; ?>
20
- }
21
- #id-<?php echo $id; ?> .owl-dots .owl-dot.active span,
22
- #id-<?php echo $id; ?> .owl-dots .owl-dot:hover span {
23
- background-color: <?php echo $_nav_active_color; ?>
24
- }
25
- #id-<?php echo $id; ?> .carousel-slider-nav-icon {
26
- fill: <?php echo $_nav_color; ?>;
27
- }
28
- #id-<?php echo $id; ?> .carousel-slider-nav-icon:hover {
29
- fill: <?php echo $_nav_active_color; ?>;
30
- }
31
- </style>
32
- <div <?php echo join(" ", $this->carousel_options($id)); ?>>
33
- <?php
34
- foreach ($_video_urls as $url) {
35
- echo $this->video_url($url);
36
- }
37
- ?>
38
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
widgets/widget-carousel_slider.php CHANGED
@@ -10,60 +10,61 @@ class Carousel_Slider_Widget extends WP_Widget {
10
  * Sets up the widgets name etc
11
  */
12
  public function __construct() {
13
- $widget_ops = array(
14
- 'classname' => 'widget_carousel_slider',
15
- 'description' => __('The easiest way to create image, video and post carousel.', 'carousel-slider'),
16
  );
17
- parent::__construct( 'widget_carousel_slider', __('Carousel Slider', 'carousel-slider'), $widget_ops );
18
  }
19
 
20
  /**
21
  * Outputs the content of the widget
22
  *
23
- * @param array $args
24
- * @param array $instance
 
25
  */
26
  public function widget( $args, $instance ) {
27
- extract($args);
28
-
29
- $title = apply_filters( 'widget_title', esc_attr( $instance['title'] ) );
30
- $carousel_id = isset($instance['carousel_id']) ? absint( $instance['carousel_id'] ) : 0;
31
 
32
- if ( ! $carousel_id) {
 
 
 
33
  return;
34
  }
35
 
36
  echo $args['before_widget'];
37
-
38
- if ( ! empty( $title ) ) {
39
- echo $args['before_title'] . $title . $args['after_title'];
40
- }
41
-
42
- echo do_shortcode('[carousel_slide id='. $carousel_id .']');
43
  echo $args['after_widget'];
44
  }
45
 
46
  /**
47
- * Outputs the options form on admin
 
 
48
  *
49
- * @param array $instance The widget options
50
  */
51
- public function form( $instance )
52
- {
53
- $carousels = $this->carousels_list();
54
- $carousel_id = ! empty( $instance['carousel_id'] ) ? absint($instance['carousel_id']) : null;
55
- $title = ! empty( $instance['title'] ) ? esc_attr($instance['title']) : '';
56
 
57
  if ( count( $carousels ) > 0 ) {
58
 
59
- echo sprintf('<p><label for="%1$s">%2$s</label>', $this->get_field_id( 'title' ), __('Title (optional):', 'carousel-slider'));
60
- echo sprintf('<input type="text" class="widefat" id="%1$s" name="%2$s" value="%3$s" /></p>', $this->get_field_id( 'title' ), $this->get_field_name( 'title' ), $title);
61
 
62
- echo sprintf('<p><label>%s</label>', __('Choose Slide', 'carousel-slider'));
63
- echo sprintf('<select class="widefat" name="%s">', $this->get_field_name( 'carousel_id' ));
64
- foreach ($carousels as $carousel ) {
65
  $selected = $carousel->id == $carousel_id ? 'selected="selected"' : '';
66
- echo sprintf(
67
  '<option value="%1$d" %3$s>%2$s</option>',
68
  $carousel->id,
69
  $carousel->title,
@@ -73,48 +74,53 @@ class Carousel_Slider_Widget extends WP_Widget {
73
  echo "</select></p>";
74
 
75
  } else {
76
- echo sprintf('<p>%1$s <a href="'. admin_url('post-new.php?post_type=carousels') .'">%3$s</a> %2$s</p>',
77
- __('You did not add any carousel slider yet.', 'carousel-slider'),
78
- __('to create a new carousel slider now.', 'carousel-slider'),
79
- __('click here', 'carousel-slider')
80
  );
81
  }
82
  }
83
 
84
  /**
85
- * Processing widget options on save
86
  *
87
- * @param array $new_instance The new options
88
- * @param array $old_instance The previous options
89
  */
90
- public function update( $new_instance, $old_instance ) {
91
- $instance = array();
92
- $instance['title'] = sanitize_text_field( $new_instance['title'] );
93
- $instance['carousel_id'] = absint( $new_instance['carousel_id'] );
94
-
95
- return $instance;
96
- }
97
-
98
- private function carousels_list()
99
- {
100
  $carousels = get_posts( array(
101
- 'post_type' => 'carousels',
102
- 'post_status' => 'publish',
103
  ) );
104
 
105
- if ( count($carousels) < 1) {
106
  return array();
107
  }
108
 
109
- return array_map(function($carousel){
110
  return (object) array(
111
- 'id' => absint($carousel->ID),
112
- 'title' => esc_html($carousel->post_title),
113
  );
114
- }, $carousels);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  }
116
  }
117
 
118
- add_action( 'widgets_init', function(){
119
  register_widget( 'Carousel_Slider_Widget' );
120
- });
10
  * Sets up the widgets name etc
11
  */
12
  public function __construct() {
13
+ $widget_ops = array(
14
+ 'classname' => 'widget_carousel_slider',
15
+ 'description' => __( 'The easiest way to create image, video, post and WooCommerce product carousel.', 'carousel-slider' ),
16
  );
17
+ parent::__construct( 'widget_carousel_slider', __( 'Carousel Slider', 'carousel-slider' ), $widget_ops );
18
  }
19
 
20
  /**
21
  * Outputs the content of the widget
22
  *
23
+ * @param array $args Display arguments including 'before_title', 'after_title',
24
+ * 'before_widget', and 'after_widget'.
25
+ * @param array $instance The settings for the particular instance of the widget.
26
  */
27
  public function widget( $args, $instance ) {
 
 
 
 
28
 
29
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : null;
30
+ $carousel_id = isset( $instance['carousel_id'] ) ? absint( $instance['carousel_id'] ) : 0;
31
+
32
+ if ( ! $carousel_id ) {
33
  return;
34
  }
35
 
36
  echo $args['before_widget'];
37
+
38
+ if ( ! empty( $title ) ) {
39
+ echo $args['before_title'] . $title . $args['after_title'];
40
+ }
41
+
42
+ echo do_shortcode( '[carousel_slide id=' . $carousel_id . ']' );
43
  echo $args['after_widget'];
44
  }
45
 
46
  /**
47
+ * Outputs the settings update form.
48
+ *
49
+ * @param array $instance Current settings.
50
  *
51
+ * @return string
52
  */
53
+ public function form( $instance ) {
54
+ $carousels = $this->carousels_list();
55
+ $carousel_id = ! empty( $instance['carousel_id'] ) ? absint( $instance['carousel_id'] ) : null;
56
+ $title = ! empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
 
57
 
58
  if ( count( $carousels ) > 0 ) {
59
 
60
+ printf( '<p><label for="%1$s">%2$s</label>', $this->get_field_id( 'title' ), __( 'Title (optional):', 'carousel-slider' ) );
61
+ printf( '<input type="text" class="widefat" id="%1$s" name="%2$s" value="%3$s" /></p>', $this->get_field_id( 'title' ), $this->get_field_name( 'title' ), $title );
62
 
63
+ printf( '<p><label>%s</label>', __( 'Choose Slide', 'carousel-slider' ) );
64
+ printf( '<select class="widefat" name="%s">', $this->get_field_name( 'carousel_id' ) );
65
+ foreach ( $carousels as $carousel ) {
66
  $selected = $carousel->id == $carousel_id ? 'selected="selected"' : '';
67
+ printf(
68
  '<option value="%1$d" %3$s>%2$s</option>',
69
  $carousel->id,
70
  $carousel->title,
74
  echo "</select></p>";
75
 
76
  } else {
77
+ printf( '<p>%1$s <a href="' . admin_url( 'post-new.php?post_type=carousels' ) . '">%3$s</a> %2$s</p>',
78
+ __( 'You did not add any carousel slider yet.', 'carousel-slider' ),
79
+ __( 'to create a new carousel slider now.', 'carousel-slider' ),
80
+ __( 'click here', 'carousel-slider' )
81
  );
82
  }
83
  }
84
 
85
  /**
86
+ * Get the list of carousel sliders
87
  *
88
+ * @return array
 
89
  */
90
+ private function carousels_list() {
 
 
 
 
 
 
 
 
 
91
  $carousels = get_posts( array(
92
+ 'post_type' => 'carousels',
93
+ 'post_status' => 'publish',
94
  ) );
95
 
96
+ if ( count( $carousels ) < 1 ) {
97
  return array();
98
  }
99
 
100
+ return array_map( function ( $carousel ) {
101
  return (object) array(
102
+ 'id' => absint( $carousel->ID ),
103
+ 'title' => esc_html( $carousel->post_title ),
104
  );
105
+ }, $carousels );
106
+ }
107
+
108
+ /**
109
+ * Processing widget options on save
110
+ *
111
+ * @param array $new_instance The new options
112
+ * @param array $old_instance The previous options
113
+ *
114
+ * @return array
115
+ */
116
+ public function update( $new_instance, $old_instance ) {
117
+ $old_instance['title'] = sanitize_text_field( $new_instance['title'] );
118
+ $old_instance['carousel_id'] = absint( $new_instance['carousel_id'] );
119
+
120
+ return $old_instance;
121
  }
122
  }
123
 
124
+ add_action( 'widgets_init', function () {
125
  register_widget( 'Carousel_Slider_Widget' );
126
+ } );