PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.16.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.16.1
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/FrmStylesCardHelper.php +20 -18 6.36.16.1 View file →
@@ -47,9 +47,9 @@
47 47
48 48 /**
49 49 * @param stdClass|WP_Post $active_style
50 50 * @param WP_Post $default_style
51 - * @param string|int $form_id
51 + * @param int|string $form_id
52 52 * @param bool $enabled
53 53 */
54 54 public function __construct( $active_style, $default_style, $form_id, $enabled ) {
55 55 $this->view_file_path = FrmAppHelper::plugin_path() . '/classes/views/styles/_style-card.php';
@@ -131,9 +131,9 @@
131 131 return apply_filters( 'frm_style_card_params', $params, compact( 'style' ) );
132 132 }
133 133
134 134 /**
135 - * @param WP_Post|stdClass $style
135 + * @param stdClass|WP_Post $style
136 136 * @return bool
137 137 */
138 138 private static function has_dark_background( $style ) {
139 139 $key = 'fieldset_bg_color';
@@ -162,9 +162,11 @@
162 162
163 163 /**
164 164 * @since 6.0
165 165 *
166 - * @param array $style API style data {
166 + * @param array $style {
167 + * API style data.
168 + *
167 169 * @type array $settings
168 170 * @type string $name
169 171 * @type string $slug
170 172 * }
@@ -193,14 +195,14 @@
193 195 * Set up a locked style card for the upgrade modal.
194 196 *
195 197 * @param array $params
196 198 * @param array $args {
197 - * @type WP_Post|stdClass $style
199 + * @type stdClass|WP_Post $style
198 200 * }
199 201 * @param stdClass $style_object
200 202 * @param array $style
201 203 */
202 - $param_filter = function( $params, $args ) use ( $style_object, $style ) {
204 + $param_filter = function ( $params, $args ) use ( $style_object, $style ) {
203 205 if ( $args['style'] !== $style_object ) {
204 206 return $params;
205 207 }
206 208
@@ -222,13 +224,13 @@
222 224 * @param array $params
223 225 * @param array $style
224 226 * @return array
225 227 */
226 - $param_filter = function( $params ) use ( $style ) {
228 + $param_filter = function ( $params ) use ( $style ) {
227 229 $params['data-template-key'] = $style['slug'];
228 230 return $params;
229 231 };
230 - }
232 + }//end if
231 233
232 234 $this->is_new_template = ! empty( $style['is_new'] );
233 235
234 236 add_filter( 'frm_style_card_params', $param_filter, 10, $this->locked ? 2 : 1 );
@@ -243,9 +245,9 @@
243 245 * It's kept static as it only requires a $style as input and also gets called when resetting a style.
244 246 *
245 247 * @since 6.0
246 248 *
247 - * @param WP_Post|stdClass $style A new style (including duplicated styles) is not a WP_Post object.
249 + * @param stdClass|WP_Post $style A new style (including duplicated styles) is not a WP_Post object.
248 250 * Template cards also use an stdClss instead of a WP_Post object.
249 251 * @return string
250 252 */
251 253 public static function get_style_param_for_card( $style ) {
@@ -393,9 +395,9 @@
393 395 * @param string $key The key for the API data. It may be a numeric ID, or a key like "active_sub" or "expires".
394 396 * @param int $count Used for pagination.
395 397 * @return void
396 398 */
397 - function( $style, $key ) use ( &$count ) {
399 + function ( $style, $key ) {
398 400 if ( ! is_numeric( $key ) ) {
399 401 // Skip active_sub/expires keys.
400 402 return;
401 403 }
@@ -414,16 +416,16 @@
414 416 $this->locked = false;
415 417 array_walk(
416 418 $styles,
417 419 /**
418 - * Echo a style card for a single style in the $styles array.
419 - *
420 - * @param WP_Post $style
421 - * @param int $count Used for pagination.
422 - * @return void
423 - */
424 - function( $style ) use ( &$count ) {
425 - $hidden = $count > ( self::PAGE_SIZE - 1 );
420 + * Echo a style card for a single style in the $styles array.
421 + *
422 + * @param WP_Post $style
423 + * @param int $count Used for pagination.
424 + * @return void
425 + */
426 + function ( $style ) use ( &$count ) {
427 + $hidden = $count > self::PAGE_SIZE - 1;
426 428 $this->echo_style_card( $style, $hidden );
427 429 ++$count;
428 430 }
429 431 );
@@ -481,9 +483,9 @@
481 483 /**
482 484 * @param WP_Post $style
483 485 * @return bool
484 486 */
485 - function( $style ) {
487 + function ( $style ) {
486 488 return $this->default_style->ID !== $style->ID;
487 489 }
488 490 );
489 491 }