PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.5
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.5
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 -61 6.3.25.5 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 ) {
@@ -1940,25 +1922,8 @@
1940 1922 *
1941 1923 * @param array $field Field data.
1942 1924 */
1943 1925 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 1926 $options = array(
1962 1927 '0' => array(
1963 1928 'text' => __( 'Simple', 'formidable' ),
1964 1929 'svg' => 'frm_simple_radio',
@@ -1986,13 +1951,14 @@
1986 1951 *
1987 1952 * @since 5.0.04
1988 1953 *
1989 1954 * @param array $options Options.
1990 - * @param array $field
1991 1955 */
1992 - $options = apply_filters( 'frm_' . $field['type'] . '_display_format_options', $options, $field );
1956 + $options = apply_filters( 'frm_radio_display_format_options', $options );
1993 1957
1994 - return $options;
1958 + $args = self::get_display_format_args( $field, $options );
1959 +
1960 + include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/radio-display-format.php';
1995 1961 }
1996 1962
1997 1963 /**
1998 1964 * Gets display format arguments to pass to the images_dropdown() method.
@@ -2002,9 +1968,9 @@
2002 1968 * @param array $field Field data.
2003 1969 * @param array $options Options array.
2004 1970 * @return array
2005 1971 */
2006 - public static function get_display_format_args( $field, $options ) {
1972 + private static function get_display_format_args( $field, $options ) {
2007 1973 $args = array(
2008 1974 'selected' => '0',
2009 1975 'options' => array(),
2010 1976 'name' => 'field_options[image_options_' . $field['id'] . ']',
@@ -2022,9 +1988,9 @@
2022 1988 *
2023 1989 * @param array $args Arguments.
2024 1990 * @param array $method_args The arguments from the method. Contains `field`, `options`.
2025 1991 */
2026 - return apply_filters( 'frm_' . $field['type'] . '_display_format_args', $args, compact( 'field', 'options' ) );
1992 + return apply_filters( 'frm_radio_display_format_args', $args, compact( 'field', 'options' ) );
2027 1993 }
2028 1994
2029 1995 /**
2030 1996 * @since 5.0.04
@@ -2083,23 +2049,8 @@
2083 2049 return $custom_attrs;
2084 2050 }
2085 2051
2086 2052 /**
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 2053 * @deprecated 4.0
2103 2054 */
2104 2055 public static function show_icon_link_js( $atts ) {
2105 2056 _deprecated_function( __METHOD__, '4.0' );
@@ -2179,13 +2130,10 @@
2179 2130 return FrmDeprecated::get_default_field_opts( $type, $field, $limit );
2180 2131 }
2181 2132
2182 2133 /**
2183 - * @deprecated 2.02.07 This is still referenced in the Highrise add on as of v1.06.
2134 + * @deprecated 2.02.07
2184 2135 * @codeCoverageIgnore
2185 - *
2186 - * @param array $args
2187 - * @return string
2188 2136 */
2189 2137 public static function dropdown_categories( $args ) {
2190 2138 return FrmDeprecated::dropdown_categories( $args );
2191 2139 }