PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
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/FrmStylesHelper.php +17 -3 6.31 → trunk View file →
@@ -867,11 +867,8 @@
867 867 $color = trim( $color );
868 868
869 869 if ( ! $color ) {
870 870 $color = $default;
871 - } elseif ( str_contains( $color, 'rgb(' ) ) {
872 - $color = str_replace( 'rgb(', 'rgba(', $color );
873 - $color = str_replace( ')', ',1)', $color );
874 871 } elseif ( ! str_contains( $color, '#' ) && self::is_hex( $color ) ) {
875 872 $color = '#' . $color;
876 873 }
877 874 }
@@ -887,8 +884,9 @@
887 884 * @return bool
888 885 */
889 886 private static function is_hex( $color ) {
890 887 $non_hex_substrings = array(
888 + 'rgb(',
891 889 'rgba(',
892 890 'hsl(',
893 891 'hsla(',
894 892 'hwb(',
@@ -925,8 +923,24 @@
925 923 $change_margin = '650px';
926 924 }
927 925
928 926 return $change_margin;
927 + }
928 +
929 + /**
930 + * Get the raw alignment value stored in the active style for a radio or checkbox field.
931 + *
932 + * @since 6.32
933 + *
934 + * @param array|int $field The 'field' array.
935 + *
936 + * @return string
937 + */
938 + public static function get_align_from_active_style( $field ) {
939 + $field_type = FrmField::is_checkbox( $field ) ? 'checkbox' : 'radio';
940 + $key = FrmStylesController::get_align_key_for_style_settings( $field_type );
941 +
942 + return FrmStylesController::get_active_style( $field )->post_content[ $key ] ?? '';
929 943 }
930 944
931 945 /**
932 946 * @since 2.3