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/views/frm-fields/front-end/radio-field.php +12 -4 6.29 → trunk View file →
@@ -7,9 +7,19 @@
7 7 * Show the radio field on the front-end.
8 8 * Extra line breaks show as space on the front-end when
9 9 * the form is double filtered and not minimized.
10 10 *
11 + * @var array $field
12 + * @var string $field_name
13 + * @var bool $read_only
14 + * @var string $html_id
15 + * @var array|null $args
16 + *
11 17 * @phpcs:disable Generic.WhiteSpace.ScopeIndent
18 + *
19 + * @since 6.30 Added `$hide_label`.
20 + *
21 + * @var bool $hide_label
12 22 */
13 23
14 24 if ( isset( $field['post_field'] ) && $field['post_field'] === 'post_category' ) {
15 25 $type = $field['type'];
@@ -17,9 +27,8 @@
17 27 } elseif ( is_array( $field['options'] ) ) {
18 28 if ( FrmFieldsHelper::should_skip_rendering_choices_for_field( $field ) ) {
19 29 return;
20 30 }
21 - $include_label = ! isset( $shortcode_atts ) || ! isset( $shortcode_atts['label'] ) || $shortcode_atts['label'];
22 31
23 32 foreach ( $field['options'] as $opt_key => $opt ) {
24 33 if ( isset( $shortcode_atts ) && isset( $shortcode_atts['opt'] ) && $shortcode_atts['opt'] !== $opt_key ) {
25 34 continue;
@@ -46,9 +55,9 @@
46 55
47 56 $checked = FrmAppHelper::check_selected( $field['value'], $field_val ) ? 'checked="checked" ' : ' ';
48 57 $should_echo_disabled_att = FrmFieldsHelper::should_disable_choice( $opt_key, trim( $checked ) !== '', $field );
49 58
50 - if ( $include_label ) {
59 + if ( empty( $hide_label ) ) {
51 60 $label_attributes = array(
52 61 'for' => $html_id . '-' . $opt_key,
53 62 );
54 63
@@ -72,10 +81,9 @@
72 81 if ( $should_echo_disabled_att ) {
73 82 echo 'disabled="disabled" ';
74 83 }
75 84 ?>/><?php
76 -
77 - if ( $include_label ) {
85 + if ( empty( $hide_label ) ) {
78 86 echo ' ';
79 87 FrmAppHelper::kses_echo( $label, 'all' );
80 88 FrmFieldsHelper::after_choice_input( $field, $opt_key );
81 89 echo '</label>';