Cherry Projects - Version 1.2.5

Version Description

  • Elementor page builder compatibility
  • Fixed bugs
Download this release

Release Info

Developer TemplateMonster 2002
Plugin Icon 128x128 Cherry Projects
Version 1.2.5
Comparing to
See all releases

Code changes from version 1.2.4 to 1.2.5

Files changed (114) hide show
  1. admin/includes/class-projects-admin.php +0 -670
  2. admin/includes/class-projects-options-page.php +1 -0
  3. cherry-framework/cherry-core.php +69 -96
  4. cherry-framework/config.json +15 -15
  5. cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php +53 -26
  6. cherry-framework/modules/cherry-customizer/cherry-customizer.php +40 -39
  7. cherry-framework/modules/cherry-customizer/inc/class-cherry-wp-customize-iconpicker.php +5 -3
  8. cherry-framework/modules/cherry-db-updater/cherry-db-updater.php +1 -3
  9. cherry-framework/modules/cherry-dynamic-css/cherry-dynamic-css.php +1 -3
  10. cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-collector.php +1 -1
  11. cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-utilities.php +4 -4
  12. cherry-framework/modules/cherry-google-fonts-loader/cherry-google-fonts-loader.php +5 -12
  13. cherry-framework/modules/cherry-handler/cherry-handler.php +50 -28
  14. cherry-framework/modules/cherry-interface-builder/cherry-interface-builder.php +28 -9
  15. cherry-framework/modules/cherry-interface-builder/inc/assets/cherry-interface-builder.scss +36 -2
  16. cherry-framework/modules/cherry-interface-builder/inc/assets/min/cherry-interface-builder.min.css +1 -1
  17. cherry-framework/modules/cherry-interface-builder/inc/views/component-accordion.php +1 -1
  18. cherry-framework/modules/cherry-interface-builder/inc/views/component-repeater.php +1 -1
  19. cherry-framework/modules/cherry-interface-builder/inc/views/component-tab-horizontal.php +1 -1
  20. cherry-framework/modules/cherry-interface-builder/inc/views/component-tab-vertical.php +1 -1
  21. cherry-framework/modules/cherry-interface-builder/inc/views/component-toggle.php +1 -1
  22. cherry-framework/modules/cherry-interface-builder/inc/views/control.php +1 -1
  23. cherry-framework/modules/cherry-interface-builder/inc/views/form.php +1 -1
  24. cherry-framework/modules/cherry-interface-builder/inc/views/html.php +1 -1
  25. cherry-framework/modules/cherry-interface-builder/inc/views/section.php +1 -1
  26. cherry-framework/modules/cherry-interface-builder/inc/views/settings-children-title.php +1 -1
  27. cherry-framework/modules/cherry-interface-builder/inc/views/settings.php +1 -1
  28. cherry-framework/modules/cherry-interface-builder/inc/views/tab-children-title.php +1 -1
  29. cherry-framework/modules/cherry-interface-builder/inc/views/toggle-children-title.php +1 -1
  30. cherry-framework/modules/cherry-js-core/cherry-js-core.php +26 -10
  31. cherry-framework/modules/cherry-post-formats-api/cherry-post-formats-api.php +42 -16
  32. cherry-framework/modules/cherry-post-formats-api/inc/class-cherry-facebook-embed.php +1 -1
  33. cherry-framework/modules/cherry-post-meta/cherry-post-meta.php +4 -6
  34. cherry-framework/modules/cherry-term-meta/cherry-term-meta.php +1 -3
  35. cherry-framework/modules/cherry-toolkit/cherry-toolkit.php +1 -3
  36. cherry-framework/modules/cherry-ui-elements/assets/sass/_lock.scss +110 -0
  37. cherry-framework/modules/cherry-ui-elements/cherry-ui-elements.php +27 -10
  38. cherry-framework/modules/cherry-ui-elements/i-ui.php +1 -1
  39. cherry-framework/modules/cherry-ui-elements/inc/class-cherry-lock-element.php +128 -0
  40. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/ui-button.php +3 -3
  41. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/view/button-view.php +10 -4
  42. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.css +1 -1
  43. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.scss +8 -5
  44. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/ui-checkbox.php +36 -16
  45. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.css +1 -1
  46. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.scss +7 -1
  47. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/ui-colorpicker.php +26 -10
  48. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/min/ui-iconpicker.min.css +1 -1
  49. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/ui-iconpicker.scss +8 -0
  50. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php +66 -9
  51. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/min/ui-media.min.css +1 -1
  52. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.scss +7 -0
  53. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/ui-media.php +27 -9
  54. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.css +1 -1
  55. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.js +1 -1
  56. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/ui-radio.scss +2 -1
  57. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/ui-radio.php +40 -17
  58. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-repeater/ui-repeater.php +39 -6
  59. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.css +1 -1
  60. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.js +1 -1
  61. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.js +1 -1
  62. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.scss +1 -0
  63. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/ui-select.php +74 -53
  64. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/min/ui-slider.min.css +1 -1
  65. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/ui-slider.scss +7 -0
  66. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/ui-slider.php +26 -9
  67. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/min/ui-stepper.min.css +1 -1
  68. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-stepper.scss +7 -0
  69. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/ui-stepper.php +25 -6
  70. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/min/ui-switcher.min.css +1 -1
  71. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-switcher.scss +1 -0
  72. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/ui-switcher.php +28 -10
  73. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/min/ui-text.min.css +1 -1
  74. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/ui-text.scss +7 -0
  75. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/ui-text.php +22 -5
  76. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/min/ui-textarea.min.css +1 -1
  77. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-textarea.scss +7 -0
  78. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/ui-textarea.php +23 -5
  79. cherry-framework/modules/cherry-ui-elements/ui-element.php +1 -16
  80. cherry-framework/modules/cherry-utility/cherry-utility.php +17 -7
  81. cherry-framework/modules/cherry-utility/inc/cherry-attributes-utilit.php +6 -3
  82. cherry-framework/modules/cherry-utility/inc/cherry-media-utilit.php +3 -1
  83. cherry-framework/modules/cherry-utility/inc/cherry-meta-data-utilit.php +2 -1
  84. cherry-framework/modules/cherry-utility/inc/cherry-satellite-utilit.php +8 -4
  85. cherry-framework/modules/cherry-widget-factory/cherry-widget-factory.php +15 -8
  86. cherry-framework/modules/cherry-widget-factory/inc/class-cherry-abstract-widget.php +34 -149
  87. cherry-framework/modules/cherry5-assets-loader/assets/append.js +16 -0
  88. cherry-framework/modules/cherry5-assets-loader/assets/min/append.min.js +1 -0
  89. cherry-framework/modules/cherry5-assets-loader/assets/var.js +2 -0
  90. cherry-framework/modules/cherry5-assets-loader/cherry5-assets-loader.php +136 -0
  91. cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-css.php +50 -0
  92. cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-js.php +50 -0
  93. cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle.php +113 -0
  94. cherry-framework/modules/cherry5-insert-shortcode/assets/cherry-insert-shortcode.scss +0 -1
  95. cherry-framework/modules/cherry5-insert-shortcode/cherry5-insert-shortcode.php +45 -21
  96. cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-button.php +1 -1
  97. cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php +35 -11
  98. cherry-framework/modules/cherry5-insert-shortcode/inc/views/insert-shortcode-pop-up.php +1 -1
  99. cherry-framework/modules/cherry5-insert-shortcode/inc/views/shortcode-content-area.php +1 -1
  100. cherry-framework/modules/cherry5-insert-shortcode/inc/views/shortcode-has-not-option.php +1 -1
  101. cherry-framework/modules/cherry5-insert-shortcode/inc/views/shortcode-options.php +1 -1
  102. cherry-framework/setup-theme.php +44 -0
  103. cherry-framework/setup.php +1 -1
  104. cherry-projects.php +2 -2
  105. public/assets/js/cherry-projects-plugin.js +4 -4
  106. public/assets/js/cherry-projects-scripts.js +34 -11
  107. public/includes/class-projects-data.php +8 -7
  108. public/includes/class-projects-shortcode.php +496 -6
  109. public/includes/class-projects-term-data.php +0 -1
  110. public/includes/class-projects-term-shortcode.php +289 -6
  111. public/includes/ext/class-cherry-projects-elementor-compat.php +123 -0
  112. public/includes/ext/class-cherry-projects-elementor-module.php +247 -0
  113. public/includes/ext/class-cherry-projects-terms-elementor-module.php +248 -0
  114. readme.txt +7 -2
admin/includes/class-projects-admin.php CHANGED
@@ -36,9 +36,6 @@ class Cherry_Projects_Admin {
36
 
37
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
38
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
39
-
40
- // Shortcode insert module registration
41
- add_action( 'after_setup_theme', array( $this, 'shortcode_registration' ), 10 );
42
  }
43
 
