Cherry Team Members - Version 1.4.6

Version Description

Download this release

Release Info

Developer TemplateMonster 2002
Plugin Icon 128x128 Cherry Team Members
Version 1.4.6
Comparing to
See all releases

Code changes from version 1.4.5 to 1.4.6

Files changed (34) hide show
  1. LICENSE +675 -0
  2. cherry-framework/cherry-core.php +1 -1
  3. cherry-framework/config.json +0 -196
  4. cherry-framework/modules/cherry-creator/cherry-creator.php +0 -122
  5. cherry-framework/modules/cherry-creator/inc/cherry-creator-term.php +0 -126
  6. cherry-framework/modules/cherry-customizer/cherry-customizer.php +0 -2
  7. cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-collector.php +1 -0
  8. cherry-framework/modules/cherry-js-core/assets/js/cherry-js-core.js +1 -24
  9. cherry-framework/modules/cherry-js-core/assets/js/min/cherry-js-core.min.js +1 -1
  10. cherry-framework/modules/cherry-page-builder/assets/css/min/page-settings.min.css +0 -18
  11. cherry-framework/modules/cherry-page-builder/assets/js/min/page-settings.min.js +0 -1
  12. cherry-framework/modules/cherry-page-builder/assets/js/page-settings.js +0 -92
  13. cherry-framework/modules/cherry-page-builder/assets/scss/page-setting.scss +0 -80
  14. cherry-framework/modules/cherry-page-builder/cherry-page-builder.php +0 -406
  15. cherry-framework/modules/cherry-page-builder/views/page.php +0 -46
  16. cherry-framework/modules/cherry-page-builder/views/section.php +0 -10
  17. cherry-framework/modules/cherry-plugin-updater/cherry-plugin-updater.php +0 -143
  18. cherry-framework/modules/cherry-plugin-updater/inc/cherry-base-updater.php +0 -156
  19. cherry-framework/modules/cherry-post-meta/views/meta.php +0 -20
  20. cherry-framework/modules/cherry-post-types/cherry-post-types.php +0 -155
  21. cherry-framework/modules/cherry-post-types/inc/cherry-post-type.php +0 -112
  22. cherry-framework/modules/cherry-taxonomies/cherry-taxonomies.php +0 -132
  23. cherry-framework/modules/cherry-taxonomies/inc/cherry-taxonomy.php +0 -210
  24. cherry-framework/modules/cherry-template-manager/cherry-template-manager.php +0 -112
  25. cherry-framework/modules/cherry-template-manager/inc/cherry-template-loader.php +0 -193
  26. cherry-framework/modules/cherry-template-manager/inc/cherry-template-parser.php +0 -196
  27. cherry-framework/modules/cherry-theme-updater/cherry-theme-updater.php +0 -141
  28. cherry-framework/modules/cherry-theme-updater/inc/cherry-base-updater.php +0 -156
  29. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php +1 -1
  30. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-kit/_mixins.scss +0 -182
  31. cherry-framework/modules/cherry-utility/inc/cherry-attributes-utilit.php +3 -1
  32. cherry-framework/setup.php +7 -7
  33. cherry-team-members.php +2 -2
  34. readme.txt +2 -2
LICENSE ADDED
@@ -0,0 +1,675 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>.
675
+
cherry-framework/cherry-core.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Class Cherry Core
4
- * Version: 1.5.7
5
  *
6
  * @package Cherry_Framework
7
  * @subpackage Class
1
  <?php
