Cherry Services List - Version 1.4.1

Version Description

Download this release

Release Info

Developer TemplateMonster 2002
Plugin Icon 128x128 Cherry Services List
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

Files changed (80) hide show
  1. cherry-framework/cherry-core.php +70 -97
  2. cherry-framework/config.json +15 -15
  3. cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php +53 -26
  4. cherry-framework/modules/cherry-customizer/cherry-customizer.php +39 -40
  5. cherry-framework/modules/cherry-customizer/inc/class-cherry-wp-customize-iconpicker.php +4 -2
  6. cherry-framework/modules/cherry-db-updater/cherry-db-updater.php +0 -2
  7. cherry-framework/modules/cherry-dynamic-css/cherry-dynamic-css.php +1 -3
  8. cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-utilities.php +4 -4
  9. cherry-framework/modules/cherry-google-fonts-loader/cherry-google-fonts-loader.php +4 -11
  10. cherry-framework/modules/cherry-handler/cherry-handler.php +49 -27
  11. cherry-framework/modules/cherry-interface-builder/cherry-interface-builder.php +27 -8
  12. cherry-framework/modules/cherry-interface-builder/inc/assets/cherry-interface-builder.scss +36 -0
  13. cherry-framework/modules/cherry-interface-builder/inc/assets/min/cherry-interface-builder.min.css +1 -1
  14. cherry-framework/modules/cherry-js-core/cherry-js-core.php +25 -9
  15. cherry-framework/modules/cherry-post-formats-api/cherry-post-formats-api.php +41 -15
  16. cherry-framework/modules/cherry-post-meta/cherry-post-meta.php +3 -5
  17. cherry-framework/modules/cherry-term-meta/cherry-term-meta.php +0 -2
  18. cherry-framework/modules/cherry-toolkit/cherry-toolkit.php +0 -2
  19. cherry-framework/modules/cherry-ui-elements/assets/sass/_lock.scss +110 -0
  20. cherry-framework/modules/cherry-ui-elements/cherry-ui-elements.php +26 -9
  21. cherry-framework/modules/cherry-ui-elements/inc/class-cherry-lock-element.php +128 -0
  22. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/ui-button.php +3 -3
  23. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.css +1 -1
  24. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.scss +8 -5
  25. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/ui-checkbox.php +36 -16
  26. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.css +1 -1
  27. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.scss +7 -1
  28. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/ui-colorpicker.php +26 -10
  29. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/min/ui-iconpicker.min.css +1 -1
  30. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/ui-iconpicker.scss +8 -0
  31. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php +66 -9
  32. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/min/ui-media.min.css +1 -1
  33. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.scss +7 -0
  34. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/ui-media.php +27 -9
  35. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.css +1 -1
  36. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.js +1 -1
  37. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/ui-radio.scss +2 -1
  38. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/ui-radio.php +40 -17
  39. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-repeater/ui-repeater.php +39 -6
  40. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.css +1 -1
  41. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.js +1 -1
  42. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.js +1 -1
  43. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.scss +1 -0
  44. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/ui-select.php +71 -49
  45. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/min/ui-slider.min.css +1 -1
  46. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/ui-slider.scss +7 -0
  47. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/ui-slider.php +26 -9
  48. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/min/ui-stepper.min.css +1 -1
  49. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-stepper.scss +7 -0
  50. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/ui-stepper.php +25 -6
  51. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/min/ui-switcher.min.css +1 -1
  52. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-switcher.scss +1 -0
  53. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/ui-switcher.php +28 -10
  54. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/min/ui-text.min.css +1 -1
  55. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/ui-text.scss +7 -0
  56. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/ui-text.php +22 -5
  57. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/min/ui-textarea.min.css +1 -1
  58. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-textarea.scss +7 -0
  59. cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/ui-textarea.php +23 -5
  60. cherry-framework/modules/cherry-ui-elements/ui-element.php +0 -15
  61. cherry-framework/modules/cherry-utility/cherry-utility.php +16 -6
  62. cherry-framework/modules/cherry-utility/inc/cherry-attributes-utilit.php +6 -3
  63. cherry-framework/modules/cherry-utility/inc/cherry-media-utilit.php +3 -1
  64. cherry-framework/modules/cherry-utility/inc/cherry-meta-data-utilit.php +2 -1
  65. cherry-framework/modules/cherry-utility/inc/cherry-satellite-utilit.php +8 -4
  66. cherry-framework/modules/cherry-widget-factory/cherry-widget-factory.php +14 -7
  67. cherry-framework/modules/cherry-widget-factory/inc/class-cherry-abstract-widget.php +33 -148
  68. cherry-framework/modules/cherry5-assets-loader/assets/append.js +16 -0
  69. cherry-framework/modules/cherry5-assets-loader/assets/min/append.min.js +1 -0
  70. cherry-framework/modules/cherry5-assets-loader/assets/var.js +2 -0
  71. cherry-framework/modules/cherry5-assets-loader/cherry5-assets-loader.php +136 -0
  72. cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-css.php +50 -0
  73. cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-js.php +50 -0
  74. cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle.php +113 -0
  75. cherry-framework/modules/cherry5-insert-shortcode/assets/cherry-insert-shortcode.scss +0 -1
  76. cherry-framework/modules/cherry5-insert-shortcode/cherry5-insert-shortcode.php +38 -14
  77. cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-button.php +10 -9
  78. cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php +4 -7
  79. cherry-services-list.php +5 -5
  80. readme.txt +2 -2
