Version Description
Download this release
Release Info
Developer | TemplateMonster 2002 |
Plugin | Cherry Team Members |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4.0 to 1.4.1
- cherry-framework/cherry-core.php +70 -97
- cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php +53 -26
- cherry-framework/modules/cherry-customizer/cherry-customizer.php +39 -40
- cherry-framework/modules/cherry-customizer/inc/class-cherry-wp-customize-iconpicker.php +4 -2
- cherry-framework/modules/cherry-db-updater/cherry-db-updater.php +0 -2
- cherry-framework/modules/cherry-dynamic-css/cherry-dynamic-css.php +1 -3
- cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-utilities.php +4 -4
- cherry-framework/modules/cherry-google-fonts-loader/cherry-google-fonts-loader.php +4 -11
- cherry-framework/modules/cherry-handler/cherry-handler.php +49 -27
- cherry-framework/modules/cherry-interface-builder/cherry-interface-builder.php +27 -8
- cherry-framework/modules/cherry-interface-builder/inc/assets/cherry-interface-builder.scss +36 -0
- cherry-framework/modules/cherry-interface-builder/inc/assets/min/cherry-interface-builder.min.css +1 -1
- cherry-framework/modules/cherry-js-core/cherry-js-core.php +25 -9
- cherry-framework/modules/cherry-post-formats-api/cherry-post-formats-api.php +41 -15
- cherry-framework/modules/cherry-post-meta/cherry-post-meta.php +3 -5
- cherry-framework/modules/cherry-term-meta/cherry-term-meta.php +0 -2
- cherry-framework/modules/cherry-toolkit/cherry-toolkit.php +0 -2
- cherry-framework/modules/cherry-ui-elements/assets/sass/_lock.scss +110 -0
- cherry-framework/modules/cherry-ui-elements/cherry-ui-elements.php +26 -9
- cherry-framework/modules/cherry-ui-elements/inc/class-cherry-lock-element.php +128 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/ui-button.php +3 -3
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.scss +8 -5
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/ui-checkbox.php +36 -16
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.scss +7 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/ui-colorpicker.php +26 -10
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/min/ui-iconpicker.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/ui-iconpicker.scss +8 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php +66 -9
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/min/ui-media.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.scss +7 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/ui-media.php +27 -9
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.js +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/ui-radio.scss +2 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/ui-radio.php +40 -17
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-repeater/ui-repeater.php +39 -6
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.js +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.js +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.scss +1 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/ui-select.php +71 -49
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/min/ui-slider.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/ui-slider.scss +7 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/ui-slider.php +26 -9
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/min/ui-stepper.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-stepper.scss +7 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/ui-stepper.php +25 -6
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/min/ui-switcher.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-switcher.scss +1 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/ui-switcher.php +28 -10
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/min/ui-text.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/ui-text.scss +7 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/ui-text.php +22 -5
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/min/ui-textarea.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-textarea.scss +7 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/ui-textarea.php +23 -5
- cherry-framework/modules/cherry-ui-elements/ui-element.php +0 -15
- cherry-framework/modules/cherry-utility/cherry-utility.php +16 -6
- cherry-framework/modules/cherry-utility/inc/cherry-attributes-utilit.php +6 -3
- cherry-framework/modules/cherry-utility/inc/cherry-media-utilit.php +3 -1
- cherry-framework/modules/cherry-utility/inc/cherry-meta-data-utilit.php +2 -1
- cherry-framework/modules/cherry-utility/inc/cherry-satellite-utilit.php +8 -4
- cherry-framework/modules/cherry-widget-factory/cherry-widget-factory.php +14 -7
- cherry-framework/modules/cherry-widget-factory/inc/class-cherry-abstract-widget.php +33 -148
- cherry-framework/modules/cherry5-assets-loader/assets/append.js +16 -0
- cherry-framework/modules/cherry5-assets-loader/assets/min/append.min.js +1 -0
- cherry-framework/modules/cherry5-assets-loader/assets/var.js +2 -0
- cherry-framework/modules/cherry5-assets-loader/cherry5-assets-loader.php +136 -0
- cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-css.php +50 -0
- cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle-js.php +50 -0
- cherry-framework/modules/cherry5-assets-loader/inc/cherry5-assets-loader-handle.php +113 -0
- cherry-framework/modules/cherry5-insert-shortcode/assets/cherry-insert-shortcode.scss +0 -1
- cherry-framework/modules/cherry5-insert-shortcode/cherry5-insert-shortcode.php +38 -14
- cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-button.php +10 -9
- cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php +4 -7
- cherry-team-members.php +1 -1
- languages/cherry-team.mo +0 -0
- languages/cherry-team.pot +50 -29
- readme.txt +2 -2
cherry-framework/cherry-core.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Class Cherry Core
|
4 |
-
* Version: 1.
|
5 |
*
|
6 |
* @package Cherry_Framework
|
7 |
* @subpackage Class
|
8 |
* @author Cherry Team <cherryframework@gmail.com>
|
9 |
-
* @copyright Copyright (c) 2012 -
|
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 |
-
$
|
66 |
-
$base_url = trailingslashit( $this->base_url( '', __FILE__ ) );
|
67 |
|
68 |
$defaults = array(
|
69 |
'framework_path' => 'cherry-framework',
|
70 |
'modules' => array(),
|
71 |
-
'base_dir' =>
|
72 |
-
'base_url' =>
|
73 |
-
'extra_base_dir' => '',
|
74 |
);
|
75 |
|
76 |
$this->settings = array_merge( $defaults, $settings );
|
77 |
|
78 |
-
$
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
$
|
122 |
-
$path = $this->get_module_path( $module );
|
123 |
|
124 |
if ( ! array_key_exists( $module, self::$all_modules ) ) {
|
125 |
-
self::$all_modules[ $module ] =
|
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 =
|
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 |
-
|
|
|
|
|
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 . '/'
|
334 |
|
335 |
-
if ( file_exists( $this->settings['
|
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
|
346 |
-
* Version information should be provided as a value stored in the header notation.
|
347 |
*
|
348 |
-
* @
|
349 |
-
* @
|
350 |
-
* @
|
351 |
-
* @param bool $is_path Set this as true, if `$module` contains a path.
|
352 |
-
* @return int
|
353 |
*/
|
354 |
-
public function
|
355 |
-
|
356 |
-
|
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 |
-
|
394 |
-
|
395 |
-
$parts[ $index ] = $max_version[ $index ] - (int) $part;
|
396 |
}
|
397 |
|
398 |
-
return
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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( $
|
421 |
-
$
|
|
|
|
|
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['
|
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/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' => $
|
354 |
'error_404' => esc_html__( '404 Not Found', 'cherry-framework' ),
|
355 |
'archives' => esc_html__( 'Archives', 'cherry-framework' ),
|
356 |
'search' => esc_html__( 'Search results for “%s”', '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
|
459 |
*
|
460 |
* @since 1.0.0
|
461 |
-
* @
|
|
|
|
|
|
|
|
|
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
|
|
|
489 |
|
490 |
-
|
|
|
|
|
|
|
|
|
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
|
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(
|
|
|
|
|
|
|
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 “%s”', '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 -
|
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
|
175 |
-
$this->capability
|
176 |
-
$this->type
|
177 |
-
|
178 |
-
$this->
|
179 |
-
$this->
|
180 |
-
$this->
|
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(
|
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(
|
|
|
|
|
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(
|
|
|
|
|
|
|
386 |
break;
|
387 |
|
388 |
case 'select':
|
389 |
$choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
|
390 |
-
$control_args = wp_parse_args( array(
|
|
|
|
|
|
|
391 |
break;
|
392 |
|
393 |
case 'fonts':
|
394 |
$choices = ( isset( $args['choices'] ) ) ? $args['choices'] : $this->get_fonts();
|
395 |
-
$control_args = wp_parse_args( array(
|
|
|
|
|
|
|
396 |
break;
|
397 |
|
398 |
case 'radio':
|
399 |
$choices = ( isset( $args['choices'] ) ) ? $args['choices'] : array();
|
400 |
-
$control_args = wp_parse_args( array(
|
|
|
|
|
|
|
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' =>
|
930 |
-
'google' =>
|
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
|
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(
|
|
|
|
|
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
|
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( (
|
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
|
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 = (
|
727 |
break;
|
728 |
case 'addition' :
|
729 |
-
$size = (
|
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
|
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(
|
|
|
|
|
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'
|
45 |
-
'callback'
|
46 |
-
'type'
|
47 |
-
'data_type'
|
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 =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
|
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
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',
|
159 |
array( 'jquery' ),
|
160 |
-
|
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',
|
167 |
array(),
|
168 |
-
|
169 |
'all'
|
170 |
);
|
171 |
}
|
@@ -192,8 +213,9 @@ if ( ! class_exists( 'Cherry_Handler' ) ) {
|
|
192 |
);
|
193 |
|
194 |
if ( $this->settings['is_public'] ) {
|
195 |
-
|
196 |
-
|
|
|
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->
|
|
|
|
|
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 :
|
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',
|
446 |
array( 'jquery' ),
|
447 |
-
|
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',
|
453 |
array(),
|
454 |
-
|
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 |
-
*
|
45 |
*
|
46 |
-
* @since 1.
|
|
|
47 |
* @var string
|
48 |
*/
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
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',
|
87 |
-
$version = $this->
|
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(
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
*
|
35 |
*
|
|
|
|
|
36 |
* @var string
|
37 |
*/
|
38 |
-
public $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
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',
|
224 |
array( 'jquery', 'cherry-js-core' ),
|
225 |
-
$this->
|
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(
|
|
|
|
|
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(
|
|
|
|
|
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(
|
859 |
-
|
|
|
|
|
|
|
|
|
|
|
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(
|
|
|
|
|
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(
|
|
|
|
|
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(
|
|
|
|
|
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(
|
|
|
|
|
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
|
|
|
|
|
|
|
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(
|
116 |
}
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
}
|
121 |
|
122 |
if ( ! empty( $this->args['ui_elements'] ) ) {
|
123 |
foreach ( $this->args['ui_elements'] as $ui_element ) {
|
124 |
-
require_once(
|
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 |
-
|
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',
|
80 |
array(),
|
81 |
-
|
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
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
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 =
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
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
|
93 |
-
|
94 |
$option_label = isset( $option_value ) && is_array( $option_value ) ? $option_value['label'] : $option_value;
|
95 |
-
$data_slave
|
96 |
|
97 |
$html .= '<div class="cherry-checkbox-item-wrap">';
|
98 |
-
$html .= '<
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
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
|
119 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-checkbox.min.js',
|
120 |
array( 'jquery' ),
|
121 |
-
|
122 |
true
|
123 |
);
|
124 |
|
125 |
wp_enqueue_style(
|
126 |
-
'ui-checkbox
|
127 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-checkbox.min.css',
|
128 |
array(),
|
129 |
-
|
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 =
|
60 |
-
|
|
|
|
|
|
|
|
|
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
|
83 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-colorpicker.min.js',
|
84 |
array( 'jquery', 'wp-color-picker' ),
|
85 |
-
|
86 |
true
|
87 |
);
|
88 |
|
89 |
wp_enqueue_style(
|
90 |
-
'ui-colorpicker
|
91 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-colorpicker.min.css',
|
92 |
array( 'wp-color-picker' ),
|
93 |
-
|
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 |
-
$
|
115 |
-
$class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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',
|
298 |
array(),
|
299 |
-
|
300 |
'all'
|
301 |
);
|
302 |
|
303 |
wp_enqueue_script(
|
304 |
'jquery-iconpicker',
|
305 |
-
esc_url( Cherry_Core::base_url( 'assets/min/jquery-iconpicker.min.js',
|
306 |
array( 'jquery' ),
|
307 |
-
|
308 |
true
|
309 |
);
|
310 |
|
311 |
wp_enqueue_script(
|
312 |
'ui-iconpicker',
|
313 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-iconpicker.min.js',
|
314 |
array( 'jquery' ),
|
315 |
-
|
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 =
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
161 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-media.min.js',
|
162 |
array( 'jquery', 'jquery-ui-sortable' ),
|
163 |
-
|
164 |
true
|
165 |
);
|
166 |
|
167 |
wp_enqueue_style(
|
168 |
-
'ui-media
|
169 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-media.min.css',
|
170 |
array(),
|
171 |
-
|
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,
|
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 =
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
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 |
-
$
|
90 |
-
|
91 |
-
$
|
|
|
|
|
92 |
$data_slave = isset( $option_value['slave'] ) && ! empty( $option_value['slave'] ) ? ' data-slave="' . $option_value['slave'] . '"' : '';
|
93 |
-
$class_box
|
|
|
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 |
-
|
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
|
117 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-radio.min.css',
|
118 |
array(),
|
119 |
-
|
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',
|
126 |
array( 'jquery' ),
|
127 |
-
|
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
|
222 |
-
|
|
|
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',
|
248 |
array(),
|
249 |
-
|
250 |
'all'
|
251 |
);
|
252 |
|
253 |
wp_enqueue_script(
|
254 |
'ui-repeater',
|
255 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-repeater.min.js',
|
256 |
array( 'wp-util', 'jquery-ui-sortable' ),
|
257 |
-
|
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
|
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.
|
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
|
|
|
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 =
|
90 |
-
|
|
|
|
|
|
|
|
|
91 |
|
92 |
$html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
|
|
|
|
|
93 |
|
94 |
-
|
|
|
95 |
|
96 |
-
|
97 |
-
|
|
|
98 |
|
99 |
-
|
100 |
-
$html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . $this->settings['label'] . '</label> ';
|
101 |
-
}
|
102 |
|
103 |
-
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
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( $
|
123 |
-
$
|
124 |
-
$data = 'data-slave="' . $option_value['slave'] . '"';
|
125 |
-
} else {
|
126 |
-
$lable = $option_value;
|
127 |
-
$data = '';
|
128 |
}
|
129 |
|
130 |
-
|
131 |
-
} else {
|
132 |
-
$html .= '<optgroup label="' . esc_attr( $option_value['label'] ) . '">';
|
133 |
$selected_state = '';
|
134 |
-
|
135 |
foreach ( $this->settings['value'] as $key => $value ) {
|
136 |
-
$selected_state = selected( $value, $
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
}
|
145 |
}
|
146 |
-
|
147 |
-
|
|
|
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',
|
162 |
array( 'jquery' ),
|
163 |
'4.0.3',
|
164 |
true
|
165 |
);
|
166 |
|
167 |
wp_enqueue_script(
|
168 |
-
'ui-select
|
169 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-select.min.js',
|
170 |
array( 'jquery' ),
|
171 |
-
|
172 |
true
|
173 |
);
|
174 |
|
175 |
wp_enqueue_style(
|
176 |
'ui-select-select2',
|
177 |
-
esc_url( Cherry_Core::base_url( 'assets/min/select2.min.css',
|
178 |
array(),
|
179 |
'4.0.3',
|
180 |
'all'
|
181 |
);
|
182 |
|
183 |
wp_enqueue_style(
|
184 |
-
'ui-select
|
185 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-select.min.css',
|
186 |
array(),
|
187 |
-
|
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 =
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
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
|
103 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-slider.min.js',
|
104 |
array( 'jquery' ),
|
105 |
-
|
106 |
true
|
107 |
);
|
108 |
|
109 |
wp_enqueue_style(
|
110 |
-
'ui-slider
|
111 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-slider.min.css',
|
112 |
array(),
|
113 |
-
|
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 |
-
$
|
65 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
88 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-stepper.min.css',
|
89 |
array(),
|
90 |
-
|
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 =
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
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
|
100 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-switcher.min.js',
|
101 |
array( 'jquery' ),
|
102 |
-
|
103 |
true
|
104 |
);
|
105 |
|
106 |
wp_enqueue_style(
|
107 |
-
'ui-switcher
|
108 |
-
esc_url( Cherry_Core::base_url( 'assets/min/ui-switcher.min.css',
|
109 |
array(),
|
110 |
-
|
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 =
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
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',
|
98 |
array(),
|
99 |
-
|
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 =
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
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',
|
84 |
array(),
|
85 |
-
|
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
|
|
|
|
|
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(
|
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 |
-
$
|
|
|
|
|
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
|
56 |
-
$
|
|
|
|
|
57 |
$title_cut = $this->cut_text( $title_cut, $args['length'], $args['trimmed_type'], $args['ending'] );
|
58 |
-
|
|
|
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(
|
|
|
|
|
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
|
|
|
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] $
|
184 |
* @return array
|
185 |
*/
|
186 |
-
public function get_terms_array( $tax = array( 'category' ), $
|
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(
|
|
|
|
|
|
|
|
|
197 |
if ( empty( $all_terms ) || is_wp_error( $all_terms ) ) {
|
198 |
return '';
|
199 |
}
|
200 |
|
201 |
foreach ( $all_terms as $term ) {
|
202 |
-
$terms[ $term
|
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['
|
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(
|
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 |
-
*
|
62 |
-
*
|
63 |
-
* @var array
|
64 |
-
*/
|
65 |
-
public $field_types = array();
|
66 |
-
|
67 |
-
/**
|
68 |
-
* UI builder instance
|
69 |
*
|
70 |
* @var object
|
71 |
*/
|
72 |
-
public $
|
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->
|
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,
|
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(
|
|
|
|
|
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 |
-
|
506 |
|
507 |
-
|
508 |
|
509 |
if ( isset( $setting['options_callback'] ) ) {
|
510 |
|
511 |
-
$callback
|
512 |
-
$options
|
|
|
|
|
513 |
|
514 |
-
} else {
|
515 |
-
$options = Cherry_Toolkit::get_arg( $setting, 'options', array() );
|
516 |
}
|
517 |
|
518 |
-
$
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
'
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
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 |
-
*
|
35 |
*
|
36 |
-
* @since 1.
|
|
|
37 |
* @var string
|
38 |
*/
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
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 |
-
|
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(
|
158 |
-
require_once(
|
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(
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
|
172 |
// Register JavaScripts.
|
173 |
-
wp_register_script(
|
|
|
|
|
|
|
|
|
|
|
|
|
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(
|
|
|
|
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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['
|
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['
|
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['
|
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['
|
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-team-members.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Cherry Team Members
|
4 |
* Plugin URI:
|
5 |
* Description: Cherry Team Members plugin allows you to showcase your team and personnel.
|
6 |
-
* Version: 1.4.
|
7 |
* Author: JetImpex
|
8 |
* Author URI: https://jetimpex.com/wordpress/
|
9 |
* Text Domain: cherry-team
|
3 |
* Plugin Name: Cherry Team Members
|
4 |
* Plugin URI:
|
5 |
* Description: Cherry Team Members plugin allows you to showcase your team and personnel.
|
6 |
+
* Version: 1.4.1
|
7 |
* Author: JetImpex
|
8 |
* Author URI: https://jetimpex.com/wordpress/
|
9 |
* Text Domain: cherry-team
|
languages/cherry-team.mo
CHANGED
Binary file
|
languages/cherry-team.pot
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: blank\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2017-
|
6 |
-
"PO-Revision-Date: 2017-
|
7 |
"Last-Translator: Vladimir Anokhin <ano.vladimir@gmail.com>\n"
|
8 |
"Language-Team: Cherry Team <support@cherryframework.com>\n"
|
9 |
"Language: su\n"
|
@@ -185,6 +185,7 @@ msgid "Options have been restored"
|
|
185 |
msgstr ""
|
186 |
|
187 |
#: admin/includes/class-cherry-team-options-page.php:493
|
|
|
188 |
msgid "Please wait, processing the previous request"
|
189 |
msgstr ""
|
190 |
|
@@ -291,101 +292,121 @@ msgstr ""
|
|
291 |
msgid "Use space between rows"
|
292 |
msgstr ""
|
293 |
|
294 |
-
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:
|
295 |
-
msgid "Home"
|
296 |
-
msgstr ""
|
297 |
-
|
298 |
-
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:352
|
299 |
msgid "Browse:"
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:
|
303 |
msgid "404 Not Found"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:
|
307 |
msgid "Archives"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:
|
311 |
#, php-format
|
312 |
msgid "Search results for “%s”"
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:
|
316 |
#, php-format
|
317 |
msgid "Page %s"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:
|
321 |
#, php-format
|
322 |
msgid "Minute %s"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:
|
326 |
#, php-format
|
327 |
msgid "Week %s"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: cherry-framework/modules/cherry-
|
|
|
|
|
|
|
|
|
331 |
msgid "Untitled Panel"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: cherry-framework/modules/cherry-customizer/cherry-customizer.php:
|
335 |
msgid "Untitled Section"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: cherry-framework/modules/cherry-customizer/cherry-customizer.php:
|
339 |
msgid "Untitled Control"
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:
|
343 |
#, php-format
|
344 |
msgid ""
|
345 |
"Module DB Updater init error in %s - version and slug is required arguments"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:
|
349 |
msgid "We need to update your database to the latest version."
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:
|
353 |
msgid "Update complete, thank you for updating to the latest version!"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:
|
357 |
msgid "Start Update"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:
|
361 |
msgid "Data Update"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: cherry-framework/modules/
|
365 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:
|
369 |
msgid "insert shortcode"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:
|
373 |
msgid "Shortcode List"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:
|
377 |
msgid "Shortcode not found."
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:
|
381 |
msgid "Shortcode content."
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:
|
385 |
msgid "Input shortcode content."
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:
|
389 |
msgid "Shortcode not a have options."
|
390 |
msgstr ""
|
391 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: blank\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2017-08-03 15:18+0200\n"
|
6 |
+
"PO-Revision-Date: 2017-08-03 15:18+0200\n"
|
7 |
"Last-Translator: Vladimir Anokhin <ano.vladimir@gmail.com>\n"
|
8 |
"Language-Team: Cherry Team <support@cherryframework.com>\n"
|
9 |
"Language: su\n"
|
185 |
msgstr ""
|
186 |
|
187 |
#: admin/includes/class-cherry-team-options-page.php:493
|
188 |
+
#: cherry-framework/modules/cherry-handler/cherry-handler.php:80
|
189 |
msgid "Please wait, processing the previous request"
|
190 |
msgstr ""
|
191 |
|
292 |
msgid "Use space between rows"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:338
|
|
|
|
|
|
|
|
|
296 |
msgid "Browse:"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:340
|
300 |
msgid "404 Not Found"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:341
|
304 |
msgid "Archives"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:342
|
308 |
#, php-format
|
309 |
msgid "Search results for “%s”"
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:343
|
313 |
#, php-format
|
314 |
msgid "Page %s"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:344
|
318 |
#, php-format
|
319 |
msgid "Minute %s"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:345
|
323 |
#, php-format
|
324 |
msgid "Week %s"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: cherry-framework/modules/cherry-breadcrumbs/cherry-breadcrumbs.php:365
|
328 |
+
msgid "Home"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: cherry-framework/modules/cherry-customizer/cherry-customizer.php:264
|
332 |
msgid "Untitled Panel"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: cherry-framework/modules/cherry-customizer/cherry-customizer.php:300
|
336 |
msgid "Untitled Section"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: cherry-framework/modules/cherry-customizer/cherry-customizer.php:334
|
340 |
msgid "Untitled Control"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:103
|
344 |
#, php-format
|
345 |
msgid ""
|
346 |
"Module DB Updater init error in %s - version and slug is required arguments"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:104
|
350 |
msgid "We need to update your database to the latest version."
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:105
|
354 |
msgid "Update complete, thank you for updating to the latest version!"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:329
|
358 |
msgid "Start Update"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: cherry-framework/modules/cherry-db-updater/cherry-db-updater.php:366
|
362 |
msgid "Data Update"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: cherry-framework/modules/cherry-handler/cherry-handler.php:76
|
366 |
+
msgid "Unable to process the request without nonce or server error"
|
367 |
+
msgstr ""
|
368 |
+
|
369 |
+
#: cherry-framework/modules/cherry-handler/cherry-handler.php:77
|
370 |
+
msgid "No right for this action"
|
371 |
+
msgstr ""
|
372 |
+
|
373 |
+
#: cherry-framework/modules/cherry-handler/cherry-handler.php:78
|
374 |
+
msgid "Stop CHEATING!!!"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: cherry-framework/modules/cherry-handler/cherry-handler.php:79
|
378 |
+
msgid "Access is allowed"
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
+
#: cherry-framework/modules/cherry-ui-elements/inc/class-cherry-lock-element.php:63
|
382 |
+
msgid "Unlocked in PRO"
|
383 |
+
msgstr ""
|
384 |
+
|
385 |
+
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-button.php:64
|
386 |
+
msgid "Cherry Shortcodes"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:125
|
390 |
msgid "insert shortcode"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:145
|
394 |
msgid "Shortcode List"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:203
|
398 |
msgid "Shortcode not found."
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:282
|
402 |
msgid "Shortcode content."
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:283
|
406 |
msgid "Input shortcode content."
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: cherry-framework/modules/cherry5-insert-shortcode/inc/class-cherry5-insertion-popup.php:298
|
410 |
msgid "Shortcode not a have options."
|
411 |
msgstr ""
|
412 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: TemplateMonster 2002
|
4 |
Tags: custom post type, team, cherry-framework, elementor, elementor builder
|
5 |
Requires at least: 4.5
|
6 |
-
Tested up to: 4.8.
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
3 |
Contributors: TemplateMonster 2002
|
4 |
Tags: custom post type, team, cherry-framework, elementor, elementor builder
|
5 |
Requires at least: 4.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 |
|