diff --git a/includes/admin/class-wp-job-manager-settings.php b/includes/admin/class-wp-job-manager-settings.php index 1fa65b9aa..70f908cd7 100644 --- a/includes/admin/class-wp-job-manager-settings.php +++ b/includes/admin/class-wp-job-manager-settings.php @@ -855,15 +855,14 @@ protected function multiple_choice_output( $option, $value, $type ) { echo '
' . wp_kses_post( $option['desc'] ) . '
'; } foreach ( $option['options'] as $key => $name ) { - $input_name = esc_attr( 'checkbox' === $type ? $option['name'] . '[fields][]' : $option['name'] ); - $input_type = esc_attr( $type ); - $input_value = esc_attr( 'checkbox' === $type ? strtolower( $name ) : $key ); - $is_checked = 'checkbox' === $type - ? checked( isset( $value['fields'] ) && is_array( $value['fields'] ) && in_array( strtolower( $name ), $value['fields'], true ), true, 0 ) + $input_name = esc_attr( 'checkbox' === $type ? $option['name'] . '[fields][' . $key . ']' : $option['name'] ); + $input_type = esc_attr( $type ); + $is_checked = 'checkbox' === $type + ? checked( isset( $value['fields'] ) && is_array( $value['fields'] ) && in_array( $key, $value['fields'], true ), true, 0 ) : checked( $value, $key, false ); - $label = esc_html( $name ); + $label = esc_html( $name ); - echo "