cherry-framework/cherry-core.php CHANGED
@@ -1,12 +1,12 @@
1
  <?php
2
  /**
3
  * Class Cherry Core
4
- * Version: 1.4.2
5
  *
6
  * @package Cherry_Framework
7
  * @subpackage Class
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
  */
@@ -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.3
5
  *
6
  * @package Cherry_Framework
7
  * @subpackage Class
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
  */
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( '/\.[0-9a-z]+$/', $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
+ $site_url = site_url();
382
+ $abs_path = wp_normalize_path( ABSPATH );
383
+ $url = str_replace( untrailingslashit( $abs_path ), $site_url, $module_dir );
384
  } else if ( false !== strpos( $module_path, $theme_dir ) ) {
385
  $explode = explode( $theme_dir, $module_dir );
386
  $url = get_stylesheet_directory_uri() . end( $explode );
408
  */
409
  public function pass_core_to_widgets( $core, $path ) {
410
  $path = str_replace( '\\', '/', $path );
411
+ $current_core = str_replace( '\\', '/', $this->settings['base_dir'] );
412
 
413
  if ( false !== strpos( $path, $current_core ) ) {
414
  return self::get_instance();
417
  return $core;
418
  }
419
 
420
+ /**
421
+ * Get core version.
422
+ *
423
+ * @since 1.5.0
424
+ * @return string
425
+ */
426
+ public function get_core_version() {
427
+ global $chery_core_version;
428
+
429
+ return key( $chery_core_version );
430
+ }
431
+
432
  /**
433
  * Get path to the core directory.
434
  *
435
  * @since 1.0.0
 
436
  * @return string
437
  */
438
  public function get_core_dir() {
cherry-framework/config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name" : "Cherry Framework",
3
- "version" : "1.4.2",
4
  "description" : "",
5
  "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs",
6
  "git_link" : "https://github.com/CherryFramework/cherry-framework",
@@ -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.1",
155
  "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/09.%20cherry-ui-elements.md",
156
  "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-ui-elements",
157
  "compatible" : ["theme", "plugin"],
@@ -162,7 +151,7 @@
162
  "cherry-utility" : {
163
  "name" : "Utility",
164
  "description" : "Multiple utility functions.",
165
- "version" : "1.1.6",
166
  "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/08.%20cherry-utility.md",
167
  "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-utility",
168
  "compatible" : ["theme", "plugin"],
@@ -181,6 +170,17 @@
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.",
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",
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.",
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.8
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.8
14
  * @author Cherry Team <cherryframework@gmail.com>
15
- * @copyright Copyright (c) 2012 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
17
  * @license http://www.gnu.org/licenses/gpl-3.0.html
18
  */
@@ -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
  }
@@ -376,28 +371,42 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
376
  case 'password':
377
  case 'checkbox':
378
  case 'dropdown-pages':
379
- $control_args = wp_parse_args( array( 'type' => $field_type ), $control_args );
 
 
380
  break;
381
 
382
  case 'range':
383
  case 'number':
384
  $input_attrs = ( isset( $args['input_attrs'] ) ) ? $args['input_attrs'] : array();
385
- $control_args = wp_parse_args( array( 'type' => $field_type, 'input_attrs' => $input_attrs ), $control_args );
 
 
 
386
  break;
387
 
388
  case 'select':
389
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
390
- $control_args = wp_parse_args( array( 'type' => 'select', 'choices' => $choices ), $control_args );
 
 
 
391
  break;
392
 
393
  case 'fonts':
394
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : $this->get_fonts();
395
- $control_args = wp_parse_args( array( 'type' => 'select', 'choices' => $choices ), $control_args );
 
 
 
396
  break;
397
 
398
  case 'radio':
399
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
400
- $control_args = wp_parse_args( array( 'type' => 'radio', 'choices' => $choices ), $control_args );
 
 
 
401
  break;
402
 
403
  case 'hex_color':
@@ -518,16 +527,6 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
518
  $this->customize = $customize;
519
  }
520
 
521
- /**
522
- * Retrieve the version number.
523
- *
524
- * @since 1.0.0
525
- * @return string The version number of the module.
526
- */
527
- public function get_version() {
528
- return $this->version;
529
- }
530
-
531
  /**
532
  * Retrieve a option value by ID.
533
  *
@@ -926,8 +925,8 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
926
  * @param object $this Cherry_Customiser instance.
927
  */
928
  return apply_filters( 'cherry_customizer_get_fonts_data', array(
929
- 'standard' => dirname( __FILE__ ) . '/assets/fonts/standard.json',
930
- 'google' => dirname( __FILE__ ) . '/assets/fonts/google.json',
931
  ), $this );
932
  }
933
 
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/
15
  * @license http://www.gnu.org/licenses/gpl-3.0.html
16
  */
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
  }
