Skip to content

Commit 9537362

Browse files
committed
Change function name to make it more descriptive
1 parent d11b8af commit 9537362

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

classes/helpers/FrmFieldsHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,7 @@ private static function get_ai_generate_options_button_class() {
28172817
*
28182818
* @return bool
28192819
*/
2820-
public static function should_disable_option( $choice_key, $field ) {
2820+
public static function should_hide_field_choice( $choice_key, $field ) {
28212821
/**
28222822
* @since x.x
28232823
*
@@ -2856,7 +2856,7 @@ public static function should_skip_rendering_options_for_field( $field ) {
28562856
*
28572857
* @return bool
28582858
*/
2859-
public static function should_echo_disabled_attribute( $choice_key, $is_selected_choice, $field ) {
2859+
public static function should_disable_option( $choice_key, $is_selected_choice, $field ) {
28602860
/**
28612861
* @since x.x
28622862
*

classes/views/frm-fields/front-end/checkbox-field.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
continue;
2727
}
2828

29-
if ( FrmFieldsHelper::should_disable_option( $opt_key, $field ) ) {
29+
if ( FrmFieldsHelper::should_hide_field_choice( $opt_key, $field ) ) {
3030
continue;
3131
}
3232

@@ -57,7 +57,7 @@
5757
$other_opt = false;
5858
$other_args = FrmFieldsHelper::prepare_other_input( compact( 'field', 'field_name', 'opt_key', 'field_val' ), $other_opt, $checked );
5959

60-
$should_echo_disabled_att = FrmFieldsHelper::should_echo_disabled_attribute( $opt_key, $checked, $field );
60+
$should_echo_disabled_att = FrmFieldsHelper::should_disable_option( $opt_key, $checked, $field );
6161
?>
6262
<div class="<?php echo esc_attr( apply_filters( 'frm_checkbox_class', 'frm_checkbox', $field, $field_val ) ); ?>" id="<?php echo esc_attr( FrmFieldsHelper::get_checkbox_id( $field, $opt_key ) ); ?>"><?php
6363

classes/views/frm-fields/front-end/dropdown-field.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
}
5151

5252
foreach ( $field['options'] as $opt_key => $opt ) {
53-
if ( FrmFieldsHelper::should_disable_option( $opt_key, $field ) ) {
53+
if ( FrmFieldsHelper::should_hide_field_choice( $opt_key, $field ) ) {
5454
continue;
5555
}
5656

@@ -80,7 +80,7 @@
8080
$option_params['class'] = 'frm_other_trigger';
8181
}
8282

83-
if ( FrmFieldsHelper::should_echo_disabled_attribute( $opt_key, $selected, $field ) ) {
83+
if ( FrmFieldsHelper::should_disable_option( $opt_key, $selected, $field ) ) {
8484
$option_params['disabled'] = 'disabled';
8585
}
8686

classes/views/frm-fields/front-end/radio-field.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
continue;
2626
}
2727

28-
if ( FrmFieldsHelper::should_disable_option( $opt_key, $field ) ) {
28+
if ( FrmFieldsHelper::should_hide_field_choice( $opt_key, $field ) ) {
2929
continue;
3030
}
3131

@@ -45,7 +45,7 @@
4545
<div class="<?php echo esc_attr( apply_filters( 'frm_radio_class', 'frm_radio', $field, $field_val ) ); ?>" id="<?php echo esc_attr( FrmFieldsHelper::get_checkbox_id( $field, $opt_key, 'radio' ) ); ?>"><?php
4646

4747
$checked = FrmAppHelper::check_selected( $field['value'], $field_val ) ? 'checked="checked" ' : ' ';
48-
$should_echo_disabled_att = FrmFieldsHelper::should_echo_disabled_attribute( $opt_key, trim( $checked ) !== '', $field );
48+
$should_echo_disabled_att = FrmFieldsHelper::should_disable_option( $opt_key, trim( $checked ) !== '', $field );
4949

5050
if ( $include_label ) {
5151
$label_attributes = array(

0 commit comments

Comments
 (0)