PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.2.02.01
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.2.02.01
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/FrmFieldsHelper.php +9 -67 6.4 → 5.2.02.01 View file →
@@ -158,9 +158,9 @@
158 158 if ( '' == $field_array['blank'] && '1' === $field_array['required'] ) {
159 159 $field_array['blank'] = $frm_settings->blank_msg;
160 160 }
161 161
162 - if ( '' === $field_array['invalid'] ) {
162 + if ( '' == $field_array['invalid'] ) {
163 163 if ( 'captcha' === $field->type ) {
164 164 $field_array['invalid'] = $frm_settings->re_msg;
165 165 } else {
166 166 /* translators: %s: Field name */
@@ -759,18 +759,13 @@
759 759
760 760 /**
761 761 * @param string $replace_with
762 762 * @param array $atts
763 - * @return string
764 763 */
765 764 private static function trigger_shortcode_atts( $replace_with, $atts ) {
766 - $supported_atts = array( 'remove_accents', 'sanitize', 'sanitize_url' );
765 + $supported_atts = array( 'sanitize', 'sanitize_url' );
767 766 $included_atts = array_intersect( $supported_atts, array_keys( $atts ) );
768 767 foreach ( $included_atts as $included_att ) {
769 - if ( '0' === $atts[ $included_att ] ) {
770 - // Skip any option that uses 0 so sanitize_url=0 does not encode.
771 - continue;
772 - }
773 768 $function = 'atts_' . $included_att;
774 769 $replace_with = self::$function( $replace_with, $atts );
775 770 }
776 771 return $replace_with;
@@ -776,21 +771,8 @@
776 771 return $replace_with;
777 772 }
778 773
779 774 /**
780 - * Converts all accent characters to ASCII characters.
781 - *
782 - * @since 6.3.1
783 - *
784 - * @param string $replace_with The text to remove accents from.
785 - *
786 - * @return string
787 - */
788 - public static function atts_remove_accents( $replace_with ) {
789 - return remove_accents( $replace_with );
790 - }
791 -
792 - /**
793 775 * @param string $replace_with
794 776 * @return string
795 777 */
796 778 private static function atts_sanitize( $replace_with ) {
@@ -1364,12 +1346,8 @@
1364 1346 $replace[] = '[' . $old . ']';
1365 1347 $replace_with[] = '[' . $new . ']';
1366 1348 $replace[] = '[' . $old . ' ';
1367 1349 $replace_with[] = '[' . $new . ' ';
1368 - $replace[] = 'field_id="' . $old . '"';
1369 - $replace_with[] = 'field_id="' . $new . '"';
1370 - $replace[] = 'field_id=\"' . $old . '\"';
1371 - $replace_with[] = 'field_id=\"' . $new . '\"';
1372 1350 unset( $old, $new );
1373 1351 }
1374 1352 if ( is_array( $val ) ) {
1375 1353 foreach ( $val as $k => $v ) {
@@ -1860,11 +1838,9 @@
1860 1838 }
1861 1839
1862 1840 /**
1863 1841 * @since 4.04
1864 - *
1865 1842 * @param array $args
1866 - * @return void
1867 1843 */
1868 1844 public static function show_add_field_buttons( $args ) {
1869 1845 $field_key = $args['field_key'];
1870 1846 $field_type = $args['field_type'];
@@ -1940,25 +1916,8 @@
1940 1916 *
1941 1917 * @param array $field Field data.
1942 1918 */
1943 1919 public static function show_radio_display_format( $field ) {
1944 - $options = self::get_display_format_options( $field );
1945 -
1946 - $args = self::get_display_format_args( $field, $options );
1947 -
1948 - include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/radio-display-format.php';
1949 - }
1950 -
1951 - /**
1952 - * Creates an array that contains variables used for display format options setting.
1953 - *
1954 - * @since 6.3.2
1955 - *
1956 - * @param array $field The field.
1957 - *
1958 - * @return array
1959 - */
1960 - public static function get_display_format_options( $field ) {
1961 1920 $options = array(
1962 1921 '0' => array(
1963 1922 'text' => __( 'Simple', 'formidable' ),
1964 1923 'svg' => 'frm_simple_radio',
@@ -1986,13 +1945,14 @@
1986 1945 *
1987 1946 * @since 5.0.04
1988 1947 *
1989 1948 * @param array $options Options.
1990 - * @param array $field
1991 1949 */
1992 - $options = apply_filters( 'frm_' . $field['type'] . '_display_format_options', $options, $field );
1950 + $options = apply_filters( 'frm_radio_display_format_options', $options );
1993 1951
1994 - return $options;
1952 + $args = self::get_display_format_args( $field, $options );
1953 +
1954 + include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/radio-display-format.php';
1995 1955 }
1996 1956
1997 1957 /**
1998 1958 * Gets display format arguments to pass to the images_dropdown() method.
@@ -2002,9 +1962,9 @@
2002 1962 * @param array $field Field data.
2003 1963 * @param array $options Options array.
2004 1964 * @return array
2005 1965 */
2006 - public static function get_display_format_args( $field, $options ) {
1966 + private static function get_display_format_args( $field, $options ) {
2007 1967 $args = array(
2008 1968 'selected' => '0',
2009 1969 'options' => array(),
2010 1970 'name' => 'field_options[image_options_' . $field['id'] . ']',
@@ -2022,9 +1982,9 @@
2022 1982 *
2023 1983 * @param array $args Arguments.
2024 1984 * @param array $method_args The arguments from the method. Contains `field`, `options`.
2025 1985 */
2026 - return apply_filters( 'frm_' . $field['type'] . '_display_format_args', $args, compact( 'field', 'options' ) );
1986 + return apply_filters( 'frm_radio_display_format_args', $args, compact( 'field', 'options' ) );
2027 1987 }
2028 1988
2029 1989 /**
2030 1990 * @since 5.0.04
@@ -2083,23 +2043,8 @@
2083 2043 return $custom_attrs;
2084 2044 }
2085 2045
2086 2046 /**
2087 - * Maybe adjust a field value based on type.
2088 - * Some types require unserializing an array (@see self::field_type_requires_unserialize).
2089 - *
2090 - * @since 6.2
2091 - *
2092 - * @param mixed $value
2093 - * @param string $field_type
2094 - * @return void
2095 - */
2096 - public static function prepare_field_value( &$value, $field_type ) {
2097 - $field_object = FrmFieldFactory::get_field_type( $field_type );
2098 - $value = $field_object->maybe_decode_value( $value );
2099 - }
2100 -
2101 - /**
2102 2047 * @deprecated 4.0
2103 2048 */
2104 2049 public static function show_icon_link_js( $atts ) {
2105 2050 _deprecated_function( __METHOD__, '4.0' );
@@ -2179,13 +2124,10 @@
2179 2124 return FrmDeprecated::get_default_field_opts( $type, $field, $limit );
2180 2125 }
2181 2126
2182 2127 /**
2183 - * @deprecated 2.02.07 This is still referenced in the Highrise add on as of v1.06.
2128 + * @deprecated 2.02.07
2184 2129 * @codeCoverageIgnore
2185 - *
2186 - * @param array $args
2187 - * @return string
2188 2130 */
2189 2131 public static function dropdown_categories( $args ) {
2190 2132 return FrmDeprecated::dropdown_categories( $args );
2191 2133 }