371
  case 'password':
372
  case 'checkbox':
373
  case 'dropdown-pages':
374
+ $control_args = wp_parse_args( array(
375
+ 'type' => $field_type,
376
+ ), $control_args );
377
  break;
378
 
379
  case 'range':
380
  case 'number':
381
  $input_attrs = ( isset( $args['input_attrs'] ) ) ? $args['input_attrs'] : array();
382
+ $control_args = wp_parse_args( array(
383
+ 'type' => $field_type,
384
+ 'input_attrs' => $input_attrs,
385
+ ), $control_args );
386
  break;
387
 
388
  case 'select':
389
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
390
+ $control_args = wp_parse_args( array(
391
+ 'type' => 'select',
392
+ 'choices' => $choices,
393
+ ), $control_args );
394
  break;
395
 
396
  case 'fonts':
397
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : $this->get_fonts();
398
+ $control_args = wp_parse_args( array(
399
+ 'type' => 'select',
400
+ 'choices' => $choices,
401
+ ), $control_args );
402
  break;
403
 
404
  case 'radio':
405
  $choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
406
+ $control_args = wp_parse_args( array(
407
+ 'type' => 'radio',
408
+ 'choices' => $choices,
409
+ ), $control_args );
410
  break;
411
 
412
  case 'hex_color':
527
  $this->customize = $customize;
528
  }
529
 
 
 
 
 
 
 
 
 
 
 
530
  /**
531
  * Retrieve a option value by ID.
532
  *
925
  * @param object $this Cherry_Customiser instance.
926
  */
927
  return apply_filters( 'cherry_customizer_get_fonts_data', array(
928
+ 'standard' => $this->module_path . 'assets/fonts/standard.json',
929
+ 'google' => $this->module_path . 'assets/fonts/google.json',
930
  ), $this );
931
  }
932
 
