Skip to content

Commit

Permalink
refactor: updates spaces with tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathan-Amaankhan committed Apr 12, 2024
1 parent b4f8715 commit 8699ac1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions admin/partials/nginx-helper-general-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,24 @@
$nginx_helper_admin->nginx_helper_default_settings()
);

$site_options = get_site_option( 'rt_wp_nginx_helper_options', array() );
$site_options = get_site_option( 'rt_wp_nginx_helper_options', array() );

foreach ( $nginx_helper_admin->nginx_helper_default_settings() as $default_setting_field => $default_setting_value ) {
foreach ( $nginx_helper_admin->nginx_helper_default_settings() as $default_setting_field => $default_setting_value ) {

// Uncheck checkbox fields whose default value is `1` but user has unchecked.
if ( 1 === $default_setting_value && isset( $site_options[ $default_setting_field ] ) && empty( $all_inputs[ $default_setting_field ] ) ) {
// Uncheck checkbox fields whose default value is `1` but user has unchecked.
if ( 1 === $default_setting_value && isset( $site_options[ $default_setting_field ] ) && empty( $all_inputs[ $default_setting_field ] ) ) {

$nginx_settings[ $default_setting_field ] = 0;
$nginx_settings[ $default_setting_field ] = 0;

}
}

// Populate the setting field with default value when it is empty.
if ( '' === $nginx_settings[ $default_setting_field ] ) {
// Populate the setting field with default value when it is empty.
if ( '' === $nginx_settings[ $default_setting_field ] ) {

$nginx_settings[ $default_setting_field ] = $default_setting_value;
$nginx_settings[ $default_setting_field ] = $default_setting_value;

}
}
}
}

if ( ( ! is_numeric( $nginx_settings['log_filesize'] ) ) || ( empty( $nginx_settings['log_filesize'] ) ) ) {
$error_log_filesize = __( 'Log file size must be a number.', 'nginx-helper' );
Expand Down

0 comments on commit 8699ac1

Please sign in to comment.