Unyson - Version 2.7.10

Version Description

  • Fixed #2997,#2999
Download this release

Release Info

Developer Unyson
Plugin Icon 128x128 Unyson
Version 2.7.10
Comparing to
See all releases

Code changes from version 2.7.9 to 2.7.10

framework/core/components/backend.php CHANGED
@@ -652,23 +652,31 @@ final class _FW_Component_Backend {
652
 
653
  $values = fw_get_db_post_option( $post->ID );
654
 
655
- foreach ( $collected as $id => $option ) {
656
- if ( ! isset( $option['options'] ) || ! in_array( $option['type'], array( 'box', 'group' ) ) ) {
657
- continue;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
658
  }
659
-
660
- $context = isset( $option['context'] ) ? $option['context'] : 'normal';
661
- $priority = isset( $option['priority'] ) ? $option['priority'] : 'default';
662
-
663
- add_meta_box(
664
- "fw-options-{$option['type']}-{$id}",
665
- empty( $option['title'] ) ? ' ' : $option['title'],
666
- $this->print_meta_box_content_callback,
667
- $post_type,
668
- $context,
669
- $priority,
670
- $this->render_options( $option['options'], $values )
671
- );
672
  }
673
  }
674
 
652
 
653
  $values = fw_get_db_post_option( $post->ID );
654
 
655
+ foreach ( $collected as $id => &$option ) {
656
+ if ( isset( $option['options'] ) && ( $option['type'] === 'box' || $option['type'] === 'group' ) ) {
657
+ $context = isset( $option['context'] ) ? $option['context'] : 'normal';
658
+ $priority = isset( $option['priority'] ) ? $option['priority'] : 'default';
659
+
660
+ add_meta_box(
661
+ "fw-options-box-{$id}",
662
+ empty( $option['title'] ) ? ' ' : $option['title'],
663
+ $this->print_meta_box_content_callback,
664
+ $post_type,
665
+ $context,
666
+ $priority,
667
+ $this->render_options( $option['options'], $values )
668
+ );
669
+ } else { // this is not a box, wrap it in auto-generated box
670
+ add_meta_box(
671
+ 'fw-options-box:auto-generated:' . time() . ':' . fw_unique_increment(),
672
+ ' ',
673
+ $this->print_meta_box_content_callback,
674
+ $post_type,
675
+ 'normal',
676
+ 'default',
677
+ $this->render_options( array( $id => $option ), $values )
678
+ );
679
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
680
  }
681
  }
682
 
framework/includes/option-types/rgba-color-picker/class-fw-option-type-rgba-color-picker.php CHANGED
@@ -56,12 +56,7 @@ class FW_Option_Type_Rgba_Color_Picker extends FW_Option_Type {
56
  $option['attr']['value'] = $data['value'];
57
  $option['attr']['data-default'] = $option['value'];
58
 
59
- $palettes = (bool) $option['palettes'];
60
- if ( ! empty( $option['palettes'] ) && is_array( $option['palettes'] ) ) {
61
- $palettes = $option['palettes'];
62
- }
63
-
64
- $option['attr']['data-palettes'] = json_encode( $palettes );
65
 
66
  return '<input type="text" ' . fw_attr_to_html( $option['attr'] ) . ' data-alpha="true">';
67
  }
56
  $option['attr']['value'] = $data['value'];
57
  $option['attr']['data-default'] = $option['value'];
58
 
59
+ $option['attr']['data-palettes'] = ! empty( $option['palettes'] ) && is_array( $option['palettes'] ) ? json_encode( $option['palettes'] ) : '';
 
 
 
 
 
60
 
61
  return '<input type="text" ' . fw_attr_to_html( $option['attr'] ) . ' data-alpha="true">';
62
  }
framework/includes/option-types/rgba-color-picker/static/css/styles.css CHANGED
@@ -1,7 +1,3 @@
1
- .fw-backend-option-input-type-rgba-color-picker .iris-palette {
2
- height: 33px !important;
3
- width: 33px !important;
4
- }
5
  .fw-backend-option-input-type-rgba-color-picker .fw-option-help-in-input {
6
  top: 2px !important;
7
  }
@@ -18,4 +14,74 @@
18
  }
19
  .fw-backend-option-input-type-rgba-color-picker input {
20
  max-width: 140px !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  }
 
 
 
 
1
  .fw-backend-option-input-type-rgba-color-picker .fw-option-help-in-input {
2
  top: 2px !important;
3
  }
14
  }
