PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.14
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.14
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 +10 -14 6.256.14 View file →
@@ -95,9 +95,9 @@
95 95 *
96 96 * @return void
97 97 */
98 98 private static function disable_form_css() {
99 - add_filter( 'get_frm_stylesheet', '__return_empty_array' );
99 + add_filter( 'get_frm_stylesheet', '__return_false' );
100 100 }
101 101
102 102 /**
103 103 * Removing this action prevents front end JavaScript from loading.
@@ -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 }
@@ -539,9 +540,9 @@
539 540 $plugin_url = FrmAppHelper::plugin_url();
540 541 $version = FrmAppHelper::plugin_version();
541 542 $js_dependencies = array( 'wp-i18n', 'wp-hooks', 'formidable_dom' );
542 543
543 - if ( FrmAppHelper::pro_is_installed() && is_callable( 'FrmProAppHelper::use_jquery_datepicker' ) && FrmProAppHelper::use_jquery_datepicker() ) {
544 + if ( FrmAppHelper::pro_is_installed() ) {
544 545 $js_dependencies[] = 'jquery-ui-datepicker';
545 546 }
546 547
547 548 wp_register_script( 'formidable_style', $plugin_url . '/js/admin/style.js', $js_dependencies, $version );
@@ -743,9 +744,8 @@
743 744 public static function manage( $message = '', $forms = array() ) {
744 745 $frm_style = new FrmStyle();
745 746 $styles = $frm_style->get_all();
746 747 $default_style = $frm_style->get_default_style( $styles );
747 - $frm_settings = FrmAppHelper::get_settings();
748 748
749 749 if ( ! $forms ) {
750 750 $forms = FrmForm::get_published_forms();
751 751 }
@@ -763,14 +763,14 @@
763 763 global $wpdb;
764 764
765 765 $forms = FrmForm::get_published_forms();
766 766 foreach ( $forms as $form ) {
767 - if ( ! isset( $_POST['style'] ) || ! isset( $_POST['style'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
767 + $new_style = isset( $_POST['style'] ) && isset( $_POST['style'][ $form->id ] ) ? sanitize_text_field( wp_unslash( $_POST['style'][ $form->id ] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing
768 + $previous_style = isset( $_POST['prev_style'] ) && isset( $_POST['prev_style'][ $form->id ] ) ? sanitize_text_field( wp_unslash( $_POST['prev_style'][ $form->id ] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Missing
769 + if ( $new_style == $previous_style ) {
768 770 continue;
769 771 }
770 772
771 - $new_style = sanitize_text_field( wp_unslash( $_POST['style'][ $form->id ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
772 -
773 773 $form->options['custom_style'] = $new_style;
774 774 $wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $form->options ) ), array( 'id' => $form->id ) );
775 775 unset( $form );
776 776 }
@@ -1258,22 +1258,18 @@
1258 1258 if ( ! $first_open ) {
1259 1259 $first_open = true;
1260 1260 $open_class = 'open';
1261 1261 }
1262 -
1263 - $accordion_content_id = 'frm_style_section_' . $box['id'];
1264 1262 ?>
1265 1263 <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'] ); ?>">
1266 - <h3 class="accordion-section-title hndle">
1264 + <h3 class="accordion-section-title hndle" tabindex="0">
1267 1265 <?php
1268 - FrmAppHelper::icon_by_class( 'frmfont ' . $icon_id . ' frm_svg24' );
1266 + FrmAppHelper::icon_by_class( 'frmfont ' . $icon_id );
1269 1267 echo esc_html( $box['title'] );
1268 + FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown8_icon' );
1270 1269 ?>
1271 - <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'] ); ?>">
1272 - <?php FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown8_icon' ); ?>
1273 - </button>
1274 1270 </h3>
1275 - <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>" id="<?php echo esc_attr( $accordion_content_id ); ?>">
1271 + <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>">
1276 1272 <div class="inside">
1277 1273 <?php call_user_func( $box['callback'], $data_object, $box ); ?>
1278 1274 </div><!-- .inside -->
1279 1275 </div><!-- .accordion-section-content -->