2
  /**
3
  * Class Cherry Core
4
+ * Version: 1.5.11
5
  *
6
  * @package Cherry_Framework
7
  * @subpackage Class
cherry-framework/config.json DELETED
@@ -1,196 +0,0 @@
1
- {
2
- "name" : "Cherry Framework",
3
- "version" : "1.4.3.1",
4
- "description" : "",
5
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs",
6
- "git_link" : "https://github.com/CherryFramework/cherry-framework",
7
- "modules" : {
8
- "cherry-breadcrumbs" : {
9
- "name" : "Breadcrumb Trail",
10
- "description" : "A breadcrumb menu script for WordPress.",
11
- "version" : "1.1.3",
12
- "doc_link" : "",
13
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-breadcrumbs",
14
- "compatible" : ["theme", "plugin"],
15
- "wordpress_org" : true,
16
- "required" : false,
17
- "dependencies" : []
18
- },
19
- "cherry-customizer" : {
20
- "name" : "Customizer API",
21
- "description" : "Customizer functionality.",
22
- "version" : "1.1.7",
23
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/01.%20cherry-customizer.md",
24
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-customizer",
25
- "compatible" : ["theme", "plugin"],
26
- "wordpress_org" : true,
27
- "required" : false,
28
- "dependencies" : []
29
- },
30
- "cherry-db-updater" : {
31
- "name" : "Database Updater",
32
- "description" : "Handle database updates if required.",
33
- "version" : "1.0.0",
34
- "doc_link" : "",
35
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-db-updater",
36
- "compatible" : ["theme", "plugin"],
37
- "wordpress_org" : true,
38
- "required" : false,
39
- "dependencies" : []
40
- },
41
- "cherry-dynamic-css" : {
42
- "name" : "Dynamic CSS",
43
- "description" : "Generate CSS.",
44
- "version" : "1.4.0",
45
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/03.%20cherry-dynamic-css.md",
46
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-dynamic-css",
47
- "compatible" : ["theme", "plugin"],
48
- "wordpress_org" : true,
49
- "required" : false,
50
- "dependencies" : []
51
- },
52
- "cherry-google-fonts-loader" : {
53
- "name" : "Google Fonts Loader",
54
- "description" : "Enqueue Google fonts.",
55
- "version" : "1.1.0",
56
- "doc_link" : "",
57
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-google-fonts-loader",
58
- "compatible" : ["theme", "plugin"],
59
- "wordpress_org" : true,
60
- "required" : false,
61
- "dependencies" : []
62
- },
63
- "cherry-handler" : {
64
- "name" : "Cherry handler",
65
- "description" : "Initialize handlers.",
66
- "version" : "1.1.3",
67
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/02.%20cherry-handler.md",
68
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-handler",
69
- "compatible" : ["theme", "plugin"],
70
- "wordpress_org" : true,
71
- "required" : false,
72
- "dependencies" : [ "cherry-js-core" ]
73
- },
74
- "cherry-interface-builder" : {
75
- "name" : "Interface Builder",
76
- "description" : "The module for the creation of interfaces in the WordPress admin panel.",
77
- "version" : "1.1.2",
78
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/07.%20cherry-interface-builder.md",
79
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-interface-builder",
80
- "compatible" : ["theme", "plugin"],
81
- "wordpress_org" : true,
82
- "required" : false,
83
- "dependencies" : [ "cherry-ui-elements" ]
84
- },
85
- "cherry-js-core" : {
86
- "name" : "JS Core",
87
- "description" : "Initialize global JS object which provides additional plugin functionality.",
88
- "version" : "1.1.2",
89
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/04.%20cherry-js-core.md",
90
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-js-core",
91
- "compatible" : ["theme", "plugin"],
92
- "wordpress_org" : true,
93
- "required" : false,
94
- "dependencies" : []
95
- },
96
- "cherry-post-formats-api" : {
97
- "name" : "Post Formats API",
98
- "description" : "API for post formats specific content.",
99
- "version" : "1.1.2",
100
- "doc_link" : "",
101
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-post-formats-api",
102
- "compatible" : ["theme", "plugin"],
103
- "wordpress_org" : true,
104
- "required" : false,
105
- "dependencies" : [ "cherry-js-core" ]
106
- },
107
- "cherry-post-meta" : {
108
- "name" : "Post Meta",
109
- "description" : "Manage post meta.",
110
- "version" : "1.2.1",
111
- "doc_link" : "",
112
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-post-meta",
113
- "compatible" : ["theme", "plugin"],
114
- "wordpress_org" : true,
115
- "required" : false,
116
- "dependencies" : [ "cherry-interface-builder" ]
117
- },
118
- "cherry-term-meta" : {
119
- "name" : "Term Meta",
120
- "description" : "Manage term metadata.",
121
- "version" : "1.1.4",
122
- "doc_link" : "",
123
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-term-meta",
124
- "compatible" : ["theme", "plugin"],
125
- "wordpress_org" : true,
126
- "required" : false,
127
- "dependencies" : [ "cherry-ui-elements" ]
128
- },
129
- "cherry-toolkit": {
130
- "name": "Framework Toolkit",
131
- "description": "Framework Toolkit contains various PHP utilities",
132
- "version" : "1.2.0",
133
- "doc_link": "https://github.com/CherryFramework/cherry-framework-docs/blob/master/100.%20cherry-toolkit.md",
134
- "git_link": "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-toolkit",
135
- "compatible": ["theme", "plugin"],
136
- "wordpress_org": true,
137
- "required": true,
138
- "dependencies": []
139
- },
140
- "cherry-ui-elements" : {
141
- "name" : "UI Elements",
142
- "description" : "UI Elements",
143
- "version" : "1.4.3",
144
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/09.%20cherry-ui-elements.md",
145
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-ui-elements",
146
- "compatible" : ["theme", "plugin"],
147
- "wordpress_org" : true,
148
- "required" : false,
149
- "dependencies" : [ "cherry-js-core" ]
150
- },
151
- "cherry-utility" : {
152
- "name" : "Utility",
153
- "description" : "Multiple utility functions.",
154
- "version" : "1.1.7",
155
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/08.%20cherry-utility.md",
156
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-utility",
157
- "compatible" : ["theme", "plugin"],
158
- "wordpress_org" : true,
159
- "required" : false,
160
- "dependencies" : []
161
- },
162
- "cherry-widget-factory" : {
163
- "name" : "Widget Factory",
164
- "description" : "Base widget class that simplifies creating of your own widgets.",
165
- "version" : "1.2.1",
166
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/06.%20cherry-widget-factory.md",
167
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-widget-factory",
168
- "compatible" : ["theme", "plugin"],
169
- "wordpress_org" : true,
170
- "required" : false,
171
- "dependencies" : [ "cherry-ui-elements" ]
172
- },
173
- "cherry5-assets-loader" : {
174
- "name" : "Assets Loader",
175
- "description" : "The module allows you deferred loading scripts and styles.",
176
- "version" : "1.0.0",
177
- "doc_link" : "",
178
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry5-assets-loader",
179
- "compatible" : [ "theme", "plugin" ],
180
- "wordpress_org" : true,
181
- "required" : false,
182
- "dependencies" : [ "cherry-js-core" ]
183
- },
184
- "cherry5-insert-shortcode" : {
185
- "name" : "Insert Shortcode",
186
- "description" : "The module allows you to add shortcodes from editor tinyMCE.",
187
- "version" : "1.0.2",
188
- "doc_link" : "",
189
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry5-insert-shortcode",
190
- "compatible" : [ "plugin" ],
191
- "wordpress_org" : true,
192
- "required" : false,
193
- "dependencies" : [ "cherry-ui-elements", "cherry-interface-builder" ]
194
- }
195
- }
196
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-creator/cherry-creator.php DELETED
@@ -1,122 +0,0 @@
1
- <?php
2
- /**
3
- * Creator
4
- *
5
- * Module Name: Creator
6
- * Description: Creator
7
- * Version: 1.1.0
8
- * Author: Cherry Team
9
- * Author URI: http://www.cherryframework.com/
10
- * License: GPLv3
11
- * License URI: http://www.gnu.org/licenses/gpl-3.0.html
12
- *
13
- * @package Cherry_Framework
14
- * @subpackage Modules
15
- * @version 1.1.0
16
- * @author Cherry Team <cherryframework@gmail.com>
17
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
18
- * @link http://www.cherryframework.com/
19
- * @license http://www.gnu.org/licenses/gpl-3.0.html
20
- */
21
-
22
- // If this file is called directly, abort.
23
- if ( ! defined( 'WPINC' ) ) {
24
- die;
25
- }
26
-
27
- if ( ! class_exists( 'Cherry_Creator' ) ) {
28
-
29
- /**
30
- * Cherry post types class
31
- */
32
- class Cherry_Creator {
33
-
34
- /**
35
- * Module version
36
- *
37
- * @var string
38
- */
39
- public $module_version = '1.1.0';
40
-
41
- /**
42
- * Module slug
43
- *
44
- * @var string
45
- */
46
- public $module_slug = 'cherry-creator';
47
-
48
- /**
49
- * Default post type arguments
50
- *
51
- * @var null
52
- */
53
- private $defaults = null;
54
-
55
- /**
56
- * Module directory
57
- *
58
- * @since 1.0.0
59
- * @var string
60
- */
61
- private $module_directory = '';
62
-
63
- /**
64
- * Cherry_Post_Type class constructor
65
- */
66
- public function __construct( $core, $args = array() ) {
67
- $this->defaults = $args;
68
- $this->module_directory = $core->settings['base_dir'] . '/modules/' . $this->module_slug;
69
-
70
- // Load Creator Term
71
- if ( ! class_exists( 'Cherry_Creator_Term' ) ) {
72
- require_once( $this->module_directory . '/inc/cherry-creator-term.php' );
73
- }
74
- }
75
-
76
- /**
77
- * Create Chery_Creator_Term object
78
- *
79
- * @param [type] $title term.
80
- * @param [string] $tax taxonomy.
81
- * @param array $args arguments.
82
- * @return Chery_Creator_Term
83
- */
84
- public static function term( $title, $tax = 'category', $args = array() ) {
85
- // Load Creator Term
86
- if ( ! class_exists( 'Cherry_Creator_Term' ) ) {
87
- require_once( 'cherry-creator-term.php' );
88
- }
89
- return new Cherry_Creator_Term( $title, $tax, $args );
90
- }
91
-
92
- /**
93
- * New / Update post
94
- *
95
- * @param array $properties new or update post properties.
96
- * @return post id or 0.
97
- */
98
- public static function post( $properties = array(), $unique = false ) {
99
- if ( $unique && array_key_exists( 'post_title', $properties ) ) {
100
- $post_type = 'page';
101
- if ( array_key_exists( 'post_type', $properties ) ) {
102
- $post_type = $properties['post_type'];
103
- }
104
- $post = get_page_by_path( sanitize_title( $properties['post_title'] ), OBJECT, $post_type );
105
- if ( null !== $post ) {
106
- $properties['ID'] = $post->ID;
107
- }
108
- }
109
- return wp_insert_post( $properties );
110
- }
111
-
112
- /**
113
- * Returns the instance.
114
- *
115
- * @since 1.0.0
116
- * @return object
117
- */
118
- public static function get_instance( $core, $args ) {
119
- return new self( $core, $args );
120
- }
121
- }
122
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-creator/inc/cherry-creator-term.php DELETED
@@ -1,126 +0,0 @@
1
- <?php
2
- /**
3
- * Creator term
4
- *
5
- * @package Cherry_Framework
6
- * @subpackage Class
7
- * @author Cherry Team <cherryframework@gmail.com>
8
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
9
- * @link http://www.cherryframework.com/
10
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
- */
12
-
13
- /**
14
- * Cherry_Creator_Term class
15
- */
16
- class Cherry_Creator_Term {
17
-
18
- /**
19
- * Term title
20
- *
21
- * @var string
22
- */
23
- private $title;
24
-
25
- /**
26
- * Term taxonomy
27
- *
28
- * @var string
29
- */
30
- private $taxonomy = 'category';
31
-
32
- /**
33
- * Term arguments
34
- *
35
- * @var array
36
- */
37
- private $arguments = array();
38
-
39
- /**
40
- * Inserted term
41
- *
42
- * @var null
43
- */
44
- private $inserted = null;
45
-
46
- /**
47
- * Cherry_Creator_Term
48
- *
49
- * @param [type] $title term title.
50
- * @param [string] $tax taxonomy.
51
- * @param array $args arguments.
52
- */
53
- public function __construct( $title, $tax = 'category', $args = array() ) {
54
- $this->title = $title;
55
- $this->taxonomy = $tax;
56
- $this->arguments = $args;
57
- }
58
-
59
- /**
60
- * Insert term
61
- *
62
- * @return Cherry_Creator_Term
63
- */
64
- public function insert( $unique = false ) {
65
- if ( ! is_array( $this->inserted ) ) {
66
- if ( $unique ) {
67
- if ( ! term_exists( $this->get_term_slug(), $this->taxonomy ) ) {
68
- $this->_insert();
69
- }
70
- } else {
71
- $this->_insert();
72
- }
73
- }
74
- return $this;
75
- }
76
-
77
- /**
78
- * Insert term without checking
79
- *
80
- * @return Cherry_Creator_Term
81
- */
82
- private function _insert() {
83
- $this->inserted = wp_insert_term(
84
- $this->title,
85
- $this->taxonomy,
86
- $this->arguments
87
- );
88
- return $this;
89
- }
90
-
91
- /**
92
- * Set parent by slug
93
- *
94
- * @param [type] $parent_slug parent.
95
- */
96
- public function set_parent_by_slug( $parent_slug = null ) {
97
- if ( null !== $parent_slug ) {
98
- $term = get_term_by( 'slug', $parent_slug, $this->taxonomy );
99
- if ( $term ) {
100
- $this->arguments['parent'] = $term->term_id;
101
- }
102
- }
103
- return $this;
104
- }
105
-
106
- /**
107
- * Get inserted object
108
- *
109
- * @return mixed.
110
- */
111
- public function get_inserted() {
112
- return $this->inserted;
113
- }
114
-
115
- /**
116
- * Get term slug
117
- *
118
- * @return [type] term slug.
119
- */
120
- public function get_term_slug() {
121
- if ( array_key_exists( 'slug', $this->arguments ) ) {
122
- return $this->arguments['slug'];
123
- }
124
- return sanitize_title( $this->title );
125
- }
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-customizer/cherry-customizer.php CHANGED
@@ -1018,9 +1018,7 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
1018
  * @return bool
1019
  */
1020
  public function get_file( $file ) {
1021
-
1022
  $result = Cherry_Toolkit::get_file( $file );
1023
-
1024
  return $result;
1025
  }
1026
 
1018
  * @return bool
1019
  */
1020
  public function get_file( $file ) {
 
1021
  $result = Cherry_Toolkit::get_file( $file );
 
1022
  return $result;
1023
  }
1024
 
cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-collector.php CHANGED
@@ -243,6 +243,7 @@ if ( ! class_exists( 'Cherry_Dynamic_Css_Collector' ) ) {
243
  $has_media = false;
244
  $min = '';
245
  $max = '';
 
246
 
247
  if ( ! empty( $media['min'] ) ) {
248
  $has_media = true;
243
  $has_media = false;
244
  $min = '';
245
  $max = '';
246
+ $sep = '';
247
 
248
  if ( ! empty( $media['min'] ) ) {
249
  $has_media = true;
cherry-framework/modules/cherry-js-core/assets/js/cherry-js-core.js CHANGED
@@ -1,4 +1,4 @@
1
- var CherryJsCore = {};
2
 
3
  ( function( $ ) {
4
  'use strict';
@@ -11,7 +11,6 @@ var CherryJsCore = {};
11
  variable: {
12
  $document: $( document ),
13
  $window: $( window ),
14
- browser: $.browser,
15
  browser_supported: true,
16
  security: window.cherry_ajax,
17
  loaded_assets: {
@@ -29,33 +28,11 @@ var CherryJsCore = {};
29
 
30
  init: function(){
31
 
32
- CherryJsCore.set_variable();
33
-
34
  $( document ).on( 'ready', CherryJsCore.ready );
35
 
36
  $( window ).on( 'load', CherryJsCore.load );
37
  },
38
 
39
- set_variable: function() {
40
- //Set variable browser_supported
41
- CherryJsCore.variable.browser_supported = ( function (){
42
- var uset_browser = CherryJsCore.variable.browser,
43
- not_supported = { 'msie': [8] };
44
-
45
- for ( var browser in not_supported ) {
46
- if( uset_browser.browser !== 'undefined' ){
47
- for ( var version in not_supported[ browser ] ) {
48
- if( uset_browser.version <= not_supported [ browser ] [ version ] ){
49
- return false;
50
- }
51
- }
52
- }
53
- }
54
-
55
- return true;
56
- }() );
57
- },
58
-
59
  ready: function() {
60
  CherryJsCore.status.is_ready = true;
61
 
1
+ var CherryJsCore = {};
2
 
3
  ( function( $ ) {
4
  'use strict';
11
  variable: {
12
  $document: $( document ),
13
  $window: $( window ),
 
14
  browser_supported: true,
15
  security: window.cherry_ajax,
16
  loaded_assets: {
28
 
29
  init: function(){
30
 
 
 
31
  $( document ).on( 'ready', CherryJsCore.ready );
32
 
33
  $( window ).on( 'load', CherryJsCore.load );
34
  },
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ready: function() {
37
  CherryJsCore.status.is_ready = true;
38
 
cherry-framework/modules/cherry-js-core/assets/js/min/cherry-js-core.min.js CHANGED
@@ -1 +1 @@
1
- var CherryJsCore={};!function(r){"use strict";CherryJsCore={name:"Cherry Js Core",version:"1.0.0",author:"Cherry Team",variable:{$document:r(document),$window:r(window),browser:r.browser,browser_supported:!0,security:window.cherry_ajax,loaded_assets:{script:window.wp_load_script,style:window.wp_load_style},ui_auto_init:"true"===window.ui_init_object.auto_init,ui_auto_target:window.ui_init_object.targets},status:{on_load:!1,is_ready:!1},init:function(){CherryJsCore.set_variable(),r(document).on("ready",CherryJsCore.ready),r(window).on("load",CherryJsCore.load)},set_variable:function(){CherryJsCore.variable.browser_supported=function(){var r=CherryJsCore.variable.browser,e={msie:[8]};for(var i in e)if("undefined"!==r.browser)for(var o in e[i])if(r.version<=e[i][o])return!1;return!0}()},ready:function(){CherryJsCore.status.is_ready=!0,CherryJsCore.expressions.widget_ui_init()},load:function(){CherryJsCore.status.on_load=!0},expressions:{widget_ui_init:function(){r(document).on("widget-added widget-updated",function(e,i){r("body").trigger({type:"cherry-ui-elements-init",_target:i})})}},utilites:{namespace:function(r){var e=r.split("."),i=CherryJsCore,o=e.length,t=0;for(t=0;t<o;t+=1)"undefined"==typeof i[e[t]]&&(i[e[t]]={}),i=i[e[t]];return i}}},CherryJsCore.init()}(jQuery);
1
+ var CherryJsCore={};!function(e){"use strict";(CherryJsCore={name:"Cherry Js Core",version:"1.0.0",author:"Cherry Team",variable:{$document:e(document),$window:e(window),browser_supported:!0,security:window.cherry_ajax,loaded_assets:{script:window.wp_load_script,style:window.wp_load_style},ui_auto_init:"true"===window.ui_init_object.auto_init,ui_auto_target:window.ui_init_object.targets},status:{on_load:!1,is_ready:!1},init:function(){e(document).on("ready",CherryJsCore.ready),e(window).on("load",CherryJsCore.load)},ready:function(){CherryJsCore.status.is_ready=!0,CherryJsCore.expressions.widget_ui_init()},load:function(){CherryJsCore.status.on_load=!0},expressions:{widget_ui_init:function(){e(document).on("widget-added widget-updated",function(r,t){e("body").trigger({type:"cherry-ui-elements-init",_target:t})})}},utilites:{namespace:function(e){var r=e.split("."),t=CherryJsCore,i=r.length,o=0;for(o=0;o<i;o+=1)void 0===t[r[o]]&&(t[r[o]]={}),t=t[r[o]];return t}}}).init()}(jQuery);
cherry-framework/modules/cherry-page-builder/assets/css/min/page-settings.min.css DELETED
@@ -1,18 +0,0 @@
1
- .cherry-settings-page .description:after { content: ' '; clear: both; height: 10px; width: 100%; }
2
-
3
- .notice-box { background: #222222; position: fixed; margin: 5px 0; border-left: 5px solid #2a445d; box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3); box-sizing: border-box; padding: 15px 20px 15px 15px; min-width: 200px; overflow: hidden; z-index: 999; -webkit-transition: all 250ms cubic-bezier(0.85, 0.04, 1, 1); transition: all 250ms cubic-bezier(0.85, 0.04, 1, 1); }
4
- .notice-box span.dashicons { position: relative; margin-right: 20px; }
5
- .notice-box span.dashicons:before { position: absolute; font-size: 40px; left: -10px; top: -10px; }
6
- .notice-box.success-notice { border-color: #8bc735; }
7
- .notice-box.success-notice span.dashicons { color: #8bc735; }
8
- .notice-box.success-notice span.dashicons:before { content: "\f147"; }
9
- .notice-box.success-notice .inner b { color: #8bc735; }
10
- .notice-box.info-notice { border-color: #ffcc00; }
11
- .notice-box.info-notice span.dashicons { color: #ffcc00; }
12
- .notice-box.info-notice span.dashicons:before { content: "\f348"; }
13
- .notice-box.info-notice .inner b { color: #ffcc00; }
14
- .notice-box.error-notice { border-color: #f62e46; }
15
- .notice-box.error-notice span.dashicons { color: #f62e46; }
16
- .notice-box.error-notice span.dashicons:before { content: "\f158"; }
17
- .notice-box.show-state { -webkit-transition: all 500ms cubic-bezier(0.1, 0.67, 0.26, 1); transition: all 500ms cubic-bezier(0.1, 0.67, 0.26, 1); }
18
- .notice-box .inner { display: inline-block; color: #fff; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-page-builder/assets/js/min/page-settings.min.js DELETED
@@ -1 +0,0 @@
1
- !function(e){"use strict";window.CherryJsCore.utilites.namespace("page_builder"),window.CherryJsCore.page_builder={init:function(){var e=this;e.tabs(".cherry-settings-tabs").saveEvent(".cherry-settings-tabs form")},tabs:function(e){return jQuery(e+" .tabs-section a").each(function(t){var s=jQuery(this),i=s.attr("href");t?jQuery(e+" .section"+i).hide():s.addClass("nav-tab-active")}),jQuery(e+" .tabs-section a").on("click",function(t){var s=jQuery(this),i=s.attr("href");jQuery(e+" .section").hide(),jQuery(e+" .section"+i).show(),jQuery(e+" .tabs-section a").removeClass("nav-tab-active"),s.addClass("nav-tab-active"),t.preventDefault()}),this},saveEvent:function(e){var t=this;return jQuery(e).submit(function(e){var s=jQuery(this);s.ajaxSubmit({success:function(){t.noticeCreate("success",window.TMRealEstateMessage.success)},error:function(){t.noticeCreate("failed",window.TMRealEstateMessage.failed)},timeout:5e3}),e.preventDefault()}),this},noticeCreate:function(t,s){function i(){var t=100;e(".notice-box").each(function(){e(this).css({top:t}),t+=e(this).outerHeight(!0)})}var a,n=e('<div class="notice-box '+t+'-notice"><span class="dashicons"></span><div class="inner">'+s+"</div></div>"),r=0;return jQuery("body").prepend(n),i(),r=-1*(n.outerWidth(!0)+10),n.css({right:r}),a=setTimeout(function(){n.css({right:10}).addClass("show-state")},100),a=setTimeout(function(){r=-1*(n.outerWidth(!0)+10),n.css({right:r}).removeClass("show-state")},4e3),a=setTimeout(function(){n.remove(),clearTimeout(a)},4500),this}},window.CherryJsCore.page_builder.init()}(jQuery);
 
cherry-framework/modules/cherry-page-builder/assets/js/page-settings.js DELETED
@@ -1,92 +0,0 @@
1
- /**
2
- * Page settings
3
- */
4
- (function( $ ) {
5
- 'use strict';
6
-
7
- window.CherryJsCore.utilites.namespace( 'page_builder' );
8
- window.CherryJsCore.page_builder = {
9
-
10
- init: function() {
11
- var self = this;
12
- self.tabs( '.cherry-settings-tabs' ).saveEvent( '.cherry-settings-tabs form' );
13
- },
14
-
15
- tabs: function( selectors ) {
16
- jQuery( selectors + ' .tabs-section a' ).each( function( index ) {
17
- var $this = jQuery( this );
18
- var id = $this.attr( 'href' );
19
- if ( ! index ) {
20
- $this.addClass( 'nav-tab-active' );
21
- } else {
22
- jQuery( selectors + ' .section' + id ).hide();
23
- }
24
- });
25
- jQuery( selectors + ' .tabs-section a' ).on( 'click', function( e ) {
26
- var $this = jQuery( this );
27
- var id = $this.attr( 'href' );
28
- jQuery( selectors + ' .section' ).hide();
29
- jQuery( selectors + ' .section' + id ).show();
30
- jQuery( selectors + ' .tabs-section a' ).removeClass( 'nav-tab-active' );
31
- $this.addClass( 'nav-tab-active' );
32
- e.preventDefault();
33
- });
34
- return this;
35
- },
36
-
37
- saveEvent: function( selectors ) {
38
- var self = this;
39
- jQuery( selectors ).submit( function( e ) {
40
- var $this = jQuery( this );
41
- $this.ajaxSubmit({
42
- success: function() {
43
- self.noticeCreate( 'success', window.TMRealEstateMessage.success );
44
- },
45
- error: function() {
46
- self.noticeCreate( 'failed', window.TMRealEstateMessage.failed );
47
- },
48
- timeout: 5000
49
- });
50
-
51
- e.preventDefault();
52
- });
53
- return this;
54
- },
55
-
56
- noticeCreate: function( type, message ) {
57
- var
58
- notice = $( '<div class="notice-box ' + type + '-notice"><span class="dashicons"></span><div class="inner">' + message + '</div></div>' ),
59
- rightDelta = 0,
60
- timeoutId;
61
-
62
- jQuery( 'body' ).prepend( notice );
63
- reposition();
64
- rightDelta = -1 * ( notice.outerWidth( true ) + 10 );
65
- notice.css( { 'right': rightDelta } );
66
-
67
- timeoutId = setTimeout( function() {
68
- notice.css( { 'right': 10 } ).addClass( 'show-state' );
69
- }, 100 );
70
- timeoutId = setTimeout( function() {
71
- rightDelta = -1 * ( notice.outerWidth( true ) + 10 );
72
- notice.css( { right: rightDelta } ).removeClass( 'show-state' );
73
- }, 4000 );
74
- timeoutId = setTimeout( function() {
75
- notice.remove();
76
- clearTimeout( timeoutId );
77
- }, 4500 );
78
-
79
- function reposition() {
80
- var
81
- topDelta = 100;
82
- $( '.notice-box' ).each(function() {
83
- $( this ).css( { top: topDelta } );
84
- topDelta += $( this ).outerHeight( true );
85
- });
86
- }
87
- return this;
88
- }
89
- };
90
-
91
- window.CherryJsCore.page_builder.init();
92
- }( jQuery ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-page-builder/assets/scss/page-setting.scss DELETED
@@ -1,80 +0,0 @@
1
- .cherry-settings-page {
2
- .description {
3
- &:after {
4
- content: ' ';
5
- clear: both;
6
- height: 10px;
7
- width: 100%;
8
- }
9
- }
10
- }
11
-
12
- .notice-box{
13
- background: #222222;
14
- position: fixed;
15
- margin: 5px 0;
16
- border-left: 5px solid #2a445d;
17
- box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
18
- box-sizing: border-box;
19
- padding: 15px 20px 15px 15px;
20
- min-width: 200px;
21
- overflow: hidden;
22
- z-index: 999;
23
- -webkit-transition: all 250ms cubic-bezier(0.85, 0.04, 1, 1);
24
- transition: all 250ms cubic-bezier(0.85, 0.04, 1, 1);
25
- span.dashicons{
26
- position: relative;
27
- margin-right: 20px;
28
- &:before{
29
- position: absolute;
30
- font-size: 40px;
31
- left: -10px;
32
- top: -10px;
33
- }
34
- }
35
- &.success-notice{
36
- border-color: #8bc735;
37
- span.dashicons{
38
- color: #8bc735;
39
- &:before{
40
- content: "\f147";
41
- }
42
- }
43
- .inner{
44
- b{
45
- color: #8bc735;
46
- }
47
- }
48
- }
49
- &.info-notice{
50
- border-color: #ffcc00;
51
- span.dashicons{
52
- color: #ffcc00;
53
- &:before{
54
- content: "\f348";
55
- }
56
- }
57
- .inner{
58
- b{
59
- color: #ffcc00;
60
- }
61
- }
62
- }
63
- &.error-notice{
64
- border-color: #f62e46;
65
- span.dashicons{
66
- color: #f62e46;
67
- &:before{
68
- content: "\f158";
69
- }
70
- }
71
- }
72
- &.show-state{
73
- -webkit-transition: all 500ms cubic-bezier(0.1, 0.67, 0.26, 1);
74
- transition: all 500ms cubic-bezier(0.1, 0.67, 0.26, 1);
75
- }
76
- .inner{
77
- display: inline-block;
78
- color: #fff;
79
- }
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-page-builder/cherry-page-builder.php DELETED
@@ -1,406 +0,0 @@
1
- <?php
2
- /**
3
- * Module Name: Page Builder
4
- * Description: Provides functionality for building custom options pages
5
- * Version: 1.1.0
6
- * Author: Cherry Team
7
- * Author URI: http://www.cherryframework.com/
8
- * License: GPLv3
9
- * License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
- *
11
- * @package Cherry_Framework
12
- * @subpackage Modules
13
- * @version 1.1.0
14
- * @author Cherry Team <cherryframework@gmail.com>
15
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
16
- * @link http://www.cherryframework.com/
17
- * @license http://www.gnu.org/licenses/gpl-3.0.html
18
- */
19
-
20
- // If this file is called directly, abort.
21
- if ( ! defined( 'WPINC' ) ) {
22
- die;
23
- }
24
-
25
- if ( ! class_exists( 'Cherry_Page_Builder' ) ) {
26
-
27
- /**
28
- * Create options page
29
- */
30
- class Cherry_Page_Builder {
31
-
32
- /**
33
- * Module version
34
- *
35
- * @var string
36
- */
37
- public $module_version = '1.1.0';
38
-
39
- /**
40
- * Module slug
41
- *
42
- * @var string
43
- */
44
- public $module_slug = 'cherry-page-builder';
45
-
46
- /**
47
- * Module arguments
48
- *
49
- * @var array
50
- */
51
- public $args = array();
52
-
53
- /**
54
- * Page data
55
- *
56
- * @var array
57
- */
58
- public $data = array();
59
-
60
- /**
61
- * Core instance
62
- *
63
- * @var object
64
- */
65
- public $core = null;
66
-
67
- /**
68
- * Current nonce name to check
69
- *
70
- * @var string
71
- */
72
- public $nonce = 'cherry-admin-menu-nonce';
73
-
74
- /**
75
- * The page properties.
76
- *
77
- * @var DataContainer
78
- */
79
- public $views;
80
-
81
- /**
82
- * The page sections.
83
- *
84
- * @var array
85
- */
86
- protected $sections;
87
-
88
- /**
89
- * The page settings.
90
- *
91
- * @var array
92
- */
93
- protected $settings;
94
-
95
- /**
96
- * Constructor for the module
97
- */
98
- function __construct( $core, $args = array() ) {
99
-
100
- $this->core = $core;
101
- $this->args = wp_parse_args(
102
- $args,
103
- array(
104
- 'capability' => 'manage_options',
105
- 'position' => 20,
106
- 'icon' => 'dashicons-admin-site',
107
- 'sections' => array(),
108
- 'settings' => array(),
109
- 'before' => '',
110
- 'after' => '',
111
- 'before_button' => '',
112
- 'after_button' => '',
113
- )
114
- );
115
-
116
- $this->views = __DIR__ . '/views/';
117
- add_action( 'admin_enqueue_scripts', array( $this, 'assets' ) );
118
- }
119
-
120
- /**
121
- * Add admin menu page
122
- */
123
- function add_admin_page() {
124
- $page = $this->make( $this->args['slug'], $this->args['title'], $this->args['parent'], $this->args['views'] )->set(
125
- array(
126
- 'capability' => $this->args['capability'],
127
- 'icon' => $this->args['icon'],
128
- 'position' => $this->args['position'],
129
- 'tabs' => $this->args['tabs'],
130
- 'sections' => $this->args['sections'],
131
- 'settings' => $this->args['settings'],
132
- )
133
- );
134
- $page->add_sections( $this->args['sections'] );
135
- $page->add_settings( $this->args['settings'] );
136
- }
137
-
138
- /**
139
- * Set base data of page
140
- *
141
- * @param type string $slug The page slug name.
142
- * @param type string $title The page display title.
143
- * @param type string $parent The parent's page slug if a subpage.
144
- *
145
- * @return object
146
- */
147
- public function make( $slug, $title, $parent = null ) {
148
- $page = new Cherry_Page_Builder( $this->core, $this->args );
149
-
150
- // Set the page properties.
151
- $page->data['slug'] = $slug;
152
- $page->data['title'] = $title;
153
- $page->data['parent'] = $parent;
154
- $page->data['args'] = array(
155
- 'capability' => 'manage_options',
156
- 'icon' => '',
157
- 'position' => null,
158
- 'tabs' => true,
159
- 'menu' => $title,
160
- );
161
- $page->data['rules'] = array();
162
-
163
- return $page;
164
- }
165
-
166
- /**
167
- * Set the custom page. Allow user to override
168
- * the default page properties and add its own
169
- * properties.
170
- *
171
- * @param array $params Base parameter.
172
- * @return object
173
- */
174
- public function set( array $params = array() ) {
175
- $this->args = $params;
176
-
177
- $this->add_sections( $params['sections'] );
178
- $this->add_settings( $params['settings'] );
179
-
180
- add_action( 'admin_menu', array( $this, 'build' ) );
181
-
182
- return $this;
183
- }
184
-
185
- /**
186
- * Triggered by the 'admin_menu' action event.
187
- * Register/display the custom page in the WordPress admin.
188
- *
189
- * @return void
190
- */
191
- public function build() {
192
- if ( ! is_null( $this->data['parent'] ) ) {
193
- add_submenu_page( $this->data['parent'], $this->data['title'], $this->data['args']['menu'], $this->data['args']['capability'], $this->data['slug'], array( $this, 'render' ) );
194
- } else {
195
- add_menu_page( $this->data['title'], $this->data['args']['menu'], $this->data['args']['capability'], $this->data['slug'], array( $this, 'render' ), $this->data['args']['icon'], $this->args['position'] );
196
- }
197
- }
198
-
199
- /**
200
- * Triggered by the 'add_menu_page' or 'add_submenu_page'.
201
- *
202
- * @return void
203
- */
204
- public function render() {
205
- $title = ! empty( $this->data['title'] ) ? $this->data['title'] : '';
206
- $page_slug = ! empty( $this->data['slug'] ) ? $this->data['slug'] : '';
207
- $page_before = ! empty( $this->args['before'] ) ? $this->args['before'] : '';
208
- $page_after = ! empty( $this->args['after'] ) ? $this->args['after'] : '';
209
- $button_before = ! empty( $this->args['button_before'] ) ? $this->args['button_before'] : '';
210
- $button_after = ! empty( $this->args['button_after'] ) ? $this->args['button_after'] : '';
211
- $sections = ( ! empty( $this->sections ) && is_array( $this->sections ) ) ? $this->sections : array();
212
-
213
- $html = Cherry_Toolkit::render_view(
214
- $this->views . 'page.php',
215
- array(
216
- 'title' => $title,
217
- 'page_slug' => $page_slug,
218
- 'page_before' => $page_before,
219
- 'page_after' => $page_after,
220
- 'button_before' => $button_before,
221
- 'button_after' => $button_after,
222
- 'sections' => $sections,
223
- )
224
- );
225
-
226
- echo $html;
227
- }
228
-
229
- /**
230
- * Add custom sections for your settings.
231
- *
232
- * @param array $sections List of sections.
233
- * @return void
234
- */
235
- public function add_sections( array $sections = array() ) {
236
- $this->sections = $sections;
237
- }
238
-
239
- /**
240
- * Check if the page has sections.
241
- *
242
- * @return bool
243
- */
244
- public function has_sections() {
245
- return count( $this->sections ) ? true : false;
246
- }
247
-
248
- /**
249
- * Check if the page has settings.
250
- *
251
- * @return bool
252
- */
253
- public function has_settings() {
254
- return count( $this->settings ) ? true : false;
255
- }
256
-
257
- /**
258
- * Add settings to the page. Define settings per section
259
- * by setting the 'key' name equal to a registered section and
260
- * pass it an array of 'settings' fields.
261
- *
262
- * @param array $settings The page settings.
263
- * @return object
264
- */
265
- public function add_settings( array $settings = array() ) {
266
- $this->settings = $settings;
267
-
268
- add_action( 'admin_init', array( $this, 'install_settings' ) );
269
-
270
- return $this;
271
- }
272
-
273
- /**
274
- * Triggered by the 'admin_init' action.
275
- * Perform the WordPress settings API.
276
- *
277
- * @return void
278
- */
279
- public function install_settings() {
280
- if ( $this->has_sections() ) {
281
- foreach ( $this->sections as $section ) {
282
- if ( false === get_option( $section['slug'] ) ) {
283
- add_option( $section['slug'] );
284
- }
285
- add_settings_section( $section['slug'], $section['name'], array( $this, 'display_sections' ), $section['slug'] );
286
- }
287
- }
288
-
289
- if ( $this->has_settings() ) {
290
- foreach ( $this->settings as $section => $settings ) {
291
- foreach ( $settings as &$setting ) {
292
- $setting['section'] = $section;
293
- add_settings_field( $setting['slug'], $setting['title'], array( $this, 'display_settings' ), $section, $section, $setting );
294
- }
295
- register_setting( $section, $section );
296
- }
297
- }
298
- }
299
-
300
- /**
301
- * Clear sections
302
- */
303
- public function clear_sections() {
304
- if ( $this->has_sections() ) {
305
- foreach ( $this->sections as $section ) {
306
- delete_option( $section['slug'] );
307
- }
308
- }
309
- }
310
-
311
- /**
312
- * Handle section display of the Settings API.
313
- *
314
- * @param array $args Page parameter.
315
- * @return void
316
- */
317
- public function display_sections( array $args ) {
318
- $description = '';
319
- if ( ! empty( $this->sections[ $args['id'] ] ) ) {
320
- if ( ! empty( $this->sections[ $args['id'] ]['description'] ) ) {
321
- $description = $this->sections[ $args['id'] ]['description'];
322
- }
323
- }
324
-
325
- $html = Cherry_Toolkit::render_view(
326
- $this->views . 'section.php',
327
- array(
328
- 'description' => $description,
329
- )
330
- );
331
- echo $html;
332
- }
333
-
334
- /**
335
- * Handle setting display of the Settings API.
336
- *
337
- * @param array $setting Fields setting.
338
- * @return void
339
- */
340
- public function display_settings( $setting ) {
341
-
342
- // Check if a registered value exists.
343
- $value = get_option( $setting['section'] );
344
-
345
- if ( isset( $value[ $setting['slug'] ] ) ) {
346
- $setting['field']['value'] = $value[ $setting['slug'] ];
347
- } else {
348
- $setting['field']['value'] = '';
349
- }
350
-
351
- // Set the name attribute.
352
- $setting['field']['name'] = $setting['section'] . '[' . $setting['slug'] . ']';
353
-
354
- if ( isset( $setting['custom_callback'] ) && is_callable( $setting['custom_callback'] ) ) {
355
- echo call_user_func( $setting['custom_callback'], $setting['field'] );
356
-
357
- } else if ( class_exists( 'UI_' . ucfirst( $setting['type'] ) ) ) {
358
- $ui_class = 'UI_' . ucfirst( $setting['type'] );
359
- $ui_element = new $ui_class( $setting['field'] );
360
-
361
- // Display the field.
362
- echo $ui_element->render();
363
- }
364
- }
365
-
366
- /**
367
- * Add styles and scripts
368
- *
369
- * @return void
370
- */
371
- public function assets() {
372
- wp_enqueue_script( 'jquery-form' );
373
-
374
- wp_localize_script( 'cherry-settings-page', 'TMRealEstateMessage', array(
375
- 'success' => 'Successfully',
376
- 'failed' => 'Failed',
377
- ) );
378
-
379
- wp_enqueue_script(
380
- 'cherry-settings-page',
381
- Cherry_Core::base_url( 'assets/js/min/page-settings.min.js', __FILE__ ),
382
- array( 'jquery' ),
383
- '0.2.0',
384
- true
385
- );
386
-
387
- wp_enqueue_style(
388
- 'cherry-settings-page',
389
- Cherry_Core::base_url( 'assets/css/min/page-settings.min.css', __FILE__ ),
390
- array(),
391
- '0.1.0',
392
- 'all'
393
- );
394
- }
395
-
396
- /**
397
- * Returns the instance.
398
- *
399
- * @since 1.0.0
400
- * @return object
401
- */
402
- public static function get_instance( $core, $args ) {
403
- return new self( $core, $args );
404
- }
405
- }
406
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-page-builder/views/page.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /**
3
- * View for options page
4
- *
5
- * @package TM Real Estate
6
- * @author Guriev Eugen & Sergyj Osadchij
7
- * @license GPL-2.0+
8
- */
9
- ?>
10
- <div class="wrap cherry-settings-page">
11
- <h2><?php echo $__data['title'] ?></h2>
12
- <?php if ( ! empty( $__data['page_before'] ) ) : ?>
13
- <div class="description"><?php echo $__data['page_before'] ?></div>
14
- <?php endif; ?>
15
- <?php if ( ! empty( $__data['sections'] ) && is_array( $__data['sections'] ) ) : ?>
16
- <div class="cherry-settings-tabs">
17
- <h2 class="nav-tab-wrapper tabs-section">
18
- <?php foreach ( $__data['sections'] as $section_slug => $section ) : ?>
19
- <a href="#<?php echo $section_slug ?>" class="nav-tab"><?php echo $section['name'] ?></a>
20
- <?php endforeach; ?>
21
- </h2>
22
-
23
- <?php foreach ( $__data['sections'] as $section_slug => $section ) : ?>
24
- <div id="<?php echo $section_slug ?>" class="section">
25
- <form method="POST" action="options.php" id="form-<?php echo $section_slug ?>">
26
- <?php settings_fields( $section_slug ); ?>
27
- <?php do_settings_sections( $section_slug ); ?>
28
-
29
- <?php if ( ! empty( $__data['button_before'] ) ) : ?>
30
- <?php echo $__data['button_before'] ?>
31
- <?php endif; ?>
32
-
33
- <?php submit_button( 'Save ' . $section['name'], 'primary small', null, true, array( 'data-ajax' => true ) ); ?>
34
-
35
- <?php if ( ! empty( $__data['button_after'] ) ) : ?>
36
- <?php echo $__data['button_after'] ?>
37
- <?php endif; ?>
38
- </form>
39
- </div>
40
- <?php endforeach; ?>
41
- </div>
42
- <?php endif; ?>
43
- <?php if ( ! empty( $__data['page_after'] ) ) : ?>
44
- <div class="description"><?php echo $__data['page_after'] ?></div>
45
- <?php endif; ?>
46
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-page-builder/views/section.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
- /**
3
- * View for section of settings
4
- *
5
- * @package TM Real Estate
6
- * @author Guriev Eugen & Sergyj Osadchij
7
- * @license GPL-2.0+
8
- */
9
- ?>
10
- <div class="description"><?php echo $__data['description'] ?></div>
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-plugin-updater/cherry-plugin-updater.php DELETED
@@ -1,143 +0,0 @@
1
- <?php
2
- /**
3
- *
4
- * Module Name: Plugin Updater
5
- * Description: Provides functionality for updating plugins
6
- * Version: 1.1.0
7
- * Author: Cherry Team
8
- * Author URI: http://www.cherryframework.com/
9
- * License: GPLv3
10
- * License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
- *
12
- * @package Cherry_Framework
13
- * @subpackage Modules
14
- * @version 1.1.0
15
- * @author Cherry Team <cherryframework@gmail.com>
16
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
17
- * @link http://www.cherryframework.com/
18
- * @license http://www.gnu.org/licenses/gpl-3.0.html
19
- */
20
-
21
- // If this file is called directly, abort.
22
- if ( ! defined( 'WPINC' ) ) {
23
- die;
24
- }
25
-
26
- if ( ! class_exists( 'Cherry_Plugin_Updater' ) ) {
27
- require_once( '/inc/cherry-base-updater.php' );
28
-
29
- /**
30
- * Define plugin updater class.
31
- *
32
- * @since 1.0.0
33
- */
34
- class Cherry_Plugin_Updater extends Cherry_Base_Updater {
35
- /**
36
- * Updater settings.
37
- *
38
- * @var array
39
- */
40
- protected $settings = array();
41
-
42
- /**
43
- * A reference to an instance of this class.
44
- *
45
- * @since 1.0.0
46
- * @var object
47
- */
48
- private static $instance = null;
49
-
50
- /**
51
- * Init class parameters.
52
- *
53
- * @since 1.0.0
54
- * @param object $core Core of framework.
55
- * @param array $args Argument of base init.
56
- * @return void
57
- */
58
- public function __construct( $core, $args = array() ) {
59
- $this->base_init( $args );
60
-
61
- /**
62
- * Need for test update - set_site_transient( 'update_plugins', null );
63
- */
64
- add_action( 'pre_set_site_transient_update_plugins', array( $this, 'update' ) );
65
- add_filter( 'upgrader_source_selection', array( $this, 'rename_github_folder' ), 11, 3 );
66
- add_action( 'admin_footer', array( $this, 'change_details_url' ) );
67
- }
68
-
69
- /**
70
- * Process update.
71
- *
72
- * @since 1.0.0
73
- * @param object $data Update data.
74
- * @return object
75
- */
76
- public function update( $data ) {
77
- $new_update = $this->check_update();
78
-
79
- if ( $new_update['version'] ) {
80
- $this->settings['plugin'] = $this->settings['slug'] . '/' . $this->settings['slug'] . '.php';
81
-
82
- $update = new stdClass();
83
-
84
- $update->slug = $this->settings['slug'];
85
- $update->plugin = $this->settings['plugin'];
86
- $update->new_version = $new_update['version'];
87
- $update->url = $this->settings['details_url'];
88
- $update->package = $new_update['package'];
89
-
90
- $data->response[ $this->settings['plugin'] ] = $update;
91
-
92
- }
93
-
94
- return $data;
95
- }
96
-
97
- /**
98
- * Change plugin detail URL.
99
- *
100
- * @since 1.0.0
101
- * @return void
102
- */
103
- public function change_details_url() {
104
- global $change_details_plugin_url_script, $pagenow;
105
-
106
- $plugins = get_plugin_updates();
107
-
108
- if ( ! $change_details_plugin_url_script && in_array( $pagenow, array( 'update-core.php', 'plugins.php' ) ) && ! empty( $plugins ) ) {
109
-
110
- $plugins_string = '';
111
-
112
- foreach ( $plugins as $plugin_key => $plugin_value ) {
113
- $plugin_key = strtolower( $plugin_key );
114
- if ( strpos( $plugin_key, 'cherry' ) !== false ) {
115
- $plugins_string .= '"' . $plugin_value ->update ->slug . '" : "' . $plugin_value ->update ->url .'", ';
116
- }
117
- }
118
-
119
- ?>
120
- <script>
121
- ( function( $ ){
122
- var plugin_updates = {<?php echo $plugins_string; ?>};
123
- for ( var plugin in plugin_updates ) {
124
- $('[href*="' + plugin + '"].thickbox').removeClass('thickbox').attr( {'href': plugin_updates[plugin], 'target' : "_blank" } );
125
- };
126
- }( jQuery ) )
127
- </script>
128
- <?php
129
- }
130
-
131
- $change_details_plugin_url_script = true;
132
- }
133
- /**
134
- * Returns the instance.
135
- *
136
- * @since 1.0.0
137
- * @return object
138
- */
139
- public static function get_instance( $core, $args ) {
140
- return new self( $core, $args );
141
- }
142
- }
143
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-plugin-updater/inc/cherry-base-updater.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- /**
3
- * Class for the base update.
4
- *
5
- * @package Cherry_Base_Updater
6
- * @subpackage Base_Update
7
- * @author Cherry Team <support@cherryframework.com>
8
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
9
- * @link http://www.cherryframework.com/
10
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
- */
12
-
13
- // If this file is called directly, abort.
14
- if ( ! defined( 'WPINC' ) ) {
15
- die;
16
- }
17
-
18
- if ( ! class_exists( 'Cherry_Base_Updater' ) ) {
19
-
20
- /**
21
- * Test definitions to allow alpha and beta updates
22
- *
23
- * Disable updates - define('CHERRY_UPDATE', false);
24
- * Enable auto updates - define('CHERRY_ALPHA_UPDATE', true);
25
- * Enable beta updates - define('CHERRY_BETA_UPDATE', true);
26
- */
27
-
28
- /**
29
- * Base updater class.
30
- *
31
- * @since 4.0.0
32
- */
33
- class Cherry_Base_Updater {
34
-
35
- /**
36
- * Default Settings.
37
- *
38
- * @since 4.0.0
39
- * @access protected
40
- * @var array
41
- */
42
- protected $default_settings = array(
43
- 'version' => '',
44
- 'slug' => '',
45
- 'cloud_url' => 'https://cloud.cherryframework.com/cherry-update/',
46
- 'product_name' => 'CherryFramework',
47
- 'repository_name' => '',
48
- );
49
-
50
- /**
51
- * Init class parameters.
52
- *
53
- * @since 4.0.0
54
- * @param array $settings Settings array.
55
- * @return void
56
- */
57
- protected function base_init( $settings = array() ) {
58
- $this->settings = array_merge( $this->default_settings, $settings );
59
- }
60
-
61
- /**
62
- * Check if update are avaliable.
63
- *
64
- * @since 4.0.0
65
- * @return array
66
- */
67
- protected function check_update() {
68
- $args = array(
69
- 'user-agent' => 'WordPress',
70
- 'github_repository' => $this->settings['product_name'] . '/' . $this->settings['repository_name'],
71
- 'current_version' => $this->settings['version'],
72
- 'up_query_limit' => false,
73
- 'get_alpha' => false,
74
- 'get_beta' => false,
75
- );
76
-
77
- if ( defined( 'CHERRY_ALPHA_UPDATE' ) ) {
78
- $args['get_alpha'] = true;
79
- }
80
-
81
- if ( defined( 'CHERRY_BETA_UPDATE' ) ) {
82
- $args['get_beta'] = true;
83
- }
84
-
85
- if ( defined( 'CHERRY_UP_QUERY_LIMIT' ) ) {
86
- $args['up_query_limit'] = true;
87
- }
88
-
89
- $response = $this -> remote_query( $args );
90
-
91
- if ( $response && 'not_update' !== $response ) {
92
- $this->settings['details_url'] = $response->details_url;
93
- return array( 'version' => $response->new_version, 'package' => $response->package );
94
- }
95
-
96
- return array( 'version' => false );
97
- }
98
-
99
- /**
100
- * Remote request to updater API.
101
- *
102
- * @since 4.0.0
103
- * @param array $args Request paprams.
104
- * @return array|bool
105
- */
106
- protected function remote_query( $args ) {
107
- $query = add_query_arg( $args, $this->settings['cloud_url'] );
108
-
109
- $response = wp_remote_get( $query );
110
-
111
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != '200' ) {
112
- return false;
113
- }
114
-
115
- $response = json_decode( $response['body'] );
116
-
117
- return $response;
118
- }
119
-
120
- /**
121
- * Rename github folder on update.
122
- *
123
- * @since 4.0.0
124
- * @param [type] $upgrate_dir Theme folder name.
125
- * @param [type] $remote_dir Remote folder name.
126
- * @param object $skin_upgrader Upgrader object instance.
127
- * @return string
128
- */
129
- public function rename_github_folder( $upgrate_dir, $remote_dir, $skin_upgrader ) {
130
-
131
- $slug = $this->settings['slug'];
132
- $is_theme = isset( $skin_upgrader->skin->theme ) || isset( $skin_upgrader->skin->theme_info ) ? true : false ;
133
- $is_plugin = isset( $skin_upgrader->skin->plugin_info ) ? true : false ;
134
- $domain_plugin = $is_plugin ? $skin_upgrader->skin->plugin_info['TextDomain'] : '' ;
135
- $title_plugin = $is_plugin ? str_replace( ' ', '-', strtolower( $skin_upgrader->skin->plugin_info['Title'] ) ) : '' ;
136
- $name_plugin = $is_plugin ? str_replace( ' ', '-', strtolower( $skin_upgrader->skin->plugin_info['Name'] ) ) : '' ;
137
-
138
- if ( $is_theme && strpos( $upgrate_dir, $slug ) !== false
139
- || $is_plugin && $domain_plugin === $slug
140
- || $is_plugin && $title_plugin === $slug
141
- || $is_plugin && $name_plugin === $slug
142
- ) {
143
- $upgrate_dir_path = pathinfo( $upgrate_dir );
144
- $new_upgrate_dir = trailingslashit( $upgrate_dir_path['dirname'] ) . trailingslashit( $slug );
145
-
146
- rename( $upgrate_dir, $new_upgrate_dir );
147
-
148
- $upgrate_dir = $new_upgrate_dir;
149
-
150
- remove_filter( 'upgrader_source_selection', array( $this, 'rename_github_folder' ), 11, 3 );
151
- }
152
-
153
- return $upgrate_dir;
154
- }
155
- }
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-post-meta/views/meta.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
- /**
3
- * POst meta view
4
- *
5
- * @package Cherry_Framework
6
- */?>
7
- <?php if ( is_array( $__data['elements'] ) && count( $__data['elements'] ) ) : ?>
8
- <table class="form-table">
9
- <tbody>
10
- <?php foreach ( $__data['elements'] as $el ) : ?>
11
- <tr>
12
- <?php if ( array_key_exists( 'name', $el['field'] ) && array_key_exists( 'left_label', $el['field'] ) ) : ?>
13
- <th><label for="<?php echo $el['field']['name']; ?>"><?php echo $el['field']['left_label']; ?></label></th>
14
- <?php endif; ?>
15
- <td><?php echo $el['html']; ?></td>
16
- </tr>
17
- <?php endforeach; ?>
18
- </tbody>
19
- </table>
20
- <?php endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-post-types/cherry-post-types.php DELETED
@@ -1,155 +0,0 @@
1
- <?php
2
- /**
3
- * Create custom post type
4
- * Module Name: Post Types
5
- * Description: Provides functionality for creating custom post types
6
- * Version: 1.1.0
7
- * Author: Cherry Team
8
- * Author URI: http://www.cherryframework.com/
9
- * License: GPLv3
10
- * License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
- *
12
- * @package Cherry_Framework
13
- * @subpackage Modules
14
- * @version 1.1.0
15
- * @author Cherry Team <cherryframework@gmail.com>
16
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
17
- * @link http://www.cherryframework.com/
18
- * @license http://www.gnu.org/licenses/gpl-3.0.html
19
- */
20
-
21
- // If this file is called directly, abort.
22
- if ( ! defined( 'WPINC' ) ) {
23
- die;
24
- }
25
-
26
- if ( ! class_exists( 'Cherry_Post_Types' ) ) {
27
-
28
- /**
29
- * Cherry Post Types.
30
- *
31
- * @since 1.0.0
32
- * @since 1.0.1 Removed `module_directory` property.
33
- */
34
- class Cherry_Post_Types {
35
- /**
36
- * Module version
37
- *
38
- * @var string
39
- */
40
- public $module_version = '1.1.0';
41
-
42
- /**
43
- * Module slug
44
- *
45
- * @var string
46
- */
47
- public $module_slug = 'cherry-post-types';
48
-
49
- /**
50
- * Default post type arguments
51
- *
52
- * @var null
53
- */
54
- private $defaults = null;
55
-
56
- /**
57
- * Created popst types list
58
- *
59
- * @var array
60
- */
61
- public static $created_post_types = array();
62
-
63
- /**
64
- * Cherry_Post_Type class constructor
65
- */
66
- public function __construct( $core, $args = array() ) {
67
- $this->defaults = $args;
68
-
69
- if ( ! class_exists( 'Cherry_Post_Type' ) ) {
70
- require_once( __DIR__ . '/inc/cherry-post-type.php' );
71
- }
72
- }
73
-
74
- /**
75
- * Create new Post Type.
76
- *
77
- * @param [type] $slug The post type slug name.
78
- * @param [type] $plural The post type plural name for display.
79
- * @param [type] $singular The post type singular name for display.
80
- * @param array $args The custom post type arguments.
81
- * @throws Exception Invalid custom post type parameter.
82
- * @return Cherry_Post_Type
83
- */
84
- public function create( $slug, $plural, $singular, $args = array() ) {
85
- $params = array(
86
- 'slug' => $slug,
87
- 'plural' => $plural,
88
- 'singular' => $singular,
89
- );
90
-
91
- foreach ( $params as $name => $param ) {
92
- if ( ! is_string( $param ) ) {
93
- throw new Exception( 'Invalid custom post type parameter "'.$name.'". Accepts string only.' );
94
- }
95
- }
96
-
97
- // Set main properties.
98
- $this->defaults = array_merge(
99
- $this->get_default_arguments( $plural, $singular ),
100
- $this->defaults
101
- );
102
- $args = array_merge( $this->defaults, $args );
103
- // Register post type
104
- self::$created_post_types[ $slug ] = new Cherry_Post_Type( $slug, $args );
105
-
106
- return self::$created_post_types[ $slug ];
107
- }
108
-
109
- /**
110
- * Get the custom post type default arguments.
111
- *
112
- * @param [type] $plural The post type plural display name.
113
- * @param [type] $singular The post type singular display name.
114
- * @return array
115
- */
116
- private function get_default_arguments( $plural, $singular ) {
117
- $labels = array(
118
- 'name' => 'cherry',
119
- 'singular_name' => $singular,
120
- 'add_new' => 'Add New',
121
- 'add_new_item' => 'Add New '. $singular,
122
- 'edit_item' => 'Edit '. $singular,
123
- 'new_item' => 'New ' . $singular,
124
- 'all_items' => 'All ' . $plural,
125
- 'view_item' => 'View ' . $singular,
126
- 'search_items' => 'Search ' . $singular,
127
- 'not_found' => 'No '. $singular .' found',
128
- 'not_found_in_trash' => 'No '. $singular .' found in Trash',
129
- 'parent_item_colon' => '',
130
- 'menu_name' => $plural,
131
- );
132
-
133
- $defaults = array(
134
- 'label' => $plural,
135
- 'labels' => $labels,
136
- 'description' => '',
137
- 'public' => true,
138
- 'menu_position' => 20,
139
- 'has_archive' => true,
140
- );
141
-
142
- return $defaults;
143
- }
144
-
145
- /**
146
- * Returns the instance.
147
- *
148
- * @since 1.0.0
149
- * @return object
150
- */
151
- public static function get_instance( $core, $args ) {
152
- return new self( $core, $args );
153
- }
154
- }
155
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-post-types/inc/cherry-post-type.php DELETED
@@ -1,112 +0,0 @@
1
- <?php
2
- /**
3
- * Custom post type
4
- *
5
- * @package Cherry_Framework
6
- * @subpackage Class
7
- * @author Cherry Team <cherryframework@gmail.com>
8
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
9
- * @link http://www.cherryframework.com/
10
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
- */
12
-
13
- /**
14
- * Cherry_Post_Type class
15
- */
16
- class Cherry_Post_Type {
17
-
18
- /**
19
- * Post type slug
20
- *
21
- * @var null
22
- */
23
- private $slug = null;
24
-
25
- /**
26
- * Post type arguments
27
- *
28
- * @var null
29
- */
30
- private $args = null;
31
-
32
- /**
33
- * The registered custom post type.
34
- *
35
- * @var Object|\WP_Error
36
- */
37
- private $post_type;
38
-
39
- /**
40
- * Font awesome icon name.
41
- *
42
- * @var null
43
- */
44
- private $icon = null;
45
-
46
- /**
47
- * Cherry Post Type Builder class constructor
48
- *
49
- * @param [type] $slug post type slug.
50
- * @param [type] $args post type arguments.
51
- */
52
- public function __construct( $slug, $args ) {
53
-
54
- $this->slug = $slug;
55
- $this->args = $args;
56
-
57
- // Register post type
58
- add_action( 'init', array( &$this, 'register' ) );
59
- }
60
-
61
- /**
62
- * Triggered by the 'init' action event.
63
- * Register a WordPress custom post type.
64
- *
65
- * @return void
66
- */
67
- public function register() {
68
- $this->post_type = register_post_type(
69
- $this->slug,
70
- $this->args
71
- );
72
- }
73
-
74
- /**
75
- * Add font awesome icon to menu
76
- *
77
- * @param [type] $icon font awesome icon code.
78
- * @return boolen true if succes | false if not.
79
- */
80
- public function font_awesome_icon( $icon = '' ) {
81
- if ( '' === $icon ) {
82
- return false;
83
- }
84
-
85
- $this->icon = $icon;
86
-
87
- add_action( 'admin_enqueue_scripts', array( &$this, 'load_font_awesome' ) );
88
-
89
- return true;
90
- }
91
-
92
- /**
93
- * Load font awesome fonts to admin menu.
94
- *
95
- * @return void
96
- */
97
- public function load_font_awesome() {
98
- wp_enqueue_style(
99
- 'font-awesome',
100
- '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'
101
- );
102
-
103
- ?>
104
- <style type='text/css' media='screen'>
105
- #adminmenu .menu-icon-<?php echo $this->slug; ?> div.wp-menu-image:before {
106
- font-family: Fontawesome !important;
107
- content: '\<?php echo $this->icon; ?>';
108
- }
109
- </style>
110
- <?php
111
- }
112
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-taxonomies/cherry-taxonomies.php DELETED
@@ -1,132 +0,0 @@
1
- <?php
2
- /**
3
- * Module Name: Taxanomies
4
- * Description: Provides functionality for creating custom taxanomies
5
- * Version: 1.1.0
6
- * Author: Cherry Team
7
- * Author URI: http://www.cherryframework.com/
8
- * License: GPLv3
9
- * License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
- *
11
- * @package Cherry_Framework
12
- * @subpackage Modules
13
- * @version 1.1.0
14
- * @author Cherry Team <cherryframework@gmail.com>
15
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
16
- * @link http://www.cherryframework.com/
17
- * @license http://www.gnu.org/licenses/gpl-3.0.html
18
- */
19
-
20
- // If this file is called directly, abort.
21
- if ( ! defined( 'WPINC' ) ) {
22
- die;
23
- }
24
-
25
- if ( ! class_exists( 'Cherry_Taxonomies' ) ) {
26
-
27
- /**
28
- * Cherry Taxonomies.
29
- *
30
- * @since 1.0.0
31
- * @since 1.0.1 Removed `module_directory` property.
32
- */
33
- class Cherry_Taxonomies {
34
- /**
35
- * Module version
36
- *
37
- * @var string
38
- */
39
- public $module_version = '1.1.0';
40
-
41
- /**
42
- * Module slug
43
- *
44
- * @var string
45
- */
46
- public $module_slug = 'cherry-taxonomies';
47
-
48
- /**
49
- * Default post type arguments
50
- *
51
- * @var null
52
- */
53
- private $defaults = null;
54
-
55
- /**
56
- * Cherry_Post_Type class constructor
57
- */
58
- public function __construct( $core, $args = array() ) {
59
- $this->defaults = $args;
60
-
61
- if ( ! class_exists( 'Cherry_Taxonomy' ) ) {
62
- require_once( __DIR__ . '/inc/cherry-taxonomy.php' );
63
- }
64
- }
65
-
66
- /**
67
- * Create new Post Type.
68
- *
69
- * @param [type] $single name.
70
- * @param [type] $post_type_slug post types slug.
71
- * @param [type] $plural name.
72
- * @return Cherry_Post_Type
73
- */
74
- public function create( $single, $post_type_slug = 'post', $plural = '' ) {
75
- $tax = new Cherry_Taxonomy( $single, $post_type_slug, $plural );
76
-
77
- $this->defaults = array_merge(
78
- $this->defaults,
79
- $this->get_default_arguments(
80
- $tax->get_single(),
81
- $tax->get_plural(),
82
- $tax->get_post_type_slug()
83
- )
84
- );
85
- $tax->set_arguments( $this->defaults );
86
-
87
- return $tax;
88
- }
89
-
90
- /**
91
- * Get the taxonomy default arguments.
92
- *
93
- * @param [type] $plural The post type plural display name.
94
- * @param [type] $singular The post type singular display name.
95
- * @return array
96
- */
97
- public function get_default_arguments( $plural, $singular, $post_type_slug ) {
98
- $labels = array(
99
- 'name' => $plural,
100
- 'singular_name' => $singular,
101
- 'search_items' => 'Search ' . $plural,
102
- 'all_items' => 'All ' . $plural,
103
- 'parent_item' => 'Parent ' . $singular,
104
- 'parent_item_colon' => 'Parent ' . $singular . ' :',
105
- 'edit_item' => 'Edit ' . $singular,
106
- 'update_item' => 'Update ' . $singular,
107
- 'add_new_item' => 'Add New ' . $singular,
108
- 'new_item_name' => 'New ' . $singular . ' Name',
109
- 'menu_name' => $plural,
110
- );
111
-
112
- return array(
113
- 'hierarchical' => true,
114
- 'labels' => $labels,
115
- 'show_ui' => true,
116
- 'show_admin_column' => true,
117
- 'query_var' => true,
118
- 'rewrite' => array( 'slug' => $post_type_slug ),
119
- );
120
- }
121
-
122
- /**
123
- * Returns the instance.
124
- *
125
- * @since 1.0.0
126
- * @return object
127
- */
128
- public static function get_instance( $core, $args ) {
129
- return new self( $core, $args );
130
- }
131
- }
132
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-taxonomies/inc/cherry-taxonomy.php DELETED
@@ -1,210 +0,0 @@
1
- <?php
2
- /**
3
- * Custom taxonomy
4
- *
5
- * @package Cherry_Framework
6
- * @subpackage Class
7
- * @author Cherry Team <cherryframework@gmail.com>
8
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
9
- * @link http://www.cherryframework.com/
10
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
- */
12
-
13
- /**
14
- * Cherry_Taxonomy class
15
- */
16
- class Cherry_Taxonomy {
17
-
18
- /**
19
- * Single taxonomy name.
20
- *
21
- * @var null
22
- */
23
- private $single = null;
24
-
25
- /**
26
- * Taxonomy slug
27
- *
28
- * @var null
29
- */
30
- private $slug = null;
31
-
32
- /**
33
- * Post type slug
34
- *
35
- * @var null
36
- */
37
- private $post_type_slug = null;
38
-
39
- /**
40
- * Plural taxonomy name.
41
- *
42
- * @var null
43
- */
44
- private $plural = null;
45
-
46
- /**
47
- * Taxonomy arguments
48
- *
49
- * @var array
50
- */
51
- private $arguments = array();
52
-
53
- /**
54
- * Cherry taxonomy
55
- *
56
- * @param [type] $single name.
57
- * @param [type] $post_type_slug post type slug.
58
- * @param [type] $plural name.
59
- * @param array $args arguments.
60
- */
61
- public function __construct( $single, $post_type_slug = 'post', $plural = '', $args = array() ) {
62
- $this->set_single( $single );
63
- $this->set_plural( $plural );
64
- $this->set_post_type_slug( $post_type_slug );
65
- $this->set_slug();
66
- $this->set_arguments( $args );
67
- }
68
-
69
- /**
70
- * Init actions
71
- *
72
- * @return Cherry_Taxonomy object
73
- */
74
- public function init() {
75
- // Register Taxonomy
76
- add_action( 'init', array( &$this, 'register' ), 0 );
77
- return $this;
78
- }
79
-
80
- /**
81
- * Set single property
82
- *
83
- * @param [type] $single property.
84
- * @return Cherry_Taxonomy object
85
- */
86
- public function set_single( $single ) {
87
- if ( '' !== $single ) {
88
- $this->single = $single;
89
- }
90
- return $this;
91
- }
92
-
93
- /**
94
- * Get single property
95
- *
96
- * @return string property.
97
- */
98
- public function get_single() {
99
- return $this->single;
100
- }
101
-
102
- /**
103
- * Set plural property
104
- *
105
- * @param [type] $plural property.
106
- * @return Cherry_Taxonomy object
107
- */
108
- public function set_plural( $plural = '' ) {
109
- if ( '' != $plural ) {
110
- $this->plural = $plural;
111
- } else {
112
- $this->plural = $this->get_single() . 's';
113
- }
114
- return $this;
115
- }
116
-
117
- /**
118
- * Get plural property
119
- *
120
- * @return string plural property.
121
- */
122
- public function get_plural() {
123
- return $this->plural;
124
- }
125
-
126
- /**
127
- * Set slug
128
- *
129
- * @param type string $slug taxonomy slug.
130
- * @return Cherry_Taxonomy object
131
- */
132
- public function set_slug( $slug = '' ) {
133
- if ( '' != $slug ) {
134
- $this->slug = $slug;
135
- } else {
136
- $slug = $this->get_single();
137
- $slug = strtolower( $slug );
138
- $slug = str_replace( ' ', '_', $slug );
139
- $this->slug = $slug;
140
- }
141
- return $this;
142
- }
143
-
144
- /**
145
- * Get slug taxonomy
146
- *
147
- * @return string taxonomy slug.
148
- */
149
- public function get_slug() {
150
- return $this->slug;
151
- }
152
-
153
- /**
154
- * Set post type slug
155
- *
156
- * @param type string $slug post types slug.
157
- * @return Cherry_Taxonomy object
158
- */
159
- public function set_post_type_slug( $slug = '' ) {
160
- if ( '' != $slug ) {
161
- $this->post_type_slug = $slug;
162
- } else {
163
- $this->post_type_slug = 'post';
164
- }
165
- return $this;
166
- }
167
-
168
- /**
169
- * Get post type slug
170
- *
171
- * @return string post type slug.
172
- */
173
- public function get_post_type_slug() {
174
- return $this->post_type_slug;
175
- }
176
-
177
- /**
178
- * Set arguments
179
- *
180
- * @param array $args arguments.
181
- */
182
- public function set_arguments( $args = array() ) {
183
- $this->arguments = array_merge( $this->arguments, (array) $args );
184
- return $this;
185
- }
186
-
187
- /**
188
- * Get arguments
189
- *
190
- * @return array taxonomy arguments.
191
- */
192
- public function get_arguments() {
193
- return (array) $this->arguments;
194
- }
195
-
196
- /**
197
- * Triggered by the 'init' action event.
198
- * Register a WordPress custom taxonomy.
199
- *
200
- * @return Cherry_Taxonomy object
201
- */
202
- public function register() {
203
- register_taxonomy(
204
- $this->slug,
205
- $this->post_type_slug,
206
- $this->arguments
207
- );
208
- return $this;
209
- }
210
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-template-manager/cherry-template-manager.php DELETED
@@ -1,112 +0,0 @@
1
- <?php
2
- /**
3
- * Module Name: Template Manager
4
- * Description: Module load and parse tmpl files.
5
- * Version: 1.0.2
6
- * Author: Cherry Team
7
- * Author URI: http://www.cherryframework.com/
8
- * License: GPLv3
9
- * License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
- *
11
- * @package Template_Manager
12
- * @subpackage Modules
13
- * @version 1.0.2
14
- * @author Cherry Team <cherryframework@gmail.com>
15
- * @copyright Copyright (c) 2012 - 2017, Cherry Team
16
- * @link http://www.cherryframework.com/
17
- * @license http://www.gnu.org/licenses/gpl-3.0.html
18
- */
19
-
20
- // If this file is called directly, abort.
21
- if ( ! defined( 'WPINC' ) ) {
22
- die;
23
- }
24
-
25
- if ( ! class_exists( 'Cherry_Template_Manager' ) ) {
26
-
27
- /**
28
- * Class Cherry Template Manager.
29
- *
30
- * @since 1.0.0
31
- */
32
- class Cherry_Template_Manager {
33
-
34
- /**
35
- * Module arguments.
36
- *
37
- * @since 1.0.0
38
- * @access private
39
- * @var array
40
- */
41
- private $args = array();
42
-
43
- /**
44
- * Core instance
45
- *
46
- * @var object
47
- */
48
- public $core = null;
49
-
50
- /**
51
- * It contains a class Cherry_Template_Parser.
52
- *
53
- * @since 1.0.0
54
- * @access public
55
- * @var object
56
- */
57
- public $parser = null;
58
-
59
- /**
60
- * It contains a class Cherry_Template_Loader.
61
- *
62
- * @since 1.0.0
63
- * @access public
64
- * @var object
65
- */
66
- public $loader = null;
67
-
68
- /**
69
- * Cherry_Template_Manager constructor.
70
- *
71
- * @since 1.0.0
72
- * @access public
73
- * @return void
74
- */
75
- public function __construct( $core = null, $args = array() ) {
76
- $this->core = $core;
77
-
78
- $this->include_class();
79
-
80
- $this->args = wp_parse_args(
81
- $args,
82
- $this->args
83
- );
84
-
85
- $this->set_class();
86
- }
87
-
88
- /**
89
- * Include abstract widget class
90
- *
91
- * @since 1.0.0
92
- * @access public
93
- * @return void
94
- */
95
- public function include_class() {
96
- require_once( dirname( __FILE__ ) . '/inc/cherry-template-loader.php' );
97
- require_once( dirname( __FILE__ ) . '/inc/cherry-template-parser.php' );
98
- }
99
-
100
- /**
101
- * Function set the child classes.
102
- *
103
- * @since 1.0.0
104
- * @access public
105
- * @return void
106
- */
107
- public function set_class() {
108
- $this->loader = new Cherry_Template_Loader( $this->args, $this );
109
- $this->parser = new Cherry_Template_Parser( $this->args, $this );
110
- }
111
- }
112
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-template-manager/inc/cherry-template-loader.php DELETED
@@ -1,193 +0,0 @@
1
- <?php
2
- /**
3
- * Class for load templates.
4
- *
5
- * @package Template_Manager
6
- * @author Cherry Team <cherryframework@gmail.com>
7
- * @copyright Copyright (c) 2012 - 2017, Cherry Team
8
- * @link http://www.cherryframework.com/
9
- * @license http://www.gnu.org/licenses/gpl-3.0.html
10
- */
11
-
12
- // If this file is called directly, abort.
13
- if ( ! defined( 'WPINC' ) ) {
14
- die;
15
- }
16
-
17
- if ( ! class_exists( 'Cherry_Template_Loader' ) ) {
18
-
19
- /**
20
- * Class Cherry Template Loader.
21
- *
22
- * @since 1.0.0
23
- */
24
- class Cherry_Template_Loader {
25
-
26
- /**
27
- * A reference to an instance of this Cherry_Template_Manager class.
28
- *
29
- * @since 1.0.0
30
- * @access private
31
- * @var object
32
- */
33
- private $cherry_template_manager_class = null;
34
-
35
- /**
36
- * Module arguments.
37
- *
38
- * @since 1.0.0
39
- * @access private
40
- * @var array
41
- */
42
- private $args = array(
43
- 'template_dir' => 'templates/%1$s/%2$s.tmpl',
44
- 'slug' => null,
45
- 'upload_dir' => null,
46
- );
47
-
48
- /**
49
- * Cherry_Template_Loader constructor.
50
- *
51
- * @since 1.0.0
52
- * @access public
53
- * @return void
54
- */
55
- public function __construct( $args = array(), $main_class = null ) {
56
-
57
- $this->args = wp_parse_args(
58
- $args,
59
- $this->args
60
- );
61
-
62
- $this->cherry_template_manager_class = $main_class;
63
-
64
- $this->set_default_variable();
65
- $this->includes_file_system();
66
-
67
- }
68
-
69
- /**
70
- * Set the default variables.
71
- *
72
- * @since 1.0.0
73
- * @access private
74
- * @return void
75
- */
76
- private function set_default_variable() {
77
- if ( ! $this->args['slug'] ) {
78
- $this->args['slug'] = $this->get_slug();
79
- }
80
-
81
- if ( ! $this->args['upload_dir'] ) {
82
- $get_upload_dir = wp_upload_dir();
83
- $this->args['upload_dir'] = trailingslashit( $get_upload_dir['basedir'] );
84
- }
85
- }
86
-
87
- /**
88
- * Function Include file with class WP_Filesystem.
89
- *
90
- * @since 1.0.0
91
- * @access private
92
- * @return void
93
- */
94
- private function includes_file_system() {
95
- if ( ! function_exists( 'WP_Filesystem' ) ) {
96
- include_once( ABSPATH . '/wp-admin/includes/file.php' );
97
- }
98
-
99
- WP_Filesystem();
100
- }
101
-
102
- /**
103
- * Return product slug.
104
- *
105
- * @since 1.0.0
106
- * @access private
107
- * @return string
108
- */
109
- private function get_slug() {
110
- $file_dir = wp_normalize_path( dirname( $this->cherry_template_manager_class->core->settings['extra_base_dir'] ) );
111
- $product_dir = $this->get_project_root();
112
-
113
- $slug = str_replace( $product_dir, '', $file_dir );
114
- preg_match( '/^[a-zA-Z-]*/' , $slug, $slug );
115
-
116
- return $slug[0];
117
- }
118
-
119
- /**
120
- * Function return the project root dir, themes or plugins.
121
- *
122
- * @since 1.0.0
123
- * @access private
124
- * @return string
125
- */
126
- private function get_project_root() {
127
- $themes_dir = wp_normalize_path( get_theme_root() );
128
- $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
129
- $file_dir = wp_normalize_path( dirname( $this->cherry_template_manager_class->core->settings['extra_base_dir'] ) );
130
- $project_root = ( false === strpos( $file_dir, $themes_dir ) ) ? $plugin_dir : $themes_dir;
131
-
132
- return trailingslashit( $project_root );
133
- }
134
-
135
- /**
136
- * Retrieve a *.tmpl file content.
137
- *
138
- * @since 1.0.0
139
- * @param string $name File name.
140
- * @access private
141
- * @return string|bool
142
- */
143
- public function get_template_by_name( $name ) {
144
- $file = '';
145
- $template_dir = sprintf( $this->args['template_dir'], $this->args['slug'], $name );
146
- $in_uploads = $this->args['upload_dir'] . $template_dir ;
147
- $in_project = trailingslashit( $this->get_project_root() . $this->args['slug'] ) . $template_dir;
148
-
149
- if ( file_exists( $in_uploads ) ) {
150
- $file = $in_uploads;
151
- } elseif ( $theme_template = locate_template( $template_dir ) ) {
152
- $file = $theme_template;
153
- } else {
154
- $file = $in_project;
155
- }
156
-
157
- if ( ! empty( $file ) ) {
158
- return $this->get_contents( $file );
159
- } else {
160
- return false;
161
- }
162
- }
163
-
164
- /**
165
- * Read template (static).
166
- *
167
- * @since 1.0.0
168
- * @since 1.0.1 - Use Cherry_Toolkit::get_file instead of WP Filesystem.
169
- * @param string $file Correct file path.
170
- * @access public
171
- * @return string|bool
172
- */
173
- public function get_contents( $file ) {
174
- return Cherry_Toolkit::get_file( $file );
175
- }
176
-
177
- /**
178
- * Returns argument.
179
- *
180
- * @since 1.0.0
181
- * @param string $argument_name Argument name.
182
- * @access public
183
- * @return object
184
- */
185
- public function get_argument( $argument_name ) {
186
- if ( isset( $this->args[ $argument_name ] ) ) {
187
- return $this->args[ $argument_name ];
188
- } else {
189
- return;
190
- }
191
- }
192
- }
193
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-template-manager/inc/cherry-template-parser.php DELETED
@@ -1,196 +0,0 @@
1
- <?php
2
- /**
3
- * Class for parse templates.
4
- *
5
- * @package Template_Manager
6
- * @author Cherry Team <cherryframework@gmail.com>
7
- * @copyright Copyright (c) 2012 - 2017, Cherry Team
8
- * @link http://www.cherryframework.com/
9
- * @license http://www.gnu.org/licenses/gpl-3.0.html
10
- */
11
-
12
- // If this file is called directly, abort.
13
- if ( ! defined( 'WPINC' ) ) {
14
- die;
15
- }
16
-
17
- if ( ! class_exists( 'Cherry_Template_Parser' ) ) {
18
-
19
- /**
20
- * Class Cherry Template Parser.
21
- *
22
- * @since 1.0.0
23
- */
24
- class Cherry_Template_Parser {
25
- /**
26
- * A reference to an instance of this Cherry_Template_Manager class.
27
- *
28
- * @since 1.0.0
29
- * @access private
30
- * @var object
31
- */
32
- private $cherry_template_manager_class = null;
33
-
34
- /**
35
- * Module arguments.
36
- *
37
- * @since 1.0.0
38
- * @access private
39
- * @var array
40
- */
41
- private $args = array(
42
- 'macros_callback' => '/%%.+?%%/',
43
- 'macros_variable' => '/\$\$.+?\$\$/',
44
- );
45
-
46
- /**
47
- * Keeps the user callbacks class.
48
- *
49
- * @since 1.0.0
50
- * @access private
51
- * @var object
52
- */
53
- private static $callbacks_class = null;
54
-
55
- /**
56
- * Cherry_Template_Parser constructor.
57
- *
58
- * @since 1.0.0
59
- * @access public
60
- * @return void
61
- */
62
- public function __construct( $args = array(), $main_class = null ) {
63
- $this->args = wp_parse_args(
64
- $args,
65
- $this->args
66
- );
67
-
68
- $this->cherry_template_manager_class = $main_class;
69
- }
70
-
71
- /**
72
- * Function parsed template.
73
- *
74
- * @since 1.0.0
75
- * @param string $template_name Template Name.
76
- * @param string|stdClass $class An instance or class name.
77
- * @param string $macros_callback The regular expression for the callback.
78
- * @param string $macros_variable The regular expression for the variable.
79
- * @access public
80
- * @return string|bool
81
- */
82
- public function parsed_template( $template_name = false, $class = false, $macros_callback = false, $macros_variable = false ) {
83
- if ( $template_name && $class ) {
84
-
85
- if ( ! $macros_callback ) {
86
- $macros_callback = $this->args['macros_callback'];
87
- }
88
-
89
- if ( ! $macros_variable ) {
90
- $macros_variable = $this->args['macros_variable'];
91
- }
92
-
93
- $search_form_template = $this->cherry_template_manager_class->loader->get_template_by_name( $template_name );
94
-
95
- if ( ! $search_form_template ) {
96
- return false;
97
- }
98
-
99
- if ( 'string' === gettype( $class ) && class_exists( $class ) ) {
100
- $class = new $class();
101
- }
102
-
103
- if ( $class !== self::$callbacks_class ) {
104
- self::$callbacks_class = $class;
105
- }
106
-
107
- $ouput = preg_replace_callback( $macros_callback, array( $this, 'replace_callback' ), $search_form_template );
108
- $ouput = preg_replace_callback( $macros_variable, array( $this, 'replace_variable' ), $ouput );
109
-
110
- return $ouput;
111
- } else {
112
- return false;
113
- }
114
-
115
- }
116
-
117
- /**
118
- * Callback to replace macros with data.
119
- *
120
- * @since 1.0.0
121
- * @param array $matches Founded macros.
122
- * @access private
123
- * @return string
124
- */
125
- private function replace_callback( $matches, $slug = '' ) {
126
- if ( ! is_array( $matches ) || empty( $matches ) ) {
127
- return;
128
- }
129
-
130
- $slug = $this->cherry_template_manager_class->loader->get_argument( 'slug' );
131
- $item = trim( $matches[0], '%%' );
132
- $arr = explode( ' ', $item, 2 );
133
- $macros = strtolower( $arr[0] );
134
- $attr = isset( $arr[1] ) ? shortcode_parse_atts( $arr[1] ) : array();
135
- $callback = apply_filters( $slug . '_set_callback_' . $macros, array( self::$callbacks_class, 'get_' . $macros ) );
136
-
137
- if ( ! is_callable( $callback ) ) {
138
- return;
139
- }
140
-
141
- if ( ! empty( $attr ) ) {
142
- // Call a WordPress function.
143
- return call_user_func( $callback, $attr );
144
- }
145
-
146
- return call_user_func( $callback );
147
- }
148
-
149
- /**
150
- * Callback to replace macros with data.
151
- *
152
- * @since 1.0.0
153
- * @param array $matches Founded macros.
154
- * @access private
155
- * @return string
156
- */
157
- private function replace_variable( $matches, $slug = '' ) {
158
-
159
- if ( ! is_array( $matches ) || empty( $matches ) ) {
160
- return;
161
- }
162
-
163
- $slug = $this->cherry_template_manager_class->loader->get_argument( 'slug' );
164
- $item = trim( $matches[0], '$$' );
165
- $arr = explode( ' ', $item, 2 );
166
- $macros = strtolower( $arr[0] );
167
- $variable = apply_filters( $slug . '_set_variable_' . $macros, null );
168
-
169
- if ( null === $variable ) {
170
- if ( isset( self::$callbacks_class->variable ) && array_key_exists( $macros, self::$callbacks_class->variable ) ) {
171
- $variable = self::$callbacks_class->variable[ $macros ];
172
- } else {
173
- return;
174
- }
175
- }
176
-
177
- return $variable;
178
- }
179
-
180
- /**
181
- * Returns argument.
182
- *
183
- * @since 1.0.0
184
- * @param string $argument_name Argument name.
185
- * @access public
186
- * @return object
187
- */
188
- public function get_argument( $argument_name ) {
189
- if ( isset( $this->args[ $argument_name ] ) ) {
190
- return $this->args[ $argument_name ];
191
- } else {
192
- return;
193
- }
194
- }
195
- }
196
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-theme-updater/cherry-theme-updater.php DELETED
@@ -1,141 +0,0 @@
1
- <?php
2
- /**
3
- *
4
- * Module Name: Theme Updater
5
- * Description: Provides functionality for updating themes
6
- * Version: 1.1.0
7
- * Author: Cherry Team
8
- * Author URI: http://www.cherryframework.com/
9
- * License: GPLv3
10
- * License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
- *
12
- * @package Cherry_Framework
13
- * @subpackage Modules
14
- * @version 1.1.0
15
- * @author Cherry Team <cherryframework@gmail.com>
16
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
17
- * @link http://www.cherryframework.com/
18
- * @license http://www.gnu.org/licenses/gpl-3.0.html
19
- */
20
-
21
- // If this file is called directly, abort.
22
- if ( ! defined( 'WPINC' ) ) {
23
- die;
24
- }
25
-
26
- if ( ! class_exists( 'Cherry_Theme_Updater' ) ) {
27
- require_once( '/inc/cherry-base-updater.php' );
28
-
29
- /**
30
- * Define theme updater class.
31
- *
32
- * @since 1.0.0
33
- */
34
- class Cherry_Theme_Updater extends Cherry_Base_Updater {
35
- /**
36
- * Updater settings.
37
- *
38
- * @var array
39
- */
40
- protected $settings = array();
41
-
42
- /**
43
- * A reference to an instance of this class.
44
- *
45
- * @since 1.0.0
46
- * @var object
47
- */
48
- private static $instance = null;
49
-
50
- /**
51
- * Init class parameters.
52
- *
53
- * @since 1.0.0
54
- * @param object $core core.
55
- * @param array $args Input attributes array.
56
- * @return void
57
- */
58
- public function __construct( $core, $args = array() ) {
59
- /**
60
- * Set default settings
61
- */
62
- $theme_headers = wp_get_theme();
63
-
64
- $this->default_settings['slug'] = $theme_headers->get( 'Name' );
65
- $this->default_settings['repository_name'] = $theme_headers->get( 'Name' );
66
- $this->default_settings['version'] = $theme_headers->get( 'Version' );
67
-
68
- $this->base_init( $args );
69
-
70
- /**
71
- * Need for test update - set_site_transient( 'pre_set_site_transient_', null );
72
- */
73
- add_action( 'pre_set_site_transient_update_themes', array( $this, 'update' ), 1, 1 );
74
- add_filter( 'upgrader_source_selection', array( $this, 'rename_github_folder' ), 11, 3 );
75
- add_filter( 'wp_prepare_themes_for_js', array( $this, 'change_details_url' ) );
76
- }
77
-
78
- /**
79
- * Process update.
80
- *
81
- * @since 1.0.0
82
- * @param object $data Update data.
83
- * @return object
84
- */
85
- public function update( $data ) {
86
- $new_update = $this->check_update();
87
-
88
- if ( $new_update['version'] ) {
89
-
90
- $update = array(
91
- 'theme' => $this->settings['slug'],
92
- 'new_version' => $new_update['version'],
93
- 'url' => $this->settings['details_url'],
94
- 'package' => $new_update['package'],
95
- );
96
-
97
- $data->response[ $this->settings['slug'] ] = $update;
98
- }
99
- return $data;
100
- }
101
-
102
- /**
103
- * Change theme detail URL.
104
- *
105
- * @since 1.0.0
106
- * @param array $prepared_themes array with update parametr.
107
- *
108
- * @return array
109
- */
110
- public function change_details_url( $prepared_themes ) {
111
-
112
- if ( ! empty( $prepared_themes ) ) {
113
-
114
- foreach ( $prepared_themes as $theme_key => $theme_value ) {
115
-
116
- if ( 'cherryframework4' === $theme_key || 'Cherry Framework' === $theme_value['parent'] ) {
117
-
118
- if ( $theme_value['hasUpdate'] ) {
119
-
120
- $prepared_themes[ $theme_key ]['update'] = str_replace( 'class="thickbox"', 'target ="_blank"', $theme_value['update'] );
121
- }
122
-
123
- remove_filter( 'wp_prepare_themes_for_js', array( $this, 'change_details_url' ) );
124
- }
125
- }
126
- }
127
-
128
- return $prepared_themes;
129
- }
130
-
131
- /**
132
- * Returns the instance.
133
- *
134
- * @since 1.0.0
135
- * @return object
136
- */
137
- public static function get_instance( $core, $args ) {
138
- return new self( $core, $args );
139
- }
140
- }
141
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-theme-updater/inc/cherry-base-updater.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- /**
3
- * Class for the base update.
4
- *
5
- * @package Cherry_Base_Updater
6
- * @subpackage Base_Update
7
- * @author Cherry Team <support@cherryframework.com>
8
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
9
- * @link http://www.cherryframework.com/
10
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
- */
12
-
13
- // If this file is called directly, abort.
14
- if ( ! defined( 'WPINC' ) ) {
15
- die;
16
- }
17
-
18
- if ( ! class_exists( 'Cherry_Base_Updater' ) ) {
19
-
20
- /**
21
- * Test definitions to allow alpha and beta updates
22
- *
23
- * Disable updates - define('CHERRY_UPDATE', false);
24
- * Enable auto updates - define('CHERRY_ALPHA_UPDATE', true);
25
- * Enable beta updates - define('CHERRY_BETA_UPDATE', true);
26
- */
27
-
28
- /**
29
- * Base updater class.
30
- *
31
- * @since 4.0.0
32
- */
33
- class Cherry_Base_Updater {
34
-
35
- /**
36
- * Default Settings.
37
- *
38
- * @since 4.0.0
39
- * @access protected
40
- * @var array
41
- */
42
- protected $default_settings = array(
43
- 'version' => '',
44
- 'slug' => '',
45
- 'cloud_url' => 'https://cloud.cherryframework.com/cherry-update/',
46
- 'product_name' => 'CherryFramework',
47
- 'repository_name' => '',
48
- );
49
-
50
- /**
51
- * Init class parameters.
52
- *
53
- * @since 4.0.0
54
- * @param array $settings Input attributes array.
55
- * @return void
56
- */
57
- protected function base_init( $settings = array() ) {
58
- $this->settings = array_merge( $this->default_settings, $settings );
59
- }
60
-
61
- /**
62
- * Check if update are avaliable.
63
- *
64
- * @since 4.0.0
65
- * @return array
66
- */
67
- protected function check_update() {
68
- $args = array(
69
- 'user-agent' => 'WordPress',
70
- 'github_repository' => $this->settings['product_name'] . '/' . $this->settings['repository_name'],
71
- 'current_version' => $this->settings['version'],
72
- 'up_query_limit' => false,
73
- 'get_alpha' => false,
74
- 'get_beta' => false,
75
- );
76
-
77
- if ( defined( 'CHERRY_ALPHA_UPDATE' ) ) {
78
- $args['get_alpha'] = true;
79
- }
80
-
81
- if ( defined( 'CHERRY_BETA_UPDATE' ) ) {
82
- $args['get_beta'] = true;
83
- }
84
-
85
- if ( defined( 'CHERRY_UP_QUERY_LIMIT' ) ) {
86
- $args['up_query_limit'] = true;
87
- }
88
-
89
- $response = $this -> remote_query( $args );
90
-
91
- if ( $response && 'not_update' !== $response ) {
92
- $this->settings['details_url'] = $response->details_url;
93
- return array( 'version' => $response->new_version, 'package' => $response->package );
94
- }
95
-
96
- return array( 'version' => false );
97
- }
98
-
99
- /**
100
- * Remote request to updater API.
101
- *
102
- * @since 4.0.0
103
- * @param array $args Request paprams.
104
- * @return array|bool
105
- */
106
- protected function remote_query( $args ) {
107
- $query = add_query_arg( $args, $this->settings['cloud_url'] );
108
-
109
- $response = wp_remote_get( $query );
110
-
111
- if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) != '200' ) {
112
- return false;
113
- }
114
-
115
- $response = json_decode( $response['body'] );
116
-
117
- return $response;
118
- }
119
-
120
- /**
121
- * Rename github folder on update.
122
- *
123
- * @since 4.0.0
124
- * @param [type] $upgrate_dir Theme folder name.
125
- * @param [type] $remote_dir Remote folder name.
126
- * @param object $skin_upgrader Upgrader object instance.
127
- * @return string
128
- */
129
- public function rename_github_folder( $upgrate_dir, $remote_dir, $skin_upgrader ) {
130
-
131
- $slug = $this->settings['slug'];
132
- $is_theme = isset( $skin_upgrader->skin->theme ) || isset( $skin_upgrader->skin->theme_info ) ? true : false ;
133
- $is_plugin = isset( $skin_upgrader->skin->plugin_info ) ? true : false ;
134
- $domain_plugin = $is_plugin ? $skin_upgrader->skin->plugin_info['TextDomain'] : '' ;
135
- $title_plugin = $is_plugin ? str_replace( ' ', '-', strtolower( $skin_upgrader->skin->plugin_info['Title'] ) ) : '' ;
136
- $name_plugin = $is_plugin ? str_replace( ' ', '-', strtolower( $skin_upgrader->skin->plugin_info['Name'] ) ) : '' ;
137
-
138
- if ( $is_theme && strpos( $upgrate_dir, $slug ) !== false
139
- || $is_plugin && $domain_plugin === $slug
140
- || $is_plugin && $title_plugin === $slug
141
- || $is_plugin && $name_plugin === $slug
142
- ) {
143
- $upgrate_dir_path = pathinfo( $upgrate_dir );
144
- $new_upgrate_dir = trailingslashit( $upgrate_dir_path['dirname'] ) . trailingslashit( $slug );
145
-
146
- rename( $upgrate_dir, $new_upgrate_dir );
147
-
148
- $upgrate_dir = $new_upgrate_dir;
149
-
150
- remove_filter( 'upgrader_source_selection', array( $this, 'rename_github_folder' ), 11, 3 );
151
- }
152
-
153
- return $upgrate_dir;
154
- }
155
- }
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php CHANGED
@@ -251,7 +251,7 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
251
 
252
  ob_start();
253
 
254
- $path = str_replace( WP_CONTENT_URL, WP_CONTENT_DIR, $this->settings['icon_data']['icon_css'] );
255
  if ( file_exists( $path ) ) {
256
  include $path;
257
  }
251
 
252
  ob_start();
253
 
254
+ $path = str_replace( content_url(), WP_CONTENT_DIR, $this->settings['icon_data']['icon_css'] );
255
  if ( file_exists( $path ) ) {
256
  include $path;
257
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-kit/_mixins.scss DELETED
@@ -1,182 +0,0 @@
1
- @mixin button_base() {
2
- display: inline-block;
3
- text-decoration: none;
4
- font-size: 12px;
5
- line-height: 20px;
6
- font-weight: bold;
7
- padding: 15px 20px;
8
- color: #fff;
9
- text-transform: uppercase;
10
- border-radius: $border_radius_small;
11
- transition: all 200ms linear;
12
- box-shadow: $box_shadow;
13
- &:hover {
14
- color: #fff;
15
- box-shadow: none;
16
- }
17
- &:focus,
18
- &:active {
19
- outline: none;
20
- box-shadow: none;
21
- color: #fff;
22
- }
23
- }
24
-
25
- @mixin button_normal() {
26
- background: $dark_color_2;
27
- &:hover {
28
- background: $dark_color_2_h;
29
- }
30
- }
31
-
32
- @mixin button_primary() {
33
- background: $blue_color;
34
- &:hover {
35
- background: $blue_color_h;
36
- }
37
- }
38
-
39
- @mixin button_success() {
40
- background: $green_color;
41
- &:hover {
42
- background: $green_color_h;
43
- }
44
- }
45
-
46
- @mixin button_danger() {
47
- background: $red_color;
48
- &:hover {
49
- background: $red_color_h;
50
- }
51
- }
52
-
53
- @mixin button_warning() {
54
- background: $orange_color;
55
- &:hover {
56
- background: $orange_color_h;
57
- }
58
- }
59
-
60
- @mixin input() {
61
- font-size: 14px;
62
- line-height: 20px;
63
- color: $dark_color_1;
64
- background-color: $grey_color_3;
65
- border-radius: $border_radius_extra_small;
66
- padding: 10px 20px;
67
- height: 50px;
68
- border: 1px solid $grey_color_3;
69
- box-shadow: none;
70
- &:focus{
71
- border-color: rgba(72,197,105,.6);
72
- box-shadow: 0 0 2px rgba(72,197,105,.6);
73
- }
74
- }
75
-
76
- @mixin button_icon( $icon ) {
77
- content: $icon;
78
- display: inline-block;
79
- font-family: dashicons;
80
- font-size: 16px;
81
- font-style: normal;
82
- font-weight: 400;
83
- height: 18px;
84
- line-height: 18px;
85
- text-align: center;
86
- text-decoration: inherit;
87
- transition: all 200ms linear;
88
- vertical-align: middle;
89
- }
90
-
91
- @mixin button_icon_before( $icon ) {
92
- &:before {
93
- @include button_icon( $icon );
94
- padding: 0 5px 0 0;
95
- }
96
- }
97
-
98
- @mixin button_icon_after( $icon ) {
99
- &:after {
100
- @include button_icon( $icon );
101
- padding: 0 0 0 5px;
102
- }
103
- }
104
-
105
- @mixin button_icon_middle( $icon ) {
106
- &:before {
107
- @include button_icon( $icon );
108
- margin: 0 -5px;
109
- }
110
- }
111
-
112
- @mixin link() {
113
- display: inline-block;
114
- text-decoration: none;
115
- font-size: 12px;
116
- line-height: 20px;
117
- font-weight: bold;
118
- color: $blue_color;
119
- text-transform: uppercase;
120
- transition: all 200ms linear;
121
- &:hover {
122
- color: $dark_color_1;
123
- box-shadow: none;
124
- }
125
- &:focus,
126
- &:active {
127
- outline: none;
128
- box-shadow: none;
129
- color: $blue_color;
130
- }
131
- }
132
-
133
- @mixin link_icon_before( $icon ) {
134
- &:before {
135
- @include button_icon( $icon );
136
- padding: 0 5px 0 0;
137
- color: $grey_color_4;
138
- }
139
- &:hover {
140
- &:before {
141
- color: $blue_color;
142
- }
143
- }
144
- }
145
-
146
- @mixin container() {
147
- padding: 30px;
148
- border: 2px solid $grey_color_2;
149
- background: $grey_color_3;
150
- border-radius: $border_radius_large;
151
- }
152
-
153
- @mixin container_heading() {
154
- margin: -30px -30px 30px -30px;
155
- border-radius: $border_radius_large $border_radius_large 0 0;
156
- border-bottom: 1px solid $grey_color_2;
157
- padding: 20px 30px;
158
- font-weight: bold;
159
- font-size: 16px;
160
- line-height: 18px;
161
- text-align: center;
162
- background: #fff;
163
- }
164
-
165
- @mixin box() {
166
- margin: 0 0 30px;
167
- padding: 20px;
168
- background: #fff;
169
- box-shadow: $box_shadow_box;
170
- border-radius: $border_radius;
171
- }
172
-
173
- @mixin box_heading() {
174
- margin: -20px -20px 20px -20px;
175
- border-radius: $border_radius_small $border_radius_small 0 0;
176
- border-bottom: 1px solid $grey_color_2;
177
- padding: 20px 30px;
178
- font-weight: bold;
179
- font-size: 16px;
180
- line-height: 18px;
181
- background: #fff;
182
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/modules/cherry-utility/inc/cherry-attributes-utilit.php CHANGED
@@ -115,7 +115,9 @@ if ( ! class_exists( 'Cherry_Attributes_Utilit' ) ) {
115
  }
116
  }
117
 
118
- $html = apply_filters( 'the_content', $html );
 
 
119
 
120
  return $this->output_method( $html, $args['echo'] );
121
  }
115
  }
116
  }
117
 
118
+ if ( 'post_content' === $content_type && -1 === $args['length'] ) {
119
+ $html = apply_filters( 'the_content', $html );
120
+ }
121
 
122
  return $this->output_method( $html, $args['echo'] );
123
  }
cherry-framework/setup.php CHANGED
@@ -11,17 +11,17 @@
11
  * @license http://www.gnu.org/licenses/gpl-3.0.en.html
12
  */
13
 
14
- return create_function( '', '
15
  global $chery_core_version;
16
 
17
- $path = trailingslashit( dirname( __FILE__ ) ) . \'cherry-core.php\';
18
 
19
  $data = get_file_data( $path, array(
20
- \'version\' => \'Version\'
21
  ) );
22
 
23
- if ( isset( $data[\'version\'] ) ) {
24
- $version = $data[\'version\'];
25
  }
26
 
27
  $old_versions = null;
@@ -31,7 +31,7 @@ return create_function( '', '
31
  }
32
 
33
  if ( is_array( $old_versions ) && isset( $old_versions[0] ) ) {
34
- $compare = version_compare( $old_versions[0], $version, \'<\' );
35
 
36
  if ( $compare ) {
37
  $chery_core_version = array();
@@ -41,4 +41,4 @@ return create_function( '', '
41
  $chery_core_version = array();
42
  $chery_core_version[ $version ] = $path;
43
  }
44
- ' );
11
  * @license http://www.gnu.org/licenses/gpl-3.0.en.html
12
  */
13
 
14
+ return function () {
15
  global $chery_core_version;
16
 
17
+ $path = trailingslashit( dirname( __FILE__ ) ) . 'cherry-core.php';
18
 
19
  $data = get_file_data( $path, array(
20
+ 'version' => 'Version'
21
  ) );
22
 
23
+ if ( isset( $data['version'] ) ) {
24
+ $version = $data['version'];
25
  }
26
 
27
  $old_versions = null;
31
  }
32
 
33
  if ( is_array( $old_versions ) && isset( $old_versions[0] ) ) {
34
+ $compare = version_compare( $old_versions[0], $version, '<' );
35
 
36
  if ( $compare ) {
37
  $chery_core_version = array();
41
  $chery_core_version = array();
42
  $chery_core_version[ $version ] = $path;
43
  }
44
+ };
cherry-team-members.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Cherry Team Members
4
  * Plugin URI:
5
  * Description: Cherry Team Members plugin allows you to showcase your team and personnel.
6
- * Version: 1.4.5
7
  * Author: Zemez
8
  * Author URI: https://zemez.io/wordpress/
9
  * Text Domain: cherry-team
@@ -45,7 +45,7 @@ if ( ! class_exists( 'Cherry_Team_Members' ) ) {
45
  *
46
  * @var string
47
  */
48
- private $version = '1.4.5';
49
 
50
  /**
51
  * Plugin dir URL
3
  * Plugin Name: Cherry Team Members
4
  * Plugin URI:
5
  * Description: Cherry Team Members plugin allows you to showcase your team and personnel.
6
+ * Version: 1.4.6
7
  * Author: Zemez
8
  * Author URI: https://zemez.io/wordpress/
9
  * Text Domain: cherry-team
45
  *
46
  * @var string
47
  */
48
+ private $version = '1.4.6';
49
 
50
  /**
51
  * Plugin dir URL
readme.txt CHANGED
@@ -3,8 +3,8 @@
3
  Contributors: TemplateMonster 2002
4
  Tags: custom post type, team, cherry-framework, elementor, elementor builder
5
  Requires at least: 4.7
6
- Tested up to: 4.9
7
- Stable tag: 1.4.5
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
3
  Contributors: TemplateMonster 2002
4
  Tags: custom post type, team, cherry-framework, elementor, elementor builder
5
  Requires at least: 4.7
6
+ Tested up to: 5.1.0
7
+ Stable tag: 1.4.6
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10