15
  .fw-backend-option-input-type-rgba-color-picker input {
16
  max-width: 140px !important;
17
+ }
18
+ #customize-controls .customize-pane-child .customize-control:last-child .fw-backend-customizer-option .fw-backend-option-type-rgba-color-picker {
19
+ padding-bottom: 220px;
20
+ }
21
+ /* Picker WP style */
22
+ .wp-color-result {
23
+ background-color: #f7f7f7;
24
+ border: 1px solid #ccc;
25
+ -webkit-border-radius: 3px;
26
+ border-radius: 3px;
27
+ cursor: pointer;
28
+ height: 22px;
29
+ margin: 0 6px 6px 0;
30
+ position: relative;
31
+ -webkit-user-select: none;
32
+ -moz-user-select: none;
33
+ -ms-user-select: none;
34
+ user-select: none;
35
+ vertical-align: bottom;
36
+ display: inline-block;
37
+ padding-left: 30px;
38
+ -webkit-box-shadow: 0 1px 0 #ccc;
39
+ box-shadow: 0 1px 0 #ccc;
40
+ top: 0;
41
+ }
42
+ .wp-color-result:focus,
43
+ .wp-color-result:hover {
44
+ background: #fafafa;
45
+ border-color: #999;
46
+ color: #23282d;
47
+ }
48
+ .wp-color-result:after {
49
+ background: #f7f7f7;
50
+ -webkit-border-radius: 0 2px 2px 0;
51
+ border-radius: 0 2px 2px 0;
52
+ border-left: 1px solid #ccc;
53
+ color: #555;
54
+ content: attr(title);
55
+ display: block;
56
+ font-size: 11px;
57
+ line-height: 22px;
58
+ padding: 0 6px;
59
+ position: relative;
60
+ right: 0;
61
+ text-align: center;
62
+ top: 0;
63
+ }
64
+ .wp-color-result.wp-picker-open:after {
65
+ content: attr(data-current);
66
+ }
67
+ .wp-color-result:focus:after,
68
+ .wp-color-result:hover:after {
69
+ color: #23282d;
70
+ border-color: #a0a5aa;
71
+ border-left: 1px solid #999;
72
+ }
73
+ .wp-picker-open+.wp-picker-input-wrap {
74
+ display: inline-block;
75
+ vertical-align: top;
76
+ }
77
+ .wp-picker-container input[type=text].wp-color-picker {
78
+ width: 65px;
79
+ height: 25px;
80
+ font-size: 12px;
81
+ font-family: monospace;
82
+ line-height: 16px;
83
+ margin: 0;
84
+ }
85
+ .wp-picker-container .button {
86
+ margin-left: 6px;
87
  }
framework/includes/option-types/simple.php CHANGED
@@ -560,19 +560,16 @@ class FW_Option_Type_Checkboxes extends FW_Option_Type {
560
  if ( is_array( $input_value ) ) {
561
  $value = array();
562
 
563
- foreach ($option['choices'] as $choice => $choice_value){
564
- if (isset($input_value[$choice]) && $input_value[$choice] ) {
565
- // Handle boolean values that got lost into the universe
566
- // and somehow become strings by the miracle of
567
- // PHP's $_POST parsing
568
- $value[$choice] = is_string(
569
- $input_value[$choice]
570
- ) ? $input_value[$choice] === 'true' : true;
571
- } else {
572
- // If the value's missing from the input it is falsy,
573
- // for sure
574
- $value[$choice] = false;
575
  }
 
 
576
  }
577
  } else {
578
  $value = $option['value'];
560
  if ( is_array( $input_value ) ) {
561
  $value = array();
562
 
563
+ foreach ( $input_value as $choice => $val ) {
564
+ if ( $val === '' ) {
565
+ continue;
566
+ }
567
+
568
+ if ( ! isset( $option['choices'][ $choice ] ) ) {
569
+ continue;
 
 
 
 
 
570
  }
571
+
572
+ $value[$choice] = true;
573
  }
574
  } else {
575
  $value = $option['value'];
framework/manifest.php CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
- $manifest['version'] = '2.7.9';
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
+ $manifest['version'] = '2.7.10';
framework/views/backend-settings-form.php CHANGED
@@ -277,7 +277,7 @@
277
  }
278
  );
279
  } else {
280
- fw.soleModal.hide();
281
  }
282
  } while(false);
283
 
277
  }
278
  );
279
  } else {
280
+ fw.soleModal.hide('fw-options-ajax-save-success');
281
  }
282
  } while(false);
283
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson
3
  Tags: page builder, shortcodes, backup, seo, breadcrumbs, portfolio, framework
4
  Requires at least: 4.4
5
  Tested up to: 4.8
6
- Stable tag: 2.7.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -85,6 +85,9 @@ Yes; Unyson will work with any theme.
85
 
86
  == Changelog ==
87
 
 
 
 
88
  = 2.7.9 =
89
  * Fixed [#1351](https://github.com/ThemeFuse/Unyson/issues/1351),[#2716](https://github.com/ThemeFuse/Unyson/issues/2716),[#2833](https://github.com/ThemeFuse/Unyson/issues/2833),[#2736](https://github.com/ThemeFuse/Unyson/issues/2736),[#2718](https://github.com/ThemeFuse/Unyson/issues/2718),[#2953](https://github.com/ThemeFuse/Unyson/issues/2953),[#2888](https://github.com/ThemeFuse/Unyson/issues/2888),[#2855](https://github.com/ThemeFuse/Unyson/issues/2855),[#2906](https://github.com/ThemeFuse/Unyson/issues/2906)
90
 
3
  Tags: page builder, shortcodes, backup, seo, breadcrumbs, portfolio, framework
4
  Requires at least: 4.4
5
  Tested up to: 4.8
6
+ Stable tag: 2.7.10
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
85
 
86
  == Changelog ==
87
 
88
+ = 2.7.10 =
89
+ * Fixed [#2997](https://github.com/ThemeFuse/Unyson/issues/2997),[#2999](https://github.com/ThemeFuse/Unyson/pull/2999)
90
+
91
  = 2.7.9 =
92
  * Fixed [#1351](https://github.com/ThemeFuse/Unyson/issues/1351),[#2716](https://github.com/ThemeFuse/Unyson/issues/2716),[#2833](https://github.com/ThemeFuse/Unyson/issues/2833),[#2736](https://github.com/ThemeFuse/Unyson/issues/2736),[#2718](https://github.com/ThemeFuse/Unyson/issues/2718),[#2953](https://github.com/ThemeFuse/Unyson/issues/2953),[#2888](https://github.com/ThemeFuse/Unyson/issues/2888),[#2855](https://github.com/ThemeFuse/Unyson/issues/2855),[#2906](https://github.com/ThemeFuse/Unyson/issues/2906)
93
 
unyson.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Unyson
4
  * Plugin URI: http://unyson.io/
5
  * Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
6
- * Version: 2.7.9
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+
3
  * Plugin Name: Unyson
4
  * Plugin URI: http://unyson.io/
5
  * Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
6
+ * Version: 2.7.10
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+