Cherry Search - Version 1.1.2

Version Description

  • Fixed bugs.

=

Download this release

Release Info

Developer TemplateMonster 2002
Plugin Icon 128x128 Cherry Search
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.1.2

Files changed (122) hide show
  1. assets/admin/img/index.php +10 -10
  2. assets/img/svg/list-layout-cascading-grid.svg +13 -13
  3. assets/img/svg/list-layout-grid.svg +16 -16
  4. assets/img/svg/list-layout-justified.svg +16 -16
  5. assets/img/svg/list-layout-listing.svg +13 -13
  6. assets/img/svg/list-layout-masonry.svg +15 -15
  7. cherry-framework/.gitignore +0 -30
  8. cherry-framework/.jscsrc +0 -22
  9. cherry-framework/.jshintignore +0 -8
  10. cherry-framework/.travis.yml +0 -95
  11. cherry-framework/README.md +0 -17
  12. cherry-framework/cherry-core.php +69 -96
  13. cherry-framework/codesniffer.ruleset.xml +0 -24
  14. cherry-framework/config.json +17 -17
  15. cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php +53 -26
  16. cherry-framework/modules/cherry-customizer/cherry-customizer.php +48 -40
  17. cherry-framework/modules/cherry-customizer/inc/class-cherry-wp-customize-iconpicker.php +19 -8
  18. cherry-framework/modules/cherry-db-updater/cherry-db-updater.php +1 -3
  19. cherry-framework/modules/cherry-dynamic-css/cherry-dynamic-css.php +1 -3
  20. cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-collector.php +1 -1
  21. cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-utilities.php +4 -4
  22. cherry-framework/modules/cherry-google-fonts-loader/cherry-google-fonts-loader.php +5 -12
  23. cherry-framework/modules/cherry-handler/assets/js/min/cherry-handler.min.js +1 -1
  24. cherry-framework/modules/cherry-handler/cherry-handler.php +50 -28
  25. cherry-framework/modules/cherry-interface-builder/cherry-interface-builder.php +28 -9
  26. cherry-framework/modules/cherry-interface-builder/inc/assets/cherry-interface-builder.scss +36 -2
  27. cherry-framework/modules/cherry-interface-builder/inc/assets/min/cherry-interface-builder.min.css +1 -1
  28. cherry-framework/modules/cherry-interface-builder/inc/views/component-accordion.php +1 -1
  29. cherry-framework/modules/cherry-interface-builder/inc/views/component-repeater.php +1 -1
  30. cherry-framework/modules/cherry-interface-builder/inc/views/component-tab-horizontal.php +1 -1
  31. cherry-framework/modules/cherry-interface-builder/inc/views/component-tab-vertical.php +1 -1
  32. cherry-framework/modules/cherry-interface-builder/inc/views/component-toggle.php +1 -1
  33. cherry-framework/modules/cherry-interface-builder/inc/views/control.php +1 -1
  34. cherry-framework/modules/cherry-interface-builder/inc/views/form.php +1 -1
  35. cherry-framework/modules/cherry-interface-builder/inc/views/html.php +1 -1
  36. cherry-framework/modules/cherry-interface-builder/inc/views/section.php +1 -1
  37. cherry-framework/modules/cherry-interface-builder/inc/views/settings-children-title.php +1 -1
  38. cherry-framework/modules/cherry-interface-builder/inc/views/settings.php +1 -1
  39. cherry-framework/modules/cherry-interface-builder/inc/views/tab-children-title.php +1 -1
  40. cherry-framework/modules/cherry-interface-builder/inc/views/toggle-children-title.php +1 -1
  41. cherry-framework/modules/cherry-js-core/cherry-js-core.php +26 -10
  42. cherry-framework/modules/cherry-post-formats-api/cherry-post-formats-api.php +42 -16
  43. cherry-framework/modules/cherry-post-formats-api/inc/class-cherry-facebook-embed.php +1 -1
  44. cherry-framework/modules/cherry-post-meta/cherry-post-meta.php +4 -6
  45. cherry-framework/modules/cherry-term-meta/cherry-term-meta.php +1 -3
  46. cherry-framework/modules/cherry-toolkit/cherry-toolkit.php +1 -3
  47. cherry-framework/modules/cherry-ui-elements/assets/sass/_lock.scss +110 -0
  48. cherry-framework/modules/cherry-ui-elements/cherry-ui-elements.php +27 -10
  49. cherry-framework/modules/cherry-ui-elements/i-ui.php +1 -1
  50. cherry-framework/modules/cherry-ui-elements/inc/class-cherry-lock-element.php +128 -0
  51. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/ui-button.php +3 -3
  52. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/view/button-view.php +10 -4
  53. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.css +1 -1
  54. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.scss +8 -5
  55. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/ui-checkbox.php +36 -16
  56. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.css +1 -1
  57. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.scss +7 -1
  58. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/ui-colorpicker.php +26 -10
  59. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/min/ui-iconpicker.min.css +1 -1
  60. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/ui-iconpicker.scss +8 -0
  61. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php +71 -12
  62. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/min/ui-media.min.css +1 -1
  63. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.scss +7 -0
  64. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/ui-media.php +27 -9
  65. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.css +1 -1
  66. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.js +1 -1
  67. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/ui-radio.scss +2 -1
  68. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/ui-radio.php +40 -17
  69. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-repeater/ui-repeater.php +39 -6
  70. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.css +1 -1
  71. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.js +1 -1
  72. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.js +1 -1
  73. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.scss +1 -0
  74. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/ui-select.php +74 -53
  75. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/min/ui-slider.min.css +1 -1
  76. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/ui-slider.scss +7 -0
  77. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/ui-slider.php +26 -9
  78. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/min/ui-stepper.min.css +1 -1
  79. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-stepper.scss +7 -0
  80. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/ui-stepper.php +25 -6
  81. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/min/ui-switcher.min.css +1 -1
  82. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-switcher.scss +1 -0
  83. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/ui-switcher.php +28 -10
  84. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/min/ui-text.min.css +1 -1
  85. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/ui-text.scss +7 -0
  86. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/ui-text.php +22 -5
  87. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/min/ui-textarea.min.css +1 -1
  88. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-textarea.scss +7 -0
  89. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/ui-textarea.php +23 -5
  90. cherry-framework/modules/cherry-ui-elements/ui-element.php +1 -16
  91. cherry-framework/modules/cherry-utility/cherry-utility.php +17 -7
  92. cherry-framework/modules/cherry-utility/inc/cherry-attributes-utilit.php +6 -3
  93. cherry-framework/modules/cherry-utility/inc/cherry-media-utilit.php +3 -1
  94. cherry-framework/modules/cherry-utility/inc/cherry-meta-data-utilit.php +2 -1
  95. cherry-framework/modules/cherry-utility/inc/cherry-satellite-utilit.php +8 -4
  96. cherry-framework/modules/cherry-widget-factory/cherry-widget-factory.php +15 -8
  97. cherry-framework/modules/cherry-widget-factory/inc/class-cherry-abstract-widget.php +34 -149
  98. cherry-framework/modules/cherry5-assets-loader/assets/append.js +16 -0
  99. cherry-framework/modules/cherry5-assets-loader/assets/min/append.min.js +1 -0
  100. cherry-framework/modules/cherry5-assets-loader/assets/var.js +2 -0
  101. cherry-framework/modules/cherry5-assets-loader/cherry5-assets-loader.php +136 -0
  102. cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-css.php +50 -0
  103. cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-js.php +50 -0
  104. cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle.php +113 -0
  105. cherry-framework/modules/cherry5-insert-shortcode/assets/cherry-insert-shortcode.scss +0 -1
  106. cherry-framework/modules/cherry5-insert-shortcode/cherry5-insert-shortcode.php +45 -21
  107. cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-button.php +1 -1
  108. cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php +35 -11
  109. cherry-framework/modules/cherry5-insert-shortcode/inc/views/insert-shortcode-pop-up.php +1 -1
  110. cherry-framework/modules/cherry5-insert-shortcode/inc/views/shortcode-content-area.php +1 -1
  111. cherry-framework/modules/cherry5-insert-shortcode/inc/views/shortcode-has-not-option.php +1 -1
  112. cherry-framework/modules/cherry5-insert-shortcode/inc/views/shortcode-options.php +1 -1
  113. cherry-framework/setup-theme.php +44 -0
  114. cherry-framework/setup.php +1 -1
  115. cherry-search.php +6 -5
  116. includes/public/cherry-template-manager/cherry-template-manager.php +112 -0
  117. includes/public/cherry-template-manager/inc/cherry-template-loader.php +193 -0
  118. includes/public/cherry-template-manager/inc/cherry-template-parser.php +196 -0
  119. index.php +10 -10
  120. languages/cherry-search-ru_RU.po +326 -326
  121. readme.txt +5 -1
  122. templates/index.php +10 -10
assets/admin/img/index.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- /**
3
- * Silence is golden.
4
- *
5
- * @package Cherry_Search
6
- * @subpackage index
7
- * @author Cherry Team
8
- * @license GPL-3.0+
9
- * @copyright 2012-2016, Cherry Team
10
- */
1
+ <?php
2
+ /**
3
+ * Silence is golden.
4
+ *
5
+ * @package Cherry_Search
6
+ * @subpackage index
7
+ * @author Cherry Team
8
+ * @license GPL-3.0+
9
+ * @copyright 2012-2016, Cherry Team
10
+ */
assets/img/svg/list-layout-cascading-grid.svg CHANGED
@@ -1,13 +1,13 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
- <rect fill="#FFFFFF" width="90" height="60"/>
7
- <rect x="7" y="7" fill="#495159" width="75.682" height="13"/>
8
- <rect x="7" y="24" fill="#495159" width="35.453" height="13"/>
9
- <rect x="46.682" y="24" fill="#495159" width="36" height="13"/>
10
- <rect x="7" y="41" fill="#495159" width="23" height="13"/>
11
- <rect x="34" y="41" fill="#495159" width="23" height="13"/>
12
- <rect x="61" y="41" fill="#495159" width="22" height="13"/>
13
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
+ <rect fill="#FFFFFF" width="90" height="60"/>
7
+ <rect x="7" y="7" fill="#495159" width="75.682" height="13"/>
8
+ <rect x="7" y="24" fill="#495159" width="35.453" height="13"/>
9
+ <rect x="46.682" y="24" fill="#495159" width="36" height="13"/>
10
+ <rect x="7" y="41" fill="#495159" width="23" height="13"/>
11
+ <rect x="34" y="41" fill="#495159" width="23" height="13"/>
12
+ <rect x="61" y="41" fill="#495159" width="22" height="13"/>
13
+ </svg>
assets/img/svg/list-layout-grid.svg CHANGED
@@ -1,16 +1,16 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
- <rect fill="#FFFFFF" width="90" height="60"/>
7
- <rect x="7" y="7" fill="#495159" width="23" height="13"/>
8
- <rect x="34" y="7" fill="#495159" width="23" height="13"/>
9
- <rect x="61" y="7" fill="#495159" width="22" height="13"/>
10
- <rect x="7" y="24" fill="#495159" width="23" height="13"/>
11
- <rect x="34" y="24" fill="#495159" width="23" height="13"/>
12
- <rect x="61" y="24" fill="#495159" width="22" height="13"/>
13
- <rect x="7" y="41" fill="#495159" width="23" height="13"/>
14
- <rect x="34" y="41" fill="#495159" width="23" height="13"/>
15
- <rect x="61" y="41" fill="#495159" width="22" height="13"/>
16
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
+ <rect fill="#FFFFFF" width="90" height="60"/>
7
+ <rect x="7" y="7" fill="#495159" width="23" height="13"/>
8
+ <rect x="34" y="7" fill="#495159" width="23" height="13"/>
9
+ <rect x="61" y="7" fill="#495159" width="22" height="13"/>
10
+ <rect x="7" y="24" fill="#495159" width="23" height="13"/>
11
+ <rect x="34" y="24" fill="#495159" width="23" height="13"/>
12
+ <rect x="61" y="24" fill="#495159" width="22" height="13"/>
13
+ <rect x="7" y="41" fill="#495159" width="23" height="13"/>
14
+ <rect x="34" y="41" fill="#495159" width="23" height="13"/>
15
+ <rect x="61" y="41" fill="#495159" width="22" height="13"/>
16
+ </svg>
assets/img/svg/list-layout-justified.svg CHANGED
@@ -1,16 +1,16 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
- <rect fill="#FFFFFF" width="90" height="60"/>
7
- <rect x="7" y="7" fill="#495159" width="28" height="13"/>
8
- <rect x="39" y="7" fill="#495159" width="20" height="13"/>
9
- <rect x="63" y="7" fill="#495159" width="20" height="13"/>
10
- <rect x="7" y="24" fill="#495159" width="16" height="13"/>
11
- <rect x="27" y="24" fill="#495159" width="16" height="13"/>
12
- <rect x="47" y="24" fill="#495159" width="16" height="13"/>
13
- <rect x="67" y="24" fill="#495159" width="16" height="13"/>
14
- <rect x="7" y="41" fill="#495159" width="48" height="13"/>
15
- <rect x="59" y="41" fill="#495159" width="24" height="13"/>
16
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
+ <rect fill="#FFFFFF" width="90" height="60"/>
7
+ <rect x="7" y="7" fill="#495159" width="28" height="13"/>
8
+ <rect x="39" y="7" fill="#495159" width="20" height="13"/>
9
+ <rect x="63" y="7" fill="#495159" width="20" height="13"/>
10
+ <rect x="7" y="24" fill="#495159" width="16" height="13"/>
11
+ <rect x="27" y="24" fill="#495159" width="16" height="13"/>
12
+ <rect x="47" y="24" fill="#495159" width="16" height="13"/>
13
+ <rect x="67" y="24" fill="#495159" width="16" height="13"/>
14
+ <rect x="7" y="41" fill="#495159" width="48" height="13"/>
15
+ <rect x="59" y="41" fill="#495159" width="24" height="13"/>
16
+ </svg>
assets/img/svg/list-layout-listing.svg CHANGED
@@ -1,13 +1,13 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
- <rect fill="#FFFFFF" width="90" height="60"/>
7
- <rect x="34" y="7" fill="#737E87" width="49" height="13"/>
8
- <rect x="34" y="24" fill="#737E87" width="49" height="13"/>
9
- <rect x="34" y="41" fill="#737E87" width="49" height="13"/>
10
- <rect x="7" y="7" fill="#495159" width="23" height="13"/>
11
- <rect x="7" y="24" fill="#495159" width="23" height="13"/>
12
- <rect x="7" y="41" fill="#495159" width="23" height="13"/>
13
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
+ <rect fill="#FFFFFF" width="90" height="60"/>
7
+ <rect x="34" y="7" fill="#737E87" width="49" height="13"/>
8
+ <rect x="34" y="24" fill="#737E87" width="49" height="13"/>
9
+ <rect x="34" y="41" fill="#737E87" width="49" height="13"/>
10
+ <rect x="7" y="7" fill="#495159" width="23" height="13"/>
11
+ <rect x="7" y="24" fill="#495159" width="23" height="13"/>
12
+ <rect x="7" y="41" fill="#495159" width="23" height="13"/>
13
+ </svg>
assets/img/svg/list-layout-masonry.svg CHANGED
@@ -1,15 +1,15 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
- <rect fill="#FFFFFF" width="90" height="60"/>
7
- <rect x="7" y="7" fill="#495159" width="23" height="17"/>
8
- <rect x="7" y="28" fill="#495159" width="23" height="7"/>
9
- <rect x="7" y="39" fill="#495159" width="23" height="15"/>
10
- <rect x="34" y="7" fill="#495159" width="23" height="22"/>
11
- <rect x="34" y="33" fill="#495159" width="23" height="21"/>
12
- <rect x="61" y="7" fill="#495159" width="22" height="10"/>
13
- <rect x="61" y="21" fill="#495159" width="22" height="19"/>
14
- <rect x="61" y="44" fill="#495159" width="22" height="10"/>
15
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="90px" height="60px" viewBox="0 0 90 60" enable-background="new 0 0 90 60" xml:space="preserve">
6
+ <rect fill="#FFFFFF" width="90" height="60"/>
7
+ <rect x="7" y="7" fill="#495159" width="23" height="17"/>
8
+ <rect x="7" y="28" fill="#495159" width="23" height="7"/>
9
+ <rect x="7" y="39" fill="#495159" width="23" height="15"/>
10
+ <rect x="34" y="7" fill="#495159" width="23" height="22"/>
11
+ <rect x="34" y="33" fill="#495159" width="23" height="21"/>
12
+ <rect x="61" y="7" fill="#495159" width="22" height="10"/>
13
+ <rect x="61" y="21" fill="#495159" width="22" height="19"/>
14
+ <rect x="61" y="44" fill="#495159" width="22" height="10"/>
15
+ </svg>
cherry-framework/.gitignore DELETED
@@ -1,30 +0,0 @@
1
- #########################
2
- # Files
3
- #########################
4
- .sass-cache
5
- package.json
6
-
7
- # Windows
8
- Thumbs.db
9
- Desktop.ini
10
-
11
- # OSX
12
- .DS_Store
13
- *.swp
14
- *~.nib
15
-
16
- #########################
17
- # Expansion
18
- #########################
19
- *.map
20
- *.log
21
- *.dll
22
-
23
- #########################
24
- # Folder
25
- #########################
26
- node_modules
27
-
28
- #########################
29
- # Travis-si files
30
- #########################
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/.jscsrc DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "preset": "wordpress",
3
- "fileExtensions": [ ".js" ],
4
- "excludeFiles": [
5
- "**/*.min.js",
6
- "modules/cherry-js-core/assets/js/cherry-js-core.js",
7
- "modules/cherry-post-formats-api/assets/js/cherry-post-formats.js",
8
- "modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.js",
9
- "modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.js",
10
- "modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.js",
11
- "modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/ui-radio.js",
12
- "modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/select2.js",
13
- "modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.js",
14
- "modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/ui-slider.js",
15
- "modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-stepper.js",
16
- "modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-switcher.js",
17
- "modules/cherry-ui-elements/inc/ui-elements/ui-collection/assets/js/jquery.collection.js",
18
- "modules/cherry-ui-elements/inc/ui-elements/ui-collection/assets/js/ui-collection.js",
19
- "modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/jquery-iconpicker.js",
20
- "modules/cherry-interface-builder/inc/assets/cherry-interface-builder.js",
21
- ]
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/.jshintignore DELETED
@@ -1,8 +0,0 @@
1
- **/*.min.js
2
- modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/select2.js
3
- modules/cherry-ui-elements/inc/ui-elements/ui-collection/assets/js/jquery.collection.js
4
- modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/jquery-iconpicker.js
5
-
6
- #Cherry Framework
7
- modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.js
8
- modules/cherry-js-core/assets/js/cherry-js-core.js
 
 
 
 
 
 
 
 
cherry-framework/.travis.yml DELETED
@@ -1,95 +0,0 @@
1
- # Travis CI configuration file.
2
- # @link https://travis-ci.org/
3
-
4
- # For use with the Twenty Sixteen WordPress theme
5
- # @link https://github.com/WordPress/twentysixteen/
6
-
7
- # Declare project language and PHP versions to test against.
8
- # @link http://about.travis-ci.org/docs/user/languages/php/
9
- language: php
10
-
11
- # Declare versions of PHP to use. Use one decimal max.
12
- php:
13
- - "5.6"
14
- - "5.5"
15
- - "5.4"
16
- - "5.3"
17
- # Current $required_php_version for WordPress: 5.2.4
18
- - "5.2"
19
-
20
- # Ditch sudo and use containers.
21
- # @link http://docs.travis-ci.com/user/migrating-from-legacy/#Why-migrate-to-container-based-infrastructure%3F
22
- # @link http://docs.travis-ci.com/user/workers/container-based-infrastructure/#Routing-your-build-to-container-based-infrastructure
23
- sudo: false
24
-
25
- # Declare which versions of WordPress to test against.
26
- # Also declare whether or not to test in Multisite.
27
- env:
28
- # Trunk (current version in development is 4.4)
29
- # @link https://github.com/WordPress/WordPress
30
- - WP_VERSION=master WP_MULTISITE=0
31
-
32
- # Use this to prepare your build for testing.
33
- # e.g. copy database configurations, environment variables, etc.
34
- # Failures in this section will result in build status 'errored'.
35
- before_script:
36
- # Set up WordPress installation.
37
- - export WP_DEVELOP_DIR=/tmp/wordpress/
38
- - mkdir -p $WP_DEVELOP_DIR
39
- # Use the Git mirror of WordPress.
40
- - git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
41
- # Set up Twenty Sixteen theme information.
42
- - theme_slug=$(basename $(pwd))
43
- - theme_dir=$WP_DEVELOP_DIR/src/wp-content/themes/$theme_slug
44
- - cd ..
45
- - mv $theme_slug $theme_dir
46
- # Set up WordPress configuration.
47
- - cd $WP_DEVELOP_DIR
48
- - echo $WP_DEVELOP_DIR
49
- - cp wp-tests-config-sample.php wp-tests-config.php
50
- - sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
51
- - sed -i "s/yourusernamehere/root/" wp-tests-config.php
52
- - sed -i "s/yourpasswordhere//" wp-tests-config.php
53
- # Create WordPress database.
54
- - mysql -e 'CREATE DATABASE wordpress_test;' -uroot
55
- # Install CodeSniffer for WordPress Coding Standards checks.
56
- - mkdir php-codesniffer && curl -L https://github.com/squizlabs/PHP_CodeSniffer/archive/master.tar.gz | tar xz --strip-components=1 -C php-codesniffer
57
- # Install WordPress Coding Standards.
58
- - mkdir wordpress-coding-standards && curl -L https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/master.tar.gz | tar xz --strip-components=1 -C wordpress-coding-standards
59
- # Hop into CodeSniffer directory.
60
- - cd php-codesniffer
61
- # Set install path for WordPress Coding Standards
62
- # @link https://github.com/squizlabs/PHP_CodeSniffer/blob/4237c2fc98cc838730b76ee9cee316f99286a2a7/CodeSniffer.php#L1941
63
- - scripts/phpcs --config-set installed_paths ../wordpress-coding-standards
64
- # Hop into themes directory.
65
- - cd $theme_dir
66
- # After CodeSniffer install you should refresh your path.
67
- - phpenv rehash
68
- # Install JSCS: JavaScript Code Style checker
69
- # @link http://jscs.info/
70
- - npm install -g jscs
71
- # Install JSHint, a JavaScript Code Quality Tool
72
- # @link http://jshint.com/docs/
73
- - npm install -g jshint
74
- - wget https://develop.svn.wordpress.org/trunk/.jshintrc
75
-
76
- # Run test script commands.
77
- # Default is specific to project language.
78
- # All commands must exit with code 0 on success. Anything else is considered failure.
79
- script:
80
- # Search theme for PHP syntax errors.
81
- - find . \( -name '*.php' \) -exec php -lf {} \;
82
- # Run the theme through JSHint
83
- - jshint .
84
- # Run the theme through JavaScript Code Style checker
85
- - jscs .
86
- # WordPress Coding Standards
87
- # @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
88
- # @link http://pear.php.net/package/PHP_CodeSniffer/
89
- # -p flag: Show progress of the run.
90
- # -s flag: Show sniff codes in all reports.
91
- # -v flag: Print verbose output.
92
- # -n flag: Do not print warnings (shortcut for --warning-severity=0)
93
- # --standard: Use WordPress as the standard.
94
- # --extensions: Only sniff PHP files.
95
- - $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/README.md DELETED
@@ -1,17 +0,0 @@
1
- [![license](https://img.shields.io/badge/license-GPL--v.3.0%2B-blue.svg?style=flat-square)](https://github.com/CherryFramework/cherry-framework/blob/master/LICENSE)
2
- [![Build Status](https://travis-ci.org/CherryFramework/cherry-framework.svg?branch=master)](https://travis-ci.org/CherryFramework/cherry-framework)
3
-
4
- # cherry-framework
5
- Module system.
6
-
7
- ## Authors
8
-
9
- * [@MaksimTS](https://github.com/MaksimTS) - **Manager**
10
- * [@Cheh](https://github.com/cheh) - **Developer**
11
- * [@Behaart](https://github.com/MakhonkoDenis) - **Developer**
12
- * [@MjHead](https://github.com/MjHead) - **Developer**
13
- * [@Sargas](https://github.com/SargasTM) - **Developer**
14
- * [@Shin](https://github.com/shinTM) - **Developer**
15
-
16
- ## Help
17
- Found a bug? Feature requests? [Create an issue - Thanks!](https://github.com/CherryFramework/cherry-framework/issues/new)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/cherry-core.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Class Cherry Core
4
- * Version: 1.4.1
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/codesniffer.ruleset.xml DELETED
@@ -1,24 +0,0 @@
1
- <?xml version="1.0"?>
2
- <ruleset name="WordPress Theme Coding Standards">
3
- <!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
4
- <!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
5
-
6
- <!-- Set a description for this ruleset. -->
7
- <description>A custom set of code standard rules to check for WordPress themes.</description>
8
-
9
- <!-- Include the WordPress ruleset, with space for exclusions if necessary. -->
10
- <rule ref="WordPress-Core">
11
- <exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
12
- <exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
13
-
14
- <exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
15
-
16
- <exclude name="Squiz.Commenting.FileComment.SpacingAfterComment" />
17
- <exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
18
- <exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
19
- <exclude name="Squiz.Commenting.InlineComment.NotCapital" />
20
- </rule>
21
- <rule ref="WordPress-Docs">
22
-
23
- </rule>
24
- </ruleset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cherry-framework/config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name" : "Cherry Framework",
3
- "version" : "1.4.1",
4
  "description" : "",
5
  "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs",
6
  "git_link" : "https://github.com/CherryFramework/cherry-framework",
@@ -19,7 +19,7 @@
19
  "cherry-customizer" : {
20
  "name" : "Customizer API",
21
  "description" : "Customizer functionality.",
22
- "version" : "1.1.6",
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"],
@@ -63,7 +63,7 @@
63
  "cherry-handler" : {
64
  "name" : "Cherry handler",
65
  "description" : "Initialize handlers.",
66
- "version" : "1.1.2",
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"],
@@ -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.0",
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",
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"],
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"],
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.6
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.6
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':
@@ -413,7 +424,14 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
413
  case 'iconpicker':
414
  $control_class = 'Cherry_WP_Customize_Iconpicker';
415
  $icon_data = ( isset( $args['icon_data'] ) ) ? $args['icon_data'] : array();
416
- $control_args = wp_parse_args( array( 'icon_data' => $icon_data ), $control_args );
 
 
 
 
 
 
 
417
  break;
418
 
419
  default:
@@ -509,16 +527,6 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
509
  $this->customize = $customize;
510
  }
511
 
512
- /**
513
- * Retrieve the version number.
514
- *
515
- * @since 1.0.0
516
- * @return string The version number of the module.
517
- */
518
- public function get_version() {
519
- return $this->version;
520
- }
521
-
522
  /**
523
  * Retrieve a option value by ID.
524
  *
@@ -917,8 +925,8 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
917
  * @param object $this Cherry_Customiser instance.
918
  */
919
  return apply_filters( 'cherry_customizer_get_fonts_data', array(
920
- 'standard' => dirname( __FILE__ ) . '/assets/fonts/standard.json',
921
- 'google' => dirname( __FILE__ ) . '/assets/fonts/google.json',
922
  ), $this );
923
  }
924
 
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':
424
  case 'iconpicker':
425
  $control_class = 'Cherry_WP_Customize_Iconpicker';
426
  $icon_data = ( isset( $args['icon_data'] ) ) ? $args['icon_data'] : array();
427
+ $auto_parse = ( isset( $args['auto_parse'] ) ) ? $args['auto_parse'] : array();
428
+ $control_args = wp_parse_args(
429
+ array(
430
+ 'icon_data' => $icon_data,
431
+ 'auto_parse' => $auto_parse,
432
+ ),
433
+ $control_args
434
+ );
435
  break;
436
 
437
  default:
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
  */
@@ -18,12 +18,20 @@ if ( class_exists( 'WP_Customize_Control' ) ) {
18
  class Cherry_WP_Customize_Iconpicker extends WP_Customize_Control {
19
 
20
  /**
21
- * Cherry Core instance
22
  *
 
23
  * @var array
24
  */
25
  public $icon_data = array();
26
 
 
 
 
 
 
 
 
27
  /**
28
  * UI instance
29
  *
@@ -62,15 +70,18 @@ if ( class_exists( 'WP_Customize_Control' ) ) {
62
  $core = apply_filters( 'cherry_customizer_get_core', false );
63
  $ui_builder = $core->init_module(
64
  'cherry-ui-elements',
65
- array( 'ui_elements' => array( 'iconpicker' ) )
 
 
66
  );
67
 
68
  $args = array(
69
- 'type' => 'iconpicker',
70
- 'id' => $this->id,
71
- 'name' => $this->id,
72
- 'value' => $this->value(),
73
- 'icon_data' => $this->icon_data,
 
74
  );
75
 
76
  add_action( 'customize_controls_print_styles', array( $this, 'print_sets' ) );
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
  */
18
  class Cherry_WP_Customize_Iconpicker extends WP_Customize_Control {
19
 
20
  /**
21
+ * Icons data array
22
  *
23
+ * @see cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php for data array format.
24
  * @var array
25
  */
26
  public $icon_data = array();
27
 
28
+ /**
29
+ * Trigger to try automatically parse icons from CSS file or not.
30
+ *
31
+ * @var boolean
32
+ */
33
+ public $auto_parse = false;
34
+
35
  /**
36
  * UI instance
37
  *
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(
79
+ 'type' => 'iconpicker',
80
+ 'id' => $this->id,
81
+ 'name' => $this->id,
82
+ 'value' => $this->value(),
83
+ 'icon_data' => $this->icon_data,
84
+ 'auto_parse' => $this->auto_parse,
85
  );
86
 
87
  add_action( 'customize_controls_print_styles', array( $this, 'print_sets' ) );
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
- * @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
  */
2
  /**
3
  * Module Name: Database Updater
4
  * Description: Handle database updates if required.
 
5
  * Author: Cherry Team
6
  * Author URI: http://www.cherryframework.com/
7
  * License: GPLv3
9
  *
10
  * @package Db_Updater
11
  * @subpackage Modules
 
12
  * @author Cherry Team <cherryframework@gmail.com>
13
+ * @copyright Copyright (c) 2012 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
cherry-framework/modules/cherry-dynamic-css/cherry-dynamic-css.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Dynamic CSS
4
  * Description: CSS parser which uses variables & functions for CSS code optimization
5
- * Version: 1.4.0
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.4.0
14
  * @author Cherry Team <cherryframework@gmail.com>
15
  * @copyright Copyright (c) 2012 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -515,7 +513,7 @@ if ( ! class_exists( 'Cherry_Dynamic_Css' ) ) {
515
  /**
516
  * Filter user function arguments
517
  *
518
- * @since 4.0.0
519
  */
520
  function prepare_args( $item ) {
521
 
2
  /**
3
  * Module Name: Dynamic CSS
4
  * Description: CSS parser which uses variables & functions for CSS code optimization
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
513
  /**
514
  * Filter user function arguments
515
  *
516
+ * @since 1.0.0
517
  */
518
  function prepare_args( $item ) {
519
 
cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-collector.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @package Cherry_Framework
6
  * @author Cherry Team <cherryframework@gmail.com>
7
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
8
  * @link http://www.cherryframework.com/
9
  * @license http://www.gnu.org/licenses/gpl-3.0.html
10
  */
4
  *
5
  * @package Cherry_Framework
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
  */
cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-utilities.php CHANGED
@@ -193,7 +193,7 @@ if ( ! class_exists( 'Cherry_Dynamic_Css_Utilities' ) ) {
193
  $is_rgb = ( false !== strpos( $color, 'rgb' ) && false === $is_rgba ) ? true : false;
194
  $is_hex = ( false === $is_rgba && false === $is_rgb ) ? true : false;
195
 
196
- $percent = round( ( double ) $percent / 100, 4 );
197
 
198
  if ( $is_hex && '#' == $color[0] ) {
199
  $color = substr( $color, 1 );
@@ -499,7 +499,7 @@ if ( ! class_exists( 'Cherry_Dynamic_Css_Utilities' ) ) {
499
  /**
500
  * Prepare font family for passing into typography function.
501
  *
502
- * @since 4.0.5
503
  * @param [string] $item Array item.
504
  * @param [int] $index Array item index.
505
  * @return void
@@ -723,10 +723,10 @@ if ( ! class_exists( 'Cherry_Dynamic_Css_Utilities' ) ) {
723
 
724
  switch ( $operation ) {
725
  case 'multiple' :
726
- $size = ( double ) $size * ( double ) $percent;
727
  break;
728
  case 'addition' :
729
- $size = ( double ) $size + ( double ) $percent;
730
  break;
731
  }
732
 
193
  $is_rgb = ( false !== strpos( $color, 'rgb' ) && false === $is_rgba ) ? true : false;
194
  $is_hex = ( false === $is_rgba && false === $is_rgb ) ? true : false;
195
 
196
+ $percent = round( (double) $percent / 100, 4 );
197
 
198
  if ( $is_hex && '#' == $color[0] ) {
199
  $color = substr( $color, 1 );
499
  /**
500
  * Prepare font family for passing into typography function.
501
  *
502
+ * @since 1.0.0
503
  * @param [string] $item Array item.
504
  * @param [int] $index Array item index.
505
  * @return void
723
 
724
  switch ( $operation ) {
725
  case 'multiple' :
726
+ $size = (double) $size * (double) $percent;
727
  break;
728
  case 'addition' :
729
+ $size = (double) $size + (double) $percent;
730
  break;
731
  }
732
 
cherry-framework/modules/cherry-google-fonts-loader/cherry-google-fonts-loader.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Google Fonts Loader
4
  * Description: Enqueue Google fonts
5
- * Version: 1.1.0
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
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
  */
@@ -30,14 +28,7 @@ if ( ! class_exists( 'Cherry_Google_Fonts_Loader' ) ) {
30
  class Cherry_Google_Fonts_Loader {
31
 
32
  /**
33
- * Module version
34
- *
35
- * @var string
36
- */
37
- public $module_version = '1.1.0';
38
-
39
- /**
40
- * Module version
41
  *
42
  * @var string
43
  */
@@ -84,7 +75,9 @@ if ( ! class_exists( 'Cherry_Google_Fonts_Loader' ) ) {
84
  function __construct( $core, $args ) {
85
 
86
  $this->core = $core;
87
- $this->args = wp_parse_args( $args, array( 'options' => array() ) );
 
 
88
 
89
  $this->fonts_host = apply_filters( 'cherry_google_fonts_cdn', $this->fonts_host );
90
 
2
  /**
3
  * Module Name: Google Fonts Loader
4
  * Description: Enqueue Google fonts
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
28
  class Cherry_Google_Fonts_Loader {
29
 
30
  /**
31
+ * Module slug.
 
 
 
 
 
 
 
32
  *
33
  * @var string
34
  */
75
  function __construct( $core, $args ) {
76
 
77
  $this->core = $core;
78
+ $this->args = wp_parse_args( $args, array(
79
+ 'options' => array(),
80
+ ) );
81
 
82
  $this->fonts_host = apply_filters( 'cherry_google_fonts_cdn', $this->fonts_host );
83
 
cherry-framework/modules/cherry-handler/assets/js/min/cherry-handler.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,a){"use strict";a.utilites.namespace("CherryAjaxHandler"),a.CherryAjaxHandler=function(t){var n=this,r={handlerId:"",cache:!1,processData:!0,url:"",beforeSendCallback:function(){},errorCallback:function(){},successCallback:function(){},completeCallback:function(){}};return t&&e.extend(r,t),window[r.handlerId]?(n.handlerSettings=window[r.handlerId]||{},n.ajaxRequest=null,n.ajaxProcessing=!1,n.data={action:n.handlerSettings.action,nonce:n.handlerSettings.nonce},""===r.url&&("false"===n.handlerSettings.is_public?r.url=window.ajaxurl:r.url=window.cherryHandlerAjaxUrl.ajax_url),n.send=function(){n.ajaxProcessing&&a.cherryHandlerUtils.noticeCreate("error-notice",n.handlerSettings.sys_messages.wait_processing,n.handlerSettings.is_public),n.ajaxProcessing=!0,n.ajaxRequest=jQuery.ajax({type:n.handlerSettings.type,url:r.url,data:n.data,cache:r.cache,dataType:n.handlerSettings.data_type,processData:r.processData,beforeSend:function(e,a){null!==n.ajaxRequest&&n.ajaxRequest.abort(),r.beforeSendCallback&&"function"==typeof r.beforeSendCallback&&r.beforeSendCallback(e,a)},error:function(a,t,n){e(document).trigger({type:"cherry-ajax-handler-error",jqXHR:a,textStatus:t,errorThrown:n}),r.errorCallback&&"function"==typeof r.errorCallback&&r.errorCallback(a,t,n)},success:function(t,c,s){n.ajaxProcessing=!1,e(document).trigger({type:"cherry-ajax-handler-success",response:t,jqXHR:s,textStatus:c}),r.successCallback&&"function"==typeof r.successCallback&&r.successCallback(t,c,s),a.cherryHandlerUtils.noticeCreate(t.type,t.message,n.handlerSettings.is_public)},complete:function(a,t){e(document).trigger({type:"cherry-ajax-handler-complete",jqXHR:a,textStatus:t}),r.completeCallback&&"function"==typeof r.completeCallback&&r.completeCallback(a,t)}})},n.sendData=function(e){var a=e||{};n.data={action:n.handlerSettings.action,nonce:n.handlerSettings.nonce,data:a},n.send()},void(n.sendFormData=function(t){var r,c=e(t);r=a.cherryHandlerUtils.serializeObject(c),n.sendData(r)})):(window.console&&window.console.warn("Handler id not found"),!1)},a.utilites.namespace("cherryHandlerUtils"),a.cherryHandlerUtils={noticeCreate:function(a,t,n){function r(){var a=100;e(".cherry-handler-notice").each(function(){e(this).css({top:a}),a+=e(this).outerHeight(!0)})}var c,s,i=0,o=n||!1;return!(!t||"true"===o)&&(c=e('<div class="cherry-handler-notice '+a+'"><span class="dashicons"></span><div class="inner">'+t+"</div></div>"),e("body").prepend(c),r(),i=-1*(c.outerWidth(!0)+10),c.css({right:i}),s=setTimeout(function(){c.css({right:10}).addClass("show-state")},100),s=setTimeout(function(){i=-1*(c.outerWidth(!0)+10),c.css({right:i}).removeClass("show-state")},4e3),void(s=setTimeout(function(){c.remove(),clearTimeout(s)},4500)))},serializeObject:function(a){var t=this,n={},r={},c={validate:/^[a-zA-Z][a-zA-Z0-9_-]*(?:\[(?:\d*|[a-zA-Z0-9_-]+)\])*$/,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_-]+$/};return this.build=function(e,a,t){return e[a]=t,e},this.push_counter=function(e){return void 0===r[e]&&(r[e]=0),r[e]++},e.each(a.serializeArray(),function(){var a,r,s,i;if(c.validate.test(this.name)){for(r=this.name.match(c.key),s=this.value,i=this.name;void 0!==(a=r.pop());)i=i.replace(new RegExp("\\["+a+"\\]$"),""),a.match(c.push)?s=t.build([],t.push_counter(i),s):a.match(c.fixed)?s=t.build([],a,s):a.match(c.named)&&(s=t.build({},a,s));n=e.extend(!0,n,s)}}),n}}}(jQuery,window.CherryJsCore);
1
+ !function(e,a){"use strict";a.utilites.namespace("CherryAjaxHandler"),a.CherryAjaxHandler=function(t){var n=this,r={handlerId:"",cache:!1,processData:!0,url:"",async:!1,beforeSendCallback:function(){},errorCallback:function(){},successCallback:function(){},completeCallback:function(){}};return t&&e.extend(r,t),window[r.handlerId]?(n.handlerSettings=window[r.handlerId]||{},n.ajaxRequest=null,n.ajaxProcessing=!1,n.data={action:n.handlerSettings.action,nonce:n.handlerSettings.nonce},""===r.url&&(r.url="false"===n.handlerSettings.is_public?window.ajaxurl:window.cherryHandlerAjaxUrl.ajax_url),n.send=function(){n.ajaxProcessing&&a.cherryHandlerUtils.noticeCreate("error-notice",n.handlerSettings.sys_messages.wait_processing,n.handlerSettings.is_public),n.ajaxProcessing=!0,n.ajaxRequest=jQuery.ajax({type:n.handlerSettings.type,url:r.url,data:n.data,cache:r.cache,dataType:n.handlerSettings.data_type,processData:r.processData,beforeSend:function(e,a){null===n.ajaxRequest||r.async||n.ajaxRequest.abort(),r.beforeSendCallback&&"function"==typeof r.beforeSendCallback&&r.beforeSendCallback(e,a)},error:function(a,t,n){e(document).trigger({type:"cherry-ajax-handler-error",jqXHR:a,textStatus:t,errorThrown:n}),r.errorCallback&&"function"==typeof r.errorCallback&&r.errorCallback(a,t,n)},success:function(t,c,s){n.ajaxProcessing=!1,e(document).trigger({type:"cherry-ajax-handler-success",response:t,jqXHR:s,textStatus:c}),r.successCallback&&"function"==typeof r.successCallback&&r.successCallback(t,c,s),a.cherryHandlerUtils.noticeCreate(t.type,t.message,n.handlerSettings.is_public)},complete:function(a,t){e(document).trigger({type:"cherry-ajax-handler-complete",jqXHR:a,textStatus:t}),r.completeCallback&&"function"==typeof r.completeCallback&&r.completeCallback(a,t)}})},n.sendData=function(e){var a=e||{};n.data={action:n.handlerSettings.action,nonce:n.handlerSettings.nonce,data:a},n.send()},void(n.sendFormData=function(t){var r,c=e(t);r=a.cherryHandlerUtils.serializeObject(c),n.sendData(r)})):(window.console&&window.console.warn("Handler id not found"),!1)},a.utilites.namespace("cherryHandlerUtils"),a.cherryHandlerUtils={noticeCreate:function(a,t,n){function r(){var a=100;e(".cherry-handler-notice").each(function(){e(this).css({top:a}),a+=e(this).outerHeight(!0)})}var c,s,i=0,o=n||!1;return t&&"true"!==o?(c=e('<div class="cherry-handler-notice '+a+'"><span class="dashicons"></span><div class="inner">'+t+"</div></div>"),e("body").prepend(c),r(),i=-1*(c.outerWidth(!0)+10),c.css({right:i}),s=setTimeout(function(){c.css({right:10}).addClass("show-state")},100),s=setTimeout(function(){i=-1*(c.outerWidth(!0)+10),c.css({right:i}).removeClass("show-state")},4e3),void(s=setTimeout(function(){c.remove(),clearTimeout(s)},4500))):!1},serializeObject:function(a){var t=this,n={},r={},c={validate:/^[a-zA-Z][a-zA-Z0-9_-]*(?:\[(?:\d*|[a-zA-Z0-9_-]+)\])*$/,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_-]+$/};return this.build=function(e,a,t){return e[a]=t,e},this.push_counter=function(e){return void 0===r[e]&&(r[e]=0),r[e]++},e.each(a.serializeArray(),function(){var a,r,s,i;if(c.validate.test(this.name)){for(r=this.name.match(c.key),s=this.value,i=this.name;void 0!==(a=r.pop());)i=i.replace(new RegExp("\\["+a+"\\]$"),""),a.match(c.push)?s=t.build([],t.push_counter(i),s):a.match(c.fixed)?s=t.build([],a,s):a.match(c.named)&&(s=t.build({},a,s));n=e.extend(!0,n,s)}}),n}}}(jQuery,window.CherryJsCore);
cherry-framework/modules/cherry-handler/cherry-handler.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Cherry handler
4
  * Description: Initializes handlers
5
- * Version: 1.1.2
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.1.2
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
  */
@@ -31,6 +29,24 @@ if ( ! class_exists( 'Cherry_Handler' ) ) {
31
  */
32
  class Cherry_Handler {
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  /**
35
  * Default settings.
36
  *
@@ -38,20 +54,14 @@ if ( ! class_exists( 'Cherry_Handler' ) ) {
38
  * @var array
39
  */
40
  private $settings = array(
41
- 'id' => '',
42
- 'action' => '',
43
- 'capability' => '',
44
- 'is_public' => false,
45
- 'callback' => '',
46
- 'type' => 'POST',
47
- 'data_type' => 'json',
48
- 'sys_messages' => array(
49
- 'invalid_base_data' => 'Unable to process the request without nonce or server error',
50
- 'no_right' => 'No right for this action',
51
- 'invalid_nonce' => 'Stop CHEATING!!!',
52
- 'access_is_allowed' => 'Access is allowed',
53
- 'wait_processing' => 'Please wait, processing the previous request',
54
- ),
55
  );
56
 
57
  /**
@@ -62,7 +72,16 @@ if ( ! class_exists( 'Cherry_Handler' ) ) {
62
  * @param array $args Class args.
63
  */
64
  public function __construct( $core, $args = array() ) {
65
- $this->settings = array_merge( $this->settings, $args );
 
 
 
 
 
 
 
 
 
66
 
67
  if ( empty( $this->settings['id'] ) ) {
68
  echo '<h3>ID is required attr</h3>';
@@ -74,11 +93,13 @@ if ( ! class_exists( 'Cherry_Handler' ) ) {
74
  return false;
75
  }
76
 
77
- add_action( 'wp_ajax_' . $this->settings['action'], array( $this, 'handler_init' ) );
 
78
 
79
- // Public action check
80
- if ( filter_var( $this->settings['is_public'], FILTER_VALIDATE_BOOLEAN ) ) {
81
- add_action( 'wp_ajax_nopriv_' . $this->settings['action'], array( $this, 'handler_init' ) );
 
82
  }
83
 
84
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
@@ -155,17 +176,17 @@ if ( ! class_exists( 'Cherry_Handler' ) ) {
155
  public function enqueue_scripts() {
156
  wp_enqueue_script(
157
  'cherry-handler-js',
158
- esc_url( Cherry_Core::base_url( 'assets/js/min/cherry-handler.min.js', __FILE__ ) ),
159
  array( 'jquery' ),
160
- '1.0.0',
161
  true
162
  );
163
 
164
  wp_enqueue_style(
165
  'cherry-handler-css',
166
- esc_url( Cherry_Core::base_url( 'assets/css/cherry-handler-styles.min.css', __FILE__ ) ),
167
  array(),
168
- '1.0.0',
169
  'all'
170
  );
171
  }
@@ -192,8 +213,9 @@ if ( ! class_exists( 'Cherry_Handler' ) ) {
192
  );
193
 
194
  if ( $this->settings['is_public'] ) {
195
- $ajax_url = esc_url( admin_url( 'admin-ajax.php' ) );
196
- wp_localize_script( 'cherry-handler-js', 'cherryHandlerAjaxUrl', array( 'ajax_url' => $ajax_url ) );
 
197
  }
198
  }
199
 
2
  /**
3
  * Module Name: Cherry handler
4
  * Description: Initializes handlers
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
29
  */
30
  class Cherry_Handler {
31
 
32
+ /**
33
+ * Core version.
34
+ *
35
+ * @since 1.5.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $core_version = '';
40
+
41
+ /**
42
+ * Module directory path.
43
+ *
44
+ * @since 1.5.0
45
+ * @access protected
46
+ * @var srting.
47
+ */
48
+ protected $module_path;
49
+
50
  /**
51
  * Default settings.
52
  *
54
  * @var array
55
  */
56
  private $settings = array(
57
+ 'id' => '',
58
+ 'action' => '',
59
+ 'capability' => '',
60
+ 'is_public' => false,
61
+ 'callback' => '',
62
+ 'type' => 'POST',
63
+ 'data_type' => 'json',
64
+ 'sys_messages' => array(),
 
 
 
 
 
 
65
  );
66
 
67
  /**
72
  * @param array $args Class args.
73
  */
74
  public function __construct( $core, $args = array() ) {
75
+ $this->settings['sys_messages'] = array(
76
+ 'invalid_base_data' => esc_html__( 'Unable to process the request without nonce or server error', 'cherry-framework' ),
77
+ 'no_right' => esc_html__( 'No right for this action', 'cherry-framework' ),
78
+ 'invalid_nonce' => esc_html__( 'Stop CHEATING!!!', 'cherry-framework' ),
79
+ 'access_is_allowed' => esc_html__( 'Access is allowed', 'cherry-framework' ),
80
+ 'wait_processing' => esc_html__( 'Please wait, processing the previous request', 'cherry-framework' ),
81
+ );
82
+ $this->settings = array_merge( $this->settings, $args );
83
+ $this->core_version = $core->get_core_version();
84
+ $this->module_path = $args['module_path'];
85
 
86
  if ( empty( $this->settings['id'] ) ) {
87
  echo '<h3>ID is required attr</h3>';
93
  return false;
94
  }
95
 
96
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
97
+ add_action( 'wp_ajax_' . $this->settings['action'], array( $this, 'handler_init' ) );
98
 
99
+ // Public action check.
100
+ if ( filter_var( $this->settings['is_public'], FILTER_VALIDATE_BOOLEAN ) ) {
101
+ add_action( 'wp_ajax_nopriv_' . $this->settings['action'], array( $this, 'handler_init' ) );
102
+ }
103
  }
104
 
105
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
176
  public function enqueue_scripts() {
177
  wp_enqueue_script(
178
  'cherry-handler-js',
179
+ esc_url( Cherry_Core::base_url( 'assets/js/min/cherry-handler.min.js', $this->module_path ) ),
180
  array( 'jquery' ),
181
+ $this->core_version,
182
  true
183
  );
184
 
185
  wp_enqueue_style(
186
  'cherry-handler-css',
187
+ esc_url( Cherry_Core::base_url( 'assets/css/cherry-handler-styles.min.css', $this->module_path ) ),
188
  array(),
189
+ $this->core_version,
190
  'all'
191
  );
192
  }
213
  );
214
 
215
  if ( $this->settings['is_public'] ) {
216
+ wp_localize_script( 'cherry-handler-js', 'cherryHandlerAjaxUrl', array(
217
+ 'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) ),
218
+ ) );
219
  }
220
  }
221
 
cherry-framework/modules/cherry-interface-builder/cherry-interface-builder.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Interface Builder
4
  * Description: The module for the creation of interfaces in the WordPress admin panel
5
- * Version: 1.1.2
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.1.2
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
  */
@@ -30,6 +28,25 @@ if ( ! class_exists( 'Cherry_Interface_Builder' ) ) {
30
  * @since 1.0.0
31
  */
32
  class Cherry_Interface_Builder {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  /**
34
  * Module settings.
35
  *
@@ -106,7 +123,9 @@ if ( ! class_exists( 'Cherry_Interface_Builder' ) ) {
106
  $this->args
107
  );
108
 
109
- $this->ui_elements = $core->init_module( 'cherry-ui-elements' );
 
 
110
 
111
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
112
  }
@@ -277,7 +296,7 @@ if ( ! class_exists( 'Cherry_Interface_Builder' ) ) {
277
  $path = ( array_key_exists( $type, $this->args['views'] ) ) ? $this->args['views'][ $type ] : $this->args['views']['control'];
278
 
279
  $path = is_array( $path ) ? $path[0] : $path;
280
- $path = file_exists( $path ) ? $path : trailingslashit( dirname( __FILE__ ) ) . $path;
281
 
282
  } else {
283
  $path = $args['view'];
@@ -442,16 +461,16 @@ if ( ! class_exists( 'Cherry_Interface_Builder' ) ) {
442
  public function enqueue_assets() {
443
  wp_enqueue_script(
444
  'cherry-interface-builder',
445
- esc_url( Cherry_Core::base_url( 'inc/assets/min/cherry-interface-builder.min.js', __FILE__ ) ),
446
  array( 'jquery' ),
447
- '1.0.0',
448
  true
449
  );
450
  wp_enqueue_style(
451
  'cherry-interface-builder',
452
- esc_url( Cherry_Core::base_url( 'inc/assets/min/cherry-interface-builder.min.css', __FILE__ ) ),
453
  array(),
454
- '1.0.0',
455
  'all'
456
  );
457
  }
2
  /**
3
  * Module Name: Interface Builder
4
  * Description: The module for the creation of interfaces in the WordPress admin panel
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
28
  * @since 1.0.0
29
  */
30
  class Cherry_Interface_Builder {
31
+
32
+ /**
33
+ * Core version.
34
+ *
35
+ * @since 1.5.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $core_version = '';
40
+
41
+ /**
42
+ * Module directory path.
43
+ *
44
+ * @since 1.5.0
45
+ * @access protected
46
+ * @var srting.
47
+ */
48
+ protected $module_path;
49
+
50
  /**
51
  * Module settings.
52
  *
123
  $this->args
124
  );
125
 
126
+ $this->core_version = $core->get_core_version();
127
+ $this->module_path = $args['module_path'];
128
+ $this->ui_elements = $core->init_module( 'cherry-ui-elements' );
129
 
130
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
131
  }
296
  $path = ( array_key_exists( $type, $this->args['views'] ) ) ? $this->args['views'][ $type ] : $this->args['views']['control'];
297
 
298
  $path = is_array( $path ) ? $path[0] : $path;
299
+ $path = file_exists( $path ) ? $path : $this->module_path . $path;
300
 
301
  } else {
302
  $path = $args['view'];
461
  public function enqueue_assets() {
462
  wp_enqueue_script(
463
  'cherry-interface-builder',
464
+ esc_url( Cherry_Core::base_url( 'inc/assets/min/cherry-interface-builder.min.js', $this->module_path ) ),
465
  array( 'jquery' ),
466
+ $this->core_version,
467
  true
468
  );
469
  wp_enqueue_style(
470
  'cherry-interface-builder',
471
+ esc_url( Cherry_Core::base_url( 'inc/assets/min/cherry-interface-builder.min.css', $this->module_path ) ),
472
  array(),
473
+ $this->core_version,
474
  'all'
475
  );
476
  }
cherry-framework/modules/cherry-interface-builder/inc/assets/cherry-interface-builder.scss CHANGED
@@ -1,4 +1,5 @@
1
  $color-1: #fff; // Background color.
 
2
  $color-2: #efefef; // Background color.
3
  $color-3: #96989a; // Description color and tabs button text color.
4
  $color-4: #b4b7ba; //
@@ -202,6 +203,10 @@ html{
202
  background: none;
203
  cursor: pointer;
204
  position: relative;
 
 
 
 
205
  .cherry-toggle__title {
206
  font-weight: 700;
207
  font-size: 14px;
@@ -221,6 +226,9 @@ html{
221
  height: 9px;
222
  text-align: left;
223
  overflow: hidden;
 
 
 
224
  &.hide-icon{
225
  &:before{
226
  position: relative;
@@ -236,8 +244,6 @@ html{
236
  top: -7px;
237
  left: -9px;
238
  }
239
- //position: relative;
240
- //left: 14px;
241
  transform:scaleX(0);
242
  transition: all 300ms cubic-bezier(0.215, 0.61, 0.355, 1);
243
  }
@@ -266,6 +272,12 @@ html{
266
  box-shadow:$shadow;
267
  border-radius: $br-radius;
268
  border: $border;
 
 
 
 
 
 
269
  }
270
  }
271
  }
@@ -384,6 +396,15 @@ html{
384
  }
385
  }
386
  }
 
 
 
 
 
 
 
 
 
387
  }
388
  .cherry-settings{
389
  & + & {
@@ -430,6 +451,19 @@ html{
430
  @media ( min-width: 961px ) {
431
  padding: $padding * 3;
432
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  }
434
 
435
  .cherry-section.cherry-scroll > .cherry-section__holder > .cherry-section__inner,
1
  $color-1: #fff; // Background color.
2
+ $widget-bg: #495159; // Background color in widgets.
3
  $color-2: #efefef; // Background color.
4
  $color-3: #96989a; // Description color and tabs button text color.
5
  $color-4: #b4b7ba; //
203
  background: none;
204
  cursor: pointer;
205
  position: relative;
206
+ .widget &{
207
+ background-color: $widget-bg;
208
+ color: $color-1;
209
+ }
210
  .cherry-toggle__title {
211
  font-weight: 700;
212
  font-size: 14px;
226
  height: 9px;
227
  text-align: left;
228
  overflow: hidden;
229
+ .widget &{
230
+ color: $color-1;
231
+ }
232
  &.hide-icon{
233
  &:before{
234
  position: relative;
244
  top: -7px;
245
  left: -9px;
246
  }
 
 
247
  transform:scaleX(0);
248
  transition: all 300ms cubic-bezier(0.215, 0.61, 0.355, 1);
249
  }
272
  box-shadow:$shadow;
273
  border-radius: $br-radius;
274
  border: $border;
275
+ .widget &{
276
+ box-shadow:none;
277
+ border-radius: 0;
278
+ border-left: 0;
279
+ border-right: 0;
280
+ }
281
  }
282
  }
283
  }
396
  }
397
  }
398
  }
399
+ .widget &{
400
+ padding: 0;
401
+ &__content{
402
+ margin: 0 $margin * -1.5 $margin * 2;
403
+ .cherry-control{
404
+ padding: $padding * 1.5 $padding * 2;
405
+ }
406
+ }
407
+ }
408
  }
409
  .cherry-settings{
410
  & + & {
451
  @media ( min-width: 961px ) {
452
  padding: $padding * 3;
453
  }
454
+ .widget & {
455
+ padding: $padding * 1.5 0;
456
+ flex-direction: column;
457
+ &__content{
458
+ -webkit-box-flex: 0;
459
+ flex: 0 1 100%;
460
+ }
461
+ &__info{
462
+ -webkit-box-flex: 0;
463
+ flex: 0 1 100%;
464
+ padding-right: 0;
465
+ }
466
+ }
467
  }
468
 
469
  .cherry-section.cherry-scroll > .cherry-section__holder > .cherry-section__inner,
cherry-framework/modules/cherry-interface-builder/inc/assets/min/cherry-interface-builder.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-kit button *{pointer-events:none}.cherry-component__content .cherry-settings__content{display:none}.cherry-component__content .cherry-settings__content.show{display:inherit}html{font-size:13px}.cherry-ui-kit h1{font-weight:700;font-size:2.308rem;line-height:2.308rem}.cherry-ui-kit h1 .dashicons{font-size:3rem;line-height:inherit;width:20px;margin:0 20px 0 -5px}.cherry-ui-kit h2{font-weight:600;font-size:1.538rem;line-height:1.538rem}.cherry-ui-kit h2 .dashicons{font-size:2rem;line-height:inherit;width:20px;margin-right:20px}.cherry-ui-kit h3{font-weight:600;font-size:1.231rem;line-height:1.231rem}.cherry-ui-kit h3 .dashicons{font-size:1.7rem;line-height:inherit;margin-right:5px}.cherry-ui-kit h4{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h5{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h6{font-weight:400;font-size:1rem;line-height:1rem}.cherry-ui-kit a{color:#298ffc;text-decoration:none}.cherry-ui-kit a:hover{color:#23282d}.cherry-ui-kit a:focus{outline:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}.cherry-ui-kit__description{font-size:0.9rem;color:#96989a;margin:10px 0}.cherry-ui-kit__title{margin:20px 0}.cherry-ui-kit.hide{display:none}.cherry-control+.cherry-control,.cherry-settings+.cherry-control{border-top:1px solid rgba(0,0,0,0.1)}.cherry-section{padding:10px;background-color:#fff;margin-left:-10px}.cherry-section__title,.cherry-section__description{margin:10px 0 0 0}.cherry-section+.cherry-ui-kit{border-top:1px solid rgba(0,0,0,0.1)}@media (min-width: 783px){.cherry-section{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);padding:15px;margin:15px 15px 0 0}.cherry-section__holder{background-color:#efefef;border-radius:5px;padding:15px}.cherry-section__info{background-color:#fff;border-radius:5px;padding:15px;box-shadow:0px 5px 21px rgba(0,0,0,0.1);margin-bottom:15px}.cherry-section .cherry-settings{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);background-color:#fff;margin-top:15px}.cherry-section .cherry-settings:first-child{margin-top:0}}@media (min-width: 961px){.cherry-section{padding:30px;margin:20px 20px 0 0}.cherry-section__info{padding:30px;margin-bottom:30px}.cherry-section__holder{padding:30px}.cherry-section .cherry-settings{margin-top:30px}}.cherry-component{padding:20px 0}@media (min-width: 783px){.cherry-component{padding:15px}}@media (min-width: 961px){.cherry-component{padding:30px}}.cherry-component+*{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component__title{margin-top:0}.cherry-component .cherry-component__content .cherry-settings{padding:0;border-top:none}.cherry-component__button{display:block;min-height:45px;-webkit-transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19);transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19)}.cherry-component__button .cherry-ui-kit__title{color:inherit}.cherry-component__button.active,.cherry-component__button:hover{color:#298ffc;-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component__button:focus{outline:none;box-shadow:inset 0px 0px 10px rgba(41,143,252,0.5);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button,.cherry-component.cherry-toggle .cherry-component__button{width:100%;padding:15px 20px;border:0;background:none;cursor:pointer;position:relative}.cherry-component.cherry-accordion .cherry-component__button .cherry-toggle__title,.cherry-component.cherry-toggle .cherry-component__button .cherry-toggle__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{position:absolute;top:50%;right:5px;margin-top:-10px;font-size:25px;color:#b4b7ba;padding:5px 5px;width:10px;height:9px;text-align:left;overflow:hidden}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon:before{position:relative;top:-8px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1);transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon:before{position:relative;top:-7px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].show-icon{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].hide-icon{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button+.cherry-settings__content,.cherry-component.cherry-toggle .cherry-component__button+.cherry-settings__content{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings+.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings+.cherry-settings{margin-top:10px}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:start;align-content:flex-start;border-bottom:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0;-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%;-ms-flex-item-align:auto;-ms-grid-row-align:auto;align-self:auto;padding:15px 20px;border:0;background:none;cursor:pointer}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button.active{-ms-box-shadow:inset 0px -3px 0px 0px #298ffc;box-shadow:inset 0px -3px 0px 0px #298ffc}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button .cherry-tab__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__body{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);background-color:#fff}.cherry-component.cherry-tab .cherry-tab__body .cherry-settings{box-shadow:none;border-radius:0;border:none;background-color:inherit;margin:0}@media (min-width: 783px){.cherry-component.cherry-tab .cherry-tab__tabs{border:solid 1px rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:none}.cherry-component.cherry-tab .cherry-tab__body{border:none}.cherry-component.cherry-tab .cherry-tab__body .cherry-tab__content{border:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab--horizontal>.cherry-tab__body{border-radius:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-radius:5px 5px 0 0;border-bottom:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__content{border-radius:0 0 5px 5px}.cherry-component.cherry-tab--vertical>.cherry-tab__body{display:-webkit-box;display:-ms-flexbox;display:flex;border-radius:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:0;-ms-flex:0 1 25%;flex:0 1 25%;border-radius:5px 0 0 5px;border-right:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{text-align:right}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button .cherry-tab__title{width:100%}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button.active{box-shadow:inset -3px 0px 0px #298ffc}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__content{-webkit-box-flex:0;-ms-flex:0 1 75%;flex:0 1 75%;border-radius:0 5px 5px 0}}@media (min-width: 1200px){.cherry-component.cherry-tab--vertical .cherry-tab__tabs{-webkit-box-flex:0;-ms-flex:0 1 20%;flex:0 1 20%}.cherry-component.cherry-tab--vertical .cherry-tab__content{-webkit-box-flex:0;-ms-flex:0 1 80%;flex:0 1 80%}}.cherry-settings+.cherry-settings{border-top:1px solid rgba(0,0,0,0.1)}.cherry-settings .cherry-settings__title{margin-bottom:10px}.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:10px}@media (min-width: 783px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:15px}}@media (min-width: 961px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:30px}}.cherry-control{padding:15px 20px}.cherry-control__title{margin:0 0 10px 0}.cherry-control__description{margin-top:0}.cherry-control .cherry-ui-container{margin:0}@media (min-width: 783px){.cherry-control{padding:15px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.cherry-control__info{-webkit-box-flex:0;-ms-flex:0 1 30%;flex:0 1 30%;padding-right:15px}.cherry-control__content{-webkit-box-flex:0;-ms-flex:0 1 70%;flex:0 1 70%}}@media (min-width: 961px){.cherry-control{padding:30px}}@media (min-width: 783px){.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner,.cherry-tab__content>.cherry-scroll,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content{max-height:700px;overflow-y:auto;position:relative}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar{width:10px;height:10px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-button,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-button,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button{width:0px;height:0px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb{background-color:#298ffc;border:none;border-radius:5px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:hover,.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:active,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:hover,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:active,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active{background:#206ff4}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-track,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-track,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track{background-color:#fff;border:none;border-radius:5px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-corner,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-corner,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner{background:transparent}}
1
+ .cherry-ui-kit button *{pointer-events:none}.cherry-component__content .cherry-settings__content{display:none}.cherry-component__content .cherry-settings__content.show{display:inherit}html{font-size:13px}.cherry-ui-kit h1{font-weight:700;font-size:2.308rem;line-height:2.308rem}.cherry-ui-kit h1 .dashicons{font-size:3rem;line-height:inherit;width:20px;margin:0 20px 0 -5px}.cherry-ui-kit h2{font-weight:600;font-size:1.538rem;line-height:1.538rem}.cherry-ui-kit h2 .dashicons{font-size:2rem;line-height:inherit;width:20px;margin-right:20px}.cherry-ui-kit h3{font-weight:600;font-size:1.231rem;line-height:1.231rem}.cherry-ui-kit h3 .dashicons{font-size:1.7rem;line-height:inherit;margin-right:5px}.cherry-ui-kit h4{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h5{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h6{font-weight:400;font-size:1rem;line-height:1rem}.cherry-ui-kit a{color:#298ffc;text-decoration:none}.cherry-ui-kit a:hover{color:#23282d}.cherry-ui-kit a:focus{outline:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}.cherry-ui-kit__description{font-size:0.9rem;color:#96989a;margin:10px 0}.cherry-ui-kit__title{margin:20px 0}.cherry-ui-kit.hide{display:none}.cherry-control+.cherry-control,.cherry-settings+.cherry-control{border-top:1px solid rgba(0,0,0,0.1)}.cherry-section{padding:10px;background-color:#fff;margin-left:-10px}.cherry-section__title,.cherry-section__description{margin:10px 0 0 0}.cherry-section+.cherry-ui-kit{border-top:1px solid rgba(0,0,0,0.1)}@media (min-width: 783px){.cherry-section{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);padding:15px;margin:15px 15px 0 0}.cherry-section__holder{background-color:#efefef;border-radius:5px;padding:15px}.cherry-section__info{background-color:#fff;border-radius:5px;padding:15px;box-shadow:0px 5px 21px rgba(0,0,0,0.1);margin-bottom:15px}.cherry-section .cherry-settings{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);background-color:#fff;margin-top:15px}.cherry-section .cherry-settings:first-child{margin-top:0}}@media (min-width: 961px){.cherry-section{padding:30px;margin:20px 20px 0 0}.cherry-section__info{padding:30px;margin-bottom:30px}.cherry-section__holder{padding:30px}.cherry-section .cherry-settings{margin-top:30px}}.cherry-component{padding:20px 0}@media (min-width: 783px){.cherry-component{padding:15px}}@media (min-width: 961px){.cherry-component{padding:30px}}.cherry-component+*{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component__title{margin-top:0}.cherry-component .cherry-component__content .cherry-settings{padding:0;border-top:none}.cherry-component__button{display:block;min-height:45px;-webkit-transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19);transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19)}.cherry-component__button .cherry-ui-kit__title{color:inherit}.cherry-component__button.active,.cherry-component__button:hover{color:#298ffc;-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component__button:focus{outline:none;box-shadow:inset 0px 0px 10px rgba(41,143,252,0.5);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button,.cherry-component.cherry-toggle .cherry-component__button{width:100%;padding:15px 20px;border:0;background:none;cursor:pointer;position:relative}.widget .cherry-component.cherry-accordion .cherry-component__button,.widget .cherry-component.cherry-toggle .cherry-component__button{background-color:#495159;color:#fff}.cherry-component.cherry-accordion .cherry-component__button .cherry-toggle__title,.cherry-component.cherry-toggle .cherry-component__button .cherry-toggle__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{position:absolute;top:50%;right:5px;margin-top:-10px;font-size:25px;color:#b4b7ba;padding:5px 5px;width:10px;height:9px;text-align:left;overflow:hidden}.widget .cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.widget .cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{color:#fff}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon:before{position:relative;top:-8px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1);transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon:before{position:relative;top:-7px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].show-icon{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].hide-icon{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button+.cherry-settings__content,.cherry-component.cherry-toggle .cherry-component__button+.cherry-settings__content{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings+.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings+.cherry-settings{margin-top:10px}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1)}.widget .cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.widget .cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:none;border-radius:0;border-left:0;border-right:0}.cherry-component.cherry-tab .cherry-tab__tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:start;align-content:flex-start;border-bottom:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0;-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%;-ms-flex-item-align:auto;-ms-grid-row-align:auto;align-self:auto;padding:15px 20px;border:0;background:none;cursor:pointer}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button.active{-ms-box-shadow:inset 0px -3px 0px 0px #298ffc;box-shadow:inset 0px -3px 0px 0px #298ffc}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button .cherry-tab__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__body{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);background-color:#fff}.cherry-component.cherry-tab .cherry-tab__body .cherry-settings{box-shadow:none;border-radius:0;border:none;background-color:inherit;margin:0}@media (min-width: 783px){.cherry-component.cherry-tab .cherry-tab__tabs{border:solid 1px rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:none}.cherry-component.cherry-tab .cherry-tab__body{border:none}.cherry-component.cherry-tab .cherry-tab__body .cherry-tab__content{border:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab--horizontal>.cherry-tab__body{border-radius:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-radius:5px 5px 0 0;border-bottom:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__content{border-radius:0 0 5px 5px}.cherry-component.cherry-tab--vertical>.cherry-tab__body{display:-webkit-box;display:-ms-flexbox;display:flex;border-radius:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:0;-ms-flex:0 1 25%;flex:0 1 25%;border-radius:5px 0 0 5px;border-right:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{text-align:right}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button .cherry-tab__title{width:100%}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button.active{box-shadow:inset -3px 0px 0px #298ffc}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__content{-webkit-box-flex:0;-ms-flex:0 1 75%;flex:0 1 75%;border-radius:0 5px 5px 0}}@media (min-width: 1200px){.cherry-component.cherry-tab--vertical .cherry-tab__tabs{-webkit-box-flex:0;-ms-flex:0 1 20%;flex:0 1 20%}.cherry-component.cherry-tab--vertical .cherry-tab__content{-webkit-box-flex:0;-ms-flex:0 1 80%;flex:0 1 80%}}.widget .cherry-component{padding:0}.widget .cherry-component__content{margin:0 -15px 20px}.widget .cherry-component__content .cherry-control{padding:15px 20px}.cherry-settings+.cherry-settings{border-top:1px solid rgba(0,0,0,0.1)}.cherry-settings .cherry-settings__title{margin-bottom:10px}.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:10px}@media (min-width: 783px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:15px}}@media (min-width: 961px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:30px}}.cherry-control{padding:15px 20px}.cherry-control__title{margin:0 0 10px 0}.cherry-control__description{margin-top:0}.cherry-control .cherry-ui-container{margin:0}@media (min-width: 783px){.cherry-control{padding:15px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.cherry-control__info{-webkit-box-flex:0;-ms-flex:0 1 30%;flex:0 1 30%;padding-right:15px}.cherry-control__content{-webkit-box-flex:0;-ms-flex:0 1 70%;flex:0 1 70%}}@media (min-width: 961px){.cherry-control{padding:30px}}.widget .cherry-control{padding:15px 0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.widget .cherry-control__content{-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%}.widget .cherry-control__info{-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%;padding-right:0}@media (min-width: 783px){.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner,.cherry-tab__content>.cherry-scroll,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content{max-height:700px;overflow-y:auto;position:relative}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar{width:10px;height:10px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-button,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-button,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button{width:0px;height:0px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb{background-color:#298ffc;border:none;border-radius:5px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:hover,.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:active,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:hover,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:active,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active{background:#206ff4}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-track,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-track,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track{background-color:#fff;border:none;border-radius:5px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-corner,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-corner,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner{background:transparent}}
cherry-framework/modules/cherry-interface-builder/inc/views/component-accordion.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/component-repeater.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/component-tab-horizontal.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/component-tab-vertical.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/component-toggle.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/control.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/form.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/html.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/section.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/settings-children-title.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/settings.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/tab-children-title.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-interface-builder/inc/views/toggle-children-title.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
5
  * @package Cherry_Interface_Builder
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry-js-core/cherry-js-core.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: JS Core
4
  * Description: Initializes global JS object which provides additional plugin functionality
5
- * Version: 1.1.2
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.1.2
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
  */
@@ -41,12 +39,22 @@ if ( ! class_exists( 'Cherry_Js_Core' ) ) {
41
  private static $instance = null;
42
 
43
  /**
44
- * Module version.
45
  *
46
- * @since 1.0.0
 
47
  * @var string
48
  */
49
- private $module_version = '1.1.2';
 
 
 
 
 
 
 
 
 
50
 
51
  /**
52
  * Default options.
@@ -68,7 +76,9 @@ if ( ! class_exists( 'Cherry_Js_Core' ) ) {
68
  * @param array $args Class args.
69
  */
70
  public function __construct( $core, $args = array() ) {
71
- $this->options = array_merge( $this->options, $args );
 
 
72
 
73
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_cherry_scripts' ), 0 );
74
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_cherry_scripts' ), 0 );
@@ -83,14 +93,20 @@ if ( ! class_exists( 'Cherry_Js_Core' ) ) {
83
  public function enqueue_cherry_scripts() {
84
 
85
  if ( 'framework' === $this->options['product_type'] ) {
86
- $src = esc_url( Cherry_Core::base_url( 'assets/js/min/cherry-js-core.min.js', __FILE__ ) );
87
- $version = $this->module_version;
88
  } else {
89
  $src = ( ! empty( $this->options['src'] ) ? esc_url( $this->options['src'] ) : false );
90
  $version = ( ! empty( $this->options['version'] ) ? absint( $this->options['src'] ) : false );
91
  }
92
 
93
- wp_enqueue_script( 'cherry-js-core', $src, array( 'jquery' ), $version, true );
 
 
 
 
 
 
94
  }
95
 
96
  /**
2
  /**
3
  * Module Name: JS Core
4
  * Description: Initializes global JS object which provides additional plugin 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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
39
  private static $instance = null;
40
 
41
  /**
42
+ * Core version.
43
  *
44
+ * @since 1.5.0
45
+ * @access public
46
  * @var string
47
  */
48
+ public $core_version = '';
49
+
50
+ /**
51
+ * Module directory path.
52
+ *
53
+ * @since 1.5.0
54
+ * @access protected
55
+ * @var srting.
56
+ */
57
+ protected $module_path;
58
 
59
  /**
60
  * Default options.
76
  * @param array $args Class args.
77
  */
78
  public function __construct( $core, $args = array() ) {
79
+ $this->options = array_merge( $this->options, $args );
80
+ $this->core_version = $core->get_core_version();
81
+ $this->module_path = $args['module_path'];
82
 
83
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_cherry_scripts' ), 0 );
84
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_cherry_scripts' ), 0 );
93
  public function enqueue_cherry_scripts() {
94
 
95
  if ( 'framework' === $this->options['product_type'] ) {
96
+ $src = esc_url( Cherry_Core::base_url( 'assets/js/min/cherry-js-core.min.js', $this->module_path ) );
97
+ $version = $this->core_version;
98
  } else {
99
  $src = ( ! empty( $this->options['src'] ) ? esc_url( $this->options['src'] ) : false );
100
  $version = ( ! empty( $this->options['version'] ) ? absint( $this->options['src'] ) : false );
101
  }
102
 
103
+ wp_enqueue_script(
104
+ 'cherry-js-core',
105
+ $src,
106
+ array( 'jquery' ),
107
+ $this->core_version,
108
+ true
109
+ );
110
  }
111
 
112
  /**
cherry-framework/modules/cherry-post-formats-api/cherry-post-formats-api.php CHANGED
@@ -3,7 +3,6 @@
3
  * API functions for post formats specific content
4
  * Module Name: Post Formats API
5
  * Description: API for post formats specific content
6
- * Version: 1.1.2
7
  * Author: Cherry Team
8
  * Author URI: http://www.cherryframework.com/
9
  * License: GPLv3
@@ -11,9 +10,8 @@
11
  *
12
  * @package Cherry_Framework
13
  * @subpackage Modules
14
- * @version 1.1.2
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
  */
@@ -31,11 +29,22 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
31
  class Cherry_Post_Formats_Api {
32
 
33
  /**
34
- * Module version
35
  *
 
 
36
  * @var string
37
  */
38
- public $module_version = '1.1.0';
 
 
 
 
 
 
 
 
 
39
 
40
  /**
41
  * Module slug
@@ -110,6 +119,9 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
110
  'height' => 400,
111
  ) );
112
 
 
 
 
113
  $formats = array(
114
  'image',
115
  'gallery',
@@ -199,11 +211,10 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
199
  * Include required API files
200
  *
201
  * @since 1.0.0
202
- * @since 1.1.1 Using dirname( __FILE__ ) instead of __DIR__.
203
  * @return void
204
  */
205
  public function includes() {
206
- require_once dirname( __FILE__ ) . '/inc/class-cherry-facebook-embed.php';
207
 
208
  // Register Facebook Embed.
209
  if ( class_exists( 'Cherry_Facebook_Embed' ) ) {
@@ -220,9 +231,9 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
220
  public function assets() {
221
  wp_enqueue_script(
222
  'cherry-post-formats',
223
- Cherry_Core::base_url( 'assets/js/min/cherry-post-formats.min.js', __FILE__ ),
224
  array( 'jquery', 'cherry-js-core' ),
225
- $this->module_version,
226
  true
227
  );
228
  }
@@ -503,7 +514,9 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
503
  * @since 1.0.0
504
  * @param array existing attributes.
505
  */
506
- $img_atts = apply_filters( 'cherry_post_image_attributes', array( 'class' => $css_model['image'] ) );
 
 
507
 
508
  if ( has_post_thumbnail( $post_id ) ) {
509
 
@@ -552,7 +565,9 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
552
  $url = get_permalink( $post_id );
553
  }
554
 
555
- $data_atts = array( 'data-cherrypopup' => true );
 
 
556
 
557
  if ( false !== $args['popup_init'] ) {
558
  $init = json_encode( $args['popup_init'] );
@@ -855,8 +870,13 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
855
  wp_enqueue_script( $args['popup_handle'] );
856
  }
857
 
858
- $slider_data = array( 'data-cherryslider' => true );
859
- $popup_data = array( 'data-cherrypopup' => true );
 
 
 
 
 
860
 
861
  if ( false !== $args['slider'] ) {
862
  $slider_data['data-slider'] = $args['slider'];
@@ -897,7 +917,9 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
897
  */
898
  $img_atts = apply_filters(
899
  'cherry_post_gallery_image_attributes',
900
- array( 'class' => $css_model['image'] ),
 
 
901
  $img
902
  );
903
 
@@ -926,7 +948,9 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
926
  $width = $_wp_additional_image_sizes[ $args['size'] ]['width'];
927
  }
928
 
929
- $default_atts = array( 'width' => $width );
 
 
930
  $img_atts = array_merge( $default_atts, $img_atts );
931
  $thumb = sprintf( '<img src="%s" %s>', esc_url( $img ), $this->prepare_atts( $img_atts ) );
932
  $url = $img;
@@ -940,7 +964,9 @@ if ( ! class_exists( 'Cherry_Post_Formats_Api' ) ) {
940
  }
941
 
942
  $slide_atts = $this->prepare_atts(
943
- array_merge( array( 'class' => $css_model['link'] . $nth_class ), $popup_data )
 
 
944
  );
945
 
946
  $slide_content = sprintf( $format, $image, $caption, $url, $slide_atts );
3
  * API functions for post formats specific content
4
  * Module Name: Post Formats API
5
  * Description: API for post formats specific content
 
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
 
13
  * @author Cherry Team <cherryframework@gmail.com>
14
+ * @copyright Copyright (c) 2012 - 2017, Cherry Team
15
  * @link http://www.cherryframework.com/
16
  * @license http://www.gnu.org/licenses/gpl-3.0.html
17
  */
29
  class Cherry_Post_Formats_Api {
30
 
31
  /**
32
+ * Core version.
33
  *
34
+ * @since 1.5.0
35
+ * @access public
36
  * @var string
37
  */
38
+ public $core_version = '';
39
+
40
+ /**
41
+ * Module directory path.
42
+ *
43
+ * @since 1.5.0
44
+ * @access protected
45
+ * @var srting.
46
+ */
47
+ protected $module_path;
48
 
49
  /**
50
  * Module slug
119
  'height' => 400,
120
  ) );
121
 
122
+ $this->core_version = $core->get_core_version();
123
+ $this->module_path = $args['module_path'];
124
+
125
  $formats = array(
126
  'image',
127
  'gallery',
211
  * Include required API files
212
  *
213
  * @since 1.0.0
 
214
  * @return void
215
  */
216
  public function includes() {
217
+ require_once $this->module_path . 'inc/class-cherry-facebook-embed.php';
218
 
219
  // Register Facebook Embed.
220
  if ( class_exists( 'Cherry_Facebook_Embed' ) ) {
231
  public function assets() {
232
  wp_enqueue_script(
233
  'cherry-post-formats',
234
+ Cherry_Core::base_url( 'assets/js/min/cherry-post-formats.min.js', $this->module_path ),
235
  array( 'jquery', 'cherry-js-core' ),
236
+ $this->core_version,
237
  true
238
  );
239
  }
514
  * @since 1.0.0
515
  * @param array existing attributes.
516
  */
517
+ $img_atts = apply_filters( 'cherry_post_image_attributes', array(
518
+ 'class' => $css_model['image'],
519
+ ) );
520
 
521
  if ( has_post_thumbnail( $post_id ) ) {
522
 
565
  $url = get_permalink( $post_id );
566
  }
567
 
568
+ $data_atts = array(
569
+ 'data-cherrypopup' => true,
570
+ );
571
 
572
  if ( false !== $args['popup_init'] ) {
573
  $init = json_encode( $args['popup_init'] );
870
  wp_enqueue_script( $args['popup_handle'] );
871
  }
872
 
873
+ $slider_data = array(
874
+ 'data-cherryslider' => true,
875
+ );
876
+
877
+ $popup_data = array(
878
+ 'data-cherrypopup' => true,
879
+ );
880
 
881
  if ( false !== $args['slider'] ) {
882
  $slider_data['data-slider'] = $args['slider'];
917
  */
918
  $img_atts = apply_filters(
919
  'cherry_post_gallery_image_attributes',
920
+ array(
921
+ 'class' => $css_model['image'],
922
+ ),
923
  $img
924
  );
925
 
948
  $width = $_wp_additional_image_sizes[ $args['size'] ]['width'];
949
  }
950
 
951
+ $default_atts = array(
952
+ 'width' => $width,
953
+ );
954
  $img_atts = array_merge( $default_atts, $img_atts );
955
  $thumb = sprintf( '<img src="%s" %s>', esc_url( $img ), $this->prepare_atts( $img_atts ) );
956
  $url = $img;
964
  }
965
 
966
  $slide_atts = $this->prepare_atts(
967
+ array_merge( array(
968
+ 'class' => $css_model['link'] . $nth_class,
969
+ ), $popup_data )
970
  );
971
 
972
  $slide_content = sprintf( $format, $image, $caption, $url, $slide_atts );
cherry-framework/modules/cherry-post-formats-api/inc/class-cherry-facebook-embed.php CHANGED
@@ -5,7 +5,7 @@
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/gpl-3.0.en.html
11
  */
5
  * @package Cherry_Framework
6
  * @subpackage Class
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.en.html
11
  */
cherry-framework/modules/cherry-post-meta/cherry-post-meta.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Post Meta
4
  * Description: Manage post meta
5
- * Version: 1.2.1
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.2.1
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
  */
@@ -165,7 +163,9 @@ if ( ! class_exists( 'Cherry_Post_Meta' ) ) {
165
 
166
  $columns = array_merge(
167
  $columns_before,
168
- array( $column_key => $column_data['label'] ),
 
 
169
  $columns_after
170
  );
171
  } else {
@@ -291,9 +291,7 @@ if ( ! class_exists( 'Cherry_Post_Meta' ) ) {
291
  * Get registered control fields
292
  *
293
  * @since 1.0.0
294
- * @since 1.1.3 Using dirname( __FILE__ ) instead of __DIR__.
295
  * @since 1.2.0 Use interface builder for HTML rendering.
296
- *
297
  * @param mixed $post Current post object.
298
  * @return void
299
  */
2
  /**
3
  * Module Name: Post Meta
4
  * Description: Manage post meta
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
163
 
164
  $columns = array_merge(
165
  $columns_before,
166
+ array(
167
+ $column_key => $column_data['label'],
168
+ ),
169
  $columns_after
170
  );
171
  } else {
291
  * Get registered control fields
292
  *
293
  * @since 1.0.0
 
294
  * @since 1.2.0 Use interface builder for HTML rendering.
 
295
  * @param mixed $post Current post object.
296
  * @return void
297
  */
cherry-framework/modules/cherry-term-meta/cherry-term-meta.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Term Meta
4
  * Description: Manage term metadata
5
- * Version: 1.1.4
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.1.4
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
  */
2
  /**
3
  * Module Name: Term Meta
4
  * Description: Manage term metadata
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
cherry-framework/modules/cherry-toolkit/cherry-toolkit.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Framework Toolkit
4
  * Description: Framework Toolkit contains various PHP utilities
5
- * Version: 1.2.0
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Class
13
- * @version 1.2.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
  */
2
  /**
3
  * Module Name: Framework Toolkit
4
  * Description: Framework Toolkit contains various PHP utilities
 
5
  * Author: Cherry Team
6
  * Author URI: http://www.cherryframework.com/
7
  * License: GPLv3
9
  *
10
  * @package Cherry_Framework
11
  * @subpackage Class
 
12
  * @author Cherry Team <cherryframework@gmail.com>
13
+ * @copyright Copyright (c) 2012 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
cherry-framework/modules/cherry-ui-elements/assets/sass/_lock.scss ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $lock-bg-color: rgba(0,0,0,0.9);
2
+ .cherry-lock-element{
3
+ user-select: none;
4
+ cursor: no-drop;
5
+ position: relative;
6
+ filter: grayscale( 100% );
7
+
8
+ &.inline-block{
9
+ display: inline-block;
10
+ }
11
+
12
+ & label{
13
+ position: relative;
14
+ }
15
+ .cherry-lable-content,
16
+ .cherry-checkbox-item,
17
+ .select2-container,
18
+ > *:first-child{
19
+ opacity: 0.5;
20
+ pointer-events: none;
21
+ }
22
+
23
+ a.cherry-lock-element__area{
24
+ position: absolute;
25
+ top: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ z-index: 2000;
30
+ cursor: no-drop;
31
+ &:focus{
32
+ outline: none;
33
+ box-shadow: none;
34
+ }
35
+ &:hover{
36
+ .cherry-lock-element__label{
37
+ animation-name: lock_show;
38
+ animation-duration: 450ms;
39
+ animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
40
+ }
41
+ }
42
+ }
43
+
44
+ &__label {
45
+ opacity: 0;
46
+ display: inline-block;
47
+ background-color: $lock-bg-color;
48
+ border-radius: 5px;
49
+ color: #fff;
50
+ padding: 8px 10px;
51
+ position: absolute;
52
+ white-space: nowrap;
53
+ top: -10px;
54
+ left: 50%;
55
+ box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.5);
56
+ will-change: auto;
57
+ pointer-events: none;
58
+ font-size: 14px;
59
+ line-height: 16px;
60
+
61
+ animation-name: lock_hide;
62
+ animation-duration: 200ms;
63
+ animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
64
+ animation-fill-mode: both;
65
+
66
+ transform-origin: 0% 0%;
67
+ * + *{
68
+ margin-right: 5px;
69
+ }
70
+ &:after {
71
+ border: solid;
72
+ border-color: $lock-bg-color transparent;
73
+ border-width: 6px 6px 0 6px;
74
+ bottom: -5px;
75
+ margin-left: -6px;
76
+ content: "";
77
+ left: 50%;
78
+ position: absolute;
79
+ }
80
+ }
81
+ }
82
+ @keyframes lock_show {
83
+ 0% {
84
+ opacity: 0;
85
+ filter: blur(5px);
86
+ transform: scale( 0 ) translate(-50%, 200% );
87
+ }
88
+ 60% {
89
+ opacity: 0.8;
90
+ transform: scale( 1.1 ) translate(-50%, -130% );
91
+ }
92
+ 100% {
93
+ opacity: 1;
94
+ filter: blur(0px);
95
+ transform: scale( 1 ) translate(-50%, -100% );
96
+ }
97
+ }
98
+
99
+ @keyframes lock_hide {
100
+ 0% {
101
+ opacity: 1;
102
+ filter: blur(0px);
103
+ transform: scale( 1 ) translate(-50%, -100%);
104
+ }
105
+ 100% {
106
+ opacity: 0;
107
+ filter: blur(3px);
108
+ transform: scale( 0 ) translate(-50%, 200%);
109
+ }
110
+ }
cherry-framework/modules/cherry-ui-elements/cherry-ui-elements.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: UI Elements
4
  * Description: Class for the building ui elements
5
- * Version: 1.4.0
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.4.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
  */
@@ -56,6 +54,24 @@ if ( ! class_exists( 'Cherry_UI_Elements' ) ) {
56
  ),
57
  );
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  /**
60
  * Constructor.
61
  *
@@ -64,7 +80,10 @@ if ( ! class_exists( 'Cherry_UI_Elements' ) ) {
64
  * @param array $args Arguments.
65
  */
66
  public function __construct( $core, $args ) {
67
- $this->args = array_merge( $this->args, $args );
 
 
 
68
  $this->ui_elements_require();
69
 
70
  // Load admin assets.
@@ -105,23 +124,21 @@ if ( ! class_exists( 'Cherry_UI_Elements' ) ) {
105
  * Require UI-elements.
106
  *
107
  * @since 1.0.0
108
- * @since 1.1.4 Using dirname( __FILE__ ) instead of __DIR__.
109
  * @return void
110
  */
111
  public function ui_elements_require() {
112
 
113
  // Add I_UI interface.
114
  if ( ! interface_exists( 'I_UI' ) ) {
115
- require_once( dirname( __FILE__ ) . '/i-ui.php' );
116
  }
117
 
118
- if ( ! class_exists( 'UI_Element' ) ) {
119
- require_once( dirname( __FILE__ ) . '/ui-element.php' );
120
- }
121
 
122
  if ( ! empty( $this->args['ui_elements'] ) ) {
123
  foreach ( $this->args['ui_elements'] as $ui_element ) {
124
- require_once( dirname( __FILE__ ) . '/inc/ui-elements/ui-' . $ui_element . '/ui-' . $ui_element . '.php' );
125
  }
126
  }
127
  }
2
  /**
3
  * Module Name: UI Elements
4
  * Description: Class for the building ui elements
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
54
  ),
55
  );
56
 
57
+ /**
58
+ * Core version.
59
+ *
60
+ * @since 1.5.0
61
+ * @access public
62
+ * @var string
63
+ */
64
+ public static $core_version = '';
65
+
66
+ /**
67
+ * Module directory path.
68
+ *
69
+ * @since 1.5.0
70
+ * @access protected
71
+ * @var srting.
72
+ */
73
+ public static $module_path;
74
+
75
  /**
76
  * Constructor.
77
  *
80
  * @param array $args Arguments.
81
  */
82
  public function __construct( $core, $args ) {
83
+ $this->args = array_merge( $this->args, $args );
84
+ self::$core_version = $core->get_core_version();
85
+ self::$module_path = $args['module_path'];
86
+
87
  $this->ui_elements_require();
88
 
89
  // Load admin assets.
124
  * Require UI-elements.
125
  *
126
  * @since 1.0.0
 
127
  * @return void
128
  */
129
  public function ui_elements_require() {
130
 
131
  // Add I_UI interface.
132
  if ( ! interface_exists( 'I_UI' ) ) {
133
+ require_once( self::$module_path . 'i-ui.php' );
134
  }
135
 
136
+ require_once( self::$module_path. 'ui-element.php' );
137
+ require_once( self::$module_path . 'inc/class-cherry-lock-element.php' );
 
138
 
139
  if ( ! empty( $this->args['ui_elements'] ) ) {
140
  foreach ( $this->args['ui_elements'] as $ui_element ) {
141
+ require_once( self::$module_path . 'inc/ui-elements/ui-' . $ui_element . '/ui-' . $ui_element . '.php' );
142
  }
143
  }
144
  }
cherry-framework/modules/cherry-ui-elements/i-ui.php CHANGED
@@ -5,7 +5,7 @@
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/gpl-3.0.en.html
11
  */
5
  * @package Cherry_Framework
6
  * @subpackage Class
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.en.html
11
  */
cherry-framework/modules/cherry-ui-elements/inc/class-cherry-lock-element.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class lock the elements
4
+ *
5
+ * @package Cherry_Framework
6
+ * @subpackage Class
7
+ * @author Cherry Team <support@cherryframework.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.en.html
11
+ */
12
+
13
+ // If class `Cherry5_Lock_Element` doesn't exists yet.
14
+ if ( ! class_exists( 'Cherry5_Lock_Element' ) ) {
15
+
16
+ /**
17
+ * Cherry5_Lock_Element class.
18
+ */
19
+ class Cherry5_Lock_Element {
20
+
21
+ /**
22
+ * Default settings.
23
+ *
24
+ * @since 1.4.3
25
+ * @access private
26
+ * @var array
27
+ */
28
+ private $defaults_args = array();
29
+
30
+ /**
31
+ * The attributes of the class.
32
+ *
33
+ * @since 1.4.3
34
+ * @access private
35
+ * @var array
36
+ */
37
+ private $args = array();
38
+
39
+ /**
40
+ * The status of locked element.
41
+ *
42
+ * @since 1.4.3
43
+ * @access private
44
+ * @var bool
45
+ */
46
+ private $element_lock = false;
47
+
48
+ /**
49
+ * Constructor method for the class.
50
+ *
51
+ * @since 1.4.3
52
+ * @access public
53
+ * @return void
54
+ */
55
+ public function __construct( $args = array() ) {
56
+
57
+ if ( ! is_array( $args ) || empty( $args ) || empty( $args['lock'] ) ) {
58
+ return false;
59
+ }
60
+
61
+ $this->element_lock = true;
62
+ $this->defaults_args = apply_filters( 'cherry5_lock_element_defaults', array(
63
+ 'label' => esc_html__( 'Unlocked in PRO', 'cherry-framework' ),
64
+ 'url' => '#',
65
+ 'html' => '<a class="cherry-lock-element__area" target="_blank" href="%1$s" title="%3$s"><span class="cherry-lock-element__label">%2$s %3$s</span></a>',
66
+ 'icon' => '<i class="fa fa-unlock-alt" aria-hidden="true"></i>',
67
+ 'class' => 'cherry-lock-element',
68
+ ), $args );
69
+
70
+ $this->args = wp_parse_args( $args['lock'], $this->defaults_args );
71
+ }
72
+
73
+ /**
74
+ * Return lock element HTML-class.
75
+ *
76
+ * @since 1.4.3
77
+ * @access public
78
+ * @return string
79
+ */
80
+ public function get_class( $sub_class = '' ) {
81
+
82
+ if ( ! $this->element_lock ) {
83
+ return '';
84
+ }
85
+
86
+ $classes = array(
87
+ $this->args['class'],
88
+ $sub_class,
89
+ );
90
+
91
+ $classes = array_filter( $classes );
92
+ $classes = array_map( 'esc_attr', $classes );
93
+
94
+ return ' ' . join( ' ', $classes );
95
+ }
96
+
97
+ /**
98
+ * Return disabled attribute.
99
+ *
100
+ * @since 1.4.3
101
+ * @access public
102
+ * @return string
103
+ */
104
+ public function get_disabled_attr() {
105
+ return $this->element_lock ? ' disabled' : '';
106
+ }
107
+
108
+ /**
109
+ * Return lock element HTML-markup.
110
+ *
111
+ * @since 1.4.3
112
+ * @access public
113
+ * @return string
114
+ */
115
+ public function get_html() {
116
+
117
+ if ( ! $this->element_lock ) {
118
+ return '';
119
+ }
120
+
121
+ return sprintf( $this->args['html'],
122
+ esc_url( $this->args['url'] ),
123
+ $this->args['icon'],
124
+ esc_attr( $this->args['label'] )
125
+ );
126
+ }
127
+ }
128
+ }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/ui-button.php CHANGED
@@ -61,7 +61,7 @@ if ( ! class_exists( 'UI_Button' ) ) {
61
  */
62
  public function render() {
63
  $html = Cherry_Toolkit::render_view(
64
- dirname( __FILE__ ) . '/view/button-view.php',
65
  $this->settings
66
  );
67
 
@@ -76,9 +76,9 @@ if ( ! class_exists( 'UI_Button' ) ) {
76
  public static function enqueue_assets() {
77
  wp_enqueue_style(
78
  'ui-button',
79
- esc_url( Cherry_Core::base_url( 'assets/min/ui-button.min.css', __FILE__ ) ),
80
  array(),
81
- '1.3.2',
82
  'all'
83
  );
84
  }
61
  */
62
  public function render() {
63
  $html = Cherry_Toolkit::render_view(
64
+ Cherry_UI_Elements::$module_path . 'inc/ui-elements/ui-button/view/button-view.php',
65
  $this->settings
66
  );
67
 
76
  public static function enqueue_assets() {
77
  wp_enqueue_style(
78
  'ui-button',
79
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-button/assets/min/ui-button.min.css', Cherry_UI_Elements::$module_path ) ),
80
  array(),
81
+ Cherry_UI_Elements::$core_version,
82
  'all'
83
  );
84
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/view/button-view.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_UI_Elements
6
  * @subpackage View
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
  */
@@ -14,18 +14,24 @@
14
  if ( ! defined( 'WPINC' ) ) {
15
  die;
16
  }
17
- $class = trim( implode( ' ', array( 'cherry5-ui-button', 'cherry5-ui-button-' . $__data['style'] . '-style ', $__data['master'], $__data['class'], 'ui-button' ) ) );
18
- $attrs = Cherry_Toolkit::join(
 
 
 
19
  array(
20
  'type' => esc_attr( $__data['button_type'] ),
21
  'id' => esc_attr( $__data['id'] ),
22
  'name' => esc_attr( $__data['name'] ),
23
  'class' => esc_attr( $class ),
24
- 'disabled' => filter_var( $__data['disabled'], FILTER_VALIDATE_BOOLEAN ),
25
  'form' => esc_attr( $__data['form'] ),
26
  'formaction' => esc_attr( $__data['formaction'] ),
27
  )
28
  );
 
 
 
 
29
  ?>
30
 
31
  <button <?php echo $attrs; ?>><?php echo $__data['content']; ?></button>
5
  * @package Cherry_UI_Elements
6
  * @subpackage View
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/old-licenses/gpl-2.0.html
11
  */
14
  if ( ! defined( 'WPINC' ) ) {
15
  die;
16
  }
17
+
18
+ $classes = array( 'cherry5-ui-button', 'cherry5-ui-button-' . $__data['style'] . '-style', $__data['master'], $__data['class'], 'ui-button' );
19
+ $classes = array_filter( $classes );
20
+ $class = trim( implode( ' ', $classes ) );
21
+ $attrs = Cherry_Toolkit::join(
22
  array(
23
  'type' => esc_attr( $__data['button_type'] ),
24
  'id' => esc_attr( $__data['id'] ),
25
  'name' => esc_attr( $__data['name'] ),
26
  'class' => esc_attr( $class ),
 
27
  'form' => esc_attr( $__data['form'] ),
28
  'formaction' => esc_attr( $__data['formaction'] ),
29
  )
30
  );
31
+
32
+ if ( filter_var( $__data['disabled'], FILTER_VALIDATE_BOOLEAN ) ) {
33
+ $attrs .= ' disabled';
34
+ }
35
  ?>
36
 
37
  <button <?php echo $attrs; ?>><?php echo $__data['content']; ?></button>
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}.cherry-checkbox-item{width:26px;height:26px;display:inline-block;border-radius:2px;margin-right:10px;margin-bottom:6px;cursor:pointer;position:relative;background-color:#f1f1f1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1);transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1)}.cherry-checkbox-item .marker{position:absolute;width:26px;height:26px;top:0px;left:0px;color:#fff;font-size:28px;-webkit-transition:inherit;transition:inherit;-webkit-transform:scale(0);transform:scale(0)}.cherry-checkbox-item .marker:before{-webkit-transition:inherit;transition:inherit;position:relative;left:-2px}.cherry-checkbox-input[checked]+.cherry-checkbox-item{background-color:#48c569}.cherry-checkbox-input[checked]+.cherry-checkbox-item .marker{-webkit-transform:scale(1);transform:scale(1)}.cherry-checkbox-label{display:inline-block;vertical-align:top;font-size:14px;line-height:26px;color:#23282d;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cherry-checkbox-label:focus{outline:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}.cherry-checkbox-item{width:26px;height:26px;display:inline-block;border-radius:2px;margin-right:10px;margin-bottom:6px;cursor:pointer;position:relative;background-color:#f1f1f1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1);transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1)}.cherry-checkbox-item .marker{position:absolute;width:26px;height:26px;top:0px;left:0px;color:#fff;font-size:28px;-webkit-transition:inherit;transition:inherit;-webkit-transform:scale(0);transform:scale(0)}.cherry-checkbox-item .marker:before{-webkit-transition:inherit;transition:inherit;position:relative;left:-2px}.cherry-checkbox-input[checked]+.cherry-checkbox-item{background-color:#48c569}.cherry-checkbox-input[checked]+.cherry-checkbox-item .marker{-webkit-transform:scale(1);transform:scale(1)}.cherry-checkbox-label{display:inline-block;vertical-align:top;font-size:14px;line-height:26px;color:#23282d;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cherry-checkbox-label:focus{outline:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.scss CHANGED
@@ -1,5 +1,6 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
3
 
4
  .cherry-ui-container{
5
  margin: 10px 0 20px 0;
@@ -40,11 +41,13 @@ label.cherry-label{
40
  }
41
  }
42
  }
43
- .cherry-checkbox-input[checked]{
44
- &+.cherry-checkbox-item{
45
- background-color: $green_color;
46
- .marker{
47
- transform: scale(1);
 
 
48
  }
49
  }
50
  }
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
 
5
  .cherry-ui-container{
6
  margin: 10px 0 20px 0;
41
  }
42
  }
43
  }
44
+ .cherry-checkbox-input{
45
+ &[checked]{
46
+ &+.cherry-checkbox-item{
47
+ background-color: $green_color;
48
+ .marker{
49
+ transform: scale(1);
50
+ }
51
  }
52
  }
53
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/ui-checkbox.php CHANGED
@@ -46,6 +46,15 @@ if ( ! class_exists( 'UI_Checkbox' ) ) {
46
  'master' => '',
47
  );
48
 
 
 
 
 
 
 
 
 
 
49
  /**
50
  * Constructor method for the UI_Checkbox class.
51
  *
@@ -54,6 +63,7 @@ if ( ! class_exists( 'UI_Checkbox' ) ) {
54
  function __construct( $args = array() ) {
55
  $this->defaults_settings['id'] = 'cherry-ui-checkbox-' . uniqid();
56
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
57
 
58
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
59
  }
@@ -64,9 +74,14 @@ if ( ! class_exists( 'UI_Checkbox' ) ) {
64
  * @since 1.0.0
65
  */
66
  public function render() {
67
- $html = '';
68
- $class = $this->settings['class'];
69
- $class .= ' ' . $this->settings['master'];
 
 
 
 
 
70
 
71
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
72
 
@@ -80,6 +95,7 @@ if ( ! class_exists( 'UI_Checkbox' ) ) {
80
  }
81
 
82
  foreach ( $this->settings['options'] as $option => $option_value ) {
 
83
 
84
  if ( ! empty( $this->settings['value'] ) ) {
85
  $option_checked = array_key_exists( $option, $this->settings['value'] ) ? $option : '';
@@ -89,21 +105,25 @@ if ( ! class_exists( 'UI_Checkbox' ) ) {
89
  $item_value = 'false';
90
  }
91
 
92
- $checked = ( ! empty( $option_checked ) && 'true' === $item_value ) ? 'checked' : '';
93
-
94
  $option_label = isset( $option_value ) && is_array( $option_value ) ? $option_value['label'] : $option_value;
95
- $data_slave = isset( $option_value['slave'] ) && ! empty( $option_value['slave'] ) ? ' data-slave="' . $option_value['slave'] . '"' : '';
96
 
97
  $html .= '<div class="cherry-checkbox-item-wrap">';
98
- $html .= '<input type="hidden" id="' . esc_attr( $this->settings['id'] ) . '-' . $counter . '" class="cherry-checkbox-input" name="' . esc_attr( $this->settings['name'] ) . '[' . $option . ']" ' . $checked . ' value="' . esc_html( $item_value ) . '"' . $data_slave . '>';
99
- $html .= '<div class="cherry-checkbox-item"><span class="marker dashicons dashicons-yes"></span></div>';
100
- $html .= '<label class="cherry-checkbox-label" for="' . esc_attr( $this->settings['id'] ) . '-' . $counter . '">' . esc_html( $option_label ) . '</label> ';
 
 
 
 
 
101
  $html .= '</div>';
102
 
103
  $counter++;
104
  }
105
  }
106
- $html .= '</div>';
107
 
108
  return $html;
109
  }
@@ -115,18 +135,18 @@ if ( ! class_exists( 'UI_Checkbox' ) ) {
115
  */
116
  public static function enqueue_assets() {
117
  wp_enqueue_script(
118
- 'ui-checkbox-min',
119
- esc_url( Cherry_Core::base_url( 'assets/min/ui-checkbox.min.js', __FILE__ ) ),
120
  array( 'jquery' ),
121
- '1.3.2',
122
  true
123
  );
124
 
125
  wp_enqueue_style(
126
- 'ui-checkbox-min',
127
- esc_url( Cherry_Core::base_url( 'assets/min/ui-checkbox.min.css', __FILE__ ) ),
128
  array(),
129
- '1.3.2',
130
  'all'
131
  );
132
  }
46
  'master' => '',
47
  );
48
 
49
+ /**
50
+ * Instance of this Cherry5_Lock_Element class.
51
+ *
52
+ * @since 1.0.0
53
+ * @var object
54
+ * @access private
55
+ */
56
+ private $lock_element = null;
57
+
58
  /**
59
  * Constructor method for the UI_Checkbox class.
60
  *
63
  function __construct( $args = array() ) {
64
  $this->defaults_settings['id'] = 'cherry-ui-checkbox-' . uniqid();
65
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
66
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
67
 
68
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
69
  }
74
  * @since 1.0.0
75
  */
76
  public function render() {
77
+ $html = '';
78
+ $class = implode( ' ',
79
+ array(
80
+ $this->settings['class'],
81
+ $this->settings['master'],
82
+ $this->lock_element->get_class( 'inline-block' ),
83
+ )
84
+ );
85
 
86
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
87
 
95
  }
96
 
97
  foreach ( $this->settings['options'] as $option => $option_value ) {
98
+ $lock_option = new Cherry5_Lock_Element( $option_value );
99
 
100
  if ( ! empty( $this->settings['value'] ) ) {
101
  $option_checked = array_key_exists( $option, $this->settings['value'] ) ? $option : '';
105
  $item_value = 'false';
106
  }
107
 
108
+ $checked = ( ! empty( $option_checked ) && 'true' === $item_value ) ? 'checked' : '';
 
109
  $option_label = isset( $option_value ) && is_array( $option_value ) ? $option_value['label'] : $option_value;
110
+ $data_slave = isset( $option_value['slave'] ) && ! empty( $option_value['slave'] ) ? ' data-slave="' . $option_value['slave'] . '"' : '';
111
 
112
  $html .= '<div class="cherry-checkbox-item-wrap">';
113
+ $html .= '<span class="' . $lock_option->get_class( 'inline-block' ) . '"">';
114
+ $html .= '<span class="cherry-lable-content">';
115
+ $html .= '<input type="hidden" id="' . esc_attr( $this->settings['id'] ) . '-' . $counter . '" class="cherry-checkbox-input" name="' . esc_attr( $this->settings['name'] ) . '[' . $option . ']" ' . $checked . ' value="' . esc_html( $item_value ) . '"' . $data_slave . $lock_option->get_disabled_attr() . '>';
116
+ $html .= '<div class="cherry-checkbox-item"><span class="marker dashicons dashicons-yes"></span></div>';
117
+ $html .= '<label class="cherry-checkbox-label" for="' . esc_attr( $this->settings['id'] ) . '-' . $counter . '"><span class="cherry-lable-content">' . esc_html( $option_label ) . '</span></label> ';
118
+ $html .= '</span>';
119
+ $html .= $lock_option->get_html();
120
+ $html .= '</span>';
121
  $html .= '</div>';
122
 
123
  $counter++;
124
  }
125
  }
126
+ $html .= $this->lock_element->get_html() . '</div>';
127
 
128
  return $html;
129
  }
135
  */
136
  public static function enqueue_assets() {
137
  wp_enqueue_script(
138
+ 'ui-checkbox',
139
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.js', Cherry_UI_Elements::$module_path ) ),
140
  array( 'jquery' ),
141
+ Cherry_UI_Elements::$core_version,
142
  true
143
  );
144
 
145
  wp_enqueue_style(
146
+ 'ui-checkbox',
147
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.css', Cherry_UI_Elements::$module_path ) ),
148
  array(),
149
+ Cherry_UI_Elements::$core_version,
150
  'all'
151
  );
152
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-colorpicker-wrapper{background-color:#f1f1f1;padding:5px;max-width:230px;height:46px;box-sizing:border-box}.cherry-ui-colorpicker-wrapper .wp-picker-container,.customize-control-content .wp-picker-container{display:block;position:relative;z-index:1000}.cherry-ui-colorpicker-wrapper .wp-picker-container:active,.customize-control-content .wp-picker-container:active{display:block}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-color-result,.customize-control-content .wp-picker-container>.wp-color-result{margin:0;border-radius:2px;display:block;border:none;box-shadow:none;height:auto;padding-left:35px}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-color-result:after,.customize-control-content .wp-picker-container>.wp-color-result:after{padding:7px 0px;font-size:14px;border-left:none}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-color-result:focus,.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-color-result:active,.customize-control-content .wp-picker-container>.wp-color-result:focus,.customize-control-content .wp-picker-container>.wp-color-result:active{outline:none;border:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-picker-input-wrap,.customize-control-content .wp-picker-container>.wp-picker-input-wrap{display:none;display:-webkit-box;display:-ms-flexbox;display:flex;width:calc(100% - 40px);max-width:calc(100% - 40px);float:right}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-picker-input-wrap:after,.customize-control-content .wp-picker-container>.wp-picker-input-wrap:after{content:'.';clear:both;visibility:hidden;height:0}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-picker-input-wrap input[type="text"],.customize-control-content .wp-picker-container>.wp-picker-input-wrap input[type="text"]{padding:8px 10px 9px;font-size:14px;max-width:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-picker-input-wrap input[type="button"],.customize-control-content .wp-picker-container>.wp-picker-input-wrap input[type="button"]{height:auto;border:none;border-radius:2px;box-shadow:none;padding:6px 10px 7px;font-size:14px;margin-left:5px;-ms-flex-negative:0;flex-shrink:0}.cherry-ui-colorpicker-wrapper .wp-picker-container.wp-picker-active>.wp-color-result,.customize-control-content .wp-picker-container.wp-picker-active>.wp-color-result{height:35px;width:0;display:inline-block;margin-right:5px}.cherry-ui-colorpicker-wrapper .wp-picker-container.wp-picker-active>.wp-color-result:after,.customize-control-content .wp-picker-container.wp-picker-active>.wp-color-result:after{display:none}.cherry-ui-colorpicker-wrapper .wp-picker-container.wp-picker-active>.wp-picker-input-wrap,.customize-control-content .wp-picker-container.wp-picker-active>.wp-picker-input-wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-colorpicker-wrapper{background-color:#f1f1f1;padding:5px;max-width:230px;height:46px;box-sizing:border-box}.cherry-ui-colorpicker-wrapper .wp-picker-container,.customize-control-content .wp-picker-container{display:block;position:relative;z-index:1000}.cherry-ui-colorpicker-wrapper .wp-picker-container:active,.customize-control-content .wp-picker-container:active{display:block}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-color-result,.customize-control-content .wp-picker-container>.wp-color-result{margin:0;border-radius:2px;display:block;border:none;box-shadow:none;height:auto;padding-left:35px}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-color-result:after,.customize-control-content .wp-picker-container>.wp-color-result:after{padding:7px 0px;font-size:14px;border-left:none}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-color-result:focus,.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-color-result:active,.customize-control-content .wp-picker-container>.wp-color-result:focus,.customize-control-content .wp-picker-container>.wp-color-result:active{outline:none;border:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-picker-input-wrap,.customize-control-content .wp-picker-container>.wp-picker-input-wrap{display:none;display:-webkit-box;display:-ms-flexbox;display:flex;width:calc(100% - 40px);max-width:calc(100% - 40px);float:right}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-picker-input-wrap:after,.customize-control-content .wp-picker-container>.wp-picker-input-wrap:after{content:'.';clear:both;visibility:hidden;height:0}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-picker-input-wrap input[type="text"],.customize-control-content .wp-picker-container>.wp-picker-input-wrap input[type="text"]{padding:8px 10px 9px;font-size:14px;max-width:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.cherry-ui-colorpicker-wrapper .wp-picker-container>.wp-picker-input-wrap input[type="button"],.customize-control-content .wp-picker-container>.wp-picker-input-wrap input[type="button"]{height:auto;border:none;border-radius:2px;box-shadow:none;padding:6px 10px 7px;font-size:14px;margin-left:5px;-ms-flex-negative:0;flex-shrink:0}.cherry-ui-colorpicker-wrapper .wp-picker-container.wp-picker-active>.wp-color-result,.customize-control-content .wp-picker-container.wp-picker-active>.wp-color-result{height:35px;width:0;display:inline-block;margin-right:5px}.cherry-ui-colorpicker-wrapper .wp-picker-container.wp-picker-active>.wp-color-result:after,.customize-control-content .wp-picker-container.wp-picker-active>.wp-color-result:after{display:none}.cherry-ui-colorpicker-wrapper .wp-picker-container.wp-picker-active>.wp-picker-input-wrap,.customize-control-content .wp-picker-container.wp-picker-active>.wp-picker-input-wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.scss CHANGED
@@ -1,8 +1,14 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
3
 
4
  $font_size: 14px;
5
-
 
 
 
 
 
6
  .cherry-ui-container{
7
  margin: 10px 0 20px 0;
8
  }
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
 
5
  $font_size: 14px;
6
+ .cherry-ui-elements-lock{
7
+ opacity: 0.5;
8
+ cursor: no-drop;
9
+ pointer-events: none;
10
+ filter: grayscale( 100% );
11
+ }
12
  .cherry-ui-container{
13
  margin: 10px 0 20px 0;
14
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/ui-colorpicker.php CHANGED
@@ -35,8 +35,18 @@ if ( ! class_exists( 'UI_Colorpicker' ) ) {
35
  'label' => '',
36
  'class' => '',
37
  'master' => '',
 
38
  );
39
 
 
 
 
 
 
 
 
 
 
40
  /**
41
  * Constructor method for the UI_Colorpicker class.
42
  *
@@ -45,6 +55,7 @@ if ( ! class_exists( 'UI_Colorpicker' ) ) {
45
  function __construct( $args = array() ) {
46
  $this->defaults_settings['id'] = 'cherry-ui-colorpicker-' . uniqid();
47
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
48
 
49
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
50
  }
@@ -56,15 +67,20 @@ if ( ! class_exists( 'UI_Colorpicker' ) ) {
56
  */
57
  public function render() {
58
  $html = '';
59
- $class = $this->settings['class'];
60
- $class .= ' ' . $this->settings['master'];
 
 
 
 
61
 
62
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
63
  if ( '' !== $this->settings['label'] ) {
64
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . esc_html( $this->settings['label'] ) . '</label> ';
65
  }
66
- $html .= '<div class="cherry-ui-colorpicker-wrapper">';
67
- $html .= '<input type="text" id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-colorpicker" name="' . esc_attr( $this->settings['name'] ) . '" value="' . esc_html( $this->settings['value'] ) . '"/>';
 
68
  $html .= '</div>';
69
  $html .= '</div>';
70
 
@@ -79,18 +95,18 @@ if ( ! class_exists( 'UI_Colorpicker' ) ) {
79
  public static function enqueue_assets() {
80
 
81
  wp_enqueue_script(
82
- 'ui-colorpicker-min',
83
- esc_url( Cherry_Core::base_url( 'assets/min/ui-colorpicker.min.js', __FILE__ ) ),
84
  array( 'jquery', 'wp-color-picker' ),
85
- '1.3.2',
86
  true
87
  );
88
 
89
  wp_enqueue_style(
90
- 'ui-colorpicker-min',
91
- esc_url( Cherry_Core::base_url( 'assets/min/ui-colorpicker.min.css', __FILE__ ) ),
92
  array( 'wp-color-picker' ),
93
- '1.3.2',
94
  'all'
95
  );
96
  }
35
  'label' => '',
36
  'class' => '',
37
  'master' => '',
38
+ 'lock' => false,
39
  );
40
 
41
+ /**
42
+ * Instance of this Cherry5_Lock_Element class.
43
+ *
44
+ * @since 1.0.0
45
+ * @var object
46
+ * @access private
47
+ */
48
+ private $lock_element = null;
49
+
50
  /**
51
  * Constructor method for the UI_Colorpicker class.
52
  *
55
  function __construct( $args = array() ) {
56
  $this->defaults_settings['id'] = 'cherry-ui-colorpicker-' . uniqid();
57
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
58
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
59
 
60
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
61
  }
67
  */
68
  public function render() {
69
  $html = '';
70
+ $class = implode( ' ',
71
+ array(
72
+ $this->settings['class'],
73
+ $this->settings['master'],
74
+ )
75
+ );
76
 
77
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
78
  if ( '' !== $this->settings['label'] ) {
79
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . esc_html( $this->settings['label'] ) . '</label> ';
80
  }
81
+ $html .= '<div class="cherry-ui-colorpicker-wrapper' . $this->lock_element->get_class() .'">';
82
+ $html .= '<input type="text" id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-colorpicker" name="' . esc_attr( $this->settings['name'] ) . '" value="' . esc_html( $this->settings['value'] ) . '"' . $this->lock_element->get_disabled_attr() . '/>';
83
+ $html .= $this->lock_element->get_html();
84
  $html .= '</div>';
85
  $html .= '</div>';
86
 
95
  public static function enqueue_assets() {
96
 
97
  wp_enqueue_script(
98
+ 'ui-colorpicker',
99
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.js', Cherry_UI_Elements::$module_path ) ),
100
  array( 'jquery', 'wp-color-picker' ),
101
+ Cherry_UI_Elements::$core_version,
102
  true
103
  );
104
 
105
  wp_enqueue_style(
106
+ 'ui-colorpicker',
107
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.css', Cherry_UI_Elements::$module_path ) ),
108
  array( 'wp-color-picker' ),
109
+ Cherry_UI_Elements::$core_version,
110
  'all'
111
  );
112
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/min/ui-iconpicker.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-iconpicker-group{position:relative}.full .cherry-ui-iconpicker-group{max-width:100%}.fixed .cherry-ui-iconpicker-group{max-width:230px}.cherry-ui-iconpicker-group .input-group-addon{position:absolute;width:36px;height:36px;left:0px;top:0px;background:#f1f1f1;font-size:14px;line-height:36px;text-align:center;border-radius:3px 0 0 3px;border-right:1px solid #dddcdc;margin:7px}.cherry-ui-iconpicker-group .input-group-addon .fa{line-height:36px}.cherry-ui-iconpicker-group .cherry-ui-text{font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px 20px;min-height:50px;border:1px solid #f1f1f1;box-shadow:none;padding-left:60px}.cherry-ui-iconpicker-group .cherry-ui-text:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}.iconpicker-popover.popover{position:absolute;top:0;left:0;display:none;max-width:none;padding:1px;text-align:left;width:242px;background:#f0f0f0;z-index:999}.iconpicker-popover.popover.top,.iconpicker-popover.popover.topLeftCorner,.iconpicker-popover.popover.topLeft,.iconpicker-popover.popover.topRight,.iconpicker-popover.popover.topRightCorner{margin-top:-10px}.iconpicker-popover.popover.right,.iconpicker-popover.popover.rightTop,.iconpicker-popover.popover.rightBottom{margin-left:10px}.iconpicker-popover.popover.bottom,.iconpicker-popover.popover.bottomRightCorner,.iconpicker-popover.popover.bottomRight,.iconpicker-popover.popover.bottomLeft,.iconpicker-popover.popover.bottomLeftCorner{margin-top:10px}.iconpicker-popover.popover.left,.iconpicker-popover.popover.leftBottom,.iconpicker-popover.popover.leftTop{margin-left:-10px}.iconpicker-popover.popover.inline{margin:0 0 14px 0;position:relative;display:inline-block;opacity:1;top:auto;left:auto;bottom:auto;right:auto;max-width:100%;box-shadow:none;z-index:auto;vertical-align:top}.iconpicker-popover.popover.inline>.arrow{display:none}.dropdown-menu .iconpicker-popover.inline{margin:0;border:none}.dropdown-menu.iconpicker-container{padding:0}.iconpicker-popover.popover .popover-title{padding:14px;font-size:14px;line-height:16px;border-bottom:1px solid #ebebeb;background-color:#f0f0f0}.iconpicker-popover.popover .popover-title input[type=search].iconpicker-search{margin:0 0 2px 0}.iconpicker-popover.popover .popover-title-text ~ input[type=search].iconpicker-search{margin-top:14px}.iconpicker-popover.popover .popover-content{padding:0px;text-align:center}.iconpicker-popover .popover-footer{float:none;clear:both;padding:14px;text-align:right;margin:0;border-top:1px solid #ebebeb;background-color:#f0f0f0}.iconpicker-popover .popover-footer:before,.iconpicker-popover .popover-footer:after{content:" ";display:table}.iconpicker-popover .popover-footer:after{clear:both}.iconpicker-popover .popover-footer .iconpicker-btn{margin-left:10px}.iconpicker-popover .popover-footer input[type=search].iconpicker-search{margin-bottom:14px}.iconpicker-popover.popover>.arrow,.iconpicker-popover.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.iconpicker-popover.popover>.arrow{border-width:11px}.iconpicker-popover.popover>.arrow:after{border-width:10px;content:""}.iconpicker-popover.popover.top>.arrow,.iconpicker-popover.popover.topLeft>.arrow,.iconpicker-popover.popover.topRight>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#f0f0f0;bottom:-11px}.iconpicker-popover.popover.top>.arrow:after,.iconpicker-popover.popover.topLeft>.arrow:after,.iconpicker-popover.popover.topRight>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff}.iconpicker-popover.popover.topLeft>.arrow{left:14px;margin-left:0}.iconpicker-popover.popover.topRight>.arrow{left:auto;right:14px;margin-left:0}.iconpicker-popover.popover.right>.arrow,.iconpicker-popover.popover.rightTop>.arrow,.iconpicker-popover.popover.rightBottom>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#f0f0f0}.iconpicker-popover.popover.right>.arrow:after,.iconpicker-popover.popover.rightTop>.arrow:after,.iconpicker-popover.popover.rightBottom>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff}.iconpicker-popover.popover.rightTop>.arrow{top:auto;bottom:14px;margin-top:0}.iconpicker-popover.popover.rightBottom>.arrow{top:14px;margin-top:0}.iconpicker-popover.popover.bottom>.arrow,.iconpicker-popover.popover.bottomRight>.arrow,.iconpicker-popover.popover.bottomLeft>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#f0f0f0;top:-11px}.iconpicker-popover.popover.bottom>.arrow:after,.iconpicker-popover.popover.bottomRight>.arrow:after,.iconpicker-popover.popover.bottomLeft>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#f0f0f0}.iconpicker-popover.popover.bottomLeft>.arrow{left:14px;margin-left:0}.iconpicker-popover.popover.bottomRight>.arrow{left:auto;right:14px;margin-left:0}.iconpicker-popover.popover.left>.arrow,.iconpicker-popover.popover.leftBottom>.arrow,.iconpicker-popover.popover.leftTop>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#f0f0f0}.iconpicker-popover.popover.left>.arrow:after,.iconpicker-popover.popover.leftBottom>.arrow:after,.iconpicker-popover.popover.leftTop>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px}.iconpicker-popover.popover.leftBottom>.arrow{top:14px;margin-top:0}.iconpicker-popover.popover.leftTop>.arrow{top:auto;bottom:14px;margin-top:0}.iconpicker{position:relative;text-align:left;text-shadow:none;line-height:0;display:block;margin:0;overflow:hidden}.iconpicker *{box-sizing:content-box;position:relative}.iconpicker:before,.iconpicker:after{content:" ";display:table}.iconpicker:after{clear:both}.iconpicker .iconpicker-items{position:relative;clear:both;float:none;padding:10px 0 0 10px;background:#fff;margin:0;overflow:hidden;overflow-y:auto;min-height:55px;max-height:275px}.iconpicker .iconpicker-items:before,.iconpicker .iconpicker-items:after{content:" ";display:table}.iconpicker .iconpicker-items:after{clear:both}.iconpicker .iconpicker-item{float:left;width:28px;height:28px;line-height:28px;margin:0 7px 7px 0;text-align:center;cursor:pointer;border-radius:3px;font-size:18px;color:#444;box-shadow:0 0 0 1px #dddddd}.iconpicker .iconpicker-item .fa{line-height:28px}.iconpicker .iconpicker-item:hover:not(.iconpicker-selected){background-color:#eeeeee}.iconpicker .iconpicker-item.iconpicker-selected{box-shadow:none;background:#ddd}.iconpicker-component{cursor:pointer}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-ui-iconpicker-group{position:relative}.full .cherry-ui-iconpicker-group{max-width:100%}.fixed .cherry-ui-iconpicker-group{max-width:230px}.cherry-ui-iconpicker-group .input-group-addon{position:absolute;width:36px;height:36px;left:0px;top:0px;background:#f1f1f1;font-size:14px;line-height:36px;text-align:center;border-radius:3px 0 0 3px;border-right:1px solid #dddcdc;margin:7px}.cherry-ui-iconpicker-group .input-group-addon .fa{line-height:36px}.cherry-ui-iconpicker-group .cherry-ui-text{font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px 20px;min-height:50px;border:1px solid #f1f1f1;box-shadow:none;padding-left:60px}.cherry-ui-iconpicker-group .cherry-ui-text:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}.iconpicker-popover.popover{position:absolute;top:0;left:0;display:none;max-width:none;padding:1px;text-align:left;width:242px;background:#f0f0f0;z-index:999}.iconpicker-popover.popover.top,.iconpicker-popover.popover.topLeftCorner,.iconpicker-popover.popover.topLeft,.iconpicker-popover.popover.topRight,.iconpicker-popover.popover.topRightCorner{margin-top:-10px}.iconpicker-popover.popover.right,.iconpicker-popover.popover.rightTop,.iconpicker-popover.popover.rightBottom{margin-left:10px}.iconpicker-popover.popover.bottom,.iconpicker-popover.popover.bottomRightCorner,.iconpicker-popover.popover.bottomRight,.iconpicker-popover.popover.bottomLeft,.iconpicker-popover.popover.bottomLeftCorner{margin-top:10px}.iconpicker-popover.popover.left,.iconpicker-popover.popover.leftBottom,.iconpicker-popover.popover.leftTop{margin-left:-10px}.iconpicker-popover.popover.inline{margin:0 0 14px 0;position:relative;display:inline-block;opacity:1;top:auto;left:auto;bottom:auto;right:auto;max-width:100%;box-shadow:none;z-index:auto;vertical-align:top}.iconpicker-popover.popover.inline>.arrow{display:none}.dropdown-menu .iconpicker-popover.inline{margin:0;border:none}.dropdown-menu.iconpicker-container{padding:0}.iconpicker-popover.popover .popover-title{padding:14px;font-size:14px;line-height:16px;border-bottom:1px solid #ebebeb;background-color:#f0f0f0}.iconpicker-popover.popover .popover-title input[type=search].iconpicker-search{margin:0 0 2px 0}.iconpicker-popover.popover .popover-title-text ~ input[type=search].iconpicker-search{margin-top:14px}.iconpicker-popover.popover .popover-content{padding:0px;text-align:center}.iconpicker-popover .popover-footer{float:none;clear:both;padding:14px;text-align:right;margin:0;border-top:1px solid #ebebeb;background-color:#f0f0f0}.iconpicker-popover .popover-footer:before,.iconpicker-popover .popover-footer:after{content:" ";display:table}.iconpicker-popover .popover-footer:after{clear:both}.iconpicker-popover .popover-footer .iconpicker-btn{margin-left:10px}.iconpicker-popover .popover-footer input[type=search].iconpicker-search{margin-bottom:14px}.iconpicker-popover.popover>.arrow,.iconpicker-popover.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.iconpicker-popover.popover>.arrow{border-width:11px}.iconpicker-popover.popover>.arrow:after{border-width:10px;content:""}.iconpicker-popover.popover.top>.arrow,.iconpicker-popover.popover.topLeft>.arrow,.iconpicker-popover.popover.topRight>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#f0f0f0;bottom:-11px}.iconpicker-popover.popover.top>.arrow:after,.iconpicker-popover.popover.topLeft>.arrow:after,.iconpicker-popover.popover.topRight>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff}.iconpicker-popover.popover.topLeft>.arrow{left:14px;margin-left:0}.iconpicker-popover.popover.topRight>.arrow{left:auto;right:14px;margin-left:0}.iconpicker-popover.popover.right>.arrow,.iconpicker-popover.popover.rightTop>.arrow,.iconpicker-popover.popover.rightBottom>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#f0f0f0}.iconpicker-popover.popover.right>.arrow:after,.iconpicker-popover.popover.rightTop>.arrow:after,.iconpicker-popover.popover.rightBottom>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff}.iconpicker-popover.popover.rightTop>.arrow{top:auto;bottom:14px;margin-top:0}.iconpicker-popover.popover.rightBottom>.arrow{top:14px;margin-top:0}.iconpicker-popover.popover.bottom>.arrow,.iconpicker-popover.popover.bottomRight>.arrow,.iconpicker-popover.popover.bottomLeft>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#f0f0f0;top:-11px}.iconpicker-popover.popover.bottom>.arrow:after,.iconpicker-popover.popover.bottomRight>.arrow:after,.iconpicker-popover.popover.bottomLeft>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#f0f0f0}.iconpicker-popover.popover.bottomLeft>.arrow{left:14px;margin-left:0}.iconpicker-popover.popover.bottomRight>.arrow{left:auto;right:14px;margin-left:0}.iconpicker-popover.popover.left>.arrow,.iconpicker-popover.popover.leftBottom>.arrow,.iconpicker-popover.popover.leftTop>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#f0f0f0}.iconpicker-popover.popover.left>.arrow:after,.iconpicker-popover.popover.leftBottom>.arrow:after,.iconpicker-popover.popover.leftTop>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px}.iconpicker-popover.popover.leftBottom>.arrow{top:14px;margin-top:0}.iconpicker-popover.popover.leftTop>.arrow{top:auto;bottom:14px;margin-top:0}.iconpicker{position:relative;text-align:left;text-shadow:none;line-height:0;display:block;margin:0;overflow:hidden}.iconpicker *{box-sizing:content-box;position:relative}.iconpicker:before,.iconpicker:after{content:" ";display:table}.iconpicker:after{clear:both}.iconpicker .iconpicker-items{position:relative;clear:both;float:none;padding:10px 0 0 10px;background:#fff;margin:0;overflow:hidden;overflow-y:auto;min-height:55px;max-height:275px}.iconpicker .iconpicker-items:before,.iconpicker .iconpicker-items:after{content:" ";display:table}.iconpicker .iconpicker-items:after{clear:both}.iconpicker .iconpicker-item{float:left;width:28px;height:28px;line-height:28px;margin:0 7px 7px 0;text-align:center;cursor:pointer;border-radius:3px;font-size:18px;color:#444;box-shadow:0 0 0 1px #dddddd}.iconpicker .iconpicker-item .fa{line-height:28px}.iconpicker .iconpicker-item:hover:not(.iconpicker-selected){background-color:#eeeeee}.iconpicker .iconpicker-item.iconpicker-selected{box-shadow:none;background:#ddd}.iconpicker-component{cursor:pointer}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/ui-iconpicker.scss CHANGED
@@ -1,5 +1,13 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
 
 
 
 
 
 
 
3
 
4
  .cherry-ui-iconpicker-group {
5
  position: relative;
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
+
5
+ .cherry-ui-elements-lock{
6
+ opacity: 0.5;
7
+ cursor: no-drop;
8
+ pointer-events: none;
9
+ filter: grayscale( 100% );
10
+ }
11
 
12
  .cherry-ui-iconpicker-group {
13
  position: relative;
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php CHANGED
@@ -41,8 +41,19 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
41
  'master' => '',
42
  'width' => 'fixed', // full, fixed
43
  'required' => false,
 
44
  );
45
 
 
 
 
 
 
 
 
 
 
 
46
  /**
47
  * Default icon data settings.
48
  *
@@ -77,6 +88,8 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
77
  */
78
  public static $printed_sets = array();
79
 
 
 
80
  /**
81
  * Constructor method for the UI_Iconpicker class.
82
  *
@@ -85,6 +98,7 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
85
  function __construct( $args = array() ) {
86
  $this->defaults_settings['id'] = 'cherry-ui-input-icon-' . uniqid();
87
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
88
 
89
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
90
  add_action( 'admin_footer', array( $this, 'print_icon_set' ), 1 );
@@ -110,9 +124,16 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
110
  * @since 1.0.0
111
  */
112
  public function render() {
113
- $html = '';
114
- $class = $this->settings['class'] . $this->settings['width'] ;
115
- $class .= ' ' . $this->settings['master'];
 
 
 
 
 
 
 
116
 
117
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
118
  if ( '' !== $this->settings['label'] ) {
@@ -124,8 +145,6 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
124
  $this->default_icon_data
125
  );
126
 
127
- $this->maybe_parse_set_from_css();
128
-
129
  $html .= '<div class="cherry-ui-iconpicker-group">';
130
 
131
  if ( $this->validate_icon_data( $this->settings['icon_data'] ) ) {
@@ -135,11 +154,47 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
135
  }
136
 
137
  $html .= '</div>';
 
138
  $html .= '</div>';
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  return $html;
141
  }
142
 
 
 
 
 
 
 
 
 
 
 
 
143
  /**
144
  * Returns iconpicker html markup
145
  *
@@ -169,6 +224,10 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
169
  */
170
  public function prepare_icon_set() {
171
 
 
 
 
 
172
  if ( ! array_key_exists( $this->settings['icon_data']['icon_set'], self::$sets ) ) {
173
  self::$sets[ $this->settings['icon_data']['icon_set'] ] = array(
174
  'iconCSS' => $this->settings['icon_data']['icon_css'],
@@ -199,7 +258,7 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
199
 
200
  $result = ob_get_clean();
201
 
202
- preg_match_all( '/\.([-a-zA-Z0-9]+):before[, {]/', $result, $matches );
203
 
204
  if ( ! is_array( $matches ) || empty( $matches[1] ) ) {
205
  return;
@@ -292,25 +351,25 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
292
 
293
  wp_enqueue_style(
294
  'ui-iconpicker',
295
- esc_url( Cherry_Core::base_url( 'assets/min/ui-iconpicker.min.css', __FILE__ ) ),
296
  array(),
297
- '1.3.2',
298
  'all'
299
  );
300
 
301
  wp_enqueue_script(
302
  'jquery-iconpicker',
303
- esc_url( Cherry_Core::base_url( 'assets/min/jquery-iconpicker.min.js', __FILE__ ) ),
304
  array( 'jquery' ),
305
- '1.3.2',
306
  true
307
  );
308
 
309
  wp_enqueue_script(
310
  'ui-iconpicker',
311
- esc_url( Cherry_Core::base_url( 'assets/min/ui-iconpicker.min.js', __FILE__ ) ),
312
  array( 'jquery' ),
313
- '1.3.2',
314
  true
315
  );
316
  }
41
  'master' => '',
42
  'width' => 'fixed', // full, fixed
43
  'required' => false,
44
+ 'lock' => false,
45
  );
46
 
47
+ /**
48
+ * Instance of this Cherry5_Lock_Element class.
49
+ *
50
+ * @since 1.0.0
51
+ * @var object
52
+ * @access private
53
+ */
54
+ private $lock_element = null;
55
+
56
+
57
  /**
58
  * Default icon data settings.
59
  *
88
  */
89
  public static $printed_sets = array();
90
 
91
+ public $temp_icons = null;
92
+
93
  /**
94
  * Constructor method for the UI_Iconpicker class.
95
  *
98
  function __construct( $args = array() ) {
99
  $this->defaults_settings['id'] = 'cherry-ui-input-icon-' . uniqid();
100
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
101
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
102
 
103
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
104
  add_action( 'admin_footer', array( $this, 'print_icon_set' ), 1 );
124
  * @since 1.0.0
125
  */
126
  public function render() {
127
+ $html = '';
128
+ $lock_lable = ! empty( $this->settings['lock']['label'] )? sprintf('<div class="cherry-lock-label">%1$s</div>', $this->settings['lock']['label'] ) : '' ;
129
+ $class = implode( ' ',
130
+ array(
131
+ $this->settings['class'],
132
+ $this->settings['master'],
133
+ $this->settings['width'],
134
+ $this->lock_element->get_class( 'inline-block' ),
135
+ )
136
+ );
137
 
138
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
139
  if ( '' !== $this->settings['label'] ) {
145
  $this->default_icon_data
146
  );
147
 
 
 
148
  $html .= '<div class="cherry-ui-iconpicker-group">';
149
 
150
  if ( $this->validate_icon_data( $this->settings['icon_data'] ) ) {
154
  }
155
 
156
  $html .= '</div>';
157
+ $html .= $this->lock_element->get_html();
158
  $html .= '</div>';
159
 
160
+ /**
161
+ * Maybe add js repeater template to response
162
+ *
163
+ * @var bool
164
+ */
165
+ $add_js_to_response = apply_filters( 'cherry_ui_add_data_to_element', false );
166
+
167
+ if ( $add_js_to_response ) {
168
+
169
+ ob_start();
170
+ $this->print_icon_set();
171
+ $icons = ob_get_clean();
172
+
173
+ $in_repeater = apply_filters( 'cherry_ui_is_repeater', false );
174
+
175
+ if ( $in_repeater ) {
176
+ $this->temp_icons = $icons;
177
+ add_filter( 'cherry_ui_add_repater_data', array( $this, 'store_icons' ) );
178
+ } else {
179
+ $html .= $icons;
180
+ }
181
+
182
+ }
183
+
184
  return $html;
185
  }
186
 
187
+ public function store_icons( $data = array() ) {
188
+
189
+ if ( ! is_array( $data ) ) {
190
+ $data = array();
191
+ }
192
+
193
+ $data[] = $this->temp_icons;
194
+
195
+ return $data;
196
+ }
197
+
198
  /**
199
  * Returns iconpicker html markup
200
  *
224
  */
225
  public function prepare_icon_set() {
226
 
227
+ if ( empty( $this->settings['icon_data']['icons'] ) ) {
228
+ $this->maybe_parse_set_from_css();
229
+ }
230
+
231
  if ( ! array_key_exists( $this->settings['icon_data']['icon_set'], self::$sets ) ) {
232
  self::$sets[ $this->settings['icon_data']['icon_set'] ] = array(
233
  'iconCSS' => $this->settings['icon_data']['icon_css'],
258
 
259
  $result = ob_get_clean();
260
 
261
+ preg_match_all( '/\.([-_a-zA-Z0-9]+):before[, {]/', $result, $matches );
262
 
263
  if ( ! is_array( $matches ) || empty( $matches[1] ) ) {
264
  return;
351
 
352
  wp_enqueue_style(
353
  'ui-iconpicker',
354
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-iconpicker/assets/min/ui-iconpicker.min.css', Cherry_UI_Elements::$module_path ) ),
355
  array(),
356
+ Cherry_UI_Elements::$core_version,
357
  'all'
358
  );
359
 
360
  wp_enqueue_script(
361
  'jquery-iconpicker',
362
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-iconpicker/assets/min/jquery-iconpicker.min.js', Cherry_UI_Elements::$module_path ) ),
363
  array( 'jquery' ),
364
+ Cherry_UI_Elements::$core_version,
365
  true
366
  );
367
 
368
  wp_enqueue_script(
369
  'ui-iconpicker',
370
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-iconpicker/assets/min/ui-iconpicker.min.js', Cherry_UI_Elements::$module_path ) ),
371
  array( 'jquery' ),
372
+ Cherry_UI_Elements::$core_version,
373
  true
374
  );
375
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/min/ui-media.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-media-wrap .cherry-upload-preview{display:block;margin:0 0 5px 0}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap{position:relative;display:inline-block;vertical-align:top;width:120px;height:120px}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner{width:110px;height:110px;margin:3px;position:relative;border:2px solid #298ffc;border-radius:2px;overflow:hidden}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder{width:100%;height:100%;position:relative;background:#f1f1f1;box-sizing:border-box}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder .centered{position:absolute;width:100%;height:100%;top:0;left:0;-webkit-transform:translate(50%, 50%);transform:translate(50%, 50%)}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder img{max-width:100%;height:auto;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder span{width:auto;height:auto;font-size:60px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .title{position:absolute;width:100%;padding:5px 0;bottom:0;left:0;color:#fff;background:rgba(41,143,252,0.8);text-align:center;font-size:11px;overflow:hidden}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap:hover .cherry-remove-image{display:block}.cherry-ui-media-wrap .cherry-upload-preview .cherry-media-thumb-sortable-placeholder{width:112px;height:112px;margin:3px;vertical-align:top;border:1px dashed #dcdcdc;display:inline-block;background-color:#f1f1f1}.cherry-ui-media-wrap .upload-button{float:left}.cherry-ui-media-wrap .cherry-remove-image{width:30px;height:30px;color:#e54343;display:block;position:absolute;top:0;right:0;cursor:pointer;text-decoration:none;outline:0;display:none}.cherry-ui-media-wrap .cherry-remove-image i{width:30px;height:30px;font-size:30px}.cherry-ui-media-wrap .cherry-remove-image:hover{color:#d71e1e}.cherry-ui-media-wrap .cherry-bgsetting{float:left;width:32%;margin-right:1%}.cherry-ui-media-wrap .cherry-bgsetting:nth-child(3n+1){width:34%;margin-right:0}.cherry-ui-media-wrap .cherry-bgsetting select{margin-bottom:10px}.button-default_{position:relative;display:inline-block;font-size:12px;line-height:18px;font-weight:900;letter-spacing:0.5px;text-decoration:none;padding:15px 20px;color:#23282d;text-transform:uppercase;border-radius:4px;border-width:1px;border-style:solid;outline:none;cursor:pointer;transition:all 200ms linear;color:#fff;border-color:#777879 #2f343a #2f343a #777879;background-color:#495159}.button-default_:before{position:absolute;display:block;width:100%;height:100%;top:0;left:0;border-radius:4px;background-image:linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);content:''}.button-default_:hover:before{background-image:linear-gradient(0deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%)}.button-default_:active:before{opacity:0}.button-default_:active{background-color:#495159;border-color:#181b1e #777879 #777879 #181b1e}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-media-wrap .cherry-upload-preview{display:block;margin:0 0 5px 0}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap{position:relative;display:inline-block;vertical-align:top;width:120px;height:120px}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner{width:110px;height:110px;margin:3px;position:relative;border:2px solid #298ffc;border-radius:2px;overflow:hidden}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder{width:100%;height:100%;position:relative;background:#f1f1f1;box-sizing:border-box}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder .centered{position:absolute;width:100%;height:100%;top:0;left:0;-webkit-transform:translate(50%, 50%);transform:translate(50%, 50%)}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder img{max-width:100%;height:auto;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder span{width:auto;height:auto;font-size:60px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .title{position:absolute;width:100%;padding:5px 0;bottom:0;left:0;color:#fff;background:rgba(41,143,252,0.8);text-align:center;font-size:11px;overflow:hidden}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap:hover .cherry-remove-image{display:block}.cherry-ui-media-wrap .cherry-upload-preview .cherry-media-thumb-sortable-placeholder{width:112px;height:112px;margin:3px;vertical-align:top;border:1px dashed #dcdcdc;display:inline-block;background-color:#f1f1f1}.cherry-ui-media-wrap .upload-button{float:left}.cherry-ui-media-wrap .cherry-remove-image{width:30px;height:30px;color:#e54343;display:block;position:absolute;top:0;right:0;cursor:pointer;text-decoration:none;outline:0;display:none}.cherry-ui-media-wrap .cherry-remove-image i{width:30px;height:30px;font-size:30px}.cherry-ui-media-wrap .cherry-remove-image:hover{color:#d71e1e}.cherry-ui-media-wrap .cherry-bgsetting{float:left;width:32%;margin-right:1%}.cherry-ui-media-wrap .cherry-bgsetting:nth-child(3n+1){width:34%;margin-right:0}.cherry-ui-media-wrap .cherry-bgsetting select{margin-bottom:10px}.button-default_{position:relative;display:inline-block;font-size:12px;line-height:18px;font-weight:900;letter-spacing:0.5px;text-decoration:none;padding:15px 20px;color:#23282d;text-transform:uppercase;border-radius:4px;border-width:1px;border-style:solid;outline:none;cursor:pointer;transition:all 200ms linear;color:#fff;border-color:#777879 #2f343a #2f343a #777879;background-color:#495159}.button-default_:before{position:absolute;display:block;width:100%;height:100%;top:0;left:0;border-radius:4px;background-image:linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);content:''}.button-default_:hover:before{background-image:linear-gradient(0deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%)}.button-default_:active:before{opacity:0}.button-default_:active{background-color:#495159;border-color:#181b1e #777879 #777879 #181b1e}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.scss CHANGED
@@ -1,6 +1,13 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
3
 
 
 
 
 
 
 
4
  .cherry-ui-container {
5
  margin: 10px 0 20px 0;
6
  }
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
 
5
+ .cherry-ui-elements-lock{
6
+ opacity: 0.5;
7
+ cursor: no-drop;
8
+ pointer-events: none;
9
+ filter: grayscale( 100% );
10
+ }
11
  .cherry-ui-container {
12
  margin: 10px 0 20px 0;
13
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/ui-media.php CHANGED
@@ -38,8 +38,18 @@ if ( ! class_exists( 'UI_Media' ) ) {
38
  'label' => '',
39
  'class' => '',
40
  'master' => '',
 
41
  );
42
 
 
 
 
 
 
 
 
 
 
43
  /**
44
  * Constructor method for the UI_Media class.
45
  *
@@ -49,6 +59,7 @@ if ( ! class_exists( 'UI_Media' ) ) {
49
 
50
  $this->defaults_settings['id'] = 'cherry-ui-media-' . uniqid();
51
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
52
 
53
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
54
  }
@@ -63,7 +74,13 @@ if ( ! class_exists( 'UI_Media' ) ) {
63
 
64
  if ( current_user_can( 'upload_files' ) ) {
65
 
66
- $class = $this->settings['class'] . ' ' . $this->settings['master'];
 
 
 
 
 
 
67
 
68
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
69
  if ( '' != $this->settings['value'] ) {
@@ -136,11 +153,12 @@ if ( ! class_exists( 'UI_Media' ) ) {
136
  $html .= '</div>';
137
  $html .= '</div>';
138
  $html .= '<div class="cherry-element-wrap">';
139
- $html .= '<input type="hidden" id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-upload-input" name="' . esc_attr( $this->settings['name'] ) . '" value="' . esc_html( $this->settings['value'] ) . '" >';
140
- $html .= '<button type="button" class="upload-button cherry-upload-button button-default_" value="' . esc_attr( $this->settings['upload_button_text'] ) . '" data-title="' . esc_attr( $this->settings['upload_button_text'] ) . '" data-multi-upload="' . esc_attr( $this->settings['multi_upload'] ) . '" data-library-type="' . esc_attr( $this->settings['library_type'] ) . '">' . esc_attr( $this->settings['upload_button_text'] ) . '</button>';
141
  $html .= '<div class="clear"></div>';
142
  $html .= '</div>';
143
  $html .= '</div>';
 
144
  $html .= '</div>';
145
  }
146
 
@@ -157,18 +175,18 @@ if ( ! class_exists( 'UI_Media' ) ) {
157
  wp_enqueue_media();
158
 
159
  wp_enqueue_script(
160
- 'ui-media-min',
161
- esc_url( Cherry_Core::base_url( 'assets/min/ui-media.min.js', __FILE__ ) ),
162
  array( 'jquery', 'jquery-ui-sortable' ),
163
- '1.3.2',
164
  true
165
  );
166
 
167
  wp_enqueue_style(
168
- 'ui-media-min',
169
- esc_url( Cherry_Core::base_url( 'assets/min/ui-media.min.css', __FILE__ ) ),
170
  array(),
171
- '1.3.2',
172
  'all'
173
  );
174
  }
38
  'label' => '',
39
  'class' => '',
40
  'master' => '',
41
+ 'lock' => false,
42
  );
43
 
44
+ /**
45
+ * Instance of this Cherry5_Lock_Element class.
46
+ *
47
+ * @since 1.0.0
48
+ * @var object
49
+ * @access private
50
+ */
51
+ private $lock_element = null;
52
+
53
  /**
54
  * Constructor method for the UI_Media class.
55
  *
59
 
60
  $this->defaults_settings['id'] = 'cherry-ui-media-' . uniqid();
61
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
62
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
63
 
64
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
65
  }
74
 
75
  if ( current_user_can( 'upload_files' ) ) {
76
 
77
+ $class = implode( ' ',
78
+ array(
79
+ $this->settings['class'],
80
+ $this->settings['master'],
81
+ $this->lock_element->get_class( 'inline-block' ),
82
+ )
83
+ );
84
 
85
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
86
  if ( '' != $this->settings['value'] ) {
153
  $html .= '</div>';
154
  $html .= '</div>';
155
  $html .= '<div class="cherry-element-wrap">';
156
+ $html .= '<input type="hidden" id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-upload-input" name="' . esc_attr( $this->settings['name'] ) . '" value="' . esc_html( $this->settings['value'] ) . '"' . $this->lock_element->get_disabled_attr() . '>';
157
+ $html .= '<button type="button" class="upload-button cherry-upload-button button-default_" value="' . esc_attr( $this->settings['upload_button_text'] ) . '" data-title="' . esc_attr( $this->settings['upload_button_text'] ) . '" data-multi-upload="' . esc_attr( $this->settings['multi_upload'] ) . '" data-library-type="' . esc_attr( $this->settings['library_type'] ) . '"' . $this->lock_element->get_disabled_attr() . '>' . esc_attr( $this->settings['upload_button_text'] ) . '</button>';
158
  $html .= '<div class="clear"></div>';
159
  $html .= '</div>';
160
  $html .= '</div>';
161
+ $html .= $this->lock_element->get_html();
162
  $html .= '</div>';
163
  }
164
 
175
  wp_enqueue_media();
176
 
177
  wp_enqueue_script(
178
+ 'ui-media',
179
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-media/assets/min/ui-media.min.js', Cherry_UI_Elements::$module_path ) ),
180
  array( 'jquery', 'jquery-ui-sortable' ),
181
+ Cherry_UI_Elements::$core_version,
182
  true
183
  );
184
 
185
  wp_enqueue_style(
186
+ 'ui-media',
187
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-media/assets/min/ui-media.min.css', Cherry_UI_Elements::$module_path ) ),
188
  array(),
189
+ Cherry_UI_Elements::$core_version,
190
  'all'
191
  );
192
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}input.cherry-radio-input{display:none}.cherry-radio-item{margin-bottom:10px}.cherry-radio-item:last-child{margin-bottom:0}.cherry-radio-item label{display:inline-block;font-size:14px;line-height:22px;color:#23282d}.cherry-radio-item span{width:25px;height:25px;border-radius:25px;margin-right:10px;cursor:pointer;position:relative;background-color:#f1f1f1;display:inline-block;float:left}.cherry-radio-item span i{width:13px;height:13px;background-color:#298ffc;margin:6px;border-radius:20px;display:inline-block;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1);transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1)}.cherry-radio-item .cherry-radio-input:checked+label span i{-webkit-transform:scale(1);transform:scale(1)}.cherry-radio-img{float:left;margin:10px 5px 0 5px;text-align:center;max-width:80px;position:relative}.cherry-radio-img label{display:inline-block}.cherry-radio-img img{width:100%;height:auto;margin:0 0 5px 0;pointer-events:none}.cherry-radio-img .cherry-radio-input:checked+label{font-weight:bold}.cherry-radio-img .cherry-radio-input:checked+label .check{display:block}.cherry-radio-img .cherry-radio-input:checked+label img{box-shadow:0 0 0 2px #fffeff,0 0 0 5px #298ffc}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}input.cherry-radio-input{display:none}.cherry-radio-item{margin-bottom:10px}.cherry-radio-item:last-child{margin-bottom:0}.cherry-radio-item label{display:inline-block;font-size:14px;line-height:22px;color:#23282d}.cherry-radio-item span.cherry-radio-item{width:25px;height:25px;border-radius:25px;margin-right:10px;cursor:pointer;position:relative;background-color:#f1f1f1;display:inline-block;float:left}.cherry-radio-item span.cherry-radio-item i{width:13px;height:13px;background-color:#298ffc;margin:6px;border-radius:20px;display:inline-block;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1);transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1)}.cherry-radio-item .cherry-radio-input:checked+label span i{-webkit-transform:scale(1);transform:scale(1)}.cherry-radio-img{float:left;margin:10px 5px 0 5px;text-align:center;max-width:80px;position:relative}.cherry-radio-img label{display:inline-block}.cherry-radio-img img{width:100%;height:auto;margin:0 0 5px 0;pointer-events:none}.cherry-radio-img .cherry-radio-input:checked+label{font-weight:bold}.cherry-radio-img .cherry-radio-input:checked+label .check{display:block}.cherry-radio-img .cherry-radio-input:checked+label img{box-shadow:0 0 0 2px #fffeff,0 0 0 5px #298ffc}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"use strict";e.utilites.namespace("ui_elements.radio"),e.ui_elements.radio={inputClass:'.cherry-radio-input:not([name*="__i__"])',containerClass:".cherry-ui-container",wrapperClass:".widget, .postbox, .cherry-form, .cherry-ui-repeater-item",init:function(){t(document).on("ready.cherry-ui-elements-init",this.addEvent.bind(this)).on("cherry-ui-elements-init",this.setState.bind(this))},addEvent:function(){t("body").on("click.masterSlave",this.inputClass,this.switchState.bind(this)),this.setState({_target:t("body")})},setState:function(e){this.switchState({currentTarget:t(this.inputClass,e._target)})},switchState:function(e){for(var i,s,n,a=t(e.currentTarget).closest(this.containerClass),r=t(this.inputClass,a),c=r.length-1;c>=0;c--)i=t(r[c]),n=i.data(),s=i.closest(this.wrapperClass),jQuery.isEmptyObject(n)||t("."+n.slave,s)[i[0].checked?"removeClass":"addClass"]("hide")}},e.ui_elements.radio.init()}(jQuery,window.CherryJsCore);
1
+ !function(t,e){"use strict";e.utilites.namespace("ui_elements.radio"),e.ui_elements.radio={inputClass:'.cherry-radio-input:not([name*="__i__"])',containerClass:".cherry-ui-container",wrapperClass:".widget, .postbox, .cherry-form, .cherry-ui-repeater-item",init:function(){t(document).on("ready.cherry-ui-elements-init",this.addEvent.bind(this)).on("cherry-ui-elements-init",this.setState.bind(this))},addEvent:function(){t("body").on("click.masterSlave",this.inputClass,this.switchState.bind(this)),this.setState({_target:t("body")})},setState:function(e){this.switchState({currentTarget:t(this.inputClass,e._target)})},switchState:function(e){for(var i,s,n,r=t(e.currentTarget).closest(this.containerClass),a=t(this.inputClass,r),c=a.length-1;c>=0;c--)i=t(a[c]),n=i.data(),s=i.closest(this.wrapperClass),jQuery.isEmptyObject(n)||t("."+n.slave,s)[i[0].checked?"removeClass":"addClass"]("hide")}},e.ui_elements.radio.init()}(jQuery,window.CherryJsCore);
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/ui-radio.scss CHANGED
@@ -1,5 +1,6 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
3
 
4
  .cherry-ui-container{
5
  margin: 10px 0 20px 0;
@@ -25,7 +26,7 @@ input.cherry-radio-input{
25
  line-height: 22px;
26
  color: $dark_color_1;
27
  }
28
- span{
29
  width: 25px;
30
  height: 25px;
31
  border-radius: 25px;
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
 
5
  .cherry-ui-container{
6
  margin: 10px 0 20px 0;
26
  line-height: 22px;
27
  color: $dark_color_1;
28
  }
29
+ span.cherry-radio-item{
30
  width: 25px;
31
  height: 25px;
32
  border-radius: 25px;
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/ui-radio.php CHANGED
@@ -37,6 +37,11 @@ if ( ! class_exists( 'UI_Radio' ) ) {
37
  'label' => 'Radio 1',
38
  'img_src' => '',
39
  'slave' => '',
 
 
 
 
 
40
  ),
41
  'radio-2' => array(
42
  'label' => 'Radio 2',
@@ -55,6 +60,15 @@ if ( ! class_exists( 'UI_Radio' ) ) {
55
  'master' => '',
56
  );
57
 
 
 
 
 
 
 
 
 
 
58
  /**
59
  * Constructor method for the UI_Radio class.
60
  *
@@ -63,6 +77,7 @@ if ( ! class_exists( 'UI_Radio' ) ) {
63
  function __construct( $args = array() ) {
64
  $this->defaults_settings['id'] = 'cherry-ui-radio-' . uniqid();
65
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
66
 
67
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
68
 
@@ -75,33 +90,41 @@ if ( ! class_exists( 'UI_Radio' ) ) {
75
  * @since 1.0.0
76
  */
77
  public function render() {
78
- $html = '';
79
- $class = $this->settings['class'];
80
- $class .= ' ' . $this->settings['master'];
 
 
 
 
 
81
 
82
- $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
83
  if ( $this->settings['options'] && ! empty( $this->settings['options'] ) && is_array( $this->settings['options'] ) ) {
84
  if ( '' !== $this->settings['label'] ) {
85
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . $this->settings['label'] . '</label> ';
86
  }
87
  $html .= '<div class="cherry-radio-group">';
88
  foreach ( $this->settings['options'] as $option => $option_value ) {
89
- $checked = $option == $this->settings['value'] ? ' checked' : '';
90
- $radio_id = $this->settings['id'] . '-' . $option;
91
- $img = isset( $option_value['img_src'] ) && ! empty( $option_value['img_src'] ) ? '<img src="' . esc_url( $option_value['img_src'] ) . '" alt="' . esc_html( $option_value['label'] ) . '">' : '<span class="cherry-radio-item"><i></i></span>';
 
 
92
  $data_slave = isset( $option_value['slave'] ) && ! empty( $option_value['slave'] ) ? ' data-slave="' . $option_value['slave'] . '"' : '';
93
- $class_box = isset( $option_value['img_src'] ) && ! empty( $option_value['img_src'] ) ? ' cherry-radio-img' : ' cherry-radio-item' ;
 
94
 
95
  $html .= '<div class="' . $class_box . '">';
96
- $html .= '<input type="radio" id="' . esc_attr( $radio_id ) . '" class="cherry-radio-input" name="' . esc_attr( $this->settings['name'] ) . '" ' . checked( $option, $this->settings['value'], false ) . ' value="' . esc_attr( $option ) . '"' . $data_slave . '>';
97
- $label_content = $img . $option_value['label'];
98
- $html .= '<label for="' . esc_attr( $radio_id ) . '">' . $label_content . '</label> ';
99
  $html .= '</div>';
100
  }
101
  $html .= '<div class="clear"></div>';
102
  $html .= '</div>';
103
  }
104
- $html .= '</div>';
105
 
106
  return $html;
107
  }
@@ -113,18 +136,18 @@ if ( ! class_exists( 'UI_Radio' ) ) {
113
  */
114
  public static function enqueue_assets() {
115
  wp_enqueue_style(
116
- 'ui-radio-min',
117
- esc_url( Cherry_Core::base_url( 'assets/min/ui-radio.min.css', __FILE__ ) ),
118
  array(),
119
- '1.3.2',
120
  'all'
121
  );
122
 
123
  wp_enqueue_script(
124
  'ui-radio-min',
125
- esc_url( Cherry_Core::base_url( 'assets/min/ui-radio.min.js', __FILE__ ) ),
126
  array( 'jquery' ),
127
- '1.3.2',
128
  true
129
  );
130
  }
37
  'label' => 'Radio 1',
38
  'img_src' => '',
39
  'slave' => '',
40
+ 'lock' => array(
41
+ 'label' => '',
42
+ 'url' => '',
43
+ 'icon' => '',
44
+ ),
45
  ),
46
  'radio-2' => array(
47
  'label' => 'Radio 2',
60
  'master' => '',
61
  );
62
 
63
+ /**
64
+ * Instance of this Cherry5_Lock_Element class.
65
+ *
66
+ * @since 1.0.0
67
+ * @var object
68
+ * @access private
69
+ */
70
+ private $lock_element = null;
71
+
72
  /**
73
  * Constructor method for the UI_Radio class.
74
  *
77
  function __construct( $args = array() ) {
78
  $this->defaults_settings['id'] = 'cherry-ui-radio-' . uniqid();
79
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
80
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
81
 
82
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
83
 
90
  * @since 1.0.0
91
  */
92
  public function render() {
93
+ $html = '';
94
+ $class = implode( ' ',
95
+ array(
96
+ $this->settings['class'],
97
+ $this->settings['master'],
98
+ $this->lock_element->get_class( 'inline-block' ),
99
+ )
100
+ );
101
 
102
+ $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '" >';
103
  if ( $this->settings['options'] && ! empty( $this->settings['options'] ) && is_array( $this->settings['options'] ) ) {
104
  if ( '' !== $this->settings['label'] ) {
105
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . $this->settings['label'] . '</label> ';
106
  }
107
  $html .= '<div class="cherry-radio-group">';
108
  foreach ( $this->settings['options'] as $option => $option_value ) {
109
+ $lock_option = new Cherry5_Lock_Element( $option_value );
110
+
111
+ $checked = $option == $this->settings['value'] ? ' checked' : '';
112
+ $radio_id = $this->settings['id'] . '-' . $option;
113
+ $img = isset( $option_value['img_src'] ) && ! empty( $option_value['img_src'] ) ? '<img src="' . esc_url( $option_value['img_src'] ) . '" alt="' . esc_html( $option_value['label'] ) . '">' : '<span class="cherry-radio-item"><i></i></span>';
114
  $data_slave = isset( $option_value['slave'] ) && ! empty( $option_value['slave'] ) ? ' data-slave="' . $option_value['slave'] . '"' : '';
115
+ $class_box = isset( $option_value['img_src'] ) && ! empty( $option_value['img_src'] ) ? ' cherry-radio-img' : ' cherry-radio-item' ;
116
+ $class_box .= $lock_option->get_class();
117
 
118
  $html .= '<div class="' . $class_box . '">';
119
+ $html .= '<input type="radio" id="' . esc_attr( $radio_id ) . '" class="cherry-radio-input" name="' . esc_attr( $this->settings['name'] ) . '" ' . checked( $option, $this->settings['value'], false ) . ' value="' . esc_attr( $option ) . '"' . $data_slave . ' ' . $lock_option->get_disabled_attr() . '/>';
120
+ $label_content = $img . $option_value['label'];
121
+ $html .= '<label for="' . esc_attr( $radio_id ) . '"><span class="cherry-lable-content">' . $label_content . '</span>' . $lock_option->get_html() . '</label> ';
122
  $html .= '</div>';
123
  }
124
  $html .= '<div class="clear"></div>';
125
  $html .= '</div>';
126
  }
127
+ $html .= $this->lock_element->get_html() . '</div>';
128
 
129
  return $html;
130
  }
136
  */
137
  public static function enqueue_assets() {
138
  wp_enqueue_style(
139
+ 'ui-radio',
140
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-radio/assets/min/ui-radio.min.css', Cherry_UI_Elements::$module_path ) ),
141
  array(),
142
+ Cherry_UI_Elements::$core_version,
143
  'all'
144
  );
145
 
146
  wp_enqueue_script(
147
  'ui-radio-min',
148
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-radio/assets/min/ui-radio.min.js', Cherry_UI_Elements::$module_path ) ),
149
  array( 'jquery' ),
150
+ Cherry_UI_Elements::$core_version,
151
  true
152
  );
153
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-repeater/ui-repeater.php CHANGED
@@ -120,6 +120,8 @@ if ( ! class_exists( 'UI_Repeater' ) ) {
120
  $value = ! empty( $this->settings['value'] ) ? count( $this->settings['value'] ) : 0 ;
121
  $title_field = ! empty( $this->settings['title_field'] ) ? 'data-title-field="' . $this->settings['title_field'] . '"' : '' ;
122
 
 
 
123
  $html .= sprintf( '<div class="cherry-ui-repeater-container cherry-ui-container %1$s %2$s">',
124
  $ui_kit,
125
  esc_attr( $class )
@@ -149,9 +151,38 @@ if ( ! class_exists( 'UI_Repeater' ) ) {
149
  esc_html( $this->settings['add_label'] )
150
  );
151
  $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  return $html;
153
  }
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  /**
156
  * Render single row for repeater
157
  *
@@ -218,9 +249,11 @@ if ( ! class_exists( 'UI_Repeater' ) ) {
218
  return '"type" and "name" are required fields for UI_Repeater items';
219
  }
220
 
221
- $field = wp_parse_args( $field, array( 'value' => '' ) );
222
- $parent_name = str_replace( '__i__', $widget_index, $this->settings['name'] );
 
223
 
 
224
  $field['id'] = sprintf( '%s-%s', $field['id'], $index );
225
  $field['value'] = isset( $this->data[ $field['name'] ] ) ? $this->data[ $field['name'] ] : $field['value'];
226
  $field['name'] = sprintf( '%1$s[item-%2$s][%3$s]', $parent_name, $index, $field['name'] );
@@ -244,17 +277,17 @@ if ( ! class_exists( 'UI_Repeater' ) ) {
244
  public static function enqueue_assets() {
245
  wp_enqueue_style(
246
  'ui-repeater',
247
- esc_url( Cherry_Core::base_url( 'assets/min/ui-repeater.min.css', __FILE__ ) ),
248
  array(),
249
- '1.3.2',
250
  'all'
251
  );
252
 
253
  wp_enqueue_script(
254
  'ui-repeater',
255
- esc_url( Cherry_Core::base_url( 'assets/min/ui-repeater.min.js', __FILE__ ) ),
256
  array( 'wp-util', 'jquery-ui-sortable' ),
257
- '1.3.2',
258
  true
259
  );
260
 
120
  $value = ! empty( $this->settings['value'] ) ? count( $this->settings['value'] ) : 0 ;
121
  $title_field = ! empty( $this->settings['title_field'] ) ? 'data-title-field="' . $this->settings['title_field'] . '"' : '' ;
122
 
123
+ add_filter( 'cherry_ui_is_repeater', '__return_true' );
124
+
125
  $html .= sprintf( '<div class="cherry-ui-repeater-container cherry-ui-container %1$s %2$s">',
126
  $ui_kit,
127
  esc_attr( $class )
151
  esc_html( $this->settings['add_label'] )
152
  );
153
  $html .= '</div>';
154
+
155
+ /**
156
+ * Maybe add js repeater template to response
157
+ *
158
+ * @var bool
159
+ */
160
+ $add_js_to_response = apply_filters( 'cherry_ui_add_data_to_element', false );
161
+
162
+ if ( $add_js_to_response ) {
163
+ $html .= $this->get_js_template();
164
+ }
165
+
166
+ $html .= $this->get_additional_data();
167
+
168
+ remove_all_filters( 'cherry_ui_is_repeater' );
169
+
170
  return $html;
171
  }
172
 
173
+ /**
174
+ * Get additional data to return
175
+ * @return [type] [description]
176
+ */
177
+ public function get_additional_data() {
178
+ $data = apply_filters( 'cherry_ui_add_repater_data', array() );
179
+
180
+ if ( ! empty( $data ) ) {
181
+ return implode( ' ', $data );
182
+ }
183
+
184
+ }
185
+
186
  /**
187
  * Render single row for repeater
188
  *
249
  return '"type" and "name" are required fields for UI_Repeater items';
250
  }
251
 
252
+ $field = wp_parse_args( $field, array(
253
+ 'value' => '',
254
+ ) );
255
 
256
+ $parent_name = str_replace( '__i__', $widget_index, $this->settings['name'] );
257
  $field['id'] = sprintf( '%s-%s', $field['id'], $index );
258
  $field['value'] = isset( $this->data[ $field['name'] ] ) ? $this->data[ $field['name'] ] : $field['value'];
259
  $field['name'] = sprintf( '%1$s[item-%2$s][%3$s]', $parent_name, $index, $field['name'] );
277
  public static function enqueue_assets() {
278
  wp_enqueue_style(
279
  'ui-repeater',
280
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-repeater/assets/min/ui-repeater.min.css', Cherry_UI_Elements::$module_path ) ),
281
  array(),
282
+ Cherry_UI_Elements::$core_version,
283
  'all'
284
  );
285
 
286
  wp_enqueue_script(
287
  'ui-repeater',
288
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-repeater/assets/min/ui-repeater.min.js', Cherry_UI_Elements::$module_path ) ),
289
  array( 'wp-util', 'jquery-ui-sortable' ),
290
+ Cherry_UI_Elements::$core_version,
291
  true
292
  );
293
 
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}select.cherry-ui-select{width:100%;outline:0 none;color:#23282d;font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px 20px;min-height:50px;border:1px solid #dcdcdc;box-shadow:none}select.cherry-ui-select:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}select.cherry-ui-select:focus{border-color:none;box-shadow:none}select.select2-hidden-accessible{display:none}.select2{color:#23282d;background-color:#f1f1f1;border-radius:2px;border:1px solid #dcdcdc}.select2 .selection .select2-selection.select2-selection--single{background-color:transparent;border:none;border-radius:2px;height:50px}.select2 .selection .select2-selection.select2-selection--single .select2-selection__rendered{padding:15px 20px;font-size:14px;line-height:20px}.select2 .selection .select2-selection.select2-selection--single .select2-selection__arrow{height:50px}.select2 .selection .select2-selection.select2-selection--multiple{background-color:transparent;border:none;border-radius:2px}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered{font-size:14px;line-height:20px;padding:0;display:block}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-selection__choice{line-height:20px;margin:5px;border:none;background-color:#23282d;border-radius:2px;color:#fff;padding:10px}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove{color:#e64545;margin-right:10px}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-search{margin:0}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-search .select2-search__field{padding:0;margin:15px 10px;border:none;box-shadow:none;line-height:20px}.select2-container .select2-dropdown{background-color:#e5e5e5;border:none;border-radius:2px;margin:5px 0;box-shadow:0px 5px 21px rgba(0,0,0,0.1);z-index:500001}.select2-container .select2-dropdown .select2-search__field{border:none;box-shadow:none;border-radius:2px;margin:0}.select2-container .select2-dropdown .select2-search__field:focus{outline:none}.select2-container .select2-dropdown .select2-results .select2-results__options .select2-results__option[aria-selected=true]{color:#fff;background-color:#2a90fc}.select2-container .select2-dropdown .select2-results .select2-results__options .select2-results__option--highlighted{color:#fff;background-color:#23282d}.select2-container .select2-dropdown .select2-results .select2-results__options .li[aria-disabled=true]{display:none}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}select.cherry-ui-select{width:100%;outline:0 none;color:#23282d;font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px 20px;min-height:50px;border:1px solid #dcdcdc;box-shadow:none}select.cherry-ui-select:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}select.cherry-ui-select:focus{border-color:none;box-shadow:none}select.select2-hidden-accessible{display:none}.select2{color:#23282d;background-color:#f1f1f1;border-radius:2px;border:1px solid #dcdcdc}.select2 .selection .select2-selection.select2-selection--single{background-color:transparent;border:none;border-radius:2px;height:50px}.select2 .selection .select2-selection.select2-selection--single .select2-selection__rendered{padding:15px 20px;font-size:14px;line-height:20px}.select2 .selection .select2-selection.select2-selection--single .select2-selection__arrow{height:50px}.select2 .selection .select2-selection.select2-selection--multiple{background-color:transparent;border:none;border-radius:2px}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered{font-size:14px;line-height:20px;padding:0;display:block}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-selection__choice{line-height:20px;margin:5px;border:none;background-color:#23282d;border-radius:2px;color:#fff;padding:10px}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove{color:#e64545;margin-right:10px}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-search{margin:0}.select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-search .select2-search__field{padding:0;margin:15px 10px;border:none;box-shadow:none;line-height:20px}.select2-container .select2-dropdown{background-color:#e5e5e5;border:none;border-radius:2px;margin:5px 0;box-shadow:0px 5px 21px rgba(0,0,0,0.1);z-index:500001}.select2-container .select2-dropdown .select2-search__field{border:none;box-shadow:none;border-radius:2px;margin:0}.select2-container .select2-dropdown .select2-search__field:focus{outline:none}.select2-container .select2-dropdown .select2-results .select2-results__options .select2-results__option[aria-selected=true]{color:#fff;background-color:#2a90fc}.select2-container .select2-dropdown .select2-results .select2-results__options .select2-results__option--highlighted{color:#fff;background-color:#23282d}.select2-container .select2-dropdown .select2-results .select2-results__options .li[aria-disabled=true]{display:none}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"use strict";t.utilites.namespace("ui_elements.select"),t.ui_elements.select={selectClass:'.cherry-ui-select[data-filter="true"]:not([name*="__i__"]), .cherry-ui-select[multiple]:not([name*="__i__"])',wrapperClass:".widget, .postbox, .cherry-form, .cherry-ui-repeater-item",init:function(){e(document).on("ready.cherry-ui-elements-init",this.render.bind(this)).on("cherry-ui-elements-init",this.render.bind(this))},render:function(t){var i=t._target?t._target:e("body");e(this.selectClass,i).each(this.select2Init.bind(this))},select2Init:function(t,i){var s=e(i),r={placeholder:s.attr("placeholder")};s.select2(r).on("change.cherrySelect2",this.changeEvent.bind(this)).trigger("change.cherrySelect2")},changeEvent:function(e){this.switchState(e.currentTarget)},switchState:function(t){for(var i,s,r,n=e(t),c=n[0].length;c>=0;c--)i=e(n[0][c]),s=i.data(),r=e(n[0]).closest(this.wrapperClass),jQuery.isEmptyObject(s)||e("."+s.slave,r)[i[0].selected?"removeClass":"addClass"]("hide")}},t.ui_elements.select.init()}(jQuery,window.CherryJsCore);
1
+ !function(e,t){"use strict";t.utilites.namespace("ui_elements.select"),t.ui_elements.select={selectClass:'.cherry-ui-select[data-filter="true"]:not([name*="__i__"]), .cherry-ui-select[multiple]:not([name*="__i__"])',wrapperClass:".widget, .postbox, .cherry-form, .cherry-ui-repeater-item",init:function(){e(document).on("ready.cherry-ui-elements-init",this.render.bind(this)).on("cherry-ui-elements-init",this.render.bind(this))},render:function(t){var i=t._target?t._target:e("body");e(this.selectClass,i).each(this.select2Init.bind(this))},select2Init:function(t,i){var r=e(i),s={placeholder:r.data("placeholder")};r.select2(s).on("change.cherrySelect2",this.changeEvent.bind(this)).trigger("change.cherrySelect2")},changeEvent:function(e){this.switchState(e.currentTarget)},switchState:function(t){for(var i,r,s,n=e(t),c=n[0].length;c>=0;c--)i=e(n[0][c]),r=i.data(),s=e(n[0]).closest(this.wrapperClass),jQuery.isEmptyObject(r)||e("."+r.slave,s)[i[0].selected?"removeClass":"addClass"]("hide")}},t.ui_elements.select.init()}(jQuery,window.CherryJsCore);
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.js CHANGED
@@ -23,7 +23,7 @@
23
  select2Init: function ( index, element ) {
24
  var $this = $( element ),
25
  options = {
26
- placeholder: $this.attr('placeholder')
27
  };
28
 
29
  $this
23
  select2Init: function ( index, element ) {
24
  var $this = $( element ),
25
  options = {
26
+ placeholder: $this.data('placeholder')
27
  };
28
 
29
  $this
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.scss CHANGED
@@ -1,5 +1,6 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
3
 
4
  .cherry-ui-container{
5
  margin: 10px 0 20px 0;
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
 
5
  .cherry-ui-container{
6
  margin: 10px 0 20px 0;
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/ui-select.php CHANGED
@@ -36,6 +36,8 @@ if ( ! class_exists( 'UI_Select' ) ) {
36
  'size' => 1,
37
  'inline_style' => 'width: 100%',
38
  'value' => 'select-8',
 
 
39
  'options' => array(
40
  'select-1' => 'select 1',
41
  'select-2' => 'select 2',
@@ -62,12 +64,20 @@ if ( ! class_exists( 'UI_Select' ) ) {
62
  ),
63
  ),
64
  ),
65
- 'placeholder' => 'Select',
66
- 'label' => '',
67
- 'class' => '',
68
- 'master' => '',
69
  );
70
 
 
 
 
 
 
 
 
 
 
71
  /**
72
  * Constructor method for the UI_Select class.
73
  *
@@ -75,7 +85,8 @@ if ( ! class_exists( 'UI_Select' ) ) {
75
  */
76
  function __construct( $args = array() ) {
77
  $this->defaults_settings['id'] = 'cherry-ui-select-' . uniqid();
78
- $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
79
 
80
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
81
  }
@@ -87,65 +98,75 @@ if ( ! class_exists( 'UI_Select' ) ) {
87
  */
88
  public function render() {
89
  $html = '';
90
- $class = $this->settings['class'];
91
- $class .= ' ' . $this->settings['master'];
 
 
 
 
92
 
93
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
 
 
94
 
95
- ( $this->settings['filter'] ) ? $filter_state = 'data-filter="true"' : $filter_state = 'data-filter="false"' ;
 
96
 
97
- ( $this->settings['multiple'] ) ? $multi_state = 'multiple="multiple"' : $multi_state = '' ;
98
- ( $this->settings['multiple'] ) ? $name = $this->settings['name'] . '[]' : $name = $this->settings['name'] ;
 
99
 
100
- if ( '' !== $this->settings['label'] ) {
101
- $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . $this->settings['label'] . '</label> ';
102
- }
103
 
104
- $inline_style = $this->settings['inline_style'] ? 'style="' . esc_attr( $this->settings['inline_style'] ) . '"' : '' ;
105
 
106
- $html .= '<select id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-select" name="' . esc_attr( $name ) . '" size="' . esc_attr( $this->settings['size'] ) . '" ' . $multi_state . ' ' . $filter_state . ' placeholder="' . $this->settings['placeholder'] . '" ' . $inline_style . ' >';
107
- if ( $this->settings['options'] && ! empty( $this->settings['options'] ) && is_array( $this->settings['options'] ) ) {
108
- foreach ( $this->settings['options'] as $option => $option_value ) {
109
- if ( ! is_array( $this->settings['value'] ) ) {
110
- $this->settings['value'] = array( $this->settings['value'] );
111
- }
112
- if ( false === strpos( $option, 'optgroup' ) ) {
113
- $selected_state = '';
114
- if ( $this->settings['value'] && ! empty( $this->settings['value'] ) ) {
115
- foreach ( $this->settings['value'] as $key => $value ) {
116
- $selected_state = selected( $value, $option, false );
117
- if ( " selected='selected'" == $selected_state ) {
118
- break;
119
- }
120
- }
121
- }
122
 
123
- if ( is_array( $option_value ) ) {
124
- $lable = $option_value['label'];
125
- $data = 'data-slave="' . $option_value['slave'] . '"';
126
- } else {
127
- $lable = $option_value;
128
- $data = '';
129
  }
130
 
131
- $html .= '<option value="' . esc_attr( $option ) . '" ' . $selected_state . ' ' . $data . '>' . esc_html( $lable ) . '</option>';
132
- } else {
133
- $html .= '<optgroup label="' . esc_attr( $option_value['label'] ) . '">';
134
  $selected_state = '';
135
- foreach ( $option_value['group_options'] as $group_item => $group_value ) {
136
  foreach ( $this->settings['value'] as $key => $value ) {
137
- $selected_state = selected( $value, $group_item, false );
138
  if ( " selected='selected'" == $selected_state ) {
139
  break;
140
  }
141
  }
142
- $html .= '<option value="' . esc_attr( $group_item ) . '" ' . $selected_state . '>' . esc_html( $group_value ) . '</option>';
143
  }
144
- $html .= '</optgroup>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  }
146
  }
147
- }
148
- $html .= '</select>';
 
149
  $html .= '</div>';
150
 
151
  return $html;
@@ -159,33 +180,33 @@ if ( ! class_exists( 'UI_Select' ) ) {
159
  public static function enqueue_assets() {
160
  wp_enqueue_script(
161
  'ui-select-select2',
162
- esc_url( Cherry_Core::base_url( 'assets/min/select2.min.js', __FILE__ ) ),
163
  array( 'jquery' ),
164
  '4.0.3',
165
  true
166
  );
167
 
168
  wp_enqueue_script(
169
- 'ui-select-min',
170
- esc_url( Cherry_Core::base_url( 'assets/min/ui-select.min.js', __FILE__ ) ),
171
  array( 'jquery' ),
172
- '1.3.2',
173
  true
174
  );
175
 
176
  wp_enqueue_style(
177
  'ui-select-select2',
178
- esc_url( Cherry_Core::base_url( 'assets/min/select2.min.css', __FILE__ ) ),
179
  array(),
180
  '4.0.3',
181
  'all'
182
  );
183
 
184
  wp_enqueue_style(
185
- 'ui-select-min',
186
- esc_url( Cherry_Core::base_url( 'assets/min/ui-select.min.css', __FILE__ ) ),
187
  array(),
188
- '1.3.2',
189
  'all'
190
  );
191
  }
36
  'size' => 1,
37
  'inline_style' => 'width: 100%',
38
  'value' => 'select-8',
39
+ 'placeholder' => null,
40
+ 'lock' => false,
41
  'options' => array(
42
  'select-1' => 'select 1',
43
  'select-2' => 'select 2',
64
  ),
65
  ),
66
  ),
67
+ 'label' => '',
68
+ 'class' => '',
69
+ 'master' => '',
 
70
  );
71
 
72
+ /**
73
+ * Instance of this Cherry5_Lock_Element class.
74
+ *
75
+ * @since 1.0.0
76
+ * @var object
77
+ * @access private
78
+ */
79
+ private $lock_element = null;
80
+
81
  /**
82
  * Constructor method for the UI_Select class.
83
  *
85
  */
86
  function __construct( $args = array() ) {
87
  $this->defaults_settings['id'] = 'cherry-ui-select-' . uniqid();
88
+ $this->settings = wp_parse_args( $args, $this->defaults_settings );
89
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
90
 
91
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
92
  }
98
  */
99
  public function render() {
100
  $html = '';
101
+ $class = implode( ' ',
102
+ array(
103
+ $this->settings['class'],
104
+ $this->settings['master'],
105
+ )
106
+ );
107
 
108
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
109
+ $html .= '<div class="cherry-ui-select-wrapper' . $this->lock_element->get_class() .'">';
110
+ ( $this->settings['filter'] ) ? $filter_state = 'data-filter="true"' : $filter_state = 'data-filter="false"' ;
111
 
112
+ ( $this->settings['multiple'] ) ? $multi_state = 'multiple="multiple"' : $multi_state = '' ;
113
+ ( $this->settings['multiple'] ) ? $name = $this->settings['name'] . '[]' : $name = $this->settings['name'] ;
114
 
115
+ if ( '' !== $this->settings['label'] ) {
116
+ $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . $this->settings['label'] . '</label> ';
117
+ }
118
 
119
+ $inline_style = $this->settings['inline_style'] ? 'style="' . esc_attr( $this->settings['inline_style'] ) . '"' : '' ;
 
 
120
 
121
+ $html .= '<select id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-select" name="' . esc_attr( $name ) . '" size="' . esc_attr( $this->settings['size'] ) . '" ' . $multi_state . ' ' . $filter_state . ' data-placeholder="' . esc_attr( $this->settings['placeholder'] ) . '" ' . $inline_style . $this->lock_element->get_disabled_attr(). '>';
122
 
123
+ if ( $this->settings['options'] && ! empty( $this->settings['options'] ) && is_array( $this->settings['options'] ) ) {
124
+ foreach ( $this->settings['options'] as $option => $option_value ) {
125
+ $lock_element = new Cherry5_Lock_Element( $option_value );
 
 
 
 
 
 
 
 
 
 
 
 
 
126
 
127
+ if ( ! is_array( $this->settings['value'] ) ) {
128
+ $this->settings['value'] = array( $this->settings['value'] );
 
 
 
 
129
  }
130
 
131
+ if ( false === strpos( $option, 'optgroup' ) ) {
 
 
132
  $selected_state = '';
133
+ if ( $this->settings['value'] && ! empty( $this->settings['value'] ) ) {
134
  foreach ( $this->settings['value'] as $key => $value ) {
135
+ $selected_state = selected( $value, $option, false );
136
  if ( " selected='selected'" == $selected_state ) {
137
  break;
138
  }
139
  }
 
140
  }
141
+
142
+ if ( is_array( $option_value ) ) {
143
+ $lable = $option_value['label'];
144
+ $data = !empty( $option_value['slave'] ) ? 'data-slave="' . $option_value['slave'] . '"' : '' ;
145
+ } else {
146
+ $lable = $option_value;
147
+ $data = '';
148
+ }
149
+
150
+ $html .= '<option value="' . esc_attr( $option ) . '" ' . $selected_state . ' ' . $data . ' ' . $lock_element->get_disabled_attr() . '>' . esc_html( $lable ) . '</option>';
151
+ } else {
152
+ $html .= '<optgroup label="' . esc_attr( $option_value['label'] ) . '">';
153
+ $selected_state = '';
154
+ foreach ( $option_value['group_options'] as $group_item => $group_value ) {
155
+ foreach ( $this->settings['value'] as $key => $value ) {
156
+ $selected_state = selected( $value, $group_item, false );
157
+ if ( " selected='selected'" == $selected_state ) {
158
+ break;
159
+ }
160
+ }
161
+ $html .= '<option value="' . esc_attr( $group_item ) . '" ' . $selected_state . ' ' . $lock_element->get_disabled_attr() . '>' . esc_html( $group_value ) . '</option>';
162
+ }
163
+ $html .= '</optgroup>';
164
+ }
165
  }
166
  }
167
+ $html .= '</select>';
168
+ $html .= $this->lock_element->get_html();
169
+ $html .= '</div>';
170
  $html .= '</div>';
171
 
172
  return $html;
180
  public static function enqueue_assets() {
181
  wp_enqueue_script(
182
  'ui-select-select2',
183
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-select/assets/min/select2.min.js', Cherry_UI_Elements::$module_path ) ),
184
  array( 'jquery' ),
185
  '4.0.3',
186
  true
187
  );
188
 
189
  wp_enqueue_script(
190
+ 'ui-select',
191
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-select/assets/min/ui-select.min.js', Cherry_UI_Elements::$module_path ) ),
192
  array( 'jquery' ),
193
+ Cherry_UI_Elements::$core_version,
194
  true
195
  );
196
 
197
  wp_enqueue_style(
198
  'ui-select-select2',
199
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-select/assets/min/select2.min.css', Cherry_UI_Elements::$module_path ) ),
200
  array(),
201
  '4.0.3',
202
  'all'
203
  );
204
 
205
  wp_enqueue_style(
206
+ 'ui-select',
207
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-select/assets/min/ui-select.min.css', Cherry_UI_Elements::$module_path ) ),
208
  array(),
209
+ Cherry_UI_Elements::$core_version,
210
  'all'
211
  );
212
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/min/ui-slider.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}.cherry-ui-container .cherry-ui-container{margin:0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-slider-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.cherry-slider-wrap .cherry-slider-input{-webkit-box-flex:0;-ms-flex:0 1 10%;flex:0 1 10%;min-width:100px;max-width:200px}.cherry-slider-wrap .cherry-slider-holder{-webkit-box-flex:0;-ms-flex:0 1 90%;flex:0 1 90%;min-width:200px;max-width:300px;margin-right:20px}.cherry-slider-wrap .cherry-slider-holder input[type=range]{-webkit-appearance:none;width:100%;margin:20px 0}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus{outline:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-webkit-slider-runnable-track{width:100%;height:5px;cursor:pointer;box-shadow:none;background:#48c569;border-radius:25px;border:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-webkit-slider-thumb{box-shadow:5px 5px 13px rgba(0,0,0,0.18);border:5px solid #48c569;height:20px;width:20px;margin-top:-7px;border-radius:15px;background:#48c569;cursor:pointer;-webkit-appearance:none;-webkit-transition:all 250ms cubic-bezier(0.645, 0.045, 0.355, 1);transition:all 250ms cubic-bezier(0.645, 0.045, 0.355, 1)}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-webkit-slider-thumb{background:#f1f1f1;height:28px;width:28px;margin-top:-11.5px}.cherry-slider-wrap .cherry-slider-holder input[type=range]:hover::-webkit-slider-thumb{background:#f1f1f1;height:28px;width:28px;margin-top:-11.5px}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-webkit-slider-runnable-track{background:#48c569}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-moz-range-track{width:100%;height:5px;cursor:pointer;box-shadow:none;background:#48c569;border-radius:25px;border:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-moz-range-thumb{box-shadow:none;border:none;height:28px;width:28px;border-radius:15px;background:#48c569;cursor:pointer}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-track{width:100%;height:10px;cursor:pointer;background:#f1f1f1;border-color:transparent;color:transparent}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-fill-lower{background:#f1f1f1;border:none;border-radius:50px;box-shadow:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-fill-upper{background:#48c569;border:none;border-radius:50px;box-shadow:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-thumb{box-shadow:none;border:none;height:10px;width:10px;border-radius:15px;background:#495159;cursor:pointer}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-ms-fill-lower{background:#f1f1f1}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-ms-fill-upper{background:#48c569}.cherry-slider-wrap .cherry-input{margin:0;width:100%}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}.cherry-ui-container .cherry-ui-container{margin:0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-slider-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.cherry-slider-wrap .cherry-slider-input{-webkit-box-flex:0;-ms-flex:0 1 10%;flex:0 1 10%;min-width:100px;max-width:200px}.cherry-slider-wrap .cherry-slider-holder{-webkit-box-flex:0;-ms-flex:0 1 90%;flex:0 1 90%;min-width:200px;max-width:300px;margin-right:20px}.cherry-slider-wrap .cherry-slider-holder input[type=range]{-webkit-appearance:none;width:100%;margin:20px 0}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus{outline:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-webkit-slider-runnable-track{width:100%;height:5px;cursor:pointer;box-shadow:none;background:#48c569;border-radius:25px;border:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-webkit-slider-thumb{box-shadow:5px 5px 13px rgba(0,0,0,0.18);border:5px solid #48c569;height:20px;width:20px;margin-top:-7px;border-radius:15px;background:#48c569;cursor:pointer;-webkit-appearance:none;-webkit-transition:all 250ms cubic-bezier(0.645, 0.045, 0.355, 1);transition:all 250ms cubic-bezier(0.645, 0.045, 0.355, 1)}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-webkit-slider-thumb{background:#f1f1f1;height:28px;width:28px;margin-top:-11.5px}.cherry-slider-wrap .cherry-slider-holder input[type=range]:hover::-webkit-slider-thumb{background:#f1f1f1;height:28px;width:28px;margin-top:-11.5px}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-webkit-slider-runnable-track{background:#48c569}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-moz-range-track{width:100%;height:5px;cursor:pointer;box-shadow:none;background:#48c569;border-radius:25px;border:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-moz-range-thumb{box-shadow:none;border:none;height:28px;width:28px;border-radius:15px;background:#48c569;cursor:pointer}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-track{width:100%;height:10px;cursor:pointer;background:#f1f1f1;border-color:transparent;color:transparent}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-fill-lower{background:#f1f1f1;border:none;border-radius:50px;box-shadow:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-fill-upper{background:#48c569;border:none;border-radius:50px;box-shadow:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-thumb{box-shadow:none;border:none;height:10px;width:10px;border-radius:15px;background:#495159;cursor:pointer}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-ms-fill-lower{background:#f1f1f1}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-ms-fill-upper{background:#48c569}.cherry-slider-wrap .cherry-input{margin:0;width:100%}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/ui-slider.scss CHANGED
@@ -1,6 +1,13 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
3
 
 
 
 
 
 
 
4
  .cherry-ui-container{
5
  margin: 10px 0 20px 0;
6
  .cherry-ui-container{
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
 
5
+ .cherry-ui-elements-lock{
6
+ opacity: 0.5;
7
+ cursor: no-drop;
8
+ pointer-events: none;
9
+ filter: grayscale( 100% );
10
+ }
11
  .cherry-ui-container{
12
  margin: 10px 0 20px 0;
13
  .cherry-ui-container{
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/ui-slider.php CHANGED
@@ -38,8 +38,18 @@ if ( ! class_exists( 'UI_Slider' ) ) {
38
  'label' => '',
39
  'class' => '',
40
  'master' => '',
 
41
  );
42
 
 
 
 
 
 
 
 
 
 
43
  /**
44
  * Constructor method for the UI_Slider class.
45
  *
@@ -48,6 +58,7 @@ if ( ! class_exists( 'UI_Slider' ) ) {
48
  function __construct( $args = array() ) {
49
  $this->defaults_settings['id'] = 'cherry-ui-slider-' . uniqid();
50
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
51
 
52
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
53
  }
@@ -59,8 +70,13 @@ if ( ! class_exists( 'UI_Slider' ) ) {
59
  */
60
  public function render() {
61
  $html = '';
62
- $class = $this->settings['class'];
63
- $class .= ' ' . $this->settings['master'];
 
 
 
 
 
64
 
65
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
66
 
@@ -81,12 +97,13 @@ if ( ! class_exists( 'UI_Slider' ) ) {
81
  }
82
  $html .= '<div class="cherry-slider-wrap">';
83
  $html .= '<div class="cherry-slider-holder">';
84
- $html .= '<input type="range" class="cherry-slider-unit" step="' . esc_attr( $this->settings['step_value'] ) . '" min="' . esc_attr( $this->settings['min_value'] ) . '" max="' . esc_attr( $this->settings['max_value'] ) . '" value="' . esc_attr( $this->settings['value'] ) . '">';
85
  $html .= '</div>';
86
  $html .= '<div class="cherry-slider-input">';
87
  $html .= $ui_stepper_html;
88
  $html .= '</div>';
89
  $html .= '</div>';
 
90
  $html .= '</div>';
91
 
92
  return $html;
@@ -99,18 +116,18 @@ if ( ! class_exists( 'UI_Slider' ) ) {
99
  */
100
  public static function enqueue_assets() {
101
  wp_enqueue_script(
102
- 'ui-slider-min',
103
- esc_url( Cherry_Core::base_url( 'assets/min/ui-slider.min.js', __FILE__ ) ),
104
  array( 'jquery' ),
105
- '1.3.2',
106
  true
107
  );
108
 
109
  wp_enqueue_style(
110
- 'ui-slider-min',
111
- esc_url( Cherry_Core::base_url( 'assets/min/ui-slider.min.css', __FILE__ ) ),
112
  array(),
113
- '1.3.2',
114
  'all'
115
  );
116
  }
38
  'label' => '',
39
  'class' => '',
40
  'master' => '',
41
+ 'lock' => false,
42
  );
43
 
44
+ /**
45
+ * Instance of this Cherry5_Lock_Element class.
46
+ *
47
+ * @since 1.0.0
48
+ * @var object
49
+ * @access private
50
+ */
51
+ private $lock_element = null;
52
+
53
  /**
54
  * Constructor method for the UI_Slider class.
55
  *
58
  function __construct( $args = array() ) {
59
  $this->defaults_settings['id'] = 'cherry-ui-slider-' . uniqid();
60
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
61
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
62
 
63
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
64
  }
70
  */
71
  public function render() {
72
  $html = '';
73
+ $class = implode( ' ',
74
+ array(
75
+ $this->settings['class'],
76
+ $this->settings['master'],
77
+ $this->lock_element->get_class(),
78
+ )
79
+ );
80
 
81
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
82
 
97
  }
98
  $html .= '<div class="cherry-slider-wrap">';
99
  $html .= '<div class="cherry-slider-holder">';
100
+ $html .= '<input type="range" class="cherry-slider-unit" step="' . esc_attr( $this->settings['step_value'] ) . '" min="' . esc_attr( $this->settings['min_value'] ) . '" max="' . esc_attr( $this->settings['max_value'] ) . '" value="' . esc_attr( $this->settings['value'] ) . '"' . $this->lock_element->get_disabled_attr() . '>';
101
  $html .= '</div>';
102
  $html .= '<div class="cherry-slider-input">';
103
  $html .= $ui_stepper_html;
104
  $html .= '</div>';
105
  $html .= '</div>';
106
+ $html .= $this->lock_element->get_html();
107
  $html .= '</div>';
108
 
109
  return $html;
116
  */
117
  public static function enqueue_assets() {
118
  wp_enqueue_script(
119
+ 'ui-slider',
120
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-slider/assets/min/ui-slider.min.js', Cherry_UI_Elements::$module_path ) ),
121
  array( 'jquery' ),
122
+ Cherry_UI_Elements::$core_version,
123
  true
124
  );
125
 
126
  wp_enqueue_style(
127
+ 'ui-slider',
128
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-slider/assets/min/ui-slider.min.css', Cherry_UI_Elements::$module_path ) ),
129
  array(),
130
+ Cherry_UI_Elements::$core_version,
131
  'all'
132
  );
133
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/min/ui-stepper.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-stepper{position:relative;max-width:100px}.cherry-ui-stepper input[type=number]{font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px;min-height:50px;border:1px solid #dcdcdc;box-shadow:none}.cherry-ui-stepper input[type=number]:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}.cherry-ui-stepper-input{min-width:90px;max-width:90px;text-align:center}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-stepper{position:relative;max-width:100px}.cherry-ui-stepper input[type=number]{font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px;min-height:50px;border:1px solid #dcdcdc;box-shadow:none}.cherry-ui-stepper input[type=number]:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}.cherry-ui-stepper-input{min-width:90px;max-width:90px;text-align:center}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-stepper.scss CHANGED
@@ -1,6 +1,13 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
3
 
 
 
 
 
 
 
4
  .cherry-ui-container{
5
  margin: 10px 0 20px 0;
6
  }
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
 
5
+ .cherry-ui-elements-lock{
6
+ opacity: 0.5;
7
+ cursor: no-drop;
8
+ pointer-events: none;
9
+ filter: grayscale( 100% );
10
+ }
11
  .cherry-ui-container{
12
  margin: 10px 0 20px 0;
13
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/ui-stepper.php CHANGED
@@ -39,8 +39,18 @@ if ( ! class_exists( 'UI_Stepper' ) ) {
39
  'class' => '',
40
  'master' => '',
41
  'placeholder' => '',
 
42
  );
43
 
 
 
 
 
 
 
 
 
 
44
  /**
45
  * Constructor method for the UI_Stepper class.
46
  *
@@ -49,6 +59,7 @@ if ( ! class_exists( 'UI_Stepper' ) ) {
49
  function __construct( $args = array() ) {
50
  $this->defaults_settings['id'] = 'cherry-ui-stepper-' . uniqid();
51
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
52
 
53
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
54
  }
@@ -61,8 +72,15 @@ if ( ! class_exists( 'UI_Stepper' ) ) {
61
  */
62
  public function render() {
63
  $html = '';
64
- $class = $this->settings['class'];
65
- $class .= ' ' . $this->settings['master'];
 
 
 
 
 
 
 
66
 
67
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
68
 
@@ -70,8 +88,9 @@ if ( ! class_exists( 'UI_Stepper' ) ) {
70
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . esc_html( $this->settings['label'] ) . '</label> ';
71
  }
72
  $html .= '<div class="cherry-ui-stepper">';
73
- $html .= '<input type="number" id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-stepper-input" pattern="[0-5]+([\.,][0-5]+)?" name="' . esc_attr( $this->settings['name'] ) . '" value="' . esc_html( $this->settings['value'] ) . '" min="' . esc_html( $this->settings['min_value'] ) . '" max="' . esc_html( $this->settings['max_value'] ) . '" step="' . esc_html( $this->settings['step_value'] ) . '" placeholder="' . esc_attr( $this->settings['placeholder'] ) . '">';
74
  $html .= '</div>';
 
75
  $html .= '</div>';
76
 
77
  return $html;
@@ -84,10 +103,10 @@ if ( ! class_exists( 'UI_Stepper' ) ) {
84
  */
85
  public static function enqueue_assets() {
86
  wp_enqueue_style(
87
- 'ui-stepper-min',
88
- esc_url( Cherry_Core::base_url( 'assets/min/ui-stepper.min.css', __FILE__ ) ),
89
  array(),
90
- '1.3.2',
91
  'all'
92
  );
93
  }
39
  'class' => '',
40
  'master' => '',
41
  'placeholder' => '',
42
+ 'lock' => false,
43
  );
44
 
45
+ /**
46
+ * Instance of this Cherry5_Lock_Element class.
47
+ *
48
+ * @since 1.0.0
49
+ * @var object
50
+ * @access private
51
+ */
52
+ private $lock_element = null;
53
+
54
  /**
55
  * Constructor method for the UI_Stepper class.
56
  *
59
  function __construct( $args = array() ) {
60
  $this->defaults_settings['id'] = 'cherry-ui-stepper-' . uniqid();
61
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
62
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
63
 
64
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
65
  }
72
  */
73
  public function render() {
74
  $html = '';
75
+ $input_lock = ( ! empty( $this->settings['lock'] ) ) ? 'disabled' : '' ;
76
+ $lock_lable = ! empty( $this->settings['lock']['label'] )? sprintf('<div class="cherry-lock-label">%1$s</div>', $this->settings['lock']['label'] ) : '' ;
77
+ $class = implode( ' ',
78
+ array(
79
+ $this->settings['class'],
80
+ $this->settings['master'],
81
+ $this->lock_element->get_class( 'inline-block' ),
82
+ )
83
+ );
84
 
85
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
86
 
88
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . esc_html( $this->settings['label'] ) . '</label> ';
89
  }
90
  $html .= '<div class="cherry-ui-stepper">';
91
+ $html .= '<input type="number" id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-stepper-input" pattern="[0-5]+([\.,][0-5]+)?" name="' . esc_attr( $this->settings['name'] ) . '" value="' . esc_html( $this->settings['value'] ) . '" min="' . esc_html( $this->settings['min_value'] ) . '" max="' . esc_html( $this->settings['max_value'] ) . '" step="' . esc_html( $this->settings['step_value'] ) . '" placeholder="' . esc_attr( $this->settings['placeholder'] ) . $this->lock_element->get_disabled_attr() . '">';
92
  $html .= '</div>';
93
+ $html .= $this->lock_element->get_html();
94
  $html .= '</div>';
95
 
96
  return $html;
103
  */
104
  public static function enqueue_assets() {
105
  wp_enqueue_style(
106
+ 'ui-stepper',
107
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-stepper/assets/min/ui-stepper.min.css', Cherry_UI_Elements::$module_path ) ),
108
  array(),
109
+ Cherry_UI_Elements::$core_version,
110
  'all'
111
  );
112
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/min/ui-switcher.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}.cherry-switcher-wrap{height:47px;border-radius:25px;display:inline-block;overflow:hidden;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #dcdcdc}.cherry-switcher-wrap label{background-color:#f1f1f1;display:block;float:left;-webkit-transition:all 0.4s ease;transition:all 0.4s ease}.cherry-switcher-wrap label span{font-size:12px;line-height:18px;font-weight:900;text-transform:uppercase;color:#23282d;text-align:center;display:block;opacity:1;-webkit-transition:all 0.4s ease;transition:all 0.4s ease}.cherry-switcher-wrap .sw-enable{padding:15px 10px 15px 20px}.cherry-switcher-wrap .sw-enable span{opacity:0}.cherry-switcher-wrap .sw-disable{padding:15px 20px 15px 10px}.cherry-switcher-wrap .sw-disable span{opacity:1}.cherry-switcher-wrap .state-marker{background-color:#e64545;display:block;position:absolute;width:41px;height:41px;margin:3px;top:0;left:0;margin-left:4px;border-radius:25px;border-style:solid;border-width:1px;border-color:#e54545 #c13b3b #c13b3b #e54545;-webkit-transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1);transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1);box-sizing:border-box}.cherry-switcher-wrap .state-marker:before{position:absolute;display:block;width:100%;height:100%;top:0;left:0;border-radius:50%;background-image:-webkit-linear-gradient(top, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);background-image:linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);content:''}.cherry-switcher-wrap .cherry-input-switcher{display:none}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .sw-enable span{opacity:1}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .sw-disable span{opacity:0}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .state-marker{left:100%;margin-left:-45px;border-color:#43b05f #3b9b54 #3b9b54 #43b05f;background-color:#49c66a}.cherry-switcher-wrap.size-small{height:23px}.cherry-switcher-wrap.size-small label{height:23px;padding:0}.cherry-switcher-wrap.size-small label span{font-size:10px;line-height:15px;padding:5px}.cherry-switcher-wrap.size-small .state-marker{width:17px;height:17px;margin-left:4px}.cherry-switcher-wrap.size-small .cherry-input-switcher-true:checked ~ .state-marker{margin-left:-22px}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}.cherry-switcher-wrap{height:47px;border-radius:25px;display:inline-block;overflow:hidden;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #dcdcdc}.cherry-switcher-wrap label{background-color:#f1f1f1;display:block;float:left;-webkit-transition:all 0.4s ease;transition:all 0.4s ease}.cherry-switcher-wrap label span{font-size:12px;line-height:18px;font-weight:900;text-transform:uppercase;color:#23282d;text-align:center;display:block;opacity:1;-webkit-transition:all 0.4s ease;transition:all 0.4s ease}.cherry-switcher-wrap .sw-enable{padding:15px 10px 15px 20px}.cherry-switcher-wrap .sw-enable span{opacity:0}.cherry-switcher-wrap .sw-disable{padding:15px 20px 15px 10px}.cherry-switcher-wrap .sw-disable span{opacity:1}.cherry-switcher-wrap .state-marker{background-color:#e64545;display:block;position:absolute;width:41px;height:41px;margin:3px;top:0;left:0;margin-left:4px;border-radius:25px;border-style:solid;border-width:1px;border-color:#e54545 #c13b3b #c13b3b #e54545;-webkit-transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1);transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1);box-sizing:border-box}.cherry-switcher-wrap .state-marker:before{position:absolute;display:block;width:100%;height:100%;top:0;left:0;border-radius:50%;background-image:-webkit-linear-gradient(top, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);background-image:linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);content:''}.cherry-switcher-wrap .cherry-input-switcher{display:none}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .sw-enable span{opacity:1}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .sw-disable span{opacity:0}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .state-marker{left:100%;margin-left:-45px;border-color:#43b05f #3b9b54 #3b9b54 #43b05f;background-color:#49c66a}.cherry-switcher-wrap.size-small{height:23px}.cherry-switcher-wrap.size-small label{height:23px;padding:0}.cherry-switcher-wrap.size-small label span{font-size:10px;line-height:15px;padding:5px}.cherry-switcher-wrap.size-small .state-marker{width:17px;height:17px;margin-left:4px}.cherry-switcher-wrap.size-small .cherry-input-switcher-true:checked ~ .state-marker{margin-left:-22px}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-switcher.scss CHANGED
@@ -1,4 +1,5 @@
1
  @import "ui-kit/variables";
 
2
 
3
  .cherry-ui-container{
4
  margin: 10px 0 20px 0;
1
  @import "ui-kit/variables";
2
+ @import "../../../../assets/sass/lock";
3
 
4
  .cherry-ui-container{
5
  margin: 10px 0 20px 0;
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/ui-switcher.php CHANGED
@@ -44,6 +44,15 @@ if ( ! class_exists( 'UI_Switcher' ) ) {
44
  'master' => '',
45
  );
46
 
 
 
 
 
 
 
 
 
 
47
  /**
48
  * Constructor method for the UI_Switcher class.
49
  *
@@ -52,6 +61,7 @@ if ( ! class_exists( 'UI_Switcher' ) ) {
52
  function __construct( $args = array() ) {
53
  $this->defaults_settings['id'] = 'cherry-ui-swither-' . uniqid();
54
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
55
 
56
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
57
  }
@@ -67,8 +77,13 @@ if ( ! class_exists( 'UI_Switcher' ) ) {
67
  $master_true = $data_slave_true || $data_slave_false ? 'data-master="true"' : '' ;
68
 
69
  $html = '';
70
- $class = $this->settings['class'];
71
- $class .= ' ' . $this->settings['master'];
 
 
 
 
 
72
 
73
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
74
  if ( '' !== $this->settings['label'] ) {
@@ -78,12 +93,15 @@ if ( ! class_exists( 'UI_Switcher' ) ) {
78
  $value = filter_var( $this->settings['value'], FILTER_VALIDATE_BOOLEAN );
79
 
80
  $html .= '<div class="cherry-switcher-wrap size-' . esc_attr( $this->settings['style'] ) . '" ' . $master_true . '>';
81
- $html .= '<input type="radio" id="' . esc_attr( $this->settings['id'] ) . '-true" class="cherry-input-switcher cherry-input-switcher-true" name="' . esc_attr( $this->settings['name'] ) . '" ' . checked( true, $value, false ) . ' value="true" ' . $data_slave_true . '>';
82
- $html .= '<input type="radio" id="' . esc_attr( $this->settings['id'] ) . '-false" class="cherry-input-switcher cherry-input-switcher-false" name="' . esc_attr( $this->settings['name'] ) . '" ' . checked( false, $value, false ) . ' value="false" ' . $data_slave_false . '>';
 
83
  $html .= '<label class="sw-enable"><span>' . esc_html( $this->settings['toggle']['true_toggle'] ) . '</span></label>';
84
  $html .= '<label class="sw-disable"><span>' . esc_html( $this->settings['toggle']['false_toggle'] ) . '</span></label>';
85
  $html .= '<span class="state-marker"></span>';
 
86
  $html .= '</div>';
 
87
  $html .= '</div>';
88
 
89
  return $html;
@@ -96,18 +114,18 @@ if ( ! class_exists( 'UI_Switcher' ) ) {
96
  */
97
  public static function enqueue_assets() {
98
  wp_enqueue_script(
99
- 'ui-switcher-min',
100
- esc_url( Cherry_Core::base_url( 'assets/min/ui-switcher.min.js', __FILE__ ) ),
101
  array( 'jquery' ),
102
- '1.3.2',
103
  true
104
  );
105
 
106
  wp_enqueue_style(
107
- 'ui-switcher-min',
108
- esc_url( Cherry_Core::base_url( 'assets/min/ui-switcher.min.css', __FILE__ ) ),
109
  array(),
110
- '1.3.2',
111
  'all'
112
  );
113
  }
44
  'master' => '',
45
  );
46
 
47
+ /**
48
+ * Instance of this Cherry5_Lock_Element class.
49
+ *
50
+ * @since 1.0.0
51
+ * @var object
52
+ * @access private
53
+ */
54
+ private $lock_element = null;
55
+
56
  /**
57
  * Constructor method for the UI_Switcher class.
58
  *
61
  function __construct( $args = array() ) {
62
  $this->defaults_settings['id'] = 'cherry-ui-swither-' . uniqid();
63
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
64
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
65
 
66
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
67
  }
77
  $master_true = $data_slave_true || $data_slave_false ? 'data-master="true"' : '' ;
78
 
79
  $html = '';
80
+ $class = implode( ' ',
81
+ array(
82
+ $this->settings['class'],
83
+ $this->settings['master'],
84
+ $this->lock_element->get_class( 'inline-block' ),
85
+ )
86
+ );
87
 
88
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
89
  if ( '' !== $this->settings['label'] ) {
93
  $value = filter_var( $this->settings['value'], FILTER_VALIDATE_BOOLEAN );
94
 
95
  $html .= '<div class="cherry-switcher-wrap size-' . esc_attr( $this->settings['style'] ) . '" ' . $master_true . '>';
96
+ $html .= '<input type="radio" id="' . esc_attr( $this->settings['id'] ) . '-true" class="cherry-input-switcher cherry-input-switcher-true" name="' . esc_attr( $this->settings['name'] ) . '" ' . checked( true, $value, false ) . ' value="true" ' . $data_slave_true . ' ' . $this->lock_element->get_disabled_attr() . '>';
97
+ $html .= '<input type="radio" id="' . esc_attr( $this->settings['id'] ) . '-false" class="cherry-input-switcher cherry-input-switcher-false" name="' . esc_attr( $this->settings['name'] ) . '" ' . checked( false, $value, false ) . ' value="false" ' . $data_slave_false . ' ' . $this->lock_element->get_disabled_attr() . '>';
98
+ //$html .= '<span class="cherry-lable-content">';
99
  $html .= '<label class="sw-enable"><span>' . esc_html( $this->settings['toggle']['true_toggle'] ) . '</span></label>';
100
  $html .= '<label class="sw-disable"><span>' . esc_html( $this->settings['toggle']['false_toggle'] ) . '</span></label>';
101
  $html .= '<span class="state-marker"></span>';
102
+ // $html .= '</span>';
103
  $html .= '</div>';
104
+ $html .= $this->lock_element->get_html();
105
  $html .= '</div>';
106
 
107
  return $html;
114
  */
115
  public static function enqueue_assets() {
116
  wp_enqueue_script(
117
+ 'ui-switcher',
118
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-switcher/assets/min/ui-switcher.min.js', Cherry_UI_Elements::$module_path ) ),
119
  array( 'jquery' ),
120
+ Cherry_UI_Elements::$core_version,
121
  true
122
  );
123
 
124
  wp_enqueue_style(
125
+ 'ui-switcher',
126
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-switcher/assets/min/ui-switcher.min.css', Cherry_UI_Elements::$module_path ) ),
127
  array(),
128
+ Cherry_UI_Elements::$core_version,
129
  'all'
130
  );
131
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/min/ui-text.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}input.cherry-ui-text{font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px 20px;min-height:50px;border:1px solid #dcdcdc;box-shadow:none}input.cherry-ui-text:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}input.cherry-ui-text{font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px 20px;min-height:50px;border:1px solid #dcdcdc;box-shadow:none}input.cherry-ui-text:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/ui-text.scss CHANGED
@@ -1,6 +1,13 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
3
 
 
 
 
 
 
 
4
  .cherry-ui-container{
5
  margin: 10px 0 20px 0;
6
  }
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
 
5
+ .cherry-ui-elements-lock{
6
+ opacity: 0.5;
7
+ cursor: no-drop;
8
+ pointer-events: none;
9
+ filter: grayscale( 100% );
10
+ }
11
  .cherry-ui-container{
12
  margin: 10px 0 20px 0;
13
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/ui-text.php CHANGED
@@ -38,8 +38,18 @@ if ( ! class_exists( 'UI_Text' ) ) {
38
  'class' => '',
39
  'master' => '',
40
  'required' => false,
 
41
  );
42
 
 
 
 
 
 
 
 
 
 
43
  /**
44
  * Constructor method for the UI_Text class.
45
  *
@@ -48,6 +58,7 @@ if ( ! class_exists( 'UI_Text' ) ) {
48
  function __construct( $args = array() ) {
49
  $this->defaults_settings['id'] = 'cherry-ui-input-text-' . uniqid();
50
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
51
 
52
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
53
  }
@@ -74,14 +85,20 @@ if ( ! class_exists( 'UI_Text' ) ) {
74
  */
75
  public function render() {
76
  $html = '';
77
- $class = $this->settings['class'];
78
- $class .= ' ' . $this->settings['master'];
 
 
 
 
 
79
 
80
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
81
  if ( '' !== $this->settings['label'] ) {
82
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . esc_html( $this->settings['label'] ) . '</label> ';
83
  }
84
- $html .= '<input type="' . esc_attr( $this->settings['type'] ) . '" id="' . esc_attr( $this->settings['id'] ) . '" class="widefat cherry-ui-text" name="' . esc_attr( $this->settings['name'] ) . '" value="' . esc_html( $this->settings['value'] ) . '" placeholder="' . esc_attr( $this->settings['placeholder'] ) . '" ' . $this->get_required() . '>';
 
85
  $html .= '</div>';
86
  return $html;
87
  }
@@ -94,9 +111,9 @@ if ( ! class_exists( 'UI_Text' ) ) {
94
  public static function enqueue_assets() {
95
  wp_enqueue_style(
96
  'ui-text',
97
- esc_url( Cherry_Core::base_url( 'assets/min/ui-text.min.css', __FILE__ ) ),
98
  array(),
99
- '1.3.2',
100
  'all'
101
  );
102
  }
38
  'class' => '',
39
  'master' => '',
40
  'required' => false,
41
+ 'lock' => false,
42
  );
43
 
44
+ /**
45
+ * Instance of this Cherry5_Lock_Element class.
46
+ *
47
+ * @since 1.0.0
48
+ * @var object
49
+ * @access private
50
+ */
51
+ private $lock_element = null;
52
+
53
  /**
54
  * Constructor method for the UI_Text class.
55
  *
58
  function __construct( $args = array() ) {
59
  $this->defaults_settings['id'] = 'cherry-ui-input-text-' . uniqid();
60
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
61
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
62
 
63
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
64
  }
85
  */
86
  public function render() {
87
  $html = '';
88
+ $class = implode( ' ',
89
+ array(
90
+ $this->settings['class'],
91
+ $this->settings['master'],
92
+ $this->lock_element->get_class(),
93
+ )
94
+ );
95
 
96
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
97
  if ( '' !== $this->settings['label'] ) {
98
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . esc_html( $this->settings['label'] ) . '</label> ';
99
  }
100
+ $html .= '<input type="' . esc_attr( $this->settings['type'] ) . '" id="' . esc_attr( $this->settings['id'] ) . '" class="widefat cherry-ui-text" name="' . esc_attr( $this->settings['name'] ) . '" value="' . esc_html( $this->settings['value'] ) . '" placeholder="' . esc_attr( $this->settings['placeholder'] ) . '" ' . $this->get_required() . $this->lock_element->get_disabled_attr() . '>';
101
+ $html .= $this->lock_element->get_html();
102
  $html .= '</div>';
103
  return $html;
104
  }
111
  public static function enqueue_assets() {
112
  wp_enqueue_style(
113
  'ui-text',
114
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-text/assets/min/ui-text.min.css', Cherry_UI_Elements::$module_path ) ),
115
  array(),
116
+ Cherry_UI_Elements::$core_version,
117
  'all'
118
  );
119
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/min/ui-textarea.min.css CHANGED
@@ -1 +1 @@
1
- .cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}textarea.cherry-ui-textarea{width:100%;font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px 20px;min-height:50px;border:1px solid #dcdcdc;box-shadow:none;height:200px}textarea.cherry-ui-textarea:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}
1
+ .cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}textarea.cherry-ui-textarea{width:100%;font-size:14px;line-height:20px;color:#23282d;background-color:#f1f1f1;border-radius:2px;padding:10px 20px;min-height:50px;border:1px solid #dcdcdc;box-shadow:none;height:200px}textarea.cherry-ui-textarea:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-textarea.scss CHANGED
@@ -1,6 +1,13 @@
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
 
3
 
 
 
 
 
 
 
4
  .cherry-ui-container{
5
  margin: 10px 0 20px 0;
6
  }
1
  @import "ui-kit/variables";
2
  @import "ui-kit/mixins";
3
+ @import "../../../../assets/sass/lock";
4
 
5
+ .cherry-ui-elements-lock{
6
+ opacity: 0.5;
7
+ cursor: no-drop;
8
+ pointer-events: none;
9
+ filter: grayscale( 100% );
10
+ }
11
  .cherry-ui-container{
12
  margin: 10px 0 20px 0;
13
  }
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/ui-textarea.php CHANGED
@@ -38,8 +38,18 @@ if ( ! class_exists( 'UI_Textarea' ) ) {
38
  'label' => '',
39
  'class' => '',
40
  'master' => '',
 
41
  );
42
 
 
 
 
 
 
 
 
 
 
43
  /**
44
  * Constructor method for the UI_Textarea class.
45
  *
@@ -48,6 +58,7 @@ if ( ! class_exists( 'UI_Textarea' ) ) {
48
  function __construct( $args = array() ) {
49
  $this->defaults_settings['id'] = 'cherry-ui-textarea-' . uniqid();
50
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
51
 
52
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
53
  }
@@ -59,14 +70,20 @@ if ( ! class_exists( 'UI_Textarea' ) ) {
59
  */
60
  public function render() {
61
  $html = '';
62
- $class = $this->settings['class'];
63
- $class .= ' ' . $this->settings['master'];
 
 
 
 
 
64
 
65
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
66
  if ( '' !== $this->settings['label'] ) {
67
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . $this->settings['label'] . '</label> ';
68
  }
69
- $html .= '<textarea id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-textarea" name="' . esc_attr( $this->settings['name'] ) . '" rows="' . esc_attr( $this->settings['rows'] ) . '" cols="' . esc_attr( $this->settings['cols'] ) . '" placeholder="' . esc_attr( $this->settings['placeholder'] ) . '">' . esc_html( $this->settings['value'] ) . '</textarea>';
 
70
  $html .= '</div>';
71
 
72
  return $html;
@@ -78,11 +95,12 @@ if ( ! class_exists( 'UI_Textarea' ) ) {
78
  * @since 1.0.0
79
  */
80
  public static function enqueue_assets() {
 
81
  wp_enqueue_style(
82
  'ui-textarea',
83
- esc_url( Cherry_Core::base_url( 'assets/min/ui-textarea.min.css', __FILE__ ) ),
84
  array(),
85
- '1.3.2',
86
  'all'
87
  );
88
  }
38
  'label' => '',
39
  'class' => '',
40
  'master' => '',
41
+ 'lock' => false,
42
  );
43
 
44
+ /**
45
+ * Instance of this Cherry5_Lock_Element class.
46
+ *
47
+ * @since 1.0.0
48
+ * @var object
49
+ * @access private
50
+ */
51
+ private $lock_element = null;
52
+
53
  /**
54
  * Constructor method for the UI_Textarea class.
55
  *
58
  function __construct( $args = array() ) {
59
  $this->defaults_settings['id'] = 'cherry-ui-textarea-' . uniqid();
60
  $this->settings = wp_parse_args( $args, $this->defaults_settings );
61
+ $this->lock_element = new Cherry5_Lock_Element( $this->settings );
62
 
63
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
64
  }
70
  */
71
  public function render() {
72
  $html = '';
73
+ $class = implode( ' ',
74
+ array(
75
+ $this->settings['class'],
76
+ $this->settings['master'],
77
+ $this->lock_element->get_class(),
78
+ )
79
+ );
80
 
81
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
82
  if ( '' !== $this->settings['label'] ) {
83
  $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . $this->settings['label'] . '</label> ';
84
  }
85
+ $html .= '<textarea id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-textarea" name="' . esc_attr( $this->settings['name'] ) . '" rows="' . esc_attr( $this->settings['rows'] ) . '" cols="' . esc_attr( $this->settings['cols'] ) . '" placeholder="' . esc_attr( $this->settings['placeholder'] ) . '" ' . $this->lock_element->get_disabled_attr() . '>' . esc_html( $this->settings['value'] ) . '</textarea>';
86
+ $html .= $this->lock_element->get_html();
87
  $html .= '</div>';
88
 
89
  return $html;
95
  * @since 1.0.0
96
  */
97
  public static function enqueue_assets() {
98
+
99
  wp_enqueue_style(
100
  'ui-textarea',
101
+ esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-textarea/assets/min/ui-textarea.min.css', Cherry_UI_Elements::$module_path ) ),
102
  array(),
103
+ Cherry_UI_Elements::$core_version,
104
  'all'
105
  );
106
  }
cherry-framework/modules/cherry-ui-elements/ui-element.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Framework
6
  * @subpackage Abstract 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/gpl-3.0.en.html
11
  */
@@ -30,21 +30,6 @@ if ( ! class_exists( 'UI_Element' ) ) {
30
  */
31
  protected $settings = array();
32
 
33
- /**
34
- * Get current file URL
35
- *
36
- * @since 1.0.0
37
- * @deprecated 1.0.3 Use `Cherry_Core::base_url()` method
38
- */
39
- public static function get_current_file_url( $file ) {
40
- $assets_url = dirname( $file );
41
- $site_url = site_url();
42
- $assets_url = str_replace( untrailingslashit( ABSPATH ), $site_url, $assets_url );
43
- $assets_url = str_replace( '\\', '/', $assets_url );
44
-
45
- return $assets_url;
46
- }
47
-
48
  /**
49
  * Get control value
50
  *
5
  * @package Cherry_Framework
6
  * @subpackage Abstract Class
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.en.html
11
  */
30
  */
31
  protected $settings = array();
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  /**
34
  * Get control value
35
  *
cherry-framework/modules/cherry-utility/cherry-utility.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Utility
4
  * Description: Multiple utility functions
5
- * Version: 1.1.6
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.1.6
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
  */
@@ -57,6 +55,15 @@ if ( ! class_exists( 'Cherry_Utility' ) ) {
57
  ),
58
  );
59
 
 
 
 
 
 
 
 
 
 
60
  /**
61
  * Utilit class.
62
  *
@@ -71,7 +78,9 @@ if ( ! class_exists( 'Cherry_Utility' ) ) {
71
  * @since 1.0.0
72
  */
73
  public function __construct( $core, $args = array() ) {
74
- $this->args = array_merge( $this->args, $args );
 
 
75
  $this->utility_require( $core );
76
  }
77
 
@@ -79,7 +88,6 @@ if ( ! class_exists( 'Cherry_Utility' ) ) {
79
  * Require utility.
80
  *
81
  * @since 1.0.0
82
- * @since 1.1.1 Using dirname( __FILE__ ) instead of __DIR__.
83
  * @return void
84
  */
85
  public function utility_require() {
@@ -92,7 +100,7 @@ if ( ! class_exists( 'Cherry_Utility' ) ) {
92
 
93
  foreach ( $utility as $utilit ) {
94
 
95
- require_once( dirname( __FILE__ ) . '/inc/cherry-' . $utilit . '-utilit.php' );
96
 
97
  $utilit = str_replace( '-', ' ', $utilit );
98
  $class_name = ucwords( $utilit );
@@ -100,7 +108,9 @@ if ( ! class_exists( 'Cherry_Utility' ) ) {
100
  $utilit = str_replace( ' ', '_', $utilit );
101
  $class_name = 'Cherry_' . $class_name . '_Utilit';
102
 
103
- $this->utility->$utilit = new $class_name( $this );
 
 
104
  }
105
  }
106
  }
2
  /**
3
  * Module Name: Utility
4
  * Description: Multiple utility functions
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
55
  ),
56
  );
57
 
58
+ /**
59
+ * Module directory path.
60
+ *
61
+ * @since 1.5.0
62
+ * @access protected
63
+ * @var srting.
64
+ */
65
+ protected $module_path;
66
+
67
  /**
68
  * Utilit class.
69
  *
78
  * @since 1.0.0
79
  */
80
  public function __construct( $core, $args = array() ) {
81
+ $this->args = array_merge( $this->args, $args );
82
+ $this->module_path = $args['module_path'];
83
+
84
  $this->utility_require( $core );
85
  }
86
 
88
  * Require utility.
89
  *
90
  * @since 1.0.0
 
91
  * @return void
92
  */
93
  public function utility_require() {
100
 
101
  foreach ( $utility as $utilit ) {
102
 
103
+ require_once( $this->module_path . '/inc/cherry-' . $utilit . '-utilit.php' );
104
 
105
  $utilit = str_replace( '-', ' ', $utilit );
106
  $class_name = ucwords( $utilit );
108
  $utilit = str_replace( ' ', '_', $utilit );
109
  $class_name = 'Cherry_' . $class_name . '_Utilit';
110
 
111
+ $instance = new $class_name( $this );
112
+
113
+ $this->utility->{$utilit} = $instance;
114
  }
115
  }
116
  }
cherry-framework/modules/cherry-utility/inc/cherry-attributes-utilit.php CHANGED
@@ -52,10 +52,13 @@ if ( ! class_exists( 'Cherry_Attributes_Utilit' ) ) {
52
  $html = '' ;
53
 
54
  if ( filter_var( $args['visible'], FILTER_VALIDATE_BOOLEAN ) && 0 !== $args['length'] ) {
55
- $title = $title_cut = ( 'post' === $type ) ? $object->post_title : $object->name ;
56
- $title = ( $args['title'] ) ? 'title="' . $args['title'] . '"' : 'title="' . $title . '"' ;
 
 
57
  $title_cut = $this->cut_text( $title_cut, $args['length'], $args['trimmed_type'], $args['ending'] );
58
- $link = ( 'post' === $type ) ? $this->get_post_permalink() : $this->get_term_permalink( $object->term_id );
 
59
  $html_class = ( $args['class'] ) ? 'class="' . $args['class'] . '"' : '' ;
60
 
61
  $html = sprintf( $args['html'], $html_class, $link, $title, $title_cut );
52
  $html = '' ;
53
 
54
  if ( filter_var( $args['visible'], FILTER_VALIDATE_BOOLEAN ) && 0 !== $args['length'] ) {
55
+ $title = ( 'post' === $type ) ? $object->post_title : $object->name;
56
+ $title_cut = $title;
57
+
58
+ $title = ( $args['title'] ) ? 'title="' . $args['title'] . '"' : 'title="' . $title . '"';
59
  $title_cut = $this->cut_text( $title_cut, $args['length'], $args['trimmed_type'], $args['ending'] );
60
+
61
+ $link = ( 'post' === $type ) ? $this->get_post_permalink() : $this->get_term_permalink( $object->term_id );
62
  $html_class = ( $args['class'] ) ? 'class="' . $args['class'] . '"' : '' ;
63
 
64
  $html = sprintf( $args['html'], $html_class, $link, $title, $title_cut );
cherry-framework/modules/cherry-utility/inc/cherry-media-utilit.php CHANGED
@@ -196,7 +196,9 @@ if ( ! class_exists( 'Cherry_Media_Utilit' ) ) {
196
  return '';
197
  }
198
 
199
- $html = wp_oembed_get( $url_array[0], array( 'width' => $size_array['width'] ) );
 
 
200
 
201
  if ( ! $html ) {
202
  $url_array = $this->sorted_array( $url_array );
196
  return '';
197
  }
198
 
199
+ $html = wp_oembed_get( $url_array[0], array(
200
+ 'width' => $size_array['width'],
201
+ ) );
202
 
203
  if ( ! $html ) {
204
  $url_array = $this->sorted_array( $url_array );
cherry-framework/modules/cherry-utility/inc/cherry-meta-data-utilit.php CHANGED
@@ -127,7 +127,8 @@ if ( ! class_exists( 'Cherry_Meta_Data_Utilit' ) ) {
127
 
128
  $args['suffix'] = ( isset( $args['sufix'] ) ) ? $args['sufix'] : $args['suffix'];
129
 
130
- $html = $count = '' ;
 
131
 
132
  if ( filter_var( $args['visible'], FILTER_VALIDATE_BOOLEAN ) ) {
133
  $post_type = get_post_type( $object->ID );
127
 
128
  $args['suffix'] = ( isset( $args['sufix'] ) ) ? $args['sufix'] : $args['suffix'];
129
 
130
+ $html = '';
131
+ $count = '';
132
 
133
  if ( filter_var( $args['visible'], FILTER_VALIDATE_BOOLEAN ) ) {
134
  $post_type = get_post_type( $object->ID );
cherry-framework/modules/cherry-utility/inc/cherry-satellite-utilit.php CHANGED
@@ -180,10 +180,10 @@ if ( ! class_exists( 'Cherry_Satellite_Utilit' ) ) {
180
  *
181
  * @since 1.0.0
182
  * @param [type] $tax - category, post_tag, post_format.
183
- * @param [type] $key - slug, term_id.
184
  * @return array
185
  */
186
- public function get_terms_array( $tax = array( 'category' ), $key = 'slug' ) {
187
  $terms = array();
188
  $tax = is_array( $tax ) ? $tax : array( $tax ) ;
189
 
@@ -193,13 +193,17 @@ if ( ! class_exists( 'Cherry_Satellite_Utilit' ) ) {
193
  }
194
  }
195
 
196
- $all_terms = (array) get_terms( $tax, array( 'hide_empty' => 0, 'hierarchical' => 0 ) );
 
 
 
 
197
  if ( empty( $all_terms ) || is_wp_error( $all_terms ) ) {
198
  return '';
199
  }
200
 
201
  foreach ( $all_terms as $term ) {
202
- $terms[ $term->slug ] = $term->name;
203
  }
204
 
205
  return $terms;
180
  *
181
  * @since 1.0.0
182
  * @param [type] $tax - category, post_tag, post_format.
183
+ * @param [type] $return_key - slug, term_id.
184
  * @return array
185
  */
186
+ public function get_terms_array( $tax = array( 'category' ), $return_key = 'slug' ) {
187
  $terms = array();
188
  $tax = is_array( $tax ) ? $tax : array( $tax ) ;
189
 
193
  }
194
  }
195
 
196
+ $all_terms = (array) get_terms( $tax, array(
197
+ 'hide_empty' => 0,
198
+ 'hierarchical' => 0,
199
+ ) );
200
+
201
  if ( empty( $all_terms ) || is_wp_error( $all_terms ) ) {
202
  return '';
203
  }
204
 
205
  foreach ( $all_terms as $term ) {
206
+ $terms[ $term->$return_key ] = $term->name;
207
  }
208
 
209
  return $terms;
cherry-framework/modules/cherry-widget-factory/cherry-widget-factory.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Widget Factory
4
  * Description: Base widget class that simplifies creating of your own widgets.
5
- * Version: 1.2.1
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.2.1
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
  */
@@ -50,6 +48,15 @@ if ( ! class_exists( 'Cherry_Widget_Factory' ) ) {
50
  */
51
  public $core = null;
52
 
 
 
 
 
 
 
 
 
 
53
  /**
54
  * A reference to an instance of this class.
55
  *
@@ -62,9 +69,10 @@ if ( ! class_exists( 'Cherry_Widget_Factory' ) ) {
62
  * Constructor for the module
63
  */
64
  function __construct( $core, $args ) {
 
 
 
65
 
66
- $this->core = $core;
67
- $this->args = $args;
68
  $this->include_abstract_widget();
69
  add_filter( 'cherry_widget_factory_core', array( $this, 'pass_core_to_widgets' ), 10, 2 );
70
  }
@@ -79,7 +87,7 @@ if ( ! class_exists( 'Cherry_Widget_Factory' ) ) {
79
  public function pass_core_to_widgets( $core, $path ) {
80
 
81
  $path = str_replace( '\\', '/', $path );
82
- $current_core = str_replace( '\\', '/', $this->core->settings['extra_base_dir'] );
83
 
84
  if ( false !== strpos( $path, $current_core ) ) {
85
  return $this->core;
@@ -92,11 +100,10 @@ if ( ! class_exists( 'Cherry_Widget_Factory' ) ) {
92
  * Include abstract widget class
93
  *
94
  * @since 1.0.0
95
- * @since 1.1.2 Using dirname( __FILE__ ) instead of __DIR__.
96
  * @return void
97
  */
98
  public function include_abstract_widget() {
99
- require_once( dirname( __FILE__ ) . '/inc/class-cherry-abstract-widget.php' );
100
  }
101
 
102
  /**
2
  /**
3
  * Module Name: Widget Factory
4
  * Description: Base widget class that simplifies creating of your own widgets.
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
48
  */
49
  public $core = null;
50
 
51
+ /**
52
+ * Module directory path.
53
+ *
54
+ * @since 1.5.0
55
+ * @access protected
56
+ * @var srting.
57
+ */
58
+ public static $module_path;
59
+
60
  /**
61
  * A reference to an instance of this class.
62
  *
69
  * Constructor for the module
70
  */
71
  function __construct( $core, $args ) {
72
+ $this->core = $core;
73
+ $this->args = $args;
74
+ self::$module_path = $args['module_path'];
75
 
 
 
76
  $this->include_abstract_widget();
77
  add_filter( 'cherry_widget_factory_core', array( $this, 'pass_core_to_widgets' ), 10, 2 );
78
  }
87
  public function pass_core_to_widgets( $core, $path ) {
88
 
89
  $path = str_replace( '\\', '/', $path );
90
+ $current_core = str_replace( '\\', '/', $this->core->settings['base_dir'] );
91
 
92
  if ( false !== strpos( $path, $current_core ) ) {
93
  return $this->core;
100
  * Include abstract widget class
101
  *
102
  * @since 1.0.0
 
103
  * @return void
104
  */
105
  public function include_abstract_widget() {
106
+ require_once( self::$module_path . '/inc/class-cherry-abstract-widget.php' );
107
  }
108
 
109
  /**
cherry-framework/modules/cherry-widget-factory/inc/class-cherry-abstract-widget.php CHANGED
@@ -5,7 +5,7 @@
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/gpl-3.0.en.html
11
  */
@@ -58,18 +58,11 @@ if ( ! class_exists( 'Cherry_Abstract_Widget' ) ) {
58
  public $settings;
59
 
60
  /**
61
- * Existing field types
62
- *
63
- * @var array
64
- */
65
- public $field_types = array();
66
-
67
- /**
68
- * UI builder instance
69
  *
70
  * @var object
71
  */
72
- public $ui_builder;
73
 
74
  /**
75
  * Temporary arguments holder
@@ -208,19 +201,13 @@ if ( ! class_exists( 'Cherry_Abstract_Widget' ) ) {
208
  return false;
209
  }
210
 
211
- array_walk( $this->settings, array( $this, 'set_field_types' ) );
212
-
213
- if ( in_array( 'slider', $this->field_types ) ) {
214
- $this->field_types[] = 'stepper';
215
- }
216
-
217
  $core = $this->get_core();
218
 
219
  if ( ! $core ) {
220
  return false;
221
  }
222
 
223
- $this->ui_builder = $core->init_module( 'cherry-ui-elements', array( 'ui_elements' => $this->field_types ) );
224
 
225
  return true;
226
  }
@@ -267,7 +254,7 @@ if ( ! class_exists( 'Cherry_Abstract_Widget' ) ) {
267
  public function get_core() {
268
 
269
  if ( null == $this->core ) {
270
- $this->core = apply_filters( 'cherry_widget_factory_core', false, dirname( __FILE__ ) );
271
  }
272
 
273
  return $this->core;
@@ -283,7 +270,9 @@ if ( ! class_exists( 'Cherry_Abstract_Widget' ) ) {
283
  * @return string the content that was cached
284
  */
285
  public function cache_widget( $args, $content ) {
286
- wp_cache_set( $this->get_cache_id(), array( $args['widget_id'] => $content ), 'widget' );
 
 
287
 
288
  return $content;
289
  }
@@ -398,96 +387,6 @@ if ( ! class_exists( 'Cherry_Abstract_Widget' ) ) {
398
  }
399
  }
400
 
401
- /**
402
- * Store field types used in this widget into class property
403
- *
404
- * @since 1.0.0
405
- * @param array $field field data.
406
- * @param [type] $id field key.
407
- * @return bool
408
- */
409
- public function set_field_types( $field, $id ) {
410
-
411
- if ( ! is_array( $field ) || ! isset( $field['type'] ) ) {
412
- return false;
413
- }
414
-
415
- if ( ! in_array( $field['type'], $this->field_types ) ) {
416
- $this->field_types[] = $field['type'];
417
- }
418
-
419
- $this->maybe_add_repeater_fields( $field );
420
-
421
- return true;
422
-
423
- }
424
-
425
- /**
426
- * Maybe add reapeater sub-fields to required elements list
427
- *
428
- * @since 1.0.1
429
- * @param array $field field data.
430
- * @return bool
431
- */
432
- public function maybe_add_repeater_fields( $field ) {
433
-
434
- if ( 'repeater' !== $field['type'] || empty( $field['fields'] ) ) {
435
- return false;
436
- }
437
-
438
- foreach ( $field['fields'] as $repeater_field ) {
439
- $this->set_field_types( $repeater_field, null );
440
- }
441
-
442
- return true;
443
-
444
- }
445
-
446
- /**
447
- * Render single from control.
448
- *
449
- * @param array $args control arguments.
450
- * @return void|null
451
- */
452
- public function render_control( $args ) {
453
-
454
- $allowed_controls = array(
455
- 'text',
456
- 'textarea',
457
- 'checkbox',
458
- 'colorpicker',
459
- 'media',
460
- 'radio',
461
- 'select',
462
- 'slider',
463
- 'stepper',
464
- 'switcher',
465
- 'slider',
466
- 'collection',
467
- 'chooseicons',
468
- 'repeater',
469
- 'iconpicker',
470
- );
471
-
472
- if ( ! in_array( $args['type'], $allowed_controls ) ) {
473
- do_action( 'cherry_widget_factory_control', $args );
474
- return;
475
- }
476
-
477
- if ( ! is_object( $this->ui_builder ) ) {
478
- return;
479
- }
480
-
481
- $current_element = $this->ui_builder->get_ui_element_instance( $args['type'], $args );
482
-
483
- ?>
484
- <div>
485
- <?php echo $current_element->render(); ?>
486
- </div>
487
- <?php
488
-
489
- }
490
-
491
  /**
492
  * Show widget form
493
  *
@@ -502,54 +401,40 @@ if ( ! class_exists( 'Cherry_Abstract_Widget' ) ) {
502
  return;
503
  }
504
 
505
- foreach ( $this->settings as $key => $setting ) {
506
 
507
- $value = isset( $instance[ $key ] ) ? $instance[ $key ] : Cherry_Toolkit::get_arg( $setting, 'value', '' );
508
 
509
  if ( isset( $setting['options_callback'] ) ) {
510
 
511
- $callback = $this->get_callback_data( $setting['options_callback'] );
512
- $options = call_user_func_array( $callback['callback'], $callback['args'] );
 
 
513
 
514
- } else {
515
- $options = Cherry_Toolkit::get_arg( $setting, 'options', array() );
516
  }
517
 
518
- $args = array(
519
- 'type' => Cherry_Toolkit::get_arg( $setting, 'type', 'text' ),
520
- 'id' => $this->get_field_id( $key ),
521
- 'name' => $this->get_field_name( $key ),
522
- 'value' => $value,
523
- 'label' => Cherry_Toolkit::get_arg( $setting, 'label', '' ),
524
- 'options' => $options,
525
- 'multiple' => Cherry_Toolkit::get_arg( $setting, 'multiple', false ),
526
- 'filter' => Cherry_Toolkit::get_arg( $setting, 'filter', false ),
527
- 'size' => Cherry_Toolkit::get_arg( $setting, 'size', 1 ),
528
- 'null_option' => Cherry_Toolkit::get_arg( $setting, 'null_option', 'None' ),
529
- 'multi_upload' => Cherry_Toolkit::get_arg( $setting, 'multi_upload', true ),
530
- 'library_type' => Cherry_Toolkit::get_arg( $setting, 'library_type', 'image' ),
531
- 'upload_button_text' => Cherry_Toolkit::get_arg( $setting, 'upload_button_text', 'Choose' ),
532
- 'max_value' => Cherry_Toolkit::get_arg( $setting, 'max_value', '100' ),
533
- 'min_value' => Cherry_Toolkit::get_arg( $setting, 'min_value', '0' ),
534
- 'step_value' => Cherry_Toolkit::get_arg( $setting, 'step_value', '1' ),
535
- 'style' => Cherry_Toolkit::get_arg( $setting, 'style', 'normal' ),
536
- 'placeholder' => Cherry_Toolkit::get_arg( $setting, 'placeholder', '' ),
537
- 'toggle' => Cherry_Toolkit::get_arg( $setting, 'toggle', array(
538
- 'true_toggle' => 'On',
539
- 'false_toggle' => 'Off',
540
- 'true_slave' => '',
541
- 'false_slave' => '',
542
- ) ),
543
- 'master' => Cherry_Toolkit::get_arg( $setting, 'master', '' ),
544
- 'icon_data' => Cherry_Toolkit::get_arg( $setting, 'icon_data', array() ),
545
- 'title_field' => Cherry_Toolkit::get_arg( $setting, 'title_field' ),
546
- 'add_label' => Cherry_Toolkit::get_arg( $setting, 'add_label', '' ),
547
- 'fields' => Cherry_Toolkit::get_arg( $setting, 'fields', array() ),
548
- 'ui_kit' => Cherry_Toolkit::get_arg( $setting, 'ui_kit', true ),
549
- );
550
 
551
- $this->render_control( $args );
552
  }
 
 
553
  }
554
 
555
  /**
@@ -588,7 +473,7 @@ if ( ! class_exists( 'Cherry_Abstract_Widget' ) ) {
588
  */
589
  public function setup_widget_data( $args, $instance ) {
590
  $this->args = $args;
591
- $this->instance = $instance;
592
  }
593
 
594
  /**
5
  * @package Cherry_Framework
6
  * @subpackage Class
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.en.html
11
  */
58
  public $settings;
59
 
60
  /**
61
+ * Interface builder instance.
 
 
 
 
 
 
 
62
  *
63
  * @var object
64
  */
65
+ public $builder = null;
66
 
67
  /**
68
  * Temporary arguments holder
201
  return false;
202
  }
203
 
 
 
 
 
 
 
204
  $core = $this->get_core();
205
 
206
  if ( ! $core ) {
207
  return false;
208
  }
209
 
210
+ $this->builder = $core->init_module( 'cherry-interface-builder', array() );
211
 
212
  return true;
213
  }
254
  public function get_core() {
255
 
256
  if ( null == $this->core ) {
257
+ $this->core = apply_filters( 'cherry_widget_factory_core', false, Cherry_Widget_Factory::$module_path );
258
  }
259
 
260
  return $this->core;
270
  * @return string the content that was cached
271
  */
272
  public function cache_widget( $args, $content ) {
273
+ wp_cache_set( $this->get_cache_id(), array(
274
+ $args['widget_id'] => $content,
275
+ ), 'widget' );
276
 
277
  return $content;
278
  }
387
  }
388
  }
389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  /**
391
  * Show widget form
392
  *
401
  return;
402
  }
403
 
404
+ $this->builder->reset_structure();
405
 
406
+ foreach ( $this->settings as $key => $setting ) {
407
 
408
  if ( isset( $setting['options_callback'] ) ) {
409
 
410
+ $callback = $this->get_callback_data( $setting['options_callback'] );
411
+ $setting['options'] = call_user_func_array( $callback['callback'], $callback['args'] );
412
+
413
+ unset( $setting['options_callback'] );
414
 
 
 
415
  }
416
 
417
+ $value = isset( $instance[ $key ] ) ? $instance[ $key ] : Cherry_Toolkit::get_arg( $setting, 'value', '' );
418
+
419
+ $element = Cherry_Toolkit::get_arg( $setting, 'element', 'control' );
420
+ $setting['id'] = $this->get_field_id( $key );
421
+ $setting['name'] = $this->get_field_name( $key );
422
+ $setting['type'] = Cherry_Toolkit::get_arg( $setting, 'type', '' );
423
+ $setting['value'] = $value;
424
+
425
+ if ( 'select' === $setting['type'] && ! isset( $setting['placeholder'] ) ) {
426
+ $setting['placeholder'] = '';
427
+ }
428
+
429
+ $register_callback = 'register_' . $element;
430
+
431
+ if ( method_exists( $this->builder, $register_callback ) ) {
432
+ call_user_func( array( $this->builder, $register_callback ), array( $key => $setting ) );
433
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
 
 
435
  }
436
+
437
+ $this->builder->render();
438
  }
439
 
440
  /**
473
  */
474
  public function setup_widget_data( $args, $instance ) {
475
  $this->args = $args;
476
+ $this->instance = $this->prepare_instance( $instance, $this );
477
  }
478
 
479
  /**
cherry-framework/modules/cherry5-assets-loader/assets/append.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Handler for Assets loader
3
+ */
4
+ function CherryAssetsLoader( tags, context ) {
5
+
6
+ 'use strict';
7
+
8
+ tags.forEach( function( item ) {
9
+ if ( 'body' === context ) {
10
+ jQuery( 'body' ).append( item );
11
+ } else {
12
+ jQuery( 'head' ).append( item );
13
+ }
14
+ } );
15
+
16
+ }
cherry-framework/modules/cherry5-assets-loader/assets/min/append.min.js ADDED
@@ -0,0 +1 @@
 
1
+ function CherryAssetsLoader(a,b){"use strict";a.forEach(function(a){"body"===b?jQuery("body").append(a):jQuery("head").append(a)})}
cherry-framework/modules/cherry5-assets-loader/assets/var.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ var cherryAssets%1$s = %2$s;
2
+ CherryAssetsLoader( cherryAssets%1$s, '%3$s' );
cherry-framework/modules/cherry5-assets-loader/cherry5-assets-loader.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Module Name: Assets Loader
4
+ * Description: The module allows you deferred loading scripts and styles.
5
+ * Author: Cherry Team
6
+ * Author URI: http://www.cherryframework.com/
7
+ * License: GPLv3
8
+ * License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
+ *
10
+ * @package Cherry_Framework
11
+ * @subpackage Modules
12
+ * @author Cherry Team <cherryframework@gmail.com>
13
+ * @copyright Copyright (c) 2012 - 2017, Cherry Team
14
+ * @link http://www.cherryframework.com/
15
+ * @license http://www.gnu.org/licenses/gpl-3.0.html
16
+ */
17
+
18
+ // If this file is called directly, abort.
19
+ if ( ! defined( 'WPINC' ) ) {
20
+ die;
21
+ }
22
+
23
+ // If class `Cherry5_Assets_Loader` doesn't exists yet.
24
+ if ( ! class_exists( 'Cherry5_Assets_Loader' ) ) {
25
+
26
+ /**
27
+ * Cherry5_Assets_Loader class.
28
+ */
29
+ class Cherry5_Assets_Loader {
30
+
31
+ /**
32
+ * Module slug
33
+ *
34
+ * @var string
35
+ */
36
+ public $module_slug = 'cherry5-assets-loader';
37
+
38
+ /**
39
+ * Module arguments
40
+ *
41
+ * @since 1.0.0
42
+ * @var array
43
+ * @access private
44
+ */
45
+ private $args = array();
46
+
47
+ /**
48
+ * Core instance
49
+ *
50
+ * @since 1.0.0
51
+ * @var object
52
+ * @access private
53
+ */
54
+ private $core = null;
55
+
56
+ /**
57
+ * CSS handle object for deferred loading.
58
+ *
59
+ * @var array
60
+ */
61
+ public static $css_handle = array();
62
+
63
+ /**
64
+ * JS handle object for deferred loading.
65
+ *
66
+ * @var array
67
+ */
68
+ public static $js_handle = array();
69
+
70
+ /**
71
+ * Is module hooks initialized or not.
72
+ *
73
+ * @var boolean
74
+ */
75
+ public static $initialized = false;
76
+
77
+ /**
78
+ * Class constructor.
79
+ *
80
+ * @since 1.0.0
81
+ * @access public
82
+ * @return void
83
+ */
84
+ public function __construct( $core = null, $args = array() ) {
85
+
86
+ $this->args = $args;
87
+ $this->init();
88
+
89
+ if ( ! empty( $this->args['css'] ) && is_array( $this->args['css'] ) ) {
90
+ self::$css_handle->add_handles( $this->args['css'] );
91
+ }
92
+
93
+ if ( ! empty( $this->args['js'] ) && is_array( $this->args['js'] ) ) {
94
+ self::$js_handle->add_handles( $this->args['js'] );
95
+ }
96
+ }
97
+
98
+ /**
99
+ * Initialize module hooks
100
+ *
101
+ * @return bool|void
102
+ */
103
+ public function init() {
104
+
105
+ if ( true === self::$initialized ) {
106
+ return null;
107
+ }
108
+
109
+ require_once 'inc/cherry5-assets-loader-handle.php';
110
+ require_once 'inc/cherry5-assets-loader-handle-css.php';
111
+ require_once 'inc/cherry5-assets-loader-handle-js.php';
112
+
113
+ self::$css_handle = new Cherry5_Assets_Loader_Handle_CSS();
114
+ self::$js_handle = new Cherry5_Assets_Loader_Handle_JS();
115
+
116
+ self::$initialized = true;
117
+
118
+ ob_start();
119
+ include 'assets/min/append.min.js';
120
+ $append_handler = ob_get_clean();
121
+ wp_add_inline_script( 'cherry-js-core', $append_handler );
122
+
123
+ }
124
+
125
+ /**
126
+ * Returns new module instance.
127
+ *
128
+ * @since 1.0.0
129
+ * @return object
130
+ */
131
+ public static function get_instance( $core, $args ) {
132
+ return new self( $core, $args );
133
+ }
134
+
135
+ }
136
+ }
cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-css.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CSS lodaer handler class
4
+ *
5
+ * @package Cherry_Framework
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( 'Cherry5_Assets_Loader_Handle_CSS' ) ) {
18
+
19
+ /**
20
+ * Define Cherry5_Assets_Loader_Handle_CSS class
21
+ */
22
+ class Cherry5_Assets_Loader_Handle_CSS extends Cherry5_Assets_Loader_Handle {
23
+
24
+ /**
25
+ * Handles list
26
+ *
27
+ * @var array
28
+ */
29
+ public $handles = array();
30
+
31
+ /**
32
+ * Handles list
33
+ *
34
+ * @var array
35
+ */
36
+ public $prepared_handles = array();
37
+
38
+ /**
39
+ * Define required properies
40
+ */
41
+ public function __construct() {
42
+
43
+ $this->context = 'style';
44
+ $this->init();
45
+
46
+ }
47
+
48
+ }
49
+
50
+ }
cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-js.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * JS lodaer handler class
4
+ *
5
+ * @package Cherry_Framework
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( 'Cherry5_Assets_Loader_Handle_JS' ) ) {
18
+
19
+ /**
20
+ * Define Cherry5_Assets_Loader_Handle_JS class
21
+ */
22
+ class Cherry5_Assets_Loader_Handle_JS extends Cherry5_Assets_Loader_Handle {
23
+
24
+ /**
25
+ * Handles list
26
+ *
27
+ * @var array
28
+ */
29
+ public $handles = array();
30
+
31
+ /**
32
+ * Handles list
33
+ *
34
+ * @var array
35
+ */
36
+ public $prepared_handles = array();
37
+
38
+ /**
39
+ * Define required properies
40
+ */
41
+ public function __construct() {
42
+
43
+ $this->context = 'script';
44
+ $this->init();
45
+
46
+ }
47
+
48
+ }
49
+
50
+ }
cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Base lodaer handler class
4
+ *
5
+ * @package Cherry_Framework
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( 'Cherry5_Assets_Loader_Handle' ) ) {
18
+
19
+ /**
20
+ * Define Cherry5_Assets_Loader_Handle class
21
+ */
22
+ class Cherry5_Assets_Loader_Handle {
23
+
24
+ /**
25
+ * Handles list
26
+ *
27
+ * @var array
28
+ */
29
+ public $handles = array();
30
+
31
+ /**
32
+ * Handles list
33
+ *
34
+ * @var array
35
+ */
36
+ public $prepared_handles = array();
37
+
38
+ /**
39
+ * Handlex context (defined in child classes)
40
+ *
41
+ * @var string
42
+ */
43
+ public $context = null;
44
+
45
+ /**
46
+ * Initalize defer loading
47
+ *
48
+ * @return void
49
+ */
50
+ public function init() {
51
+
52
+ if ( null !== $this->context ) {
53
+ add_filter( $this->context . '_loader_tag', array( $this, 'defer' ), 10, 3 );
54
+ add_action( 'wp_footer', array( $this, 'print_tags_var' ), 99 );
55
+ }
56
+
57
+ }
58
+
59
+ /**
60
+ * Store tag for deferred loading.
61
+ *
62
+ * @return string
63
+ */
64
+ public function defer( $tag, $handle, $src ) {
65
+
66
+ if ( in_array( $handle, $this->handles ) ) {
67
+ $this->prepared_handles[] = $tag;
68
+ $tag = '';
69
+ }
70
+
71
+ return $tag;
72
+ }
73
+
74
+ /**
75
+ * Add new handles into list before processing
76
+ */
77
+ public function add_handles( $handles = array() ) {
78
+ $this->handles = array_merge( $this->handles, $handles );
79
+ $this->handles = array_unique( $this->handles );
80
+ }
81
+
82
+ /**
83
+ * Print stored handles.
84
+ *
85
+ * @return void|null
86
+ */
87
+ public function print_tags_var() {
88
+
89
+ if ( empty( $this->prepared_handles ) || null === $this->context ) {
90
+ return;
91
+ }
92
+
93
+ $path = preg_replace( '/[\\\\\/]inc$/', '/assets/var.js', $this->module_path );
94
+
95
+ ob_start();
96
+ include $path;
97
+ $var_template = ob_get_clean();
98
+
99
+ $js_context = ( 'style' === $this->context ) ? 'head' : 'body';
100
+
101
+ $var = sprintf(
102
+ $var_template,
103
+ ucfirst( $this->context ),
104
+ json_encode( $this->prepared_handles ),
105
+ $js_context
106
+ );
107
+
108
+ echo '<script type="text/javascript">' . $var . '</script>';
109
+ }
110
+
111
+ }
112
+
113
+ }
cherry-framework/modules/cherry5-insert-shortcode/assets/cherry-insert-shortcode.scss CHANGED
@@ -22,7 +22,6 @@ $border: 1px solid rgba(0, 0, 0, 0.1) ;
22
  text-transform: capitalize;
23
  box-sizing: border-box;
24
  white-space: nowrap;
25
- //height: 28px;
26
  text-decoration: none;
27
  font-weight: normal;
28
  line-height: 26px;
22
  text-transform: capitalize;
23
  box-sizing: border-box;
24
  white-space: nowrap;
 
25
  text-decoration: none;
26
  font-weight: normal;
27
  line-height: 26px;
cherry-framework/modules/cherry5-insert-shortcode/cherry5-insert-shortcode.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Insert Shortcode
4
  * Description: The module allows you to add shortcodes from editor tinyMCE.
5
- * Version: 1.0.1
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,9 +9,8 @@
10
  *
11
  * @package Cherry_Framework
12
  * @subpackage Modules
13
- * @version 1.0.1
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
  */
@@ -31,12 +29,22 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
31
  class Cherry5_Insert_Shortcode {
32
 
33
  /**
34
- * Module version.
35
  *
36
- * @since 1.0.0
 
37
  * @var string
38
  */
39
- private $module_version = '1.0.1';
 
 
 
 
 
 
 
 
 
40
 
41
  /**
42
  * A reference to an instance of this class.
@@ -48,7 +56,7 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
48
  private static $instance = null;
49
 
50
  /**
51
- * Module arguments
52
  *
53
  * @since 1.0.0
54
  * @var array
@@ -57,7 +65,7 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
57
  private $args = array();
58
 
59
  /**
60
- * Core instance
61
  *
62
  * @since 1.0.0
63
  * @var object
@@ -68,8 +76,8 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
68
  /**
69
  * UI element instance.
70
  *
71
- * @since 1.0.0
72
- * @var object
73
  * @access public
74
  */
75
  public $ui_elements = null;
@@ -77,8 +85,8 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
77
  /**
78
  * Cherry Interface Builder instance.
79
  *
80
- * @since 1.0.0
81
- * @var object
82
  * @access public
83
  */
84
  public $cherry_interface_builder = null;
@@ -104,8 +112,8 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
104
  /**
105
  * Shortcode list.
106
  *
107
- * @since 1.0.0
108
- * @var object
109
  * @access private
110
  */
111
  private $added_shortcodes = array();
@@ -120,10 +128,12 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
120
  public function __construct( $core = null, $args = array(), $init = true ) {
121
  if ( $init ) {
122
  $this->core = $core;
 
 
 
123
  $this->args = array_merge_recursive(
124
  $args,
125
  array(
126
- 'module_dir' => trailingslashit( dirname( __FILE__ ) ),
127
  'in_screen' => array( 'post' ),
128
  )
129
  );
@@ -154,8 +164,8 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
154
  * @return void
155
  */
156
  private function includes() {
157
- require_once( dirname( __FILE__ ) . '/inc/class-cherry5-insertion-button.php' );
158
- require_once( dirname( __FILE__ ) . '/inc/class-cherry5-insertion-popup.php' );
159
  }
160
 
161
  /**
@@ -167,10 +177,22 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
167
  */
168
  public function register_assets() {
169
  // Register stylesheets.
170
- wp_register_style( 'cherry5-insert-shortcode', esc_url( Cherry_Core::base_url( 'assets/min/cherry-insert-shortcode.min.css', __FILE__ ) ), array(), $this->module_version, 'all' );
 
 
 
 
 
 
171
 
172
  // Register JavaScripts.
173
- wp_register_script( 'cherry5-insert-shortcode-js', esc_url( Cherry_Core::base_url( 'assets/min/cherry-insert-shortcode.min.js', __FILE__ ) ), array( 'cherry-js-core' ), $this->module_version, true );
 
 
 
 
 
 
174
  }
175
 
176
  /**
@@ -187,8 +209,10 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
187
  wp_enqueue_style( 'cherry5-insert-shortcode' );
188
  wp_enqueue_script( 'cherry5-insert-shortcode-js' );
189
 
190
- $dev_mode = ( constant( 'WP_DEBUG' ) ) ? 'true' : 'false' ;
191
- wp_localize_script( 'cherry-js-core', 'cherry5InsertShortcode', array( 'devMode' => $dev_mode ) );
 
 
192
  }
193
  }
194
 
2
  /**
3
  * Module Name: Insert Shortcode
4
  * Description: The module allows you to add shortcodes from editor tinyMCE.
 
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 - 2017, Cherry Team
14
  * @link http://www.cherryframework.com/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
29
  class Cherry5_Insert_Shortcode {
30
 
31
  /**
32
+ * Core version.
33
  *
34
+ * @since 1.5.0
35
+ * @access public
36
  * @var string
37
  */
38
+ public $core_version = '';
39
+
40
+ /**
41
+ * Module directory path.
42
+ *
43
+ * @since 1.5.0
44
+ * @access protected
45
+ * @var srting.
46
+ */
47
+ protected $module_path;
48
 
49
  /**
50
  * A reference to an instance of this class.
56
  private static $instance = null;
57
 
58
  /**
59
+ * Module arguments.
60
  *
61
  * @since 1.0.0
62
  * @var array
65
  private $args = array();
66
 
67
  /**
68
+ * Core instance.
69
  *
70
  * @since 1.0.0
71
  * @var object
76
  /**
77
  * UI element instance.
78
  *
79
+ * @since 1.0.0
80
+ * @var object
81
  * @access public
82
  */
83
  public $ui_elements = null;
85
  /**
86
  * Cherry Interface Builder instance.
87
  *
88
+ * @since 1.0.0
89
+ * @var object
90
  * @access public
91
  */
92
  public $cherry_interface_builder = null;
112
  /**
113
  * Shortcode list.
114
  *
115
+ * @since 1.0.0
116
+ * @var object
117
  * @access private
118
  */
119
  private $added_shortcodes = array();
128
  public function __construct( $core = null, $args = array(), $init = true ) {
129
  if ( $init ) {
130
  $this->core = $core;
131
+ $this->core_version = $core->get_core_version();
132
+ $this->module_path = $args['module_path'];
133
+
134
  $this->args = array_merge_recursive(
135
  $args,
136
  array(
 
137
  'in_screen' => array( 'post' ),
138
  )
139
  );
164
  * @return void
165
  */
166
  private function includes() {
167
+ require_once( $this->module_path . 'inc/class-cherry5-insertion-button.php' );
168
+ require_once( $this->module_path . 'inc/class-cherry5-insertion-popup.php' );
169
  }
170
 
171
  /**
177
  */
178
  public function register_assets() {
179
  // Register stylesheets.
180
+ wp_register_style(
181
+ 'cherry5-insert-shortcode',
182
+ esc_url( Cherry_Core::base_url( 'assets/min/cherry-insert-shortcode.min.css', $this->module_path ) ),
183
+ array(),
184
+ $this->core_version,
185
+ 'all'
186
+ );
187
 
188
  // Register JavaScripts.
189
+ wp_register_script(
190
+ 'cherry5-insert-shortcode-js',
191
+ esc_url( Cherry_Core::base_url( 'assets/min/cherry-insert-shortcode.min.js', $this->module_path ) ),
192
+ array( 'cherry-js-core' ),
193
+ $this->core_version,
194
+ true
195
+ );
196
  }
197
 
198
  /**
209
  wp_enqueue_style( 'cherry5-insert-shortcode' );
210
  wp_enqueue_script( 'cherry5-insert-shortcode-js' );
211
 
212
+ $dev_mode = ( constant( 'WP_DEBUG' ) ) ? 'true' : 'false';
213
+ wp_localize_script( 'cherry-js-core', 'cherry5InsertShortcode', array(
214
+ 'devMode' => $dev_mode,
215
+ ) );
216
  }
217
  }
218
 
cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-button.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Framework
6
  * @subpackage Modules
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
  */
5
  * @package Cherry_Framework
6
  * @subpackage Modules
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
  */
cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package Cherry_Framework
6
  * @subpackage Modules
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
  */
@@ -30,8 +30,8 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
30
  /**
31
  * Module arguments
32
  *
33
- * @since 1.0.0
34
- * @var array
35
  * @access private
36
  */
37
  private $args = array();
@@ -39,8 +39,8 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
39
  /**
40
  * Core instance
41
  *
42
- * @since 1.0.0
43
- * @var object
44
  * @access private
45
  */
46
  private $core = null;
@@ -48,8 +48,8 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
48
  /**
49
  * Shortcode list.
50
  *
51
- * @since 1.0.0
52
- * @var array
53
  * @access private
54
  */
55
  private $shortcode_list = array(
@@ -131,7 +131,7 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
131
 
132
  $insert_button = $this->parent_self->ui_elements->get_ui_element_instance( 'button', $args )->render();
133
 
134
- require_once( apply_filters( 'cherry5-is__popup-template', $this->args['module_dir'] . 'inc/views/insert-shortcode-pop-up.php' ) );
135
  }
136
  }
137
 
@@ -228,6 +228,10 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
228
  if ( ! array_key_exists( 'id', $settings ) ) {
229
  $shortcode_attr['options'][ $key ]['id'] = $shortcode_slug . '_' . $key;
230
  }
 
 
 
 
231
  }
232
 
233
  $shortcode_options_html = $this->parent_self->cherry_interface_builder->render( false, $shortcode_attr['options'] );
@@ -235,7 +239,7 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
235
  $shortcode_options_html = $this->get_empty_layer();
236
  }
237
 
238
- $shortcode_option_template = apply_filters( 'cherry5-is__options-template', Cherry_Toolkit::get_file( $this->args['module_dir'] . 'inc/views/shortcode-options.php' ) );
239
  $output_html = sprintf( $shortcode_option_template, $plugin_slug, $shortcode_slug, $shortcode_attr['title'], $shortcode_attr['description'], $shortcode_attr['content_area'], $shortcode_options_html );
240
 
241
  return array(
@@ -249,6 +253,26 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
249
  }
250
  }
251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  /**
253
  * The function returns content area HTML.
254
  *
@@ -257,7 +281,7 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
257
  * @return string
258
  */
259
  private function get_shortcode_content_editor( $content = '', $plugin_slug = '', $shortcode_slug = '' ) {
260
- $template = apply_filters( 'cherry5-is__content-area-template', Cherry_Toolkit::get_file( $this->args['module_dir'] . 'inc/views/shortcode-content-area.php' ) );
261
  $title = apply_filters( 'cherry5-is__content-title', esc_html__( 'Shortcode content.', 'cherry-framework' ) );
262
  $placeholder = apply_filters( 'cherry5-is__content-placeholder', esc_html__( 'Input shortcode content.', 'cherry-framework' ) );
263
 
@@ -275,7 +299,7 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
275
  */
276
  private function get_empty_layer() {
277
  $text = apply_filters( 'cherry5-is__empty_layer-text', esc_html__( 'Shortcode not a have options.', 'cherry-framework' ) );
278
- $template = apply_filters( 'cherry5-is__empty_layer-template', Cherry_Toolkit::get_file( $this->args['module_dir'] . 'inc/views/shortcode-has-not-option.php' ) );
279
  $output = sprintf( $template, $text );
280
 
281
  return $output;
5
  * @package Cherry_Framework
6
  * @subpackage Modules
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
  */
30
  /**
31
  * Module arguments
32
  *
33
+ * @since 1.0.0
34
+ * @var array
35
  * @access private
36
  */
37
  private $args = array();
39
  /**
40
  * Core instance
41
  *
42
+ * @since 1.0.0
43
+ * @var object
44
  * @access private
45
  */
46
  private $core = null;
48
  /**
49
  * Shortcode list.
50
  *
51
+ * @since 1.0.0
52
+ * @var array
53
  * @access private
54
  */
55
  private $shortcode_list = array(
131
 
132
  $insert_button = $this->parent_self->ui_elements->get_ui_element_instance( 'button', $args )->render();
133
 
134
+ require_once( apply_filters( 'cherry5-is__popup-template', $this->args['module_path'] . 'inc/views/insert-shortcode-pop-up.php' ) );
135
  }
136
  }
137
 
228
  if ( ! array_key_exists( 'id', $settings ) ) {
229
  $shortcode_attr['options'][ $key ]['id'] = $shortcode_slug . '_' . $key;
230
  }
231
+
232
+ if ( isset( $settings['options'] ) ) {
233
+ $shortcode_attr['options'][ $key ]['options'] = $this->apply_options_cb( $settings );
234
+ }
235
  }
236
 
237
  $shortcode_options_html = $this->parent_self->cherry_interface_builder->render( false, $shortcode_attr['options'] );
239
  $shortcode_options_html = $this->get_empty_layer();
240
  }
241
 
242
+ $shortcode_option_template = apply_filters( 'cherry5-is__options-template', Cherry_Toolkit::get_file( $this->args['module_path'] . 'inc/views/shortcode-options.php' ) );
243
  $output_html = sprintf( $shortcode_option_template, $plugin_slug, $shortcode_slug, $shortcode_attr['title'], $shortcode_attr['description'], $shortcode_attr['content_area'], $shortcode_options_html );
244
 
245
  return array(
253
  }
254
  }
255
 
256
+ /**
257
+ * Apply shortcode options callback if required.
258
+ *
259
+ * @since 1.0.2
260
+ * @param array $atts Shortcode field parameters.
261
+ * @return array
262
+ */
263
+ private function apply_options_cb( $atts ) {
264
+
265
+ if ( ! empty( $atts['options'] ) ) {
266
+ return $atts['options'];
267
+ }
268
+
269
+ if ( empty( $atts['options_cb'] ) || ! is_callable( $atts['options_cb'] ) ) {
270
+ return array();
271
+ }
272
+
273
+ return call_user_func( $atts['options_cb'] );
274
+ }
275
+
276
  /**
277
  * The function returns content area HTML.
278
  *
281
  * @return string
282
  */
283
  private function get_shortcode_content_editor( $content = '', $plugin_slug = '', $shortcode_slug = '' ) {
284
+ $template = apply_filters( 'cherry5-is__content-area-template', Cherry_Toolkit::get_file( $this->args['module_path'] . 'inc/views/shortcode-content-area.php' ) );
285
  $title = apply_filters( 'cherry5-is__content-title', esc_html__( 'Shortcode content.', 'cherry-framework' ) );
286
  $placeholder = apply_filters( 'cherry5-is__content-placeholder', esc_html__( 'Input shortcode content.', 'cherry-framework' ) );
287
 
299
  */
300
  private function get_empty_layer() {
301
  $text = apply_filters( 'cherry5-is__empty_layer-text', esc_html__( 'Shortcode not a have options.', 'cherry-framework' ) );
302
+ $template = apply_filters( 'cherry5-is__empty_layer-template', Cherry_Toolkit::get_file( $this->args['module_path'] . 'inc/views/shortcode-has-not-option.php' ) );
303
  $output = sprintf( $template, $text );
304
 
305
  return $output;
cherry-framework/modules/cherry5-insert-shortcode/inc/views/insert-shortcode-pop-up.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package cherry5_insert_shortcode
6
  * @subpackage Views
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
  */
5
  * @package cherry5_insert_shortcode
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry5-insert-shortcode/inc/views/shortcode-content-area.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package cherry5_insert_shortcode
6
  * @subpackage Views
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
  */
5
  * @package cherry5_insert_shortcode
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry5-insert-shortcode/inc/views/shortcode-has-not-option.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package cherry5_insert_shortcode
6
  * @subpackage Views
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
  */
5
  * @package cherry5_insert_shortcode
6
  * @subpackage Views
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
  */
cherry-framework/modules/cherry5-insert-shortcode/inc/views/shortcode-options.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package cherry5_insert_shortcode
6
  * @subpackage Views
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
  */
5
  * @package cherry5_insert_shortcode
6
  * @subpackage Views
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
  */
cherry-framework/setup-theme.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Setup function that used for checking latest version of the core.
4
+ * It creates `$chery_core_version` global variable and writes the latest core version
5
+ * and it's path into it.
6
+ *
7
+ * @package Cherry_Framework
8
+ * @author Cherry Team <cherryframework@gmail.com>
9
+ * @copyright Copyright (c) 2012 - 2017, Cherry Team
10
+ * @link http://www.cherryframework.com/
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 = get_template_directory() . \'/cherry-framework/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;
28
+
29
+ if ( null !== $chery_core_version ) {
30
+ $old_versions = array_keys( $chery_core_version );
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();
38
+ $chery_core_version[ $version ] = $path;
39
+ }
40
+ } else {
41
+ $chery_core_version = array();
42
+ $chery_core_version[ $version ] = $path;
43
+ }
44
+ ' );
cherry-framework/setup.php CHANGED
@@ -6,7 +6,7 @@
6
  *
7
  * @package Cherry_Framework
8
  * @author Cherry Team <cherryframework@gmail.com>
9
- * @copyright Copyright (c) 2012 - 2016, Cherry Team
10
  * @link http://www.cherryframework.com/
11
  * @license http://www.gnu.org/licenses/gpl-3.0.en.html
12
  */
6
  *
7
  * @package Cherry_Framework
8
  * @author Cherry Team <cherryframework@gmail.com>
9
+ * @copyright Copyright (c) 2012 - 2017, Cherry Team
10
  * @link http://www.cherryframework.com/
11
  * @license http://www.gnu.org/licenses/gpl-3.0.en.html
12
  */
cherry-search.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Cherry Search
4
  * Plugin URI: http://www.cherryframework.com/
5
  * Description: A plugin for WordPress.
6
- * Version: 1.1.1
7
  * Author: Cherry Team
8
  * Text Domain: cherry-search
9
  * License: GPL-3.0+
@@ -12,7 +12,7 @@
12
  *
13
  * @package Cherry_Search
14
  * @author Cherry Team
15
- * @version 1.1.1
16
  * @license GPL-3.0+
17
  * @copyright 2012-2016, Cherry Team
18
  */
@@ -92,7 +92,7 @@ if ( ! class_exists( 'Cherry_Search' ) ) {
92
  *
93
  * @since 1.0.0
94
  */
95
- define( 'CHERRY_SEARCH_VERSION', '1.1.1' );
96
 
97
  /**
98
  * Set the slug of the plugin.
@@ -168,9 +168,9 @@ if ( ! class_exists( 'Cherry_Search' ) ) {
168
  'cherry-handler' => array(
169
  'autoload' => false,
170
  ),
171
- 'cherry-template-manager' => array(
172
  'autoload' => false,
173
- ),
174
  'cherry-dynamic-css' => array(
175
  'autoload' => false,
176
  ),
@@ -192,6 +192,7 @@ if ( ! class_exists( 'Cherry_Search' ) ) {
192
  */
193
  public function includes() {
194
 
 
195
  require_once( CHERRY_SEARCH_DIR . 'includes/public/class-cherry-search-settings-manager.php' );
196
  require_once( CHERRY_SEARCH_DIR . 'includes/public/class-cherry-search-public-ajax-handlers.php' );
197
 
3
  * Plugin Name: Cherry Search
4
  * Plugin URI: http://www.cherryframework.com/
5
  * Description: A plugin for WordPress.
6
+ * Version: 1.1.2
7
  * Author: Cherry Team
8
  * Text Domain: cherry-search
9
  * License: GPL-3.0+
12
  *
13
  * @package Cherry_Search
14
  * @author Cherry Team
15
+ * @version 1.1.2
16
  * @license GPL-3.0+
17
  * @copyright 2012-2016, Cherry Team
18
  */
92
  *
93
  * @since 1.0.0
94
  */
95
+ define( 'CHERRY_SEARCH_VERSION', '1.1.2' );
96
 
97
  /**
98
  * Set the slug of the plugin.
168
  'cherry-handler' => array(
169
  'autoload' => false,
170
  ),
171
+ /*'cherry-template-manager' => array(
172
  'autoload' => false,
173
+ ),*/
174
  'cherry-dynamic-css' => array(
175
  'autoload' => false,
176
  ),
192
  */
193
  public function includes() {
194
 
195
+ require_once( CHERRY_SEARCH_DIR . 'includes/public/cherry-template-manager/cherry-template-manager.php' );
196
  require_once( CHERRY_SEARCH_DIR . 'includes/public/class-cherry-search-settings-manager.php' );
197
  require_once( CHERRY_SEARCH_DIR . 'includes/public/class-cherry-search-public-ajax-handlers.php' );
198
 
includes/public/cherry-template-manager/cherry-template-manager.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 - 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_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
+ }
includes/public/cherry-template-manager/inc/cherry-template-loader.php ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 - 2016, 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( CHERRY_SEARCH_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( CHERRY_SEARCH_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
+ }
includes/public/cherry-template-manager/inc/cherry-template-parser.php ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 - 2016, 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
+ }
index.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- /**
3
- * Silence is golden.
4
- *
5
- * @package Cherry_Search
6
- * @subpackage index
7
- * @author Cherry Team
8
- * @license GPL-3.0+
9
- * @copyright 2012-2016, Cherry Team
10
- */
1
+ <?php
2
+ /**
3
+ * Silence is golden.
4
+ *
5
+ * @package Cherry_Search
6
+ * @subpackage index
7
+ * @author Cherry Team
8
+ * @license GPL-3.0+
9
+ * @copyright 2012-2016, Cherry Team
10
+ */
languages/cherry-search-ru_RU.po CHANGED
@@ -1,326 +1,326 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: cherry-search\n"
4
- "POT-Creation-Date: 2016-11-03 16:49+0200\n"
5
- "PO-Revision-Date: 2016-11-03 16:57+0200\n"
6
- "Last-Translator: \n"
7
- "Language-Team: CherryTeam\n"
8
- "Language: ru_RU\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.11\n"
13
- "X-Poedit-Basepath: ..\n"
14
- "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
- "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_n_noop:1,2;_x:1,2c;_nx:1,2,4c;"
18
- "_nx_noop:1,2,3c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;"
19
- "esc_html_x:1,2c\n"
20
- "X-Poedit-SearchPath-0: .\n"
21
-
22
- #: includes/admin/class-cherry-search-admin.php:84
23
- #: includes/admin/class-cherry-search-admin.php:85
24
- msgid "Cherry Search"
25
- msgstr ""
26
-
27
- #: includes/admin/class-cherry-search-admin.php:95
28
- #: includes/admin/class-cherry-search-admin.php:96
29
- msgid "Settings"
30
- msgstr "Настройки"
31
-
32
- #: includes/admin/class-cherry-search-ajax-handlers.php:57
33
- #: includes/admin/class-cherry-search-ajax-handlers.php:73
34
- msgid "Unable to process the request without nonche or server error"
35
- msgstr "Ошабка сервера. =("
36
-
37
- #: includes/admin/class-cherry-search-ajax-handlers.php:58
38
- #: includes/admin/class-cherry-search-ajax-handlers.php:74
39
- msgid "No right for this action"
40
- msgstr "Не найден обработчик."
41
-
42
- #: includes/admin/class-cherry-search-ajax-handlers.php:59
43
- #: includes/admin/class-cherry-search-ajax-handlers.php:75
44
- msgid "Stop CHEATING!!!"
45
- msgstr "Перестань это делать!!!!"
46
-
47
- #: includes/admin/class-cherry-search-ajax-handlers.php:60
48
- msgid "Options save successfully."
49
- msgstr "Опции сохранены."
50
-
51
- #: includes/admin/class-cherry-search-ajax-handlers.php:76
52
- msgid "Options reset successfully"
53
- msgstr "Опции по умолчанию установлены."
54
-
55
- #: includes/admin/class-cherry-search-settings.php:158
56
- msgid "Cherry Search Settings"
57
- msgstr "Cherry Search настройки."
58
-
59
- #: includes/admin/class-cherry-search-settings.php:173
60
- msgid "Main settings"
61
- msgstr "Основные настройки."
62
-
63
- #: includes/admin/class-cherry-search-settings.php:178
64
- msgid "Search results settings"
65
- msgstr "Настройка поискового запроса."
66
-
67
- #: includes/admin/class-cherry-search-settings.php:183
68
- msgid "Visual settings"
69
- msgstr "Визуальные настройки."
70
-
71
- #: includes/admin/class-cherry-search-settings.php:188
72
- msgid "Notifications"
73
- msgstr "Уведомления."
74
-
75
- #: includes/admin/class-cherry-search-settings.php:202
76
- msgid ""
77
- "In case you need to add Cherry Search on your website, you can do it in "
78
- "several ways:"
79
- msgstr ""
80
- "Если вы хотите добавить Cherry Search на свой веб сайт, вы можете сделать "
81
- "это несколькими способами:"
82
-
83
- #: includes/admin/class-cherry-search-settings.php:203
84
- msgid "Enable a \"Replace the standard search\" option"
85
- msgstr "Включить опцию \"Заменить стандартную форму поиска\"."
86
-
87
- #: includes/admin/class-cherry-search-settings.php:204
88
- msgid "Add Cherry Search using this shortcode"
89
- msgstr "Добавить форму поиска с помощью шорткода."
90
-
91
- #: includes/admin/class-cherry-search-settings.php:205
92
- msgid "Add PHP code to the necessaryfiles of your theme:"
93
- msgstr "Добавить PHP код в необходимые файлы вашей тему."
94
-
95
- #: includes/admin/class-cherry-search-settings.php:216
96
- msgid "Replace the standard search form."
97
- msgstr "Заменить стандартную форму поиска."
98
-
99
- #: includes/admin/class-cherry-search-settings.php:217
100
- msgid ""
101
- "This option allows to replace all the standard search forms on your website."
102
- msgstr ""
103
- "Опция позволяет заменить все стандартные формы поиска на вашем веб сайте."
104
-
105
- #: includes/admin/class-cherry-search-settings.php:220
106
- #: includes/admin/class-cherry-search-settings.php:348
107
- #: includes/admin/class-cherry-search-settings.php:367
108
- #: includes/admin/class-cherry-search-settings.php:385
109
- #: includes/admin/class-cherry-search-settings.php:395
110
- msgid "Yes"
111
- msgstr "Вкл"
112
-
113
- #: includes/admin/class-cherry-search-settings.php:221
114
- #: includes/admin/class-cherry-search-settings.php:349
115
- #: includes/admin/class-cherry-search-settings.php:368
116
- #: includes/admin/class-cherry-search-settings.php:386
117
- #: includes/admin/class-cherry-search-settings.php:396
118
- msgid "No"
119
- msgstr "Выкл"
120
-
121
- #: includes/admin/class-cherry-search-settings.php:227
122
- msgid "Search Button Text."
123
- msgstr "Текст кнопки."
124
-
125
- #: includes/admin/class-cherry-search-settings.php:228
126
- #: includes/admin/class-cherry-search-settings.php:235
127
- msgid "This option sets search button text."
128
- msgstr "Опция устанавливает текст для кнопки поиска в форме."
129
-
130
- #: includes/admin/class-cherry-search-settings.php:234
131
- msgid "Search Button Icon."
132
- msgstr "Иконка кнопки."
133
-
134
- #: includes/admin/class-cherry-search-settings.php:243
135
- msgid "Caption / Placeholder text."
136
- msgstr "Подсказка."
137
-
138
- #: includes/admin/class-cherry-search-settings.php:244
139
- msgid "This option sets placeholder text in input field."
140
- msgstr "Опция устанавливает иконку для кнопки поиска в форме."
141
-
142
- #: includes/admin/class-cherry-search-settings.php:245
143
- msgid "Search"
144
- msgstr "Искать"
145
-
146
- #: includes/admin/class-cherry-search-settings.php:252
147
- msgid "Search in."
148
- msgstr "Искать в:"
149
-
150
- #: includes/admin/class-cherry-search-settings.php:253
151
- msgid ""
152
- "You can select particular search areas. If nothing is selected in the "
153
- "option, search will be made over the entire site."
154
- msgstr ""
155
- "Вы можете выбрать определенные области поиска. Если в опции ничего не "
156
- "выбрано, то поиск будет осуществляться по всему сайту."
157
-
158
- #: includes/admin/class-cherry-search-settings.php:258
159
- msgid "Selected search source."
160
- msgstr "Ничего не выбрано."
161
-
162
- #: includes/admin/class-cherry-search-settings.php:263
163
- msgid "Exclude categories from search results."
164
- msgstr "Исключить категории из поиска:"
165
-
166
- #: includes/admin/class-cherry-search-settings.php:264
167
- msgid "This option allows to set categories in which search will not be made."
168
- msgstr ""
169
- "Опция позволяет указать категории, в которых не будет осуществляться поиск."
170
-
171
- #: includes/admin/class-cherry-search-settings.php:269
172
- msgid "Not selected categories."
173
- msgstr "Ничего не выбрано."
174
-
175
- #: includes/admin/class-cherry-search-settings.php:274
176
- msgid "Exclude tags from search results."
177
- msgstr "Исключить теги из поиска:"
178
-
179
- #: includes/admin/class-cherry-search-settings.php:275
180
- msgid "This option allows to set tags in which search will not be made."
181
- msgstr "Опция позволяет указать теги, в которых не будет осуществляться поиск."
182
-
183
- #: includes/admin/class-cherry-search-settings.php:280
184
- msgid "Not selected tags."
185
- msgstr "Ничего не выбрано."
186
-
187
- #: includes/admin/class-cherry-search-settings.php:285
188
- msgid "Exclude post types from search results."
189
- msgstr "Исключить форматы статей из поиска:"
190
-
191
- #: includes/admin/class-cherry-search-settings.php:286
192
- msgid "This option allows to post types in which search will not be made."
193
- msgstr ""
194
- "Опция позволяет указать форматы статей, в которых не будет осуществляться "
195
- "поиск."
196
-
197
- #: includes/admin/class-cherry-search-settings.php:291
198
- msgid "Not selected post formats."
199
- msgstr "Ничего не выбрано."
200
-
201
- #: includes/admin/class-cherry-search-settings.php:296
202
- msgid "Number of results displayed in one search query."
203
- msgstr "Количество выводимых элементов в поисковом запросе."
204
-
205
- #: includes/admin/class-cherry-search-settings.php:297
206
- msgid ""
207
- "This option will allow you to limit the number of displayed search results. "
208
- "If the overall number of results will exceeed the previously set limit, the "
209
- "\"load more\" button will come up.."
210
- msgstr ""
211
- "Опция позволяет ограничить количество выводимых элементов. Если общий "
212
- "результат поиска будет больше, чем указано в опции, то выводится кнопка "
213
- "\"показать ещё\"."
214
-
215
- #: includes/admin/class-cherry-search-settings.php:306
216
- msgid "Sort search results by:"
217
- msgstr "Сортировать результат поиска по:"
218
-
219
- #: includes/admin/class-cherry-search-settings.php:310
220
- msgid "Date"
221
- msgstr "Датe создания."
222
-
223
- #: includes/admin/class-cherry-search-settings.php:313
224
- msgid "Title"
225
- msgstr "Заголовокам."
226
-
227
- #: includes/admin/class-cherry-search-settings.php:316
228
- msgid "Author"
229
- msgstr "Авторам постов."
230
-
231
- #: includes/admin/class-cherry-search-settings.php:319
232
- msgid "Last modified"
233
- msgstr "Последним изменениям."
234
-
235
- #: includes/admin/class-cherry-search-settings.php:322
236
- msgid "Number of Comments (descending)"
237
- msgstr "Количеству комментариев. ( по убыванию )"
238
-
239
- #: includes/admin/class-cherry-search-settings.php:329
240
- msgid "Filter results by: "
241
- msgstr "Порядок сортировки:"
242
-
243
- #: includes/admin/class-cherry-search-settings.php:333
244
- msgid "Asc"
245
- msgstr "По возрастанию."
246
-
247
- #: includes/admin/class-cherry-search-settings.php:336
248
- msgid "Desc"
249
- msgstr "По убыванию."
250
-
251
- #: includes/admin/class-cherry-search-settings.php:345
252
- msgid "Show post titles."
253
- msgstr "Отображать заголовки статей."
254
-
255
- #: includes/admin/class-cherry-search-settings.php:355
256
- msgid "Post word count."
257
- msgstr "Количество вводимых слов из контента статей."
258
-
259
- #: includes/admin/class-cherry-search-settings.php:364
260
- msgid "Show post authors."
261
- msgstr "Отображать авторов статей."
262
-
263
- #: includes/admin/class-cherry-search-settings.php:375
264
- msgid "Prefix before author`s name."
265
- msgstr "Приставка перед именем автора."
266
-
267
- #: includes/admin/class-cherry-search-settings.php:376
268
- msgid "Posted by:"
269
- msgstr "Сообщение от:"
270
-
271
- #: includes/admin/class-cherry-search-settings.php:382
272
- msgid "Show post thumbnails."
273
- msgstr "Отображать миниатюры статей."
274
-
275
- #: includes/admin/class-cherry-search-settings.php:392
276
- msgid "Enable scrolling for dropdown lists."
277
- msgstr "Включить полосу прокрутки в выпадающем списке."
278
-
279
- #: includes/admin/class-cherry-search-settings.php:403
280
- msgid "Dropdown list height."
281
- msgstr "Высота выпадающего списка."
282
-
283
- #: includes/admin/class-cherry-search-settings.php:413
284
- msgid "\"View more\" button text."
285
- msgstr "Добавить текст для кнопки \"показать ещё\"."
286
-
287
- #: includes/admin/class-cherry-search-settings.php:414
288
- msgid "View more."
289
- msgstr "Показать ещё"
290
-
291
- #: includes/admin/class-cherry-search-settings.php:421
292
- msgid "Negative search results."
293
- msgstr "Уведомление отрицательные результаты поиска."
294
-
295
- #: includes/admin/class-cherry-search-settings.php:422
296
- msgid "Sorry, but nothing matched your search terms."
297
- msgstr "Извините, но ничего не найдено по вашему запросу."
298
-
299
- #: includes/admin/class-cherry-search-settings.php:428
300
- msgid "Technical error."
301
- msgstr "Уведомление при ошибке. "
302
-
303
- #: includes/admin/class-cherry-search-settings.php:429
304
- msgid ""
305
- "Sorry, but we cannot handle your search query now. Please, try again later!"
306
- msgstr ""
307
- "Извините, но мы не можем обработать ваш запрос. Пожалуйста, повторите "
308
- "попытку позже."
309
-
310
- #: includes/admin/class-cherry-search-settings.php:438
311
- msgid "Reset"
312
- msgstr "Сбрость настройки"
313
-
314
- #: includes/admin/class-cherry-search-settings.php:446
315
- msgid "Save"
316
- msgstr "Сохранить настройки"
317
-
318
- #: includes/public/class-cherry-search-macros-callback.php:74
319
- msgid "Search for:"
320
- msgstr "Искать:"
321
-
322
- #~ msgid "Main Settings"
323
- #~ msgstr "Основные настройки."
324
-
325
- #~ msgid "Search Query Settings"
326
- #~ msgstr "Настройка поискового запроса."
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: cherry-search\n"
4
+ "POT-Creation-Date: 2016-11-03 16:49+0200\n"
5
+ "PO-Revision-Date: 2016-11-03 16:57+0200\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: CherryTeam\n"
8
+ "Language: ru_RU\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.11\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
+ "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_n_noop:1,2;_x:1,2c;_nx:1,2,4c;"
18
+ "_nx_noop:1,2,3c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;"
19
+ "esc_html_x:1,2c\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+
22
+ #: includes/admin/class-cherry-search-admin.php:84
23
+ #: includes/admin/class-cherry-search-admin.php:85
24
+ msgid "Cherry Search"
25
+ msgstr ""
26
+
27
+ #: includes/admin/class-cherry-search-admin.php:95
28
+ #: includes/admin/class-cherry-search-admin.php:96
29
+ msgid "Settings"
30
+ msgstr "Настройки"
31
+
32
+ #: includes/admin/class-cherry-search-ajax-handlers.php:57
33
+ #: includes/admin/class-cherry-search-ajax-handlers.php:73
34
+ msgid "Unable to process the request without nonche or server error"
35
+ msgstr "Ошабка сервера. =("
36
+
37
+ #: includes/admin/class-cherry-search-ajax-handlers.php:58
38
+ #: includes/admin/class-cherry-search-ajax-handlers.php:74
39
+ msgid "No right for this action"
40
+ msgstr "Не найден обработчик."
41
+
42
+ #: includes/admin/class-cherry-search-ajax-handlers.php:59
43
+ #: includes/admin/class-cherry-search-ajax-handlers.php:75
44
+ msgid "Stop CHEATING!!!"
45
+ msgstr "Перестань это делать!!!!"
46
+
47
+ #: includes/admin/class-cherry-search-ajax-handlers.php:60
48
+ msgid "Options save successfully."
49
+ msgstr "Опции сохранены."
50
+
51
+ #: includes/admin/class-cherry-search-ajax-handlers.php:76
52
+ msgid "Options reset successfully"
53
+ msgstr "Опции по умолчанию установлены."
54
+
55
+ #: includes/admin/class-cherry-search-settings.php:158
56
+ msgid "Cherry Search Settings"
57
+ msgstr "Cherry Search настройки."
58
+
59
+ #: includes/admin/class-cherry-search-settings.php:173
60
+ msgid "Main settings"
61
+ msgstr "Основные настройки."
62
+
63
+ #: includes/admin/class-cherry-search-settings.php:178
64
+ msgid "Search results settings"
65
+ msgstr "Настройка поискового запроса."
66
+
67
+ #: includes/admin/class-cherry-search-settings.php:183
68
+ msgid "Visual settings"
69
+ msgstr "Визуальные настройки."
70
+
71
+ #: includes/admin/class-cherry-search-settings.php:188
72
+ msgid "Notifications"
73
+ msgstr "Уведомления."
74
+
75
+ #: includes/admin/class-cherry-search-settings.php:202
76
+ msgid ""
77
+ "In case you need to add Cherry Search on your website, you can do it in "
78
+ "several ways:"
79
+ msgstr ""
80
+ "Если вы хотите добавить Cherry Search на свой веб сайт, вы можете сделать "
81
+ "это несколькими способами:"
82
+
83
+ #: includes/admin/class-cherry-search-settings.php:203
84
+ msgid "Enable a \"Replace the standard search\" option"
85
+ msgstr "Включить опцию \"Заменить стандартную форму поиска\"."
86
+
87
+ #: includes/admin/class-cherry-search-settings.php:204
88
+ msgid "Add Cherry Search using this shortcode"
89
+ msgstr "Добавить форму поиска с помощью шорткода."
90
+
91
+ #: includes/admin/class-cherry-search-settings.php:205
92
+ msgid "Add PHP code to the necessaryfiles of your theme:"
93
+ msgstr "Добавить PHP код в необходимые файлы вашей тему."
94
+
95
+ #: includes/admin/class-cherry-search-settings.php:216
96
+ msgid "Replace the standard search form."
97
+ msgstr "Заменить стандартную форму поиска."
98
+
99
+ #: includes/admin/class-cherry-search-settings.php:217
100
+ msgid ""
101
+ "This option allows to replace all the standard search forms on your website."
102
+ msgstr ""
103
+ "Опция позволяет заменить все стандартные формы поиска на вашем веб сайте."
104
+
105
+ #: includes/admin/class-cherry-search-settings.php:220
106
+ #: includes/admin/class-cherry-search-settings.php:348
107
+ #: includes/admin/class-cherry-search-settings.php:367
108
+ #: includes/admin/class-cherry-search-settings.php:385
109
+ #: includes/admin/class-cherry-search-settings.php:395
110
+ msgid "Yes"
111
+ msgstr "Вкл"
112
+
113
+ #: includes/admin/class-cherry-search-settings.php:221
114
+ #: includes/admin/class-cherry-search-settings.php:349
115
+ #: includes/admin/class-cherry-search-settings.php:368
116
+ #: includes/admin/class-cherry-search-settings.php:386
117
+ #: includes/admin/class-cherry-search-settings.php:396
118
+ msgid "No"
119
+ msgstr "Выкл"
120
+
121
+ #: includes/admin/class-cherry-search-settings.php:227
122
+ msgid "Search Button Text."
123
+ msgstr "Текст кнопки."
124
+
125
+ #: includes/admin/class-cherry-search-settings.php:228
126
+ #: includes/admin/class-cherry-search-settings.php:235
127
+ msgid "This option sets search button text."
128
+ msgstr "Опция устанавливает текст для кнопки поиска в форме."
129
+
130
+ #: includes/admin/class-cherry-search-settings.php:234
131
+ msgid "Search Button Icon."
132
+ msgstr "Иконка кнопки."
133
+
134
+ #: includes/admin/class-cherry-search-settings.php:243
135
+ msgid "Caption / Placeholder text."
136
+ msgstr "Подсказка."
137
+
138
+ #: includes/admin/class-cherry-search-settings.php:244
139
+ msgid "This option sets placeholder text in input field."
140
+ msgstr "Опция устанавливает иконку для кнопки поиска в форме."
141
+
142
+ #: includes/admin/class-cherry-search-settings.php:245
143
+ msgid "Search"
144
+ msgstr "Искать"
145
+
146
+ #: includes/admin/class-cherry-search-settings.php:252
147
+ msgid "Search in."
148
+ msgstr "Искать в:"
149
+
150
+ #: includes/admin/class-cherry-search-settings.php:253
151
+ msgid ""
152
+ "You can select particular search areas. If nothing is selected in the "
153
+ "option, search will be made over the entire site."
154
+ msgstr ""
155
+ "Вы можете выбрать определенные области поиска. Если в опции ничего не "
156
+ "выбрано, то поиск будет осуществляться по всему сайту."
157
+
158
+ #: includes/admin/class-cherry-search-settings.php:258
159
+ msgid "Selected search source."
160
+ msgstr "Ничего не выбрано."
161
+
162
+ #: includes/admin/class-cherry-search-settings.php:263
163
+ msgid "Exclude categories from search results."
164
+ msgstr "Исключить категории из поиска:"
165
+
166
+ #: includes/admin/class-cherry-search-settings.php:264
167
+ msgid "This option allows to set categories in which search will not be made."
168
+ msgstr ""
169
+ "Опция позволяет указать категории, в которых не будет осуществляться поиск."
170
+
171
+ #: includes/admin/class-cherry-search-settings.php:269
172
+ msgid "Not selected categories."
173
+ msgstr "Ничего не выбрано."
174
+
175
+ #: includes/admin/class-cherry-search-settings.php:274
176
+ msgid "Exclude tags from search results."
177
+ msgstr "Исключить теги из поиска:"
178
+
179
+ #: includes/admin/class-cherry-search-settings.php:275
180
+ msgid "This option allows to set tags in which search will not be made."
181
+ msgstr "Опция позволяет указать теги, в которых не будет осуществляться поиск."
182
+
183
+ #: includes/admin/class-cherry-search-settings.php:280
184
+ msgid "Not selected tags."
185
+ msgstr "Ничего не выбрано."
186
+
187
+ #: includes/admin/class-cherry-search-settings.php:285
188
+ msgid "Exclude post types from search results."
189
+ msgstr "Исключить форматы статей из поиска:"
190
+
191
+ #: includes/admin/class-cherry-search-settings.php:286
192
+ msgid "This option allows to post types in which search will not be made."
193
+ msgstr ""
194
+ "Опция позволяет указать форматы статей, в которых не будет осуществляться "
195
+ "поиск."
196
+
197
+ #: includes/admin/class-cherry-search-settings.php:291
198
+ msgid "Not selected post formats."
199
+ msgstr "Ничего не выбрано."
200
+
201
+ #: includes/admin/class-cherry-search-settings.php:296
202
+ msgid "Number of results displayed in one search query."
203
+ msgstr "Количество выводимых элементов в поисковом запросе."
204
+
205
+ #: includes/admin/class-cherry-search-settings.php:297
206
+ msgid ""
207
+ "This option will allow you to limit the number of displayed search results. "
208
+ "If the overall number of results will exceeed the previously set limit, the "
209
+ "\"load more\" button will come up.."
210
+ msgstr ""
211
+ "Опция позволяет ограничить количество выводимых элементов. Если общий "
212
+ "результат поиска будет больше, чем указано в опции, то выводится кнопка "
213
+ "\"показать ещё\"."
214
+
215
+ #: includes/admin/class-cherry-search-settings.php:306
216
+ msgid "Sort search results by:"
217
+ msgstr "Сортировать результат поиска по:"
218
+
219
+ #: includes/admin/class-cherry-search-settings.php:310
220
+ msgid "Date"
221
+ msgstr "Датe создания."
222
+
223
+ #: includes/admin/class-cherry-search-settings.php:313
224
+ msgid "Title"
225
+ msgstr "Заголовокам."
226
+
227
+ #: includes/admin/class-cherry-search-settings.php:316
228
+ msgid "Author"
229
+ msgstr "Авторам постов."
230
+
231
+ #: includes/admin/class-cherry-search-settings.php:319
232
+ msgid "Last modified"
233
+ msgstr "Последним изменениям."
234
+
235
+ #: includes/admin/class-cherry-search-settings.php:322
236
+ msgid "Number of Comments (descending)"
237
+ msgstr "Количеству комментариев. ( по убыванию )"
238
+
239
+ #: includes/admin/class-cherry-search-settings.php:329
240
+ msgid "Filter results by: "
241
+ msgstr "Порядок сортировки:"
242
+
243
+ #: includes/admin/class-cherry-search-settings.php:333
244
+ msgid "Asc"
245
+ msgstr "По возрастанию."
246
+
247
+ #: includes/admin/class-cherry-search-settings.php:336
248
+ msgid "Desc"
249
+ msgstr "По убыванию."
250
+
251
+ #: includes/admin/class-cherry-search-settings.php:345
252
+ msgid "Show post titles."
253
+ msgstr "Отображать заголовки статей."
254
+
255
+ #: includes/admin/class-cherry-search-settings.php:355
256
+ msgid "Post word count."
257
+ msgstr "Количество вводимых слов из контента статей."
258
+
259
+ #: includes/admin/class-cherry-search-settings.php:364
260
+ msgid "Show post authors."
261
+ msgstr "Отображать авторов статей."
262
+
263
+ #: includes/admin/class-cherry-search-settings.php:375
264
+ msgid "Prefix before author`s name."
265
+ msgstr "Приставка перед именем автора."
266
+
267
+ #: includes/admin/class-cherry-search-settings.php:376
268
+ msgid "Posted by:"
269
+ msgstr "Сообщение от:"
270
+
271
+ #: includes/admin/class-cherry-search-settings.php:382
272
+ msgid "Show post thumbnails."
273
+ msgstr "Отображать миниатюры статей."
274
+
275
+ #: includes/admin/class-cherry-search-settings.php:392
276
+ msgid "Enable scrolling for dropdown lists."
277
+ msgstr "Включить полосу прокрутки в выпадающем списке."
278
+
279
+ #: includes/admin/class-cherry-search-settings.php:403
280
+ msgid "Dropdown list height."
281
+ msgstr "Высота выпадающего списка."
282
+
283
+ #: includes/admin/class-cherry-search-settings.php:413
284
+ msgid "\"View more\" button text."
285
+ msgstr "Добавить текст для кнопки \"показать ещё\"."
286
+
287
+ #: includes/admin/class-cherry-search-settings.php:414
288
+ msgid "View more."
289
+ msgstr "Показать ещё"
290
+
291
+ #: includes/admin/class-cherry-search-settings.php:421
292
+ msgid "Negative search results."
293
+ msgstr "Уведомление отрицательные результаты поиска."
294
+
295
+ #: includes/admin/class-cherry-search-settings.php:422
296
+ msgid "Sorry, but nothing matched your search terms."
297
+ msgstr "Извините, но ничего не найдено по вашему запросу."
298
+
299
+ #: includes/admin/class-cherry-search-settings.php:428
300
+ msgid "Technical error."
301
+ msgstr "Уведомление при ошибке. "
302
+
303
+ #: includes/admin/class-cherry-search-settings.php:429
304
+ msgid ""
305
+ "Sorry, but we cannot handle your search query now. Please, try again later!"
306
+ msgstr ""
307
+ "Извините, но мы не можем обработать ваш запрос. Пожалуйста, повторите "
308
+ "попытку позже."
309
+
310
+ #: includes/admin/class-cherry-search-settings.php:438
311
+ msgid "Reset"
312
+ msgstr "Сбрость настройки"
313
+
314
+ #: includes/admin/class-cherry-search-settings.php:446
315
+ msgid "Save"
316
+ msgstr "Сохранить настройки"
317
+
318
+ #: includes/public/class-cherry-search-macros-callback.php:74
319
+ msgid "Search for:"
320
+ msgstr "Искать:"
321
+
322
+ #~ msgid "Main Settings"
323
+ #~ msgstr "Основные настройки."
324
+
325
+ #~ msgid "Search Query Settings"
326
+ #~ msgstr "Настройка поискового запроса."
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: TemplateMonster 2002
3
  Tags: search, ajax search, quick search, fast search, ajax, cherry framework, widget search, shortcode search, custom search, cherry search
4
  Requires at least: 4.4
5
  Tested up to: 4.7.2
6
- Stable tag: 1.1.1
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -76,6 +76,10 @@ There are several ways to enable the plugin on your website. You can either:
76
 
77
  * Fixed php error on search page.
78
 
 
 
 
 
79
  == Arbitrary section ==
80
 
81
  = Plugin Settings =
3
  Tags: search, ajax search, quick search, fast search, ajax, cherry framework, widget search, shortcode search, custom search, cherry search
4
  Requires at least: 4.4
5
  Tested up to: 4.7.2
6
+ Stable tag: 1.1.2
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
76
 
77
  * Fixed php error on search page.
78
 
79
+ = 1.1.2 =
80
+
81
+ * Fixed bugs.
82
+
83
  == Arbitrary section ==
84
 
85
  = Plugin Settings =
templates/index.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- /**
3
- * Silence is golden.
4
- *
5
- * @package Cherry_Search
6
- * @subpackage index
7
- * @author Cherry Team
8
- * @license GPL-3.0+
9
- * @copyright 2012-2016, Cherry Team
10
- */
1
+ <?php
2
+ /**
3
+ * Silence is golden.
4
+ *
5
+ * @package Cherry_Search
6
+ * @subpackage index
7
+ * @author Cherry Team
8
+ * @license GPL-3.0+
9
+ * @copyright 2012-2016, Cherry Team
10
+ */