PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.16
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.16
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/shared/toggle.php +9 -1 6.46.16 View file →
@@ -19,8 +19,9 @@
19 19 $off_label = isset( $args['off_label'] ) ? $args['off_label'] : '';
20 20 $on_label = isset( $args['on_label'] ) ? $args['on_label'] : 1;
21 21 $value = isset( $args['value'] ) ? $args['value'] : $on_label;
22 22 $checked = isset( $args['checked'] ) && ( true === $args['checked'] || false !== strpos( $args['checked'], 'checked="checked"' ) );
23 +$disabled = ! empty( $args['disabled'] );
23 24 $aria_checked = $checked ? 'true' : 'false';
24 25 $input_html = isset( $args['input_html'] ) ? $args['input_html'] : array();
25 26
26 27 $use_container = false;
@@ -55,8 +56,11 @@
55 56 <?php checked( $checked, true ); ?>
56 57 <?php if ( $show_labels && $off_label ) { ?>
57 58 data-off="<?php echo esc_attr( $off_label ); ?>"
58 59 <?php } ?>
60 + <?php if ( $disabled ) { ?>
61 + disabled
62 + <?php } ?>
59 63 <?php
60 64 if ( is_array( $input_html ) ) {
61 65 FrmAppHelper::array_to_html_params( $input_html, true );
62 66 } else {
@@ -64,9 +68,13 @@
64 68 }
65 69 ?>
66 70 />
67 71
68 - <span class="frm_toggle" tabindex="0" role="switch" aria-labelledby="<?php echo esc_attr( $id ); ?>_label" aria-checked="<?php echo esc_attr( $aria_checked ); ?>">
72 + <span class="frm_toggle" tabindex="0" role="switch"
73 + <?php echo ! empty( $args['aria-label-attr'] ) ? 'aria-label="' . esc_attr( $args['aria-label-attr'] ) . '"' : ''; ?>
74 + aria-labelledby="<?php echo esc_attr( $id ); ?>_label"
75 + aria-checked="<?php echo esc_attr( $aria_checked ); ?>"
76 + >
69 77 <span class="frm_toggle_slider"></span>
70 78 </span>
71 79
72 80 <?php if ( $show_labels && $on_label != 1 ) { ?>