| @@ -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 */ |
| @@ -491,14 +491,9 @@ | ||
| 491 | 491 | return FrmFieldsController::check_label( $opt ); |
| 492 | 492 | } |
| 493 | 493 | |
| 494 | 494 | /** |
| 495 | - * Shows the inline modal. | |
| 496 | - * | |
| 497 | 495 | * @since 4.0 |
| 498 | - * @since 6.4.1 Added `inside_class` in the arguments. | |
| 499 | - * | |
| 500 | - * @param array $args The arguments. | |
| 501 | 496 | */ |
| 502 | 497 | public static function inline_modal( $args ) { |
| 503 | 498 | $defaults = array( |
| 504 | 499 | 'id' => '', |
| @@ -506,9 +501,8 @@ | ||
| 506 | 501 | 'show' => 0, |
| 507 | 502 | 'callback' => array(), |
| 508 | 503 | 'args' => array(), |
| 509 | 504 | 'title' => '', |
| 510 | - 'inside_class' => 'inside', | |
| 511 | 505 | ); |
| 512 | 506 | $args = array_merge( $defaults, $args ); |
| 513 | 507 | |
| 514 | 508 | include( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/inline-modal.php' ); |
| @@ -765,18 +759,13 @@ | ||
| 765 | 759 | |
| 766 | 760 | /** |
| 767 | 761 | * @param string $replace_with |
| 768 | 762 | * @param array $atts |
| 769 | - * @return string | |
| 770 | 763 | */ |
| 771 | 764 | private static function trigger_shortcode_atts( $replace_with, $atts ) { |
| 772 | - $supported_atts = array( 'remove_accents', 'sanitize', 'sanitize_url' ); | |
| 765 | + $supported_atts = array( 'sanitize', 'sanitize_url' ); | |
| 773 | 766 | $included_atts = array_intersect( $supported_atts, array_keys( $atts ) ); |
| 774 | 767 | foreach ( $included_atts as $included_att ) { |
| 775 | - if ( '0' === $atts[ $included_att ] ) { | |
| 776 | - // Skip any option that uses 0 so sanitize_url=0 does not encode. | |
| 777 | - continue; | |
| 778 | - } | |
| 779 | 768 | $function = 'atts_' . $included_att; |
| 780 | 769 | $replace_with = self::$function( $replace_with, $atts ); |
| 781 | 770 | } |
| 782 | 771 | return $replace_with; |
| @@ -782,21 +771,8 @@ | ||
| 782 | 771 | return $replace_with; |
| 783 | 772 | } |
| 784 | 773 | |
| 785 | 774 | /** |
| 786 | - * Converts all accent characters to ASCII characters. | |
| 787 | - * | |
| 788 | - * @since 6.3.1 | |
| 789 | - * | |
| 790 | - * @param string $replace_with The text to remove accents from. | |
| 791 | - * | |
| 792 | - * @return string | |
| 793 | - */ | |
| 794 | - public static function atts_remove_accents( $replace_with ) { | |
| 795 | - return remove_accents( $replace_with ); | |
| 796 | - } | |
| 797 | - | |
| 798 | - /** | |
| 799 | 775 | * @param string $replace_with |
| 800 | 776 | * @return string |
| 801 | 777 | */ |
| 802 | 778 | private static function atts_sanitize( $replace_with ) { |
| @@ -1946,25 +1922,8 @@ | ||
| 1946 | 1922 | * |
| 1947 | 1923 | * @param array $field Field data. |
| 1948 | 1924 | */ |
| 1949 | 1925 | public static function show_radio_display_format( $field ) { |
| 1950 | - $options = self::get_display_format_options( $field ); | |
| 1951 | - | |
| 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'; | |
| 1955 | - } | |
| 1956 | - | |
| 1957 | - /** | |
| 1958 | - * Creates an array that contains variables used for display format options setting. | |
| 1959 | - * | |
| 1960 | - * @since 6.3.2 | |
| 1961 | - * | |
| 1962 | - * @param array $field The field. | |
| 1963 | - * | |
| 1964 | - * @return array | |
| 1965 | - */ | |
| 1966 | - public static function get_display_format_options( $field ) { | |
| 1967 | 1926 | $options = array( |
| 1968 | 1927 | '0' => array( |
| 1969 | 1928 | 'text' => __( 'Simple', 'formidable' ), |
| 1970 | 1929 | 'svg' => 'frm_simple_radio', |
| @@ -1992,13 +1951,14 @@ | ||
| 1992 | 1951 | * |
| 1993 | 1952 | * @since 5.0.04 |
| 1994 | 1953 | * |
| 1995 | 1954 | * @param array $options Options. |
| 1996 | - * @param array $field | |
| 1997 | 1955 | */ |
| 1998 | - $options = apply_filters( 'frm_' . $field['type'] . '_display_format_options', $options, $field ); | |
| 1956 | + $options = apply_filters( 'frm_radio_display_format_options', $options ); | |
| 1999 | 1957 | |
| 2000 | - 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'; | |
| 2001 | 1961 | } |
| 2002 | 1962 | |
| 2003 | 1963 | /** |
| 2004 | 1964 | * Gets display format arguments to pass to the images_dropdown() method. |
| @@ -2008,9 +1968,9 @@ | ||
| 2008 | 1968 | * @param array $field Field data. |
| 2009 | 1969 | * @param array $options Options array. |
| 2010 | 1970 | * @return array |
| 2011 | 1971 | */ |
| 2012 | - public static function get_display_format_args( $field, $options ) { | |
| 1972 | + private static function get_display_format_args( $field, $options ) { | |
| 2013 | 1973 | $args = array( |
| 2014 | 1974 | 'selected' => '0', |
| 2015 | 1975 | 'options' => array(), |
| 2016 | 1976 | 'name' => 'field_options[image_options_' . $field['id'] . ']', |
| @@ -2028,9 +1988,9 @@ | ||
| 2028 | 1988 | * |
| 2029 | 1989 | * @param array $args Arguments. |
| 2030 | 1990 | * @param array $method_args The arguments from the method. Contains `field`, `options`. |
| 2031 | 1991 | */ |
| 2032 | - 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' ) ); | |
| 2033 | 1993 | } |
| 2034 | 1994 | |
| 2035 | 1995 | /** |
| 2036 | 1996 | * @since 5.0.04 |
| @@ -2089,23 +2049,8 @@ | ||
| 2089 | 2049 | return $custom_attrs; |
| 2090 | 2050 | } |
| 2091 | 2051 | |
| 2092 | 2052 | /** |
| 2093 | - * Maybe adjust a field value based on type. | |
| 2094 | - * Some types require unserializing an array (@see self::field_type_requires_unserialize). | |
| 2095 | - * | |
| 2096 | - * @since 6.2 | |
| 2097 | - * | |
| 2098 | - * @param mixed $value | |
| 2099 | - * @param string $field_type | |
| 2100 | - * @return void | |
| 2101 | - */ | |
| 2102 | - public static function prepare_field_value( &$value, $field_type ) { | |
| 2103 | - $field_object = FrmFieldFactory::get_field_type( $field_type ); | |
| 2104 | - $value = $field_object->maybe_decode_value( $value ); | |
| 2105 | - } | |
| 2106 | - | |
| 2107 | - /** | |
| 2108 | 2053 | * @deprecated 4.0 |
| 2109 | 2054 | */ |
| 2110 | 2055 | public static function show_icon_link_js( $atts ) { |
| 2111 | 2056 | _deprecated_function( __METHOD__, '4.0' ); |
| @@ -2185,13 +2130,10 @@ | ||
| 2185 | 2130 | return FrmDeprecated::get_default_field_opts( $type, $field, $limit ); |
| 2186 | 2131 | } |
| 2187 | 2132 | |
| 2188 | 2133 | /** |
| 2189 | - * @deprecated 2.02.07 This is still referenced in the Highrise add on as of v1.06. | |
| 2134 | + * @deprecated 2.02.07 | |
| 2190 | 2135 | * @codeCoverageIgnore |
| 2191 | - * | |
| 2192 | - * @param array $args | |
| 2193 | - * @return string | |
| 2194 | 2136 | */ |
| 2195 | 2137 | public static function dropdown_categories( $args ) { |
| 2196 | 2138 | return FrmDeprecated::dropdown_categories( $args ); |
| 2197 | 2139 | } |