44
  /**
@@ -173,673 +170,6 @@ class Cherry_Projects_Admin {
173
  }
174
  }
175
 
176
- /**
177
- * Shortcode registration
178
- *
179
- * @return void
180
- */
181
- public function shortcode_registration() {
182
- cherry_projects()->get_core()->init_module( 'cherry5-insert-shortcode', array() );
183
-
184
- $utility = cherry_projects()->get_core()->modules['cherry-utility']->utility;
185
-
186
- $category_list = $utility->satellite->get_terms_array( CHERRY_PROJECTS_NAME . '_category', 'slug' );
187
- $tag_list = $utility->satellite->get_terms_array( CHERRY_PROJECTS_NAME . '_tag', 'slug' );
188
-
189
- cherry5_register_shortcode(
190
- array(
191
- 'title' => esc_html__( 'Projects', 'cherry-projects' ),
192
- 'description' => esc_html__( 'Showcase your projects using a variety of layouts with Cherry Projects plugin', 'cherry-projects' ),
193
- 'icon' => '<span class="dashicons dashicons-layout"></span>',
194
- 'slug' => 'cherry-prijects-plugin',
195
- 'shortcodes' => array(
196
- array(
197
- 'title' => esc_html__( 'Projects', 'cherry-projects' ),
198
- 'description' => esc_html__( 'Shortcode is used to display the projects list with set parameters.', 'cherry-projects' ),
199
- 'icon' => '<span class="dashicons dashicons-layout"></span>',
200
- 'slug' => 'cherry_projects',
201
- 'options' => array(
202
-
203
- 'listing_layout' => array(
204
- 'type' => 'radio',
205
- 'title' => esc_html__( 'Projects listing layout', 'cherry-projects' ),
206
- 'description' => esc_html__( 'Choose projects listing view layout.', 'cherry-projects' ),
207
- 'value' => 'grid-layout',
208
- 'display_input' => false,
209
- 'options' => array(
210
- 'grid-layout' => array(
211
- 'label' => esc_html__( 'Grid', 'cherry-projects' ),
212
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-grid.svg',
213
- 'slave' => 'projects-listing-layout-grid-layout',
214
- ),
215
- 'masonry-layout' => array(
216
- 'label' => esc_html__( 'Masonry', 'cherry-projects' ),
217
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-masonry.svg',
218
- 'slave' => 'projects-listing-layout-masonry-layout',
219
- ),
220
- 'justified-layout' => array(
221
- 'label' => esc_html__( 'Justified', 'cherry-projects' ),
222
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-justified.svg',
223
- 'slave' => 'projects-listing-layout-justified-layout',
224
- ),
225
- 'cascading-grid-layout' => array(
226
- 'label' => esc_html__( 'Cascading grid', 'cherry-projects' ),
227
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-cascading-grid.svg',
228
- 'slave' => 'projects-listing-layout-cascading-grid-layout',
229
- ),
230
- 'list-layout' => array(
231
- 'label' => esc_html__( 'List', 'cherry-projects' ),
232
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-listing.svg',
233
- 'slave' => 'projects-listing-layout-list-layout',
234
- ),
235
- ),
236
- ),
237
-
238
- 'loading_mode' => array(
239
- 'type' => 'radio',
240
- 'title' => esc_html__( 'Pagination mode', 'cherry-projects' ),
241
- 'description' => esc_html__( 'Choose projects pagination mode', 'cherry-projects' ),
242
- 'value' => 'ajax-pagination-mode',
243
- 'class' => '',
244
- 'display_input' => false,
245
- 'options' => array(
246
- 'ajax-pagination-mode' => array(
247
- 'label' => esc_html__( 'Ajax pagination', 'cherry-projects' ),
248
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/loading-mode-ajax-pagination.svg',
249
- ),
250
- 'more-button-mode' => array(
251
- 'label' => esc_html__( 'More button', 'cherry-projects' ),
252
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/loading-mode-ajax-more-button.svg',
253
- ),
254
- 'lazy-loading-mode' => array(
255
- 'label' => esc_html__( 'Lazy loading', 'cherry-projects' ),
256
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/loading-mode-lazy-loading.svg',
257
- ),
258
- 'none-mode' => array(
259
- 'label' => esc_html__( 'None', 'cherry-projects' ),
260
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/loading-mode-none.svg',
261
- ),
262
- ),
263
- ),
264
-
265
- 'load_animation' => array(
266
- 'type' => 'radio',
267
- 'title' => esc_html__( 'Loading animation', 'cherry-projects' ),
268
- 'description' => esc_html__( 'Choose posts loading animation', 'cherry-projects' ),
269
- 'value' => 'loading-animation-move-up',
270
- 'class' => '',
271
- 'display_input' => false,
272
- 'options' => array(
273
- 'loading-animation-fade' => array(
274
- 'label' => esc_html__( 'Fade animation', 'cherry-projects' ),
275
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-fade.svg',
276
- ),
277
- 'loading-animation-scale' => array(
278
- 'label' => esc_html__( 'Scale animation', 'cherry-projects' ),
279
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-scale.svg',
280
- ),
281
- 'loading-animation-move-up' => array(
282
- 'label' => esc_html__( 'Move Up animation', 'cherry-projects' ),
283
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-move-up.svg',
284
- ),
285
- 'loading-animation-flip' => array(
286
- 'label' => esc_html__( 'Flip animation', 'cherry-projects' ),
287
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-flip.svg',
288
- ),
289
- 'loading-animation-helix' => array(
290
- 'label' => esc_html__( 'Helix animation', 'cherry-projects' ),
291
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-helix.svg',
292
- ),
293
- 'loading-animation-fall-perspective' => array(
294
- 'label' => esc_html__( 'Fall perspective animation', 'cherry-projects' ),
295
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-fall-perspective.svg',
296
- ),
297
- ),
298
- ),
299
-
300
- 'hover_animation' => array(
301
- 'type' => 'radio',
302
- 'title' => esc_html__( 'Hover animation', 'cherry-projects' ),
303
- 'description' => esc_html__( 'Choose posts images hover animation', 'cherry-projects' ),
304
- 'value' => 'simple-scale',
305
- 'class' => '',
306
- 'display_input' => false,
307
- 'options' => array(
308
- 'simple-fade' => array(
309
- 'label' => esc_html__( 'Fade', 'cherry-projects' ),
310
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/hover-fade.svg',
311
- ),
312
- 'simple-scale' => array(
313
- 'label' => esc_html__( 'Scale', 'cherry-projects' ),
314
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/hover-scale.svg',
315
- ),
316
- 'custom' => array(
317
- 'label' => esc_html__( 'Custom', 'cherry-projects' ),
318
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/inherit.svg',
319
- ),
320
- ),
321
- ),
322
-
323
- 'filter_visible' => array(
324
- 'type' => 'switcher',
325
- 'title' => esc_html__( 'Filters', 'cherry-projects' ),
326
- 'description' => esc_html__( 'Enable/disable listing filters', 'cherry-projects' ),
327
- 'value' => 'true',
328
- 'toggle' => array(
329
- 'true_toggle' => esc_html__( 'Show', 'cherry-projects' ),
330
- 'false_toggle' => esc_html__( 'Hide', 'cherry-projects' ),
331
- ),
332
- ),
333
-
334
- 'filter_type' => array(
335
- 'type' => 'radio',
336
- 'title' => esc_html__( 'Filter type', 'cherry-projects' ),
337
- 'description' => esc_html__( 'Select if you want to filter posts by tag or by category.', 'cherry-projects' ),
338
- 'value' => 'category',
339
- 'display-input' => true,
340
- 'options' => array(
341
- 'category' => array(
342
- 'label' => esc_html__( 'Category', 'cherry-projects' ),
343
- 'slave' => 'projects-filter-type-category',
344
- ),
345
- 'tag' => array(
346
- 'label' => esc_html__( 'Tag', 'cherry-projects' ),
347
- 'slave' => 'projects-filter-type-tag',
348
- ),
349
- ),
350
- ),
351
-
352
- 'category_list' => array(
353
- 'type' => 'select',
354
- 'title' => esc_html__( 'Projects filter categories list', 'cherry-projects' ),
355
- 'multiple' => true,
356
- 'value' => array(),
357
- 'class' => 'cherry-multi-select',
358
- 'options' => $category_list,
359
- 'master' => 'projects-filter-type-category',
360
- ),
361
-
362
- 'tags_list' => array(
363
- 'type' => 'select',
364
- 'title' => esc_html__( 'Projects filter tags list', 'cherry-projects' ),
365
- 'multiple' => true,
366
- 'value' => array(),
367
- 'class' => 'cherry-multi-select',
368
- 'options' => $tag_list,
369
- 'master' => 'projects-filter-type-tag',
370
- ),
371
-
372
- 'order_filter_visible' => array(
373
- 'type' => 'switcher',
374
- 'title' => esc_html__( 'Order filters', 'cherry-projects' ),
375
- 'description' => esc_html__( 'Enable/disable order filters', 'cherry-projects' ),
376
- 'value' => 'false',
377
- 'toggle' => array(
378
- 'true_toggle' => 'On',
379
- 'false_toggle' => 'Off',
380
- 'true_slave' => 'projects-order-filter-visible-true',
381
- 'false_slave' => 'projects-order-filter-visible-false',
382
- ),
383
- ),
384
-
385
- 'order_filter_default_value' => array(
386
- 'type' => 'radio',
387
- 'title' => esc_html__( 'Order filter default value', 'cherry-projects' ),
388
- 'value' => 'desc',
389
- 'display-input' => true,
390
- 'options' => array(
391
- 'desc' => array(
392
- 'label' => esc_html__( 'DESC', 'cherry-projects' ),
393
- ),
394
- 'asc' => array(
395
- 'label' => esc_html__( 'ASC', 'cherry-projects' ),
396
- ),
397
- ),
398
- 'master' => 'projects-order-filter-visible-true',
399
- ),
400
-
401
- 'orderby_filter_default_value' => array(
402
- 'type' => 'radio',
403
- 'title' => esc_html__( 'Order by filter default value', 'cherry-projects' ),
404
- 'value' => 'date',
405
- 'display-input' => true,
406
- 'options' => array(
407
- 'date' => array(
408
- 'label' => esc_html__( 'Date', 'cherry-projects' ),
409
- ),
410
- 'name' => array(
411
- 'label' => esc_html__( 'Name', 'cherry-projects' ),
412
- ),
413
- 'modified' => array(
414
- 'label' => esc_html__( 'Modified', 'cherry-projects' ),
415
- ),
416
- 'comment_count' => array(
417
- 'label' => esc_html__( 'Comments', 'cherry-projects' ),
418
- ),
419
- ),
420
- 'master' => 'projects-order-filter-visible-true',
421
- ),
422
-
423
- 'posts_format' => array(
424
- 'type' => 'radio',
425
- 'title' => esc_html__( 'Post Format', 'cherry-projects' ),
426
- 'value' => 'post-format-all',
427
- 'display-input' => true,
428
- 'options' => array(
429
- 'post-format-all' => array(
430
- 'label' => esc_html__( 'All formats', 'cherry-projects' ),
431
- ),
432
- 'post-format-standard' => array(
433
- 'label' => esc_html__( 'Standard', 'cherry-projects' ),
434
- ),
435
- 'post-format-image' => array(
436
- 'label' => esc_html__( 'Image', 'cherry-projects' ),
437
- ),
438
- 'post-format-gallery' => array(
439
- 'label' => esc_html__( 'Gallery', 'cherry-projects' ),
440
- ),
441
- 'post-format-audio' => array(
442
- 'label' => esc_html__( 'Audio', 'cherry-projects' ),
443
- ),
444
- 'post-format-video' => array(
445
- 'label' => esc_html__( 'Video', 'cherry-projects' ),
446
- ),
447
- ),
448
- ),
449
-
450
- 'single_term' => array(
451
- 'type' => 'text',
452
- 'title' => esc_html__( 'Single term slug', 'cherry-projects' ),
453
- 'value' => '',
454
- ),
455
-
456
- 'device_layout_column_number' => array(
457
- 'type' => 'component-tab-horizontal',
458
- ),
459
-
460
- 'column_number_desktop_layout' => array(
461
- 'type' => 'settings',
462
- 'parent' => 'device_layout_column_number',
463
- 'title' => esc_html__( 'Desktop', 'cherry-projects' ),
464
- 'description' => esc_html__( 'Define column number for desktop layout', 'cherry-projects' ),
465
- ),
466
-
467
- 'column_number_laptop_layout' => array(
468
- 'type' => 'settings',
469
- 'parent' => 'device_layout_column_number',
470
- 'title' => esc_html__( 'Laptop', 'cherry-projects' ),
471
- 'description' => esc_html__( 'Define column number for laptop layout', 'cherry-projects' ),
472
- ),
473
-
474
- 'column_number_album_tablet_layout' => array(
475
- 'type' => 'settings',
476
- 'parent' => 'device_layout_column_number',
477
- 'title' => esc_html__( 'Album Tablet', 'cherry-projects' ),
478
- 'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
479
- ),
480
-
481
- 'column_number_portrait_tablet_layout' => array(
482
- 'type' => 'settings',
483
- 'parent' => 'device_layout_column_number',
484
- 'title' => esc_html__( 'Portrait Tablet', 'cherry-projects' ),
485
- 'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
486
- ),
487
-
488
- 'column_number_mobile_layout' => array(
489
- 'type' => 'settings',
490
- 'parent' => 'device_layout_column_number',
491
- 'title' => esc_html__( 'Mobile', 'cherry-projects' ),
492
- 'description' => esc_html__( 'Define column number for mobile layout', 'cherry-projects' ),
493
- ),
494
-
495
- 'column_number' => array(
496
- 'type' => 'slider',
497
- 'parent' => 'column_number_desktop_layout',
498
- 'title' => esc_html__( 'Column number', 'cherry-projects' ),
499
- 'description' => esc_html__( 'Select number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
500
- 'max_value' => 6,
501
- 'min_value' => 1,
502
- 'value' => 4,
503
- ),
504
-
505
- 'column_number_laptop' => array(
506
- 'type' => 'slider',
507
- 'parent' => 'column_number_laptop_layout',
508
- 'title' => esc_html__( 'Labtop column number', 'cherry-projects' ),
509
- 'description' => esc_html__( 'Select laptop number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
510
- 'max_value' => 6,
511
- 'min_value' => 1,
512
- 'value' => 3,
513
- ),
514
-
515
- 'column_number_album_tablet' => array(
516
- 'type' => 'slider',
517
- 'parent' => 'column_number_album_tablet_layout',
518
- 'title' => esc_html__( 'Album Tablet column number', 'cherry-projects' ),
519
- 'description' => esc_html__( 'Select album tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
520
- 'max_value' => 6,
521
- 'min_value' => 1,
522
- 'value' => 2,
523
- ),
524
-
525
- 'column_number_portrait_tablet' => array(
526
- 'type' => 'slider',
527
- 'parent' => 'column_number_portrait_tablet_layout',
528
- 'title' => esc_html__( 'Portrait Tablet column number', 'cherry-projects' ),
529
- 'description' => esc_html__( 'Select portrait tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
530
- 'max_value' => 6,
531
- 'min_value' => 1,
532
- 'value' => 2,
533
- ),
534
-
535
- 'column_number_mobile' => array(
536
- 'type' => 'slider',
537
- 'parent' => 'column_number_mobile_layout',
538
- 'title' => esc_html__( 'Tablet column number', 'cherry-projects' ),
539
- 'description' => esc_html__( 'Select mobile number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
540
- 'max_value' => 6,
541
- 'min_value' => 1,
542
- 'value' => 1,
543
- ),
544
-
545
- 'post_per_page' => array(
546
- 'type' => 'slider',
547
- 'title' => esc_html__( 'Posts per page', 'cherry-projects' ),
548
- 'description' => esc_html__( 'Select how many posts per page do you want to display(-1 means that will show all projects)', 'cherry-projects' ),
549
- 'max_value' => 50,
550
- 'min_value' => -1,
551
- 'value' => 9,
552
- ),
553
-
554
- 'item_margin' => array(
555
- 'type' => 'slider',
556
- 'title' => esc_html__( 'Item margin', 'cherry-projects' ),
557
- 'description' => esc_html__( 'Select projects item margin (outer indent) value.', 'cherry-projects' ),
558
- 'max_value' => 50,
559
- 'min_value' => 0,
560
- 'value' => 4,
561
- ),
562
-
563
- 'justified_fixed_height' => array(
564
- 'type' => 'slider',
565
- 'title' => esc_html__( 'Justified fixed height', 'cherry-projects' ),
566
- 'description' => esc_html__( 'Select projects item justified height value.', 'cherry-projects' ),
567
- 'max_value' => 1000,
568
- 'min_value' => 50,
569
- 'value' => 300,
570
- 'master' => 'projects-listing-layout-justified-layout',
571
- ),
572
-
573
- 'grid_template' => array(
574
- 'type' => 'text',
575
- 'title' => esc_html__( 'Grid template', 'cherry-projects' ),
576
- 'description' => esc_html__( 'Grid content template', 'cherry-projects' ),
577
- 'value' => 'grid-default.tmpl',
578
- 'master' => 'projects-listing-layout-grid-layout',
579
- ),
580
-
581
- 'masonry_template' => array(
582
- 'type' => 'text',
583
- 'title' => esc_html__( 'Masonry template', 'cherry-projects' ),
584
- 'description' => esc_html__( 'Masonry content template', 'cherry-projects' ),
585
- 'value' => 'masonry-default.tmpl',
586
- 'master' => 'projects-listing-layout-masonry-layout',
587
- ),
588
-
589
- 'justified_template' => array(
590
- 'type' => 'text',
591
- 'title' => esc_html__( 'Justified template', 'cherry-projects' ),
592
- 'description' => esc_html__( 'Justified content template', 'cherry-projects' ),
593
- 'value' => 'justified-default.tmpl',
594
- 'master' => 'projects-listing-layout-justified-layout',
595
- ),
596
-
597
- 'cascading_grid_template' => array(
598
- 'type' => 'text',
599
- 'title' => esc_html__( 'Cascading grid template', 'cherry-projects' ),
600
- 'description' => esc_html__( 'Cascading grid template', 'cherry-projects' ),
601
- 'value' => 'cascading-grid-default.tmpl',
602
- 'master' => 'projects-listing-layout-cascading-grid-layout',
603
- ),
604
-
605
- 'list_template' => array(
606
- 'type' => 'text',
607
- 'title' => esc_html__( 'List template', 'cherry-projects' ),
608
- 'description' => esc_html__( 'List content template', 'cherry-projects' ),
609
- 'value' => 'list-default.tmpl',
610
- 'master' => 'projects-listing-layout-list-layout',
611
- ),
612
- ),
613
- ),
614
- array(
615
- 'title' => esc_html__( 'Projects Terms', 'cherry-projects' ),
616
- 'description' => esc_html__( 'The shortcode displays Category and Tag sections content listing with set parameters.', 'cherry-projects' ),
617
- 'icon' => '<span class="dashicons dashicons-category"></span>',
618
- 'slug' => 'cherry_projects_terms',
619
- 'options' => array(
620
-
621
- 'term_type' => array(
622
- 'type' => 'radio',
623
- 'title' => esc_html__( 'Filter type', 'cherry-projects' ),
624
- 'description' => esc_html__( 'Select if you want to filter posts by tag or by category.', 'cherry-projects' ),
625
- 'value' => 'category',
626
- 'display-input' => true,
627
- 'options' => array(
628
- 'category' => array(
629
- 'label' => esc_html__( 'Category', 'cherry-projects' ),
630
- ),
631
- 'tag' => array(
632
- 'label' => esc_html__( 'Tag', 'cherry-projects' ),
633
- ),
634
- ),
635
- ),
636
-
637
- 'listing_layout' => array(
638
- 'type' => 'radio',
639
- 'title' => esc_html__( 'Terms listing layout', 'cherry-projects' ),
640
- 'description' => esc_html__( 'Choose terms listing view layout.', 'cherry-projects' ),
641
- 'value' => 'grid-layout',
642
- 'display_input' => false,
643
- 'options' => array(
644
- 'grid-layout' => array(
645
- 'label' => esc_html__( 'Grid', 'cherry-projects' ),
646
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-grid.svg',
647
- 'slave' => 'projects-listing-layout-grid-layout',
648
- ),
649
- 'masonry-layout' => array(
650
- 'label' => esc_html__( 'Masonry', 'cherry-projects' ),
651
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-masonry.svg',
652
- 'slave' => 'projects-listing-layout-masonry-layout',
653
- ),
654
- 'cascading-grid-layout' => array(
655
- 'label' => esc_html__( 'Cascading grid', 'cherry-projects' ),
656
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-cascading-grid.svg',
657
- 'slave' => 'projects-listing-layout-cascading-grid-layout',
658
- ),
659
- 'list-layout' => array(
660
- 'label' => esc_html__( 'List', 'cherry-projects' ),
661
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-listing.svg',
662
- 'slave' => 'projects-listing-layout-list-layout',
663
- ),
664
- ),
665
- ),
666
-
667
- 'load_animation' => array(
668
- 'type' => 'radio',
669
- 'title' => esc_html__( 'Loading animation', 'cherry-projects' ),
670
- 'description' => esc_html__( 'Choose terms loading animation', 'cherry-projects' ),
671
- 'value' => 'loading-animation-move-up',
672
- 'class' => '',
673
- 'display_input' => false,
674
- 'options' => array(
675
- 'loading-animation-fade' => array(
676
- 'label' => esc_html__( 'Fade animation', 'cherry-projects' ),
677
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-fade.svg',
678
- ),
679
- 'loading-animation-scale' => array(
680
- 'label' => esc_html__( 'Scale animation', 'cherry-projects' ),
681
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-scale.svg',
682
- ),
683
- 'loading-animation-move-up' => array(
684
- 'label' => esc_html__( 'Move Up animation', 'cherry-projects' ),
685
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-move-up.svg',
686
- ),
687
- 'loading-animation-flip' => array(
688
- 'label' => esc_html__( 'Flip animation', 'cherry-projects' ),
689
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-flip.svg',
690
- ),
691
- 'loading-animation-helix' => array(
692
- 'label' => esc_html__( 'Helix animation', 'cherry-projects' ),
693
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-helix.svg',
694
- ),
695
- 'loading-animation-fall-perspective' => array(
696
- 'label' => esc_html__( 'Fall perspective animation', 'cherry-projects' ),
697
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-fall-perspective.svg',
698
- ),
699
- ),
700
- ),
701
-
702
- 'device_layout_column_number' => array(
703
- 'type' => 'component-tab-horizontal',
704
- ),
705
-
706
- 'column_number_desktop_layout' => array(
707
- 'type' => 'settings',
708
- 'parent' => 'device_layout_column_number',
709
- 'title' => esc_html__( 'Desktop', 'cherry-projects' ),
710
- 'description' => esc_html__( 'Define column number for desktop layout', 'cherry-projects' ),
711
- ),
712
-
713
- 'column_number_laptop_layout' => array(
714
- 'type' => 'settings',
715
- 'parent' => 'device_layout_column_number',
716
- 'title' => esc_html__( 'Laptop', 'cherry-projects' ),
717
- 'description' => esc_html__( 'Define column number for laptop layout', 'cherry-projects' ),
718
- ),
719
-
720
- 'column_number_album_tablet_layout' => array(
721
- 'type' => 'settings',
722
- 'parent' => 'device_layout_column_number',
723
- 'title' => esc_html__( 'Album Tablet', 'cherry-projects' ),
724
- 'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
725
- ),
726
-
727
- 'column_number_portrait_tablet_layout' => array(
728
- 'type' => 'settings',
729
- 'parent' => 'device_layout_column_number',
730
- 'title' => esc_html__( 'Portrait Tablet', 'cherry-projects' ),
731
- 'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
732
- ),
733
-
734
- 'column_number_mobile_layout' => array(
735
- 'type' => 'settings',
736
- 'parent' => 'device_layout_column_number',
737
- 'title' => esc_html__( 'Mobile', 'cherry-projects' ),
738
- 'description' => esc_html__( 'Define column number for mobile layout', 'cherry-projects' ),
739
- ),
740
-
741
- 'column_number' => array(
742
- 'type' => 'slider',
743
- 'parent' => 'column_number_desktop_layout',
744
- 'title' => esc_html__( 'Column number', 'cherry-projects' ),
745
- 'description' => esc_html__( 'Select number of columns for masonry and grid projects layouts. (Min 2, max 6)', 'cherry-projects' ),
746
- 'max_value' => 6,
747
- 'min_value' => 1,
748
- 'value' => 3,
749
- ),
750
-
751
- 'column_number_laptop' => array(
752
- 'type' => 'slider',
753
- 'parent' => 'column_number_laptop_layout',
754
- 'title' => esc_html__( 'Labtop column number', 'cherry-projects' ),
755
- 'description' => esc_html__( 'Select laptop number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
756
- 'max_value' => 6,
757
- 'min_value' => 1,
758
- 'value' => 3,
759
- ),
760
-
761
- 'column_number_album_tablet' => array(
762
- 'type' => 'slider',
763
- 'parent' => 'column_number_album_tablet_layout',
764
- 'title' => esc_html__( 'Album Tablet column number', 'cherry-projects' ),
765
- 'description' => esc_html__( 'Select album tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
766
- 'max_value' => 6,
767
- 'min_value' => 1,
768
- 'value' => 2,
769
- ),
770
-
771
- 'column_number_portrait_tablet' => array(
772
- 'type' => 'slider',
773
- 'parent' => 'column_number_portrait_tablet_layout',
774
- 'title' => esc_html__( 'Portrait Tablet column number', 'cherry-projects' ),
775
- 'description' => esc_html__( 'Select portrait tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
776
- 'max_value' => 6,
777
- 'min_value' => 1,
778
- 'value' => 2,
779
- ),
780
-
781
- 'column_number_mobile' => array(
782
- 'type' => 'slider',
783
- 'parent' => 'column_number_mobile_layout',
784
- 'title' => esc_html__( 'Tablet column number', 'cherry-projects' ),
785
- 'description' => esc_html__( 'Select mobile number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
786
- 'max_value' => 6,
787
- 'min_value' => 1,
788
- 'value' => 1,
789
- ),
790
-
791
- 'post_per_page' => array(
792
- 'type' => 'slider',
793
- 'title' => esc_html__( 'Posts per page', 'cherry-projects' ),
794
- 'description' => esc_html__( 'Select how many posts per page do you want to display(-1 means that will show all projects)', 'cherry-projects' ),
795
- 'max_value' => 50,
796
- 'min_value' => -1,
797
- 'value' => 6,
798
- ),
799
-
800
- 'item_margin' => array(
801
- 'type' => 'slider',
802
- 'title' => esc_html__( 'Item margin', 'cherry-projects' ),
803
- 'description' => esc_html__( 'Select projects item margin (outer indent) value.', 'cherry-projects' ),
804
- 'max_value' => 50,
805
- 'min_value' => 0,
806
- 'value' => 4,
807
- ),
808
-
809
- 'grid_template' => array(
810
- 'type' => 'text',
811
- 'title' => esc_html__( 'Grid template', 'cherry-projects' ),
812
- 'description' => esc_html__( 'Grid content template', 'cherry-projects' ),
813
- 'value' => 'terms-grid-default.tmpl',
814
- ),
815
-
816
- 'masonry_template' => array(
817
- 'type' => 'text',
818
- 'title' => esc_html__( 'Masonry template', 'cherry-projects' ),
819
- 'description' => esc_html__( 'Masonry content template', 'cherry-projects' ),
820
- 'value' => 'terms-masonry-default.tmpl',
821
- ),
822
-
823
- 'cascading_grid_template' => array(
824
- 'type' => 'text',
825
- 'title' => esc_html__( 'Cascading grid template', 'cherry-projects' ),
826
- 'description' => esc_html__( 'Cascading grid template', 'cherry-projects' ),
827
- 'value' => 'terms-cascading-grid-default.tmpl',
828
- ),
829
-
830
- 'list_template' => array(
831
- 'type' => 'text',
832
- 'title' => esc_html__( 'List template', 'cherry-projects' ),
833
- 'description' => esc_html__( 'List content template', 'cherry-projects' ),
834
- 'value' => 'terms-list-default.tmpl',
835
- ),
836
- ),
837
- ),
838
- ),
839
- )
840
- );
841
- }
842
-
843
  /**
844
  * Returns the instance.
845
  *
36
 
37
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
38
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
 
 
 
39
  }
40
 
41
  /**
170
  }
171
  }
172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  /**
174
  * Returns the instance.
175
  *
admin/includes/class-projects-options-page.php CHANGED
@@ -81,6 +81,7 @@ class Cherry_Projects_Options_Page {
81
  * @since 1.0.0
82
  */
83
  public function init() {
 
84
  $this->utility = cherry_projects()->get_core()->modules['cherry-utility']->utility;
85
  $this->builder = cherry_projects()->get_core()->modules['cherry-interface-builder'];
86
  }
81
  * @since 1.0.0
82
  */
83
  public function init() {
84
+ cherry_projects()->get_core()->init_module( 'cherry5-insert-shortcode', array() );
85
  $this->utility = cherry_projects()->get_core()->modules['cherry-utility']->utility;
86
  $this->builder = cherry_projects()->get_core()->modules['cherry-interface-builder'];
87
  }
cherry-framework/cherry-core.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Class Cherry Core
4
- * Version: 1.4.2
5
  *
6
  * @package Cherry_Framework
7
  * @subpackage Class
@@ -59,25 +59,29 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
59
  * Constructor.
60
  *
61
  * @since 1.0.0
62
- * @since 1.1.1 Using dirname( __FILE__ ) instead of __DIR__.
63
  */
64
  public function __construct( $settings = array() ) {
65
- $base_dir = trailingslashit( dirname( __FILE__ ) );
66
- $base_url = trailingslashit( $this->base_url( '', __FILE__ ) );
67
 
68
  $defaults = array(
69
  'framework_path' => 'cherry-framework',
70
  'modules' => array(),
71
- 'base_dir' => $base_dir,
72
- 'base_url' => $base_url,
73
- 'extra_base_dir' => '',
74
  );
75
 
76
  $this->settings = array_merge( $defaults, $settings );
77
 
78
- $this->settings['extra_base_dir'] = trailingslashit( $this->settings['base_dir'] );
79
- $this->settings['base_dir'] = $base_dir;
80
- $this->settings['base_url'] = $base_url;
 
 
 
 
 
 
 
81
 
82
  $this->run_collector();
83
 
@@ -118,26 +122,10 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
118
  }
119
 
120
  foreach ( $this->settings['modules'] as $module => $settings ) {
121
- $priority = $this->get_module_priority( $module );
122
- $path = $this->get_module_path( $module );
123
 
124
  if ( ! array_key_exists( $module, self::$all_modules ) ) {
125
- self::$all_modules[ $module ] = array( $priority => $path );
126
- } else {
127
-
128
- $old_priority = array_keys( self::$all_modules[ $module ] );
129
-
130
- if ( ! is_array( $old_priority ) || ! isset( $old_priority[0] ) ) {
131
- continue;
132
- }
133
-
134
- $compare = version_compare( $old_priority[0], $priority, '<' );
135
-
136
- if ( $compare ) {
137
- continue;
138
- }
139
-
140
- self::$all_modules[ $module ] = array( $priority => $path );
141
  }
142
  }
143
 
@@ -156,10 +144,8 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
156
  * @since 1.1.0
157
  */
158
  public static function load_all_modules() {
 
159
 
160
- foreach ( self::$all_modules as $module => $data ) {
161
-
162
- $path = current( $data );
163
  $loaded = self::load_module( $module, $path );
164
 
165
  if ( ! $loaded ) {
@@ -174,7 +160,7 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
174
  * @since 1.4.0
175
  */
176
  public function load_textdomain() {
177
- $mo_file_path = dirname( __FILE__ ) . '/languages/' . get_locale() . '.mo';
178
 
179
  load_textdomain( 'cherry-framework', $mo_file_path );
180
  }
@@ -209,7 +195,6 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
209
  * @since 1.1.0
210
  */
211
  public function init_autoload_modules() {
212
-
213
  if ( empty( $this->modules ) ) {
214
  return;
215
  }
@@ -225,6 +210,7 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
225
  }
226
 
227
  $args = ! empty( $settings['args'] ) ? $settings['args'] : array();
 
228
  $this->init_module( $module, $args );
229
  }
230
  }
@@ -238,6 +224,12 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
238
  * @return mixed
239
  */
240
  public function init_module( $module, $args = array() ) {
 
 
 
 
 
 
241
  $this->modules[ $module ] = $this->get_module_instance( $module, $args );
242
 
243
  /**
@@ -275,14 +267,14 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
275
  public static function load_module( $module, $path ) {
276
  $class_name = self::get_class_name( $module );
277
 
278
- if ( class_exists( $class_name ) ) {
279
- return true;
280
- }
281
-
282
  if ( ! $path ) {
283
  return false;
284
  }
285
 
 
 
 
 
286
  require_once( $path );
287
 
288
  return true;
@@ -304,7 +296,9 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
304
  return false;
305
  }
306
 
307
- return $this->modules[ $module ] = call_user_func( array( $class_name, 'get_instance' ), $this, $args );
 
 
308
  }
309
 
310
  /**
@@ -330,11 +324,9 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
330
  */
331
  public function get_module_path( $module ) {
332
  $abs_path = false;
333
- $rel_path = 'modules/' . $module . '/' . $module . '.php';
334
 
335
- if ( file_exists( $this->settings['extra_base_dir'] . $rel_path ) ) {
336
- $abs_path = $this->settings['extra_base_dir'] . $rel_path;
337
- } else if ( file_exists( $this->settings['base_dir'] . $rel_path ) ) {
338
  $abs_path = $this->settings['base_dir'] . $rel_path;
339
  }
340
 
@@ -342,60 +334,21 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
342
  }
343
 
344
  /**
345
- * Get module priority from it's version.
346
- * Version information should be provided as a value stored in the header notation.
347
  *
348
- * @link https://developer.wordpress.org/reference/functions/get_file_data/
349
- * @since 1.0.0
350
- * @param string $module Module slug or path.
351
- * @param bool $is_path Set this as true, if `$module` contains a path.
352
- * @return int
353
  */
354
- public function get_module_priority( $module, $is_path = false ) {
355
-
356
- // Default phpDoc headers.
357
- $default_headers = array(
358
- 'version' => 'Version',
359
- );
360
-
361
- // Maximum version number (major, minor, patch).
362
- $max_version = array(
363
- 99,
364
- 99,
365
- 999,
366
- );
367
-
368
- // If `$module` is a slug, get module path.
369
- if ( ! $is_path ) {
370
- $module = $this->get_module_path( $module );
371
- }
372
-
373
- $version = '1.0.0';
374
-
375
- /* @TODO: Add smart check */
376
- if ( ! $module ) {
377
- return $version;
378
- }
379
-
380
- $data = get_file_data( $module , $default_headers );
381
-
382
- // Check if version string has a valid value.
383
- if ( isset( $data['version'] ) && false !== strpos( $data['version'], '.' ) ) {
384
-
385
- // Clean the version string.
386
- preg_match( '/[\d\.]+/', $data['version'], $version );
387
- $version = $version[0];
388
- }
389
-
390
- // Convert version into integer.
391
- $parts = explode( '.', $version );
392
 
393
- // Calculate priority.
394
- foreach ( $parts as $index => $part ) {
395
- $parts[ $index ] = $max_version[ $index ] - (int) $part;
396
  }
397
 
398
- return (int) join( '', $parts );
399
  }
400
 
401
  /**
@@ -410,15 +363,24 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
410
  */
411
  public static function base_url( $file_path = '', $module_path ) {
412
  $module_path = wp_normalize_path( $module_path );
413
- $module_dir = dirname( $module_path );
 
 
 
 
 
 
 
414
 
415
  $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
416
  $stylesheet = get_stylesheet();
417
  $theme_root = get_raw_theme_root( $stylesheet );
418
  $theme_dir = "$theme_root/$stylesheet";
419
 
420
- if ( 0 === strpos( $module_path, $plugin_dir ) ) {
421
- $url = plugin_dir_url( $module_path );
 
 
422
  } else if ( false !== strpos( $module_path, $theme_dir ) ) {
423
  $explode = explode( $theme_dir, $module_dir );
424
  $url = get_stylesheet_directory_uri() . end( $explode );
@@ -446,7 +408,7 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
446
  */
447
  public function pass_core_to_widgets( $core, $path ) {
448
  $path = str_replace( '\\', '/', $path );
449
- $current_core = str_replace( '\\', '/', $this->settings['extra_base_dir'] );
450
 
451
  if ( false !== strpos( $path, $current_core ) ) {
452
  return self::get_instance();
@@ -455,11 +417,22 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
455
  return $core;
456
  }
457
 
 
 
 
 
 
 
 
 
 
 
 
 
458
  /**
459
  * Get path to the core directory.
460
  *
461
  * @since 1.0.0
462
- * @deprecated 1.1.0 Use constant `dirname( __FILE__ )`
463
  * @return string
464
  */
465
  public function get_core_dir() {
1
  <?php
2
  /**
3
  * Class Cherry Core
4
+ * Version: 1.5.0
5
  *
6
  * @package Cherry_Framework
7
  * @subpackage Class
59
  * Constructor.
60
  *
61
  * @since 1.0.0
 
62
  */
63
  public function __construct( $settings = array() ) {
64
+ global $chery_core_version;
 
65
 
66
  $defaults = array(
67
  'framework_path' => 'cherry-framework',
68
  'modules' => array(),
69
+ 'base_dir' => '',
70
+ 'base_url' => '',
 
71
  );
72
 
73
  $this->settings = array_merge( $defaults, $settings );
74
 
75
+ if ( isset( $chery_core_version ) && 0 < sizeof( $chery_core_version ) ) {
76
+ $core_paths = array_values( $chery_core_version );
77
+ $path_parts = pathinfo( $core_paths[0] );
78
+ $this->settings['base_dir'] = trailingslashit( $path_parts['dirname'] );
79
+ } else {
80
+ // This condition and the using of the function dirname is due to core backwards compatibility with old framework versions
81
+ $this->settings['base_dir'] = trailingslashit( dirname( __FILE__ ) );
82
+ }
83
+
84
+ $this->settings['base_url'] = trailingslashit( $this->base_url( '', $this->settings['base_dir'] ) );
85
 
86
  $this->run_collector();
87
 
122
  }
123
 
124
  foreach ( $this->settings['modules'] as $module => $settings ) {
125
+ $file_path = $this->get_module_file( $module );
 
126
 
127
  if ( ! array_key_exists( $module, self::$all_modules ) ) {
128
+ self::$all_modules[ $module ] = $file_path;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
130
  }
131
 
144
  * @since 1.1.0
145
  */
146
  public static function load_all_modules() {
147
+ foreach ( self::$all_modules as $module => $path ) {
148
 
 
 
 
149
  $loaded = self::load_module( $module, $path );
150
 
151
  if ( ! $loaded ) {
160
  * @since 1.4.0
161
  */
162
  public function load_textdomain() {
163
+ $mo_file_path = $this->settings['base_dir'] . 'languages/' . get_locale() . '.mo';
164
 
165
  load_textdomain( 'cherry-framework', $mo_file_path );
166
  }
195
  * @since 1.1.0
196
  */
197
  public function init_autoload_modules() {
 
198
  if ( empty( $this->modules ) ) {
199
  return;
200
  }
210
  }
211
 
212
  $args = ! empty( $settings['args'] ) ? $settings['args'] : array();
213
+
214
  $this->init_module( $module, $args );
215
  }
216
  }
224
  * @return mixed
225
  */
226
  public function init_module( $module, $args = array() ) {
227
+
228
+ if ( empty( $args[ 'module_path' ] ) ) {
229
+ $get_module_path = $this->get_module_path( $module );
230
+ $args['module_path'] = ( $get_module_path ) ? $get_module_path : '';
231
+ }
232
+
233
  $this->modules[ $module ] = $this->get_module_instance( $module, $args );
234
 
235
  /**
267
  public static function load_module( $module, $path ) {
268
  $class_name = self::get_class_name( $module );
269
 
 
 
 
 
270
  if ( ! $path ) {
271
  return false;
272
  }
273
 
274
+ if ( class_exists( $class_name ) ) {
275
+ return true;
276
+ }
277
+
278
  require_once( $path );
279
 
280
  return true;
296
  return false;
297
  }
298
 
299
+ $this->modules[ $module ] = call_user_func( array( $class_name, 'get_instance' ), $this, $args );
300
+
301
+ return $this->modules[ $module ];
302
  }
303
 
304
  /**
324
  */
325
  public function get_module_path( $module ) {
326
  $abs_path = false;
327
+ $rel_path = 'modules/' . $module . '/';
328
 
329
+ if ( file_exists( $this->settings['base_dir'] . $rel_path ) ) {
 
 
330
  $abs_path = $this->settings['base_dir'] . $rel_path;
331
  }
332
 
334
  }
335
 
336
  /**
337
+ * Get path to main file for passed module.
 
338
  *
339
+ * @since 1.0.1
340
+ * @param string $module Module slug.
341
+ * @return string
 
 
342
  */
343
+ public function get_module_file( $module ) {
344
+ $abs_path = false;
345
+ $rel_path = 'modules/' . $module . '/' . $module . '.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
 
347
+ if ( file_exists( $this->settings['base_dir'] . $rel_path ) ) {
348
+ $abs_path = $this->settings['base_dir'] . $rel_path;
 
349
  }
350
 
351
+ return $abs_path;
352
  }
353
 
354
  /**
363
  */
364
  public static function base_url( $file_path = '', $module_path ) {
365
  $module_path = wp_normalize_path( $module_path );
366
+ preg_match( '/\..*$/', $module_path, $ext );
367
+
368
+ if ( empty( $ext ) ) {
369
+ $module_dir = $module_path;
370
+ } else {
371
+ // This condition and the using of the function dirname is due to core backwards compatibility with old framework versions
372
+ $module_dir = dirname( $module_path );
373
+ }
374
 
375
  $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
376
  $stylesheet = get_stylesheet();
377
  $theme_root = get_raw_theme_root( $stylesheet );
378
  $theme_dir = "$theme_root/$stylesheet";
379
 
380
+ if ( 0 === strpos( $module_dir, $plugin_dir ) ) {
381
+ $home_url = home_url();
382
+ $abs_path = wp_normalize_path( ABSPATH );
383
+ $url = str_replace( untrailingslashit( $abs_path ), $home_url, $module_dir );
384
  } else if ( false !== strpos( $module_path, $theme_dir ) ) {
385
  $explode = explode( $theme_dir, $module_dir );
386
  $url = get_stylesheet_directory_uri() . end( $explode );
408
  */
409
  public function pass_core_to_widgets( $core, $path ) {
410
  $path = str_replace( '\\', '/', $path );
411
+ $current_core = str_replace( '\\', '/', $this->settings['base_dir'] );
412
 
413
  if ( false !== strpos( $path, $current_core ) ) {
414
  return self::get_instance();
417
  return $core;
418
  }
419
 
420
+ /**
421
+ * Get core version.
422
+ *
423
+ * @since 1.5.0
424
+ * @return string
425
+ */
426
+ public function get_core_version() {
427
+ global $chery_core_version;
428
+
429
+ return key( $chery_core_version );
430
+ }
431
+
432
  /**
433
  * Get path to the core directory.
434
  *
435
  * @since 1.0.0
 
436
  * @return string
437
  */
438
  public function get_core_dir() {
cherry-framework/config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name" : "Cherry Framework",
3
- "version" : "1.4.2",
4
  "description" : "",
5
  "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs",
6
  "git_link" : "https://github.com/CherryFramework/cherry-framework",
@@ -115,17 +115,6 @@
115
  "required" : false,
116
  "dependencies" : [ "cherry-interface-builder" ]
117
  },
118
- "cherry-template-manager" : {
119
- "name" : "Template Manager",
120
- "description" : "Module for load and parse *.tmpl files.",
121
- "version" : "1.0.2",
122
- "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/05.%20cherry-template-manager.md",
123
- "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-template-manager",
124
- "compatible" : ["theme", "plugin"],
125
- "wordpress_org" : true,
126
- "required" : false,
127
- "dependencies" : []
128
- },
129
  "cherry-term-meta" : {
130
  "name" : "Term Meta",
131
  "description" : "Manage term metadata.",
@@ -151,7 +140,7 @@
151
  "cherry-ui-elements" : {
152
  "name" : "UI Elements",
153
  "description" : "UI Elements",
154
- "version" : "1.4.1",
155
  "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/09.%20cherry-ui-elements.md",
156
  "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-ui-elements",
157
  "compatible" : ["theme", "plugin"],
@@ -162,7 +151,7 @@
162
  "cherry-utility" : {
163
  "name" : "Utility",
164
  "description" : "Multiple utility functions.",
165
- "version" : "1.1.6",
166
  "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/08.%20cherry-utility.md",
167
  "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-utility",
168
  "compatible" : ["theme", "plugin"],
@@ -181,10 +170,21 @@
181
  "required" : false,
182
  "dependencies" : [ "cherry-ui-elements" ]
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.1",
188
  "doc_link" : "",
189
  "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry5-insert-shortcode",
190
  "compatible" : [ "plugin" ],
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",
115
  "required" : false,
116
  "dependencies" : [ "cherry-interface-builder" ]
117
  },
 
 
 
 
 
 
 
 
 
 
 
118
  "cherry-term-meta" : {
119
  "name" : "Term Meta",
120
  "description" : "Manage term metadata.",
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"],
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"],
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" ],
cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Breadcrumb Trail
4
  * Description: A breadcrumb menu script for WordPress
5
- * Version: 1.1.3
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -334,23 +333,10 @@ if ( ! class_exists( 'Cherry_Breadcrumbs' ) ) {
334
  * @since 1.0.0
335
  */
336
  public function default_labels() {
337
- $page_on_front_id = get_option( 'page_on_front' );
338
- $use_custom_front_title = 'true';
339
- $use_custom_front_title = ( 'true' == $use_custom_front_title ) ? true : false;
340
-
341
- if ( $page_on_front_id ) {
342
- $page_on_front_title = get_the_title( $page_on_front_id );
343
- }
344
-
345
- if ( $use_custom_front_title ) {
346
- $default = esc_html__( 'Home', 'cherry-framework' );
347
- $page_on_front_title = $default;
348
- $page_on_front_title = $this->prepare_label( $page_on_front_title, $default );
349
- }
350
 
351
  $labels = array(
352
  'browse' => esc_html__( 'Browse:', 'cherry-framework' ),
353
- 'home' => $page_on_front_title,
354
  'error_404' => esc_html__( '404 Not Found', 'cherry-framework' ),
355
  'archives' => esc_html__( 'Archives', 'cherry-framework' ),
356
  'search' => esc_html__( 'Search results for &#8220;%s&#8221;', 'cherry-framework' ),
@@ -369,6 +355,33 @@ if ( ! class_exists( 'Cherry_Breadcrumbs' ) ) {
369
  return $labels;
370
  }
371
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
  /**
373
  * Build breadcrumbs trail items array.
374
  *
@@ -455,12 +468,16 @@ if ( ! class_exists( 'Cherry_Breadcrumbs' ) ) {
455
  $this->add_paged_items();
456
 
457
  /**
458
- * Filter final item array
459
  *
460
  * @since 1.0.0
461
- * @var array
 
 
 
 
462
  */
463
- $this->items = apply_filters( 'cherry_breadcrumbs_items', $this->items, $this->args );
464
 
465
  }
466
 
@@ -468,13 +485,14 @@ if ( ! class_exists( 'Cherry_Breadcrumbs' ) ) {
468
  * Add trail item int array.
469
  *
470
  * @since 1.0.0
 
471
  *
472
  * @param string $format Item format to add.
473
  * @param string $label Item label.
474
  * @param string $url Item URL.
475
  * @param string $class Item CSS class.
476
  */
477
- public function _add_item( $format = 'link_format', $label, $url = '', $class = '' ) {
478
 
479
  $title = esc_attr( wp_strip_all_tags( $label ) );
480
  $css = ( 'target_format' == $format ) ? 'target' : 'link';
@@ -485,9 +503,14 @@ if ( ! class_exists( 'Cherry_Breadcrumbs' ) ) {
485
  $class = $this->css[ $css ];
486
  }
487
 
488
- $item = sprintf( $this->args[ $format ], $label, $class, $title, $url );
 
489
 
490
- $this->items[] = sprintf( $this->args['item_format'], $item, esc_attr( $this->css['item'] ) );
 
 
 
 
491
 
492
  if ( 'target_format' == $format ) {
493
  $this->page_title = $label;
@@ -725,8 +748,10 @@ if ( ! class_exists( 'Cherry_Breadcrumbs' ) ) {
725
  /* Display terms for specific post type taxonomy if requested. */
726
  $this->add_post_terms( $post_id );
727
 
 
 
728
  /* End with the post title. */
729
- if ( $post_title = single_post_title( '', false ) ) {
730
 
731
  if ( 1 < get_query_var( 'page' ) ) {
732
 
@@ -1118,7 +1143,10 @@ if ( ! class_exists( 'Cherry_Breadcrumbs' ) ) {
1118
  'link_format',
1119
  $week,
1120
  add_query_arg(
1121
- array( 'm' => get_the_time( 'Y' ), 'w' => get_the_time( 'W' ) ),
 
 
 
1122
  esc_url( home_url( '/' ) )
1123
  )
1124
  );
@@ -1227,10 +1255,9 @@ if ( ! class_exists( 'Cherry_Breadcrumbs' ) ) {
1227
  if ( is_paged() ) {
1228
  $url = get_search_link();
1229
  $this->_add_item( 'link_format', $label, $url );
1230
-
 
1231
  }
1232
-
1233
- $this->_add_item( 'target_format', $label );
1234
  }
1235
 
1236
  /**
2
  /**
3
  * Module Name: Breadcrumb Trail
4
  * Description: A breadcrumb menu script for WordPress
 
5
  * Author: Cherry Team
6
  * Author URI: http://www.cherryframework.com/
7
  * License: GPLv3
333
  * @since 1.0.0
334
  */
335
  public function default_labels() {
 
 
 
 
 
 
 
 
 
 
 
 
 
336
 
337
  $labels = array(
338
  'browse' => esc_html__( 'Browse:', 'cherry-framework' ),
339
+ 'home' => $this->home_title(),
340
  'error_404' => esc_html__( '404 Not Found', 'cherry-framework' ),
341
  'archives' => esc_html__( 'Archives', 'cherry-framework' ),
342
  'search' => esc_html__( 'Search results for &#8220;%s&#8221;', 'cherry-framework' ),
355
  return $labels;
356
  }
357
 
358
+ /**
359
+ * Returns home title
360
+ *
361
+ * @return string
362
+ */
363
+ public function home_title() {
364
+
365
+ $title = esc_html__( 'Home', 'cherry-framework' );
366
+ $use_custom_title = apply_filters( 'cherry_breadcrumbs_custom_home_title', true );
367
+
368
+ if ( $use_custom_title ) {
369
+
370
+ $page_on_front_id = get_option( 'page_on_front' );
371
+ $page_title = false;
372
+
373
+ if ( $page_on_front_id ) {
374
+ $page_title = get_the_title( $page_on_front_id );
375
+ }
376
+
377
+ if ( ! empty( $page_title ) ) {
378
+ $title = $page_title;
379
+ }
380
+ }
381
+
382
+ return $this->prepare_label( $title );
383
+ }
384
+
385
  /**
386
  * Build breadcrumbs trail items array.
387
  *
468
  $this->add_paged_items();
469
 
470
  /**
471
+ * Filter final items array
472
  *
473
  * @since 1.0.0
474
+ * @since 1.1.5 Added 3rd parameter $this.
475
+ *
476
+ * @param array $this->items Current items array.
477
+ * @param array $this->args Current instance arguments array.
478
+ * @param array $this Current instance.
479
  */
480
+ $this->items = apply_filters( 'cherry_breadcrumbs_items', $this->items, $this->args, $this );
481
 
482
  }
483
 
485
  * Add trail item int array.
486
  *
487
  * @since 1.0.0
488
+ * @since 1.1.5 $prepend parameter.
489
  *
490
  * @param string $format Item format to add.
491
  * @param string $label Item label.
492
  * @param string $url Item URL.
493
  * @param string $class Item CSS class.
494
  */
495
+ public function _add_item( $format = 'link_format', $label, $url = '', $class = '', $prepend = false ) {
496
 
497
  $title = esc_attr( wp_strip_all_tags( $label ) );
498
  $css = ( 'target_format' == $format ) ? 'target' : 'link';
503
  $class = $this->css[ $css ];
504
  }
505
 
506
+ $item = sprintf( $this->args[ $format ], $label, $class, $title, $url );
507
+ $result = sprintf( $this->args['item_format'], $item, esc_attr( $this->css['item'] ) );
508
 
509
+ if ( true === $prepend ) {
510
+ array_unshift( $this->items, $result );
511
+ } else {
512
+ $this->items[] = $result;
513
+ }
514
 
515
  if ( 'target_format' == $format ) {
516
  $this->page_title = $label;
748
  /* Display terms for specific post type taxonomy if requested. */
749
  $this->add_post_terms( $post_id );
750
 
751
+ $post_title = single_post_title( '', false );
752
+
753
  /* End with the post title. */
754
+ if ( $post_title ) {
755
 
756
  if ( 1 < get_query_var( 'page' ) ) {
757
 
1143
  'link_format',
1144
  $week,
1145
  add_query_arg(
1146
+ array(
1147
+ 'm' => get_the_time( 'Y' ),
1148
+ 'w' => get_the_time( 'W' ),
1149
+ ),
1150
  esc_url( home_url( '/' ) )
1151
  )
1152
  );
1255
  if ( is_paged() ) {
1256
  $url = get_search_link();
1257
  $this->_add_item( 'link_format', $label, $url );
1258
+ } else {
1259
+ $this->_add_item( 'target_format', $label );
1260
  }
 
 
1261
  }
1262
 
1263
  /**
cherry-framework/modules/cherry-customizer/cherry-customizer.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Customizer
4
  * Description: Customizer functionality.
5
- * Version: 1.1.7
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,7 +9,6 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.1.7
14
  * @author Cherry Team <cherryframework@gmail.com>
15
  * @copyright Copyright (c) 2012 - 2016, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -32,15 +30,6 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
32
  */
33
  class Cherry_Customizer {
34
 
35
- /**
36
- * The version of this module.
37
- *
38
- * @since 1.0.0
39
- * @access protected
40
- * @var string
41
- */
42
- protected $version;
43
-
44
  /**
45
  * Unique prefix.
46
  * This is a theme or plugin slug.
@@ -105,6 +94,15 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
105
  */
106
  protected $fonts;
107
 
 
 
 
 
 
 
 
 
 
108
  /**
109
  * Module initialization.
110
  *
@@ -157,7 +155,6 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
157
  * Cherry customizer class construct.
158
  */
159
  public function __construct( $core, $args ) {
160
-
161
  /**
162
  * Cherry Customizer only works in WordPress 4.0 or later.
163
  */
@@ -171,14 +168,13 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
171
  return;
172
  }
173
 
174
- $this->prefix = $this->prepare_prefix( $args['prefix'] );
175
- $this->capability = ! empty( $args['capability'] ) ? $args['capability'] : 'edit_theme_options';
176
- $this->type = ! empty( $args['type'] ) && $this->sanitize_type( $args['type'] )
177
- ? $args['type'] : 'theme_mod';
178
- $this->options = $args['options'];
179
- $this->core = $core;
180
- $this->fonts = array();
181
- $this->version = '1.1.5';
182
 
183
  add_action( 'customize_register', array( $this, 'register' ) );
184
 
@@ -210,12 +206,11 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
210
  * Include advanced customizer controls classes
211
  *
212
  * @since 1.1.0
213
- * @since 1.1.4 Using dirname( __FILE__ ) instead of __DIR__.
214
  */
215
  private function include_custom_controls() {
216
 
217
  if ( ! class_exists( 'Cherry_WP_Customize_Iconpicker' ) ) {
218
- require_once( trailingslashit( dirname( __FILE__ ) ) . '/inc/class-cherry-wp-customize-iconpicker.php' );
219
  }
220
 
221
  }
@@ -324,6 +319,7 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
324
  * Add a customize control.
325
  *
326
  * @since 1.0.0
 
327
  * @param numder $id Settings ID.
328
  * @param array $args Control arguments.
329
  */
@@ -374,28 +370,43 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
374
  case 'url':
375
  case 'password':
376
  case 'checkbox':
377
- $control_args = wp_parse_args( array( 'type' => $field_type ), $control_args );
 
 
 
378
  break;
379
 
380
  case 'range':
381
  case 'number':
382
  $input_attrs = ( isset( $args['input_attrs'] ) ) ? $args['input_attrs'] : array();
383
- $control_args = wp_parse_args( array( 'type' => $field_type, 'input_attrs' => $input_attrs ), $control_args );
 
 
 
384
  break;
385
 
386
  case 'select':
387
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
388
- $control_args = wp_parse_args( array( 'type' => 'select', 'choices' => $choices ), $control_args );
 
 
 
389
  break;
390
 
391
  case 'fonts':
392
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : $this->get_fonts();
393
- $control_args = wp_parse_args( array( 'type' => 'select', 'choices' => $choices ), $control_args );
 
 
 
394
  break;
395
 
396
  case 'radio':
397
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
398
- $control_args = wp_parse_args( array( 'type' => 'radio', 'choices' => $choices ), $control_args );
 
 
 
399
  break;
400
 
401
  case 'hex_color':
@@ -516,16 +527,6 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
516
  $this->customize = $customize;
517
  }
518
 
519
- /**
520
- * Retrieve the version number.
521
- *
522
- * @since 1.0.0
523
- * @return string The version number of the module.
524
- */
525
- public function get_version() {
526
- return $this->version;
527
- }
528
-
529
  /**
530
  * Retrieve a option value by ID.
531
  *
@@ -924,8 +925,8 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
924
  * @param object $this Cherry_Customiser instance.
925
  */
926
  return apply_filters( 'cherry_customizer_get_fonts_data', array(
927
- 'standard' => dirname( __FILE__ ) . '/assets/fonts/standard.json',
928
- 'google' => dirname( __FILE__ ) . '/assets/fonts/google.json',
929
  ), $this );
930
  }
931
 
2
  /**
3
  * Module Name: Customizer
4
  * Description: Customizer functionality.
 
5
  * Author: Cherry Team
6
  * Author URI: http://www.cherryframework.com/
7
  * License: GPLv3
9
  *
10
  * @package Cherry_Framework
11
  * @subpackage Modules
 
12
  * @author Cherry Team <cherryframework@gmail.com>
13
  * @copyright Copyright (c) 2012 - 2016, Cherry Team
14
  * @link http://www.cherryframework.com/
30
  */
31
  class Cherry_Customizer {
32
 
 
 
 
 
 
 
 
 
 
33
  /**
34
  * Unique prefix.
35
  * This is a theme or plugin slug.
94
  */
95
  protected $fonts;
96
 
97
+ /**
98
+ * Module directory path.
99
+ *
100
+ * @since 1.5.0
101
+ * @access protected
102
+ * @var srting.
103
+ */
104
+ protected $module_path;
105
+
106
  /**
107
  * Module initialization.
108
  *
155
  * Cherry customizer class construct.
156
  */
157
  public function __construct( $core, $args ) {
 
158
  /**
159
  * Cherry Customizer only works in WordPress 4.0 or later.
160
  */
168
  return;
169
  }
170
 
171
+ $this->prefix = $this->prepare_prefix( $args['prefix'] );
172
+ $this->capability = ! empty( $args['capability'] ) ? $args['capability'] : 'edit_theme_options';
173
+ $this->type = ! empty( $args['type'] ) && $this->sanitize_type( $args['type'] ) ? $args['type'] : 'theme_mod';
174
+ $this->options = $args['options'];
175
+ $this->core = $core;
176
+ $this->fonts = array();
177
+ $this->module_path = $args['module_path'];
 
178
 
179
  add_action( 'customize_register', array( $this, 'register' ) );
180
 
206
  * Include advanced customizer controls classes
207
  *
208
  * @since 1.1.0
 
209
  */
210
  private function include_custom_controls() {
211
 
212
  if ( ! class_exists( 'Cherry_WP_Customize_Iconpicker' ) ) {
213
+ require_once( $this->module_path . 'inc/class-cherry-wp-customize-iconpicker.php' );
214
  }
215
 
216
  }
319
  * Add a customize control.
320
  *
321
  * @since 1.0.0
322
+ * @since 1.1.8 Added a `dropdown-pages` support.
323
  * @param numder $id Settings ID.
324
  * @param array $args Control arguments.
325
  */
370
  case 'url':
371
  case 'password':
372
  case 'checkbox':
373
+ case 'dropdown-pages':
374
+ $control_args = wp_parse_args( array(
375
+ 'type' => $field_type,
376
+ ), $control_args );
377
  break;
378
 
379
  case 'range':
380
  case 'number':
381
  $input_attrs = ( isset( $args['input_attrs'] ) ) ? $args['input_attrs'] : array();
382
+ $control_args = wp_parse_args( array(
383
+ 'type' => $field_type,
384
+ 'input_attrs' => $input_attrs,
385
+ ), $control_args );
386
  break;
387
 
388
  case 'select':
389
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
390
+ $control_args = wp_parse_args( array(
391
+ 'type' => 'select',
392
+ 'choices' => $choices,
393
+ ), $control_args );
394
  break;
395
 
396
  case 'fonts':
397
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : $this->get_fonts();
398
+ $control_args = wp_parse_args( array(
399
+ 'type' => 'select',
400
+ 'choices' => $choices,
401
+ ), $control_args );
402
  break;
403
 
404
  case 'radio':
405
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
406
+ $control_args = wp_parse_args( array(
407
+ 'type' => 'radio',
408
+ 'choices' => $choices,
409
+ ), $control_args );
410
  break;
411
 
412
  case 'hex_color':
527
  $this->customize = $customize;
528
  }
529
 
 
 
 
 
 
 
 
 
 
 
530
  /**
531
  * Retrieve a option value by ID.
532
  *
925
  * @param object $this Cherry_Customiser instance.
926
  */
927
  return apply_filters( 'cherry_customizer_get_fonts_data', array(
928
+ 'standard' => $this->module_path . 'assets/fonts/standard.json',
929
+ 'google' => $this->module_path . 'assets/fonts/google.json',
930
  ), $this );
931
  }
932
 
cherry-framework/modules/cherry-customizer/inc/class-cherry-wp-customize-iconpicker.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Framework
6
  * @subpackage Modules/Customizer
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/gpl-3.0.html
11
  */
@@ -26,7 +26,7 @@ if ( class_exists( 'WP_Customize_Control' ) ) {
26
  public $icon_data = array();
27
 
28
  /**
29
- * Trigger to try automatically pase icons from CSS file or not.
30
  *
31
  * @var boolean
32
  */
@@ -70,7 +70,9 @@ if ( class_exists( 'WP_Customize_Control' ) ) {
70
  $core = apply_filters( 'cherry_customizer_get_core', false );
71
  $ui_builder = $core->init_module(
72
  'cherry-ui-elements',
73
- array( 'ui_elements' => array( 'iconpicker' ) )
 
 
74
  );
75
 
76
  $args = array(
5
  * @package Cherry_Framework
6
  * @subpackage Modules/Customizer
7
  * @author Cherry Team <cherryframework@gmail.com>
8
+ * @copyright Copyright (c) 2012 - 2017, Cherry Team
9
  * @link http://www.cherryframework.com/
10
  * @license http://www.gnu.org/licenses/gpl-3.0.html
11
  */
26
  public $icon_data = array();
27
 
28
  /**
29
+ * Trigger to try automatically parse icons from CSS file or not.
30
  *
31
  * @var boolean
32
  */
70
  $core = apply_filters( 'cherry_customizer_get_core', false );
71
  $ui_builder = $core->init_module(
72
  'cherry-ui-elements',
73
+ array(
74
+ 'ui_elements' => array( 'iconpicker' ),
75
+ )
76
  );
77
 
78
  $args = array(
cherry-framework/modules/cherry-db-updater/cherry-db-updater.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Database Updater
4
  * Description: Handle database updates if required.
5
- * Version: 1.0.0
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Db_Updater
12
  * @subpackage Modules
13
- * @version 1.0.0
14
  * @author Cherry Team <cherryframework@gmail.com>
15