PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.8
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.8
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/controllers/FrmStylesController.php +18 -11 6.46.8 View file →
@@ -200,9 +200,9 @@
200 200
201 201 if ( $frm_settings->load_style === 'all' ) {
202 202 $frm_vars['css_loaded'] = true;
203 203 }
204 - }
204 + }//end if
205 205 unset( $css );
206 206
207 207 add_filter( 'style_loader_tag', 'FrmStylesController::add_tags_to_css', 10, 2 );
208 208 }
@@ -401,9 +401,10 @@
401 401 // TODO: Show a message why a random form is being shown (because no form is assigned to the style).
402 402 // Fallback to any form.
403 403 $where = array(
404 404 'status' => 'published',
405 - 'parent_form_id' => array( null, 0 ), // Make sure it's not a repeater.
405 + // Make sure it's not a repeater.
406 + 'parent_form_id' => array( null, 0 ),
406 407 );
407 408 $form_id = FrmDb::get_var( 'frm_forms', $where, 'id' );
408 409 }
409 410
@@ -489,9 +490,10 @@
489 490 if ( $style_id === $default_style->ID && empty( $form->options['chat'] ) ) {
490 491 $style_id = 1;
491 492 }
492 493
493 - $form->options['custom_style'] = (string) $style_id; // We want to save a string for consistency. FrmStylesHelper::get_form_count_for_style expects the custom style ID is a string.
494 + // We want to save a string for consistency. FrmStylesHelper::get_form_count_for_style expects the custom style ID is a string.
495 + $form->options['custom_style'] = (string) $style_id;
494 496
495 497 global $wpdb;
496 498 $wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $form->options ) ), array( 'id' => $form->id ) );
497 499
@@ -541,9 +543,8 @@
541 543 *
542 544 * @since 6.0
543 545 *
544 546 * @param stdClass|WP_Post $active_style
545 - * @param array<WP_Post> $styles
546 547 * @param stdClass $form
547 548 * @param WP_Post $default_style
548 549 * @return void
549 550 */
@@ -548,13 +549,15 @@
548 549 * @return void
549 550 */
550 551 private static function render_style_page( $active_style, $form, $default_style ) {
551 552 $style_views_path = self::get_views_path();
552 - $view = FrmAppHelper::simple_get( 'frm_action', 'sanitize_text_field', 'list' ); // edit, list (default), new_style.
553 - $frm_style = new FrmStyle( $active_style->ID );
553 + // Edit, list (default), new_style.
554 + $view = FrmAppHelper::simple_get( 'frm_action', 'sanitize_text_field', 'list' );
555 + $frm_style = new FrmStyle( $active_style->ID );
554 556
555 557 if ( 'new_style' !== $view && ! FrmAppHelper::simple_get( 'form' ) && ! FrmAppHelper::simple_get( 'style_id' ) ) {
556 - $view = 'edit'; // Have the Appearance > Forms link fallback to the edit view. Otherwise we want to use 'list' as the default.
558 + // Have the Appearance > Forms link fallback to the edit view. Otherwise we want to use 'list' as the default.
559 + $view = 'edit';
557 560 }
558 561
559 562 if ( in_array( $view, array( 'edit', 'new_style', 'duplicate' ), true ) ) {
560 563 self::add_meta_boxes();
@@ -661,9 +664,10 @@
661 664
662 665 $id = $frm_style->update( $post_id );
663 666 if ( ! $post_id && $id ) {
664 667 self::maybe_redirect_after_save( $id );
665 - $post_id = reset( $id ); // Set the post id to the new style so it will be loaded for editing.
668 + // Set the post id to the new style so it will be loaded for editing.
669 + $post_id = reset( $id );
666 670 }
667 671
668 672 self::$message = __( 'Your styling settings have been saved.', 'formidable' );
669 673 }
@@ -895,9 +899,10 @@
895 899 );
896 900 global $wpdb;
897 901 $wpdb->update( $wpdb->posts, array( 'post_content' => $default_post_content ), $where );
898 902
899 - $frm_style->save_settings(); // Save the settings after resetting to default or the old style will still appear.
903 + // Save the settings after resetting to default or the old style will still appear.
904 + $frm_style->save_settings();
900 905
901 906 $data = array(
902 907 'style' => FrmStylesCardHelper::get_style_param_for_card( $frm_style->get_new() ),
903 908 );
@@ -916,10 +921,12 @@
916 921 FrmAppHelper::permission_check( 'frm_change_settings' );
917 922 check_ajax_referer( 'frm_ajax', 'nonce' );
918 923
919 924 $frm_style = new FrmStyle();
920 - $defaults = false; // Intentionally avoid defaults here so nothing gets removed from our style.
921 - $style = '';
925 +
926 + // Intentionally avoid defaults here so nothing gets removed from our style.
927 + $defaults = array();
928 + $style = '';
922 929
923 930 echo '<style type="text/css">';
924 931 include FrmAppHelper::plugin_path() . '/css/_single_theme.css.php';
925 932 echo '</style>';