PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
← All changes | admin/views/sp-framework/fields/column/column.php +20 -20 2.3.62.2.10 View file →
@@ -76,9 +76,9 @@
76 76 $value = wp_parse_args( $this->value, $default_values );
77 77 $unit = ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? $args['units'][0] : '';
78 78 $is_unit = ( ! empty( $unit ) ) ? ' spf--is-unit' : '';
79 79
80 - echo wp_kses_post( $this->field_before() );
80 + echo $this->field_before();
81 81
82 82 echo '<div class="spf--inputs">';
83 83
84 84 $min = ( isset( $args['min'] ) ) ? ' min="' . $args['min'] . '"' : '';
@@ -86,11 +86,11 @@
86 86
87 87 $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . $args['all_placeholder'] . '"' : '';
88 88
89 89 echo '<div class="spf--input">';
90 - echo ( ! empty( $args['all_icon'] ) ) ? '<span class="spf--label spf--icon">' . wp_kses_post( $args['all_icon'] ) . '</span>' : '';
91 - echo '<input type="number" name="' . esc_attr( $this->field_name( '[all]' ) ) . '" value="' . esc_attr( $value['all'] ) . '"' . wp_kses_post( $placeholder ) . wp_kses_post( $min ) . ' class="spf-number" />';
92 - echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--unit">' . esc_html( $args['units'][0] ) . '</span>' : '';
90 + echo ( ! empty( $args['all_icon'] ) ) ? '<span class="spf--label spf--icon">' . $args['all_icon'] . '</span>' : '';
91 + echo '<input type="number" name="' . $this->field_name( '[all]' ) . '" value="' . $value['all'] . '"' . $placeholder . $min . ' class="spf-number" />';
92 + echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--unit">' . $args['units'][0] . '</span>' : '';
93 93 echo '</div>';
94 94
95 95 } else {
96 96
@@ -101,9 +101,9 @@
101 101 $properties[] = $prop;
102 102 }
103 103 }
104 104
105 - $properties = ( array( 'tablet', 'mobile' ) === $properties ) ? array_reverse( $properties ) : $properties;
105 + $properties = ( $properties === array( 'tablet', 'mobile' ) ) ? array_reverse( $properties ) : $properties;
106 106
107 107 foreach ( $properties as $property ) {
108 108
109 109 $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . $args[ $property . '_placeholder' ] . '"' : '';
@@ -108,11 +108,11 @@
108 108
109 109 $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . $args[ $property . '_placeholder' ] . '"' : '';
110 110
111 111 echo '<div class="spf--input">';
112 - echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="spf--label spf--icon">' . wp_kses_post( $args[ $property . '_icon' ] ) . '</span>' : '';
113 - echo '<input type="number" name="' . esc_attr( $this->field_name( '[' . $property . ']' ) ) . '" value="' . esc_attr( $value[ $property ] ) . '"' . wp_kses_post( $placeholder ) . wp_kses_post( $min ) . ' class="spf-number" />';
114 - echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--unit">' . esc_html( $args['units'][0] ) . '</span>' : '';
112 + echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="spf--label spf--icon">' . $args[ $property . '_icon' ] . '</span>' : '';
113 + echo '<input type="number" name="' . $this->field_name( '[' . $property . ']' ) . '" value="' . $value[ $property ] . '"' . $placeholder . $min . ' class="spf-number" />';
114 + echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--unit">' . $args['units'][0] . '</span>' : '';
115 115 echo '</div>';
116 116
117 117 }
118 118 }
@@ -119,12 +119,12 @@
119 119
120 120 if ( ! empty( $args['unit'] ) && count( $args['units'] ) > 1 ) {
121 121 echo '<div class="spf--input">';
122 122
123 - echo '<select name="' . esc_attr( $this->field_name( '[unit]' ) ) . '">';
123 + echo '<select name="' . $this->field_name( '[unit]' ) . '">';
124 124 foreach ( $args['units'] as $unit ) {
125 125 $selected = ( $value['unit'] === $unit ) ? ' selected' : '';
126 - echo '<option value="' . esc_attr( $unit ) . '"' . esc_attr( $selected ) . '>' . esc_html( $unit ) . '</option>';
126 + echo '<option value="' . $unit . '"' . $selected . '>' . $unit . '</option>';
127 127 }
128 128 echo '</select>';
129 129 echo '</div>';
130 130 }
@@ -130,9 +130,9 @@
130 130 }
131 131
132 132 echo '</div>';
133 133
134 - echo wp_kses_post( $this->field_after() );
134 + echo $this->field_after();
135 135
136 136 }
137 137
138 138 /**
@@ -137,9 +137,9 @@
137 137
138 138 /**
139 139 * The output function.
140 140 *
141 - * @return mixed
141 + * @return void
142 142 */
143 143 public function output() {
144 144
145 145 $output = '';
@@ -147,12 +147,12 @@
147 147 $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
148 148 $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
149 149
150 150 $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'padding';
151 - $mode = ( 'relative' === $mode || 'absolute' === $mode || 'none' === $mode ) ? '' : $mode;
151 + $mode = ( $mode === 'relative' || $mode === 'absolute' || $mode === 'none' ) ? '' : $mode;
152 152 $mode = ( ! empty( $mode ) ) ? $mode . '-' : '';
153 153
154 - if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && '' !== $this->value['all'] ) {
154 + if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && $this->value['all'] !== '' ) {
155 155
156 156 $output = $element . '{';
157 157 $output .= $mode . 'lg_desktop:' . $this->value['all'] . $unit . $important . ';';
158 158 $output .= $mode . 'desktop:' . $this->value['all'] . $unit . $important . ';';
@@ -162,15 +162,15 @@
162 162 $output .= '}';
163 163
164 164 } else {
165 165
166 - $lg_desktop = ( isset( $this->value['lg_desktop'] ) && '' !== $this->value['lg_desktop'] ) ? $mode . 'lg_desktop:' . $this->value['lg_desktop'] . $unit . $important . ';' : '';
167 - $desktop = ( isset( $this->value['desktop'] ) && '' !== $this->value['desktop'] ) ? $mode . 'desktop:' . $this->value['desktop'] . $unit . $important . ';' : '';
168 - $tablet = ( isset( $this->value['tablet'] ) && '' !== $this->value['tablet'] ) ? $mode . 'tablet:' . $this->value['tablet'] . $unit . $important . ';' : '';
169 - $mobile_landscape = ( isset( $this->value['mobile_landscape'] ) && '' !== $this->value['mobile_landscape'] ) ? $mode . 'mobile_landscape:' . $this->value['mobile_landscape'] . $unit . $important . ';' : '';
170 - $mobile = ( isset( $this->value['mobile'] ) && '' !== $this->value['mobile'] ) ? $mode . 'mobile:' . $this->value['mobile'] . $unit . $important . ';' : '';
166 + $lg_desktop = ( isset( $this->value['lg_desktop'] ) && $this->value['lg_desktop'] !== '' ) ? $mode . 'lg_desktop:' . $this->value['lg_desktop'] . $unit . $important . ';' : '';
167 + $desktop = ( isset( $this->value['desktop'] ) && $this->value['desktop'] !== '' ) ? $mode . 'desktop:' . $this->value['desktop'] . $unit . $important . ';' : '';
168 + $tablet = ( isset( $this->value['tablet'] ) && $this->value['tablet'] !== '' ) ? $mode . 'tablet:' . $this->value['tablet'] . $unit . $important . ';' : '';
169 + $mobile_landscape = ( isset( $this->value['mobile_landscape'] ) && $this->value['mobile_landscape'] !== '' ) ? $mode . 'mobile_landscape:' . $this->value['mobile_landscape'] . $unit . $important . ';' : '';
170 + $mobile = ( isset( $this->value['mobile'] ) && $this->value['mobile'] !== '' ) ? $mode . 'mobile:' . $this->value['mobile'] . $unit . $important . ';' : '';
171 171
172 - if ( '' !== $lg_desktop || '' !== $desktop || '' !== $tablet || '' !== $mobile_landscape || '' !== $mobile ) {
172 + if ( $lg_desktop !== '' || $desktop !== '' || $tablet !== '' || $mobile_landscape !== '' || $mobile !== '' ) {
173 173 $output = $element . '{' . $lg_desktop . $desktop . $tablet . $mobile_landscape . $mobile . '}';
174 174 }
175 175 }
176 176