Version Description
- New: Add frm_sanitize_shortcodes hook. This hook allows shortcodes in field values to be processed rather than shown on the page.
- Fix: Stylesheets weren't saving correctly when multiple styles were used
Download this release
Release Info
Developer | sswells |
Plugin | Formidable Forms – Form Builder for WordPress |
Version | 3.01.02 |
Comparing to | |
See all releases |
Code changes from version 3.01.01 to 3.01.02
- classes/helpers/FrmAppHelper.php +2 -2
- classes/helpers/FrmFieldsHelper.php +16 -1
- classes/helpers/FrmStylesHelper.php +4 -4
- classes/views/shared/form-nav.php +1 -1
- formidable.php +1 -1
- readme.txt +5 -1
classes/helpers/FrmAppHelper.php
CHANGED
@@ -4,14 +4,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
}
|
5 |
|
6 |
class FrmAppHelper {
|
7 |
-
public static $db_version =
|
8 |
public static $pro_db_version = 37; //deprecated
|
9 |
public static $font_version = 3;
|
10 |
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
-
public static $plug_version = '3.01.
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
4 |
}
|
5 |
|
6 |
class FrmAppHelper {
|
7 |
+
public static $db_version = 88; //version of the database we are moving to
|
8 |
public static $pro_db_version = 37; //deprecated
|
9 |
public static $font_version = 3;
|
10 |
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
+
public static $plug_version = '3.01.02';
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
classes/helpers/FrmFieldsHelper.php
CHANGED
@@ -623,7 +623,7 @@ class FrmFieldsHelper {
|
|
623 |
$replace_with = self::get_value_for_shortcode( $atts );
|
624 |
|
625 |
if ( $replace_with !== null ) {
|
626 |
-
|
627 |
$content = str_replace( $shortcodes[0][ $short_key ], $replace_with, $content );
|
628 |
}
|
629 |
|
@@ -633,6 +633,21 @@ class FrmFieldsHelper {
|
|
633 |
return $content;
|
634 |
}
|
635 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
636 |
/**
|
637 |
* @since 3.0
|
638 |
*
|
623 |
$replace_with = self::get_value_for_shortcode( $atts );
|
624 |
|
625 |
if ( $replace_with !== null ) {
|
626 |
+
self::sanitize_embedded_shortcodes( compact( 'entry' ), $replace_with );
|
627 |
$content = str_replace( $shortcodes[0][ $short_key ], $replace_with, $content );
|
628 |
}
|
629 |
|
633 |
return $content;
|
634 |
}
|
635 |
|
636 |
+
/**
|
637 |
+
* Prevent shortcodes in fields from being processed
|
638 |
+
* @since 3.01.02
|
639 |
+
*
|
640 |
+
* @param array $atts - includes entry object
|
641 |
+
* @param string $value
|
642 |
+
*/
|
643 |
+
public static function sanitize_embedded_shortcodes( $atts, &$value ) {
|
644 |
+
$atts['value'] = $value;
|
645 |
+
$should_sanitize = apply_filters( 'frm_sanitize_shortcodes', true, $atts );
|
646 |
+
if ( $should_sanitize ) {
|
647 |
+
$value = str_replace( '[', '[', $value );
|
648 |
+
}
|
649 |
+
}
|
650 |
+
|
651 |
/**
|
652 |
* @since 3.0
|
653 |
*
|
classes/helpers/FrmStylesHelper.php
CHANGED
@@ -302,11 +302,11 @@ class FrmStylesHelper {
|
|
302 |
if ( isset( $_POST['frm_style_setting'] ) ) {
|
303 |
$settings = $_POST['frm_style_setting']['post_content'];
|
304 |
} else {
|
305 |
-
$settings = $
|
306 |
}
|
307 |
FrmAppHelper::sanitize_value( 'sanitize_text_field', $settings );
|
308 |
|
309 |
-
$style_name = FrmAppHelper::
|
310 |
$settings['style_class'] = '';
|
311 |
if ( ! empty( $style_name ) ) {
|
312 |
$settings['style_class'] = $style_name . '.';
|
@@ -393,11 +393,11 @@ class FrmStylesHelper {
|
|
393 |
}
|
394 |
|
395 |
/**
|
396 |
-
* Where is 'flat' being used?
|
397 |
* @since 2.3
|
398 |
*/
|
399 |
public static function previewing_style() {
|
400 |
-
|
|
|
401 |
}
|
402 |
|
403 |
/**
|
302 |
if ( isset( $_POST['frm_style_setting'] ) ) {
|
303 |
$settings = $_POST['frm_style_setting']['post_content'];
|
304 |
} else {
|
305 |
+
$settings = $_GET;
|
306 |
}
|
307 |
FrmAppHelper::sanitize_value( 'sanitize_text_field', $settings );
|
308 |
|
309 |
+
$style_name = FrmAppHelper::get_param( 'style_name', '', 'get', 'sanitize_title' );
|
310 |
$settings['style_class'] = '';
|
311 |
if ( ! empty( $style_name ) ) {
|
312 |
$settings['style_class'] = $style_name . '.';
|
393 |
}
|
394 |
|
395 |
/**
|
|
|
396 |
* @since 2.3
|
397 |
*/
|
398 |
public static function previewing_style() {
|
399 |
+
$ajax_change = isset( $_POST['action'] ) && $_POST['action'] === 'frm_change_styling' && isset( $_POST['frm_style_setting'] );
|
400 |
+
return $ajax_change || isset( $_GET['flat'] );
|
401 |
}
|
402 |
|
403 |
/**
|
classes/views/shared/form-nav.php
CHANGED
@@ -15,7 +15,7 @@ FrmFormsHelper::form_switcher();
|
|
15 |
|
16 |
<?php
|
17 |
if ( $form && 'show' === $title ) {
|
18 |
-
_deprecated_argument( 'title', '3.0' );
|
19 |
?>
|
20 |
<input id="title" type="text" value="<?php echo esc_attr( '' === $form->name ? __( '(no title)' ) : $form->name ) ?>" readonly="readonly" disabled="disabled" />
|
21 |
<?php } ?>
|
15 |
|
16 |
<?php
|
17 |
if ( $form && 'show' === $title ) {
|
18 |
+
_deprecated_argument( '$title in form-nav.php', '3.0' );
|
19 |
?>
|
20 |
<input id="title" type="text" value="<?php echo esc_attr( '' === $form->name ? __( '(no title)' ) : $form->name ) ?>" readonly="readonly" disabled="disabled" />
|
21 |
<?php } ?>
|
formidable.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Formidable Forms
|
4 |
Description: Quickly and easily create drag-and-drop forms
|
5 |
-
Version: 3.01.
|
6 |
Plugin URI: https://formidableforms.com/
|
7 |
Author URI: https://formidableforms.com/
|
8 |
Author: Strategy11
|
2 |
/*
|
3 |
Plugin Name: Formidable Forms
|
4 |
Description: Quickly and easily create drag-and-drop forms
|
5 |
+
Version: 3.01.02
|
6 |
Plugin URI: https://formidableforms.com/
|
7 |
Author URI: https://formidableforms.com/
|
8 |
Author: Strategy11
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: contact form, form builder, custom form, forms, form, form maker, form cre
|
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 3.01.
|
8 |
|
9 |
The best WordPress form plugin for contact forms, surveys and more. Make forms a breeze with a drag and drop form builder and form style generator.
|
10 |
|
@@ -159,6 +159,10 @@ The field and form names and descriptions are all changed with in-place edit. Ju
|
|
159 |
[See more FAQs](https://formidableforms.com/formidable-faqs/ "Formidable Form FAQs")
|
160 |
|
161 |
== Changelog ==
|
|
|
|
|
|
|
|
|
162 |
= 3.01.01 =
|
163 |
* New: Replace the jQuery colorpicker with the WordPress colorpicker in the visual form styler
|
164 |
* New: Process shortcodes in the redirect url after form submission
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 3.01.02
|
8 |
|
9 |
The best WordPress form plugin for contact forms, surveys and more. Make forms a breeze with a drag and drop form builder and form style generator.
|
10 |
|
159 |
[See more FAQs](https://formidableforms.com/formidable-faqs/ "Formidable Form FAQs")
|
160 |
|
161 |
== Changelog ==
|
162 |
+
= 3.01.02 =
|
163 |
+
* New: Add frm_sanitize_shortcodes hook. This hook allows shortcodes in field values to be processed rather than shown on the page.
|
164 |
+
* Fix: Stylesheets weren't saving correctly when multiple styles were used
|
165 |
+
|
166 |
= 3.01.01 =
|
167 |
* New: Replace the jQuery colorpicker with the WordPress colorpicker in the visual form styler
|
168 |
* New: Process shortcodes in the redirect url after form submission
|