PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.19
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.19
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 +6 -26 6.25.16.19 View file →
@@ -123,8 +123,9 @@
123 123 FrmStyleComponent::register_assets();
124 124 self::load_pro_hooks();
125 125
126 126 $version = FrmAppHelper::plugin_version();
127 + wp_enqueue_script( 'jquery-ui-datepicker' );
127 128
128 129 if ( FrmAppHelper::is_style_editor_page( 'edit' ) ) {
129 130 wp_enqueue_style( 'wp-color-picker' );
130 131 }
@@ -496,10 +497,8 @@
496 497 wp_die( esc_html__( 'Form does not exist', 'formidable' ), esc_html__( 'Form does not exist', 'formidable' ), 400 );
497 498 return;
498 499 }
499 500
500 - $previous_style_id = $form->options['custom_style'];
501 -
502 501 // If the default style is selected, use the "Always use default" legacy option instead of the default style.
503 502 // There's also a check here for conversational forms.
504 503 // Without the check it isn't possible to select "Default" because "Always use default" will convert to "Lines" dynamically.
505 504 $default_style = self::get_default_style();
@@ -509,27 +508,13 @@
509 508
510 509 // We want to save a string for consistency. FrmStylesHelper::get_form_count_for_style expects the custom style ID is a string.
511 510 $form->options['custom_style'] = (string) $style_id;
512 511
513 - if ( $previous_style_id === $form->options['custom_style'] ) {
514 - // Exit early before updating DB if nothing actually changed.
515 - self::$message = __( 'Successfully updated style.', 'formidable' );
516 - return;
517 - }
518 -
519 512 global $wpdb;
520 513 $wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $form->options ) ), array( 'id' => $form->id ) );
521 514
522 515 FrmForm::clear_form_cache();
523 516
524 - /**
525 - * @since 6.25.1
526 - *
527 - * @param int $form_id
528 - * @param int $style_id
529 - */
530 - do_action( 'frm_after_changed_form_style', absint( $form_id ), absint( $style_id ) );
531 -
532 517 self::$message = __( 'Successfully updated style.', 'formidable' );
533 518 }
534 519
535 520 /**
@@ -555,9 +540,9 @@
555 540 $plugin_url = FrmAppHelper::plugin_url();
556 541 $version = FrmAppHelper::plugin_version();
557 542 $js_dependencies = array( 'wp-i18n', 'wp-hooks', 'formidable_dom' );
558 543
559 - if ( FrmAppHelper::pro_is_installed() && is_callable( 'FrmProAppHelper::use_jquery_datepicker' ) && FrmProAppHelper::use_jquery_datepicker() ) {
544 + if ( FrmAppHelper::pro_is_installed() ) {
560 545 $js_dependencies[] = 'jquery-ui-datepicker';
561 546 }
562 547
563 548 wp_register_script( 'formidable_style', $plugin_url . '/js/admin/style.js', $js_dependencies, $version );
@@ -698,15 +683,8 @@
698 683 // Set the post id to the new style so it will be loaded for editing.
699 684 $post_id = reset( $id );
700 685 }
701 686
702 - /**
703 - * @since 6.25.1
704 - *
705 - * @param int $post_id
706 - */
707 - do_action( 'frm_after_saved_style', absint( $post_id ) );
708 -
709 687 self::$message = __( 'Your styling settings have been saved.', 'formidable' );
710 688 }
711 689
712 690 /**
@@ -1287,13 +1265,15 @@
1287 1265 ?>
1288 1266 <li class="control-section accordion-section <?php echo esc_attr( $open_class ); ?> <?php echo esc_attr( $box['id'] ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>">
1289 1267 <h3 class="accordion-section-title hndle">
1290 1268 <?php
1291 - FrmAppHelper::icon_by_class( 'frmfont ' . $icon_id . ' frm_svg24' );
1269 + FrmAppHelper::icon_by_class( 'frmfont ' . $icon_id );
1292 1270 echo esc_html( $box['title'] );
1293 1271 ?>
1294 1272 <button type="button" aria-expanded="<?php echo esc_attr( 'open' === $open_class ? 'true' : 'false' ); ?>" aria-controls="<?php echo esc_attr( $accordion_content_id ); ?>" aria-label="<?php echo esc_attr( $box['title'] ); ?>">
1295 - <?php FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown8_icon' ); ?>
1273 + <?php
1274 + FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown8_icon' );
1275 + ?>
1296 1276 </button>
1297 1277 </h3>
1298 1278 <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>" id="<?php echo esc_attr( $accordion_content_id ); ?>">
1299 1279 <div class="inside">