cherry-framework/modules/cherry-customizer/inc/class-cherry-wp-customize-iconpicker.php CHANGED
@@ -26,7 +26,7 @@ if ( class_exists( 'WP_Customize_Control' ) ) {
26
  public $icon_data = array();
27
 
28
  /**
29
- * Trigger to try automatically pase icons from CSS file or not.
30
  *
31
  * @var boolean
32
  */
@@ -70,7 +70,9 @@ if ( class_exists( 'WP_Customize_Control' ) ) {
70
  $core = apply_filters( 'cherry_customizer_get_core', false );
71
  $ui_builder = $core->init_module(
72
  'cherry-ui-elements',
73
- array( 'ui_elements' => array( 'iconpicker' ) )
 
 
74
  );
75
 
76
  $args = array(
26
  public $icon_data = array();
27
 
28
  /**
29
+ * Trigger to try automatically parse icons from CSS file or not.
30
  *
31
  * @var boolean
32
  */
70
  $core = apply_filters( 'cherry_customizer_get_core', false );
71
  $ui_builder = $core->init_module(
72
  'cherry-ui-elements',
73
+ array(
74
+ 'ui_elements' => array( 'iconpicker' ),
75
+ )
76
  );
77
 
78
  $args = array(
cherry-framework/modules/cherry-db-updater/cherry-db-updater.php CHANGED
@@ -2,7 +2,6 @@
2
  /**
3
  * Module Name: Database Updater
4
  * Description: Handle database updates if required.
5
- * Version: 1.0.0
6
  * Author: Cherry Team
7
  * Author URI: http://www.cherryframework.com/
8
  * License: GPLv3
@@ -10,7 +9,6 @@
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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
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/
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-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,7 +9,6 @@
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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -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/
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/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,7 +9,6 @@
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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -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/
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,7 +9,6 @@
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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -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/
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;
@@ -264,6 +272,12 @@ html{
264
  box-shadow:$shadow;
265
  border-radius: $br-radius;
266
  border: $border;
 
 
 
 
 
 
267
  }
268
  }
269
  }
@@ -382,6 +396,15 @@ html{
382
  }
383
  }
384
  }
 
 
 
 
 
 
 
 
 
385
  }
386
  .cherry-settings{
387
  & + & {
@@ -428,6 +451,19 @@ html{
428
  @media ( min-width: 961px ) {
429
  padding: $padding * 3;
430
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  }
432
 
433
  .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;
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-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,7 +9,6 @@
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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -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/
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,7 +10,6 @@
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 - 2017, Cherry Team
17
  * @link http://www.cherryframework.com/
@@ -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/
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-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,7 +9,6 @@
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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -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/
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,7 +9,6 @@
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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
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/
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,7 +9,6 @@
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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
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/
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.2
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.2
14
  * @author Cherry Team <cherryframework@gmail.com>
15
  * @copyright Copyright (c) 2012 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -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/
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/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-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'] ) {
@@ -133,11 +154,47 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
133
  }
134
 
135
  $html .= '</div>';
 
136
  $html .= '</div>';
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  return $html;
139
  }
140
 
 
 
 
 
 
 
 
 
 
 
 
141
  /**
142
  * Returns iconpicker html markup
143
  *
@@ -294,25 +351,25 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
294
 
295
  wp_enqueue_style(
296
  'ui-iconpicker',
297
- esc_url( Cherry_Core::base_url( 'assets/min/ui-iconpicker.min.css', __FILE__ ) ),
298
  array(),
299
- '1.3.2',
300
  'all'
301
  );
302
 
303
  wp_enqueue_script(
304
  'jquery-iconpicker',
305
- esc_url( Cherry_Core::base_url( 'assets/min/jquery-iconpicker.min.js', __FILE__ ) ),
306
  array( 'jquery' ),
307
- '1.3.2',
308
  true
309
  );
310
 
311
  wp_enqueue_script(
312
  'ui-iconpicker',
313
- esc_url( Cherry_Core::base_url( 'assets/min/ui-iconpicker.min.js', __FILE__ ) ),
314
  array( 'jquery' ),
315
- '1.3.2',
316
  true
317
  );
318
  }
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'] ) {
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
  *
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',
@@ -67,6 +69,15 @@ if ( ! class_exists( 'UI_Select' ) ) {
67
  'master' => '',
68
  );
69
 
 
 
 
 
 
 
 
 
 
70
  /**
71
  * Constructor method for the UI_Select class.
72
  *
@@ -74,7 +85,8 @@ if ( ! class_exists( 'UI_Select' ) ) {
74
  */
75
  function __construct( $args = array() ) {
76
  $this->defaults_settings['id'] = 'cherry-ui-select-' . uniqid();
77
- $this->settings = wp_parse_args( $args, $this->defaults_settings );
 
78
 
79
  add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
80
  }
@@ -86,65 +98,75 @@ if ( ! class_exists( 'UI_Select' ) ) {
86
  */
87
  public function render() {
88
  $html = '';
89
- $class = $this->settings['class'];
90
- $class .= ' ' . $this->settings['master'];
 
 
 
 
91
 
92
  $html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
 
 
93
 
94
- ( $this->settings['filter'] ) ? $filter_state = 'data-filter="true"' : $filter_state = 'data-filter="false"' ;
 
95
 
96
- ( $this->settings['multiple'] ) ? $multi_state = 'multiple="multiple"' : $multi_state = '' ;
97
- ( $this->settings['multiple'] ) ? $name = $this->settings['name'] . '[]' : $name = $this->settings['name'] ;
 
98
 
99
- if ( '' !== $this->settings['label'] ) {
100
- $html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . $this->settings['label'] . '</label> ';
101
- }
102
 
103
- $inline_style = $this->settings['inline_style'] ? 'style="' . esc_attr( $this->settings['inline_style'] ) . '"' : '' ;
104
 
105
- $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 . ' ' . $inline_style . ' >';
106
- if ( $this->settings['options'] && ! empty( $this->settings['options'] ) && is_array( $this->settings['options'] ) ) {
107
- foreach ( $this->settings['options'] as $option => $option_value ) {
108
- if ( ! is_array( $this->settings['value'] ) ) {
109
- $this->settings['value'] = array( $this->settings['value'] );
110
- }
111
- if ( false === strpos( $option, 'optgroup' ) ) {
112
- $selected_state = '';
113
- if ( $this->settings['value'] && ! empty( $this->settings['value'] ) ) {
114
- foreach ( $this->settings['value'] as $key => $value ) {
115
- $selected_state = selected( $value, $option, false );
116
- if ( " selected='selected'" == $selected_state ) {
117
- break;
118
- }
119
- }
120
- }
121
 
122
- if ( is_array( $option_value ) ) {
123
- $lable = $option_value['label'];
124
- $data = 'data-slave="' . $option_value['slave'] . '"';
125
- } else {
126
- $lable = $option_value;
127
- $data = '';
128
  }
129
 
130
- $html .= '<option value="' . esc_attr( $option ) . '" ' . $selected_state . ' ' . $data . '>' . esc_html( $lable ) . '</option>';
131
- } else {
132
- $html .= '<optgroup label="' . esc_attr( $option_value['label'] ) . '">';
133
  $selected_state = '';
134
- foreach ( $option_value['group_options'] as $group_item => $group_value ) {
135
  foreach ( $this->settings['value'] as $key => $value ) {
136
- $selected_state = selected( $value, $group_item, false );
137
  if ( " selected='selected'" == $selected_state ) {
138
  break;
139
  }
140
  }
141
- $html .= '<option value="' . esc_attr( $group_item ) . '" ' . $selected_state . '>' . esc_html( $group_value ) . '</option>';
142
  }
143
- $html .= '</optgroup>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
145
  }
146
- }
147
- $html .= '</select>';
 
148
  $html .= '</div>';
149
 
150
  return $html;
@@ -158,33 +180,33 @@ if ( ! class_exists( 'UI_Select' ) ) {
158
  public static function enqueue_assets() {
159
  wp_enqueue_script(
160
  'ui-select-select2',
161
- esc_url( Cherry_Core::base_url( 'assets/min/select2.min.js', __FILE__ ) ),
162
  array( 'jquery' ),
163
  '4.0.3',
164
  true
165
  );
166
 
167
  wp_enqueue_script(
168
- 'ui-select-min',
169
- esc_url( Cherry_Core::base_url( 'assets/min/ui-select.min.js', __FILE__ ) ),
170
  array( 'jquery' ),
171
- '1.3.2',
172
  true
173
  );
174
 
175
  wp_enqueue_style(
176
  'ui-select-select2',
177
- esc_url( Cherry_Core::base_url( 'assets/min/select2.min.css', __FILE__ ) ),
178
  array(),
179
  '4.0.3',
180
  'all'
181
  );
182
 
183
  wp_enqueue_style(
184
- 'ui-select-min',
185
- esc_url( Cherry_Core::base_url( 'assets/min/ui-select.min.css', __FILE__ ) ),
186
  array(),
187
- '1.3.2',
188
  'all'
189
  );
190
  }
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',
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" 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
@@ -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
  *
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,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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -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/
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,7 +9,6 @@
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 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -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/
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
@@ -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
  /**
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.2
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.0.2
14
  * @author Cherry Team <cherryframework@gmail.com>
15
  * @copyright Copyright (c) 2012 - 2017, Cherry Team
16
  * @link http://www.cherryframework.com/
@@ -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.2';
 
 
 
 
 
 
 
 
 
40
 
41
  /**
42
  * A reference to an instance of this class.
@@ -90,7 +98,7 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
90
  * @var object
91
  * @access private
92
  */
93
- private $shortcodes_button = null;
94
 
95
  /**
96
  * A reference to an instance of this class Cherry5_Insertion_Popup.
@@ -99,7 +107,7 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
99
  * @var object
100
  * @access private
101
  */
102
- private $shortcodes_popup = null;
103
 
104
  /**
105
  * Shortcode list.
@@ -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
  );
@@ -135,8 +145,8 @@ if ( ! class_exists( 'Cherry5_Insert_Shortcode' ) ) {
135
  $this->includes();
136
 
137
  // Initializing child classes.
 
138
  $this->shortcodes_button = new Cherry5_Insertion_Button( $this->core, $this->args, $this );
139
- $this->shortcodes_popup = new Cherry5_Insertion_Popup( $this->core, $this->args, $this );
140
 
141
  // Register admin assets.
142
  add_action( 'admin_enqueue_scripts', array( $this, 'register_assets' ), 0 );
@@ -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
  /**
@@ -188,7 +210,9 @@ if ( ! class_exists( '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/
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.
98
  * @var object
99
  * @access private
100
  */
101
+ public $shortcodes_button = null;
102
 
103
  /**
104
  * A reference to an instance of this class Cherry5_Insertion_Popup.
107
  * @var object
108
  * @access private
109
  */
110
+ public $shortcodes_popup = null;
111
 
112
  /**
113
  * Shortcode list.
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
  );
145
  $this->includes();
146
 
147
  // Initializing child classes.
148
+ $this->shortcodes_popup = new Cherry5_Insertion_Popup( $this->core, $this->args, $this );
149
  $this->shortcodes_button = new Cherry5_Insertion_Button( $this->core, $this->args, $this );
 
150
 
151
  // Register admin assets.
152
  add_action( 'admin_enqueue_scripts', array( $this, 'register_assets' ), 0 );
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
  /**
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
@@ -55,16 +55,17 @@ if ( ! class_exists( 'Cherry5_Insertion_Button' ) ) {
55
  * @access public
56
  * @return void
57
  */
58
- public function add_button() {
59
- $args = apply_filters( 'cherry5-is__open-button', array(
60
- 'id' => '',
61
- 'name' => '',
62
- 'style' => 'primary',
63
- 'content' => '<span class="cherry5-is__icon dashicons dashicons-plus"></span>' . esc_html__( 'Cherry shortcodes', 'cherry-framework' ),
64
- 'class' => 'cherry5-is__open-button',
65
- ) );
66
 
67
- echo $this->parent_self->ui_elements->get_ui_element_instance( 'button', $args )->render();
 
 
 
 
 
 
 
 
68
  }
69
  }
70
  }
55
  * @access public
56
  * @return void
57
  */
58
+ public function add_button( $editor_id ) {
 
 
 
 
 
 
 
59
 
60
+ if ( 'content' !== $editor_id ) {
61
+ return;
62
+ }
63
+
64
+ echo '<button class="button cherry5-is__open-button" type="button"><span class="cherry5-is__icon dashicons dashicons-plus"></span>' . esc_html__( 'Cherry Shortcodes', 'cherry-framework' ) . '</button>';
65
+
66
+ if ( ! defined( 'DOING_AJAX' ) ) {
67
+ add_action( 'admin_print_footer_scripts', array( $this->parent_self->shortcodes_popup, 'render_popup' ), 99 );
68
+ }
69
  }
70
  }
71
  }
cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php CHANGED
@@ -100,9 +100,6 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
100
  )
101
  );
102
 
103
- if ( ! defined( 'DOING_AJAX' ) ) {
104
- add_action( 'admin_print_footer_scripts', array( $this, 'render_popup' ), 99 );
105
- }
106
  }
107
 
108
  /**
@@ -131,7 +128,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
 
@@ -239,7 +236,7 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
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_dir'] . '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(
@@ -281,7 +278,7 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
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_dir'] . '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,7 +296,7 @@ if ( ! class_exists( 'Cherry5_Insertion_Popup' ) ) {
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_dir'] . 'inc/views/shortcode-has-not-option.php' ) );
303
  $output = sprintf( $template, $text );
304
 
305
  return $output;
100
  )
101
  );
102
 
 
 
 
103
  }
104
 
105
  /**
128
 
129
  $insert_button = $this->parent_self->ui_elements->get_ui_element_instance( 'button', $args )->render();
130
 
131
+ require_once( apply_filters( 'cherry5-is__popup-template', $this->args['module_path'] . 'inc/views/insert-shortcode-pop-up.php' ) );
132
  }
133
  }
134
 
236
  $shortcode_options_html = $this->get_empty_layer();
237
  }
238
 
239
+ $shortcode_option_template = apply_filters( 'cherry5-is__options-template', Cherry_Toolkit::get_file( $this->args['module_path'] . 'inc/views/shortcode-options.php' ) );
240
  $output_html = sprintf( $shortcode_option_template, $plugin_slug, $shortcode_slug, $shortcode_attr['title'], $shortcode_attr['description'], $shortcode_attr['content_area'], $shortcode_options_html );
241
 
242
  return array(
278
  * @return string
279
  */
280
  private function get_shortcode_content_editor( $content = '', $plugin_slug = '', $shortcode_slug = '' ) {
281
+ $template = apply_filters( 'cherry5-is__content-area-template', Cherry_Toolkit::get_file( $this->args['module_path'] . 'inc/views/shortcode-content-area.php' ) );
282
  $title = apply_filters( 'cherry5-is__content-title', esc_html__( 'Shortcode content.', 'cherry-framework' ) );
283
  $placeholder = apply_filters( 'cherry5-is__content-placeholder', esc_html__( 'Input shortcode content.', 'cherry-framework' ) );
284
 
296
  */
297
  private function get_empty_layer() {
298
  $text = apply_filters( 'cherry5-is__empty_layer-text', esc_html__( 'Shortcode not a have options.', 'cherry-framework' ) );
299
+ $template = apply_filters( 'cherry5-is__empty_layer-template', Cherry_Toolkit::get_file( $this->args['module_path'] . 'inc/views/shortcode-has-not-option.php' ) );
300
  $output = sprintf( $template, $text );
301
 
302
  return $output;
cherry-services-list.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /**
3
  * Plugin Name: Cherry Services List
4
- * Plugin URI: http://www.cherryframework.com/plugins/
5
  * Description: Cherry Services is a flexible WordPress plugin that lets you display your company’s services in a variety of ways.
6
- * Version: 1.4.0
7
- * Author: TemplateMonster
8
- * Author URI: http://cherryframework.com/
9
  * Text Domain: cherry-services
10
  * License: GPL-3.0+
11
  * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -92,7 +92,7 @@ if ( ! class_exists( 'Cherry_Services_List' ) ) {
92
  * @access private
93
  * @var string
94
  */
95
- private $version = '1.4.0';
96
 
97
  /**
98
  * Plugin CPT name
1
  <?php
2
  /**
3
  * Plugin Name: Cherry Services List
4
+ * Plugin URI:
5
  * Description: Cherry Services is a flexible WordPress plugin that lets you display your company’s services in a variety of ways.
6
+ * Version: 1.4.1
7
+ * Author: JetImpex
8
+ * Author URI: https://jetimpex.com/wordpress/
9
  * Text Domain: cherry-services
10
  * License: GPL-3.0+
11
  * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
92
  * @access private
93
  * @var string
94
  */
95
+ private $version = '1.4.1';
96
 
97
  /**
98
  * Plugin CPT name
readme.txt CHANGED
@@ -3,8 +3,8 @@
3
  Contributors: TemplateMonster 2002
4
  Tags: custom post type, services, service, cherry-framework, elementor, elementor builder
5
  Requires at least: 4.5
6
- Tested up to: 4.7.5
7
- Stable tag: 1.4.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
3
  Contributors: TemplateMonster 2002
4
  Tags: custom post type, services, service, cherry-framework, elementor, elementor builder
5
  Requires at least: 4.5
6
+ Tested up to: 4.8.1
7
+ Stable tag: 1.4.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10