PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.22
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.22
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/helpers/FrmFieldGridHelper.php +1 -18 6.276.22 View file →
@@ -4,11 +4,8 @@
4 4 }
5 5
6 6 class FrmFieldGridHelper {
7 7
8 - /**
9 - * @var bool
10 - */
11 8 private $parent_li;
12 9
13 10 /**
14 11 * @var int
@@ -54,16 +51,10 @@
54 51 * @var int
55 52 */
56 53 private $section_size;
57 54
58 - /**
59 - * @var bool
60 - */
61 55 private $section_is_open = false;
62 56
63 - /**
64 - * @param bool $nested
65 - */
66 57 public function __construct( $nested = false ) {
67 58 $this->parent_li = false;
68 59 $this->current_list_size = 0;
69 60 $this->current_field_count = 0;
@@ -157,13 +148,11 @@
157 148 private function should_first_close_the_active_field_wrapper() {
158 149 if ( false === $this->parent_li || ! empty( $this->section_helper ) ) {
159 150 return false;
160 151 }
161 -
162 152 if ( 'end_divider' === $this->field->type ) {
163 153 return false;
164 154 }
165 -
166 155 return ! $this->can_support_current_layout() || $this->is_frm_first;
167 156 }
168 157
169 158 /**
@@ -177,9 +166,8 @@
177 166 }
178 167
179 168 /**
180 169 * @param string $class
181 - *
182 170 * @return int
183 171 */
184 172 private static function get_size_of_class( $class ) {
185 173 switch ( $class ) {
@@ -196,11 +184,10 @@
196 184 case 'frm_sixth':
197 185 return 2;
198 186 }
199 187
200 - if ( str_starts_with( $class, 'frm' ) ) {
188 + if ( 0 === strpos( $class, 'frm' ) ) {
201 189 $substr = substr( $class, 3 );
202 -
203 190 if ( is_numeric( $substr ) ) {
204 191 return (int) $substr;
205 192 }
206 193 }
@@ -222,13 +209,11 @@
222 209 }
223 210
224 211 if ( ! empty( $this->section_helper ) ) {
225 212 $this->section_helper->sync_list_size();
226 -
227 213 if ( 'end_divider' === $this->field->type ) {
228 214 $this->maybe_close_section_helper();
229 215 }
230 -
231 216 return;
232 217 }
233 218
234 219 if ( false !== $this->parent_li ) {
@@ -233,9 +218,8 @@
233 218
234 219 if ( false !== $this->parent_li ) {
235 220 ++$this->current_field_count;
236 221 $this->current_list_size += $this->active_field_size;
237 -
238 222 if ( 12 === $this->current_list_size ) {
239 223 $this->close_field_wrapper();
240 224 }
241 225 }
@@ -275,9 +259,8 @@
275 259 }
276 260
277 261 /**
278 262 * @param string $class
279 - *
280 263 * @return bool
281 264 */
282 265 private function can_support_an_additional_layout( $class ) {
283 266 $size = self::get_size_of_class( $class );