Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
octaedro committed Apr 28, 2023
1 parent 7eedad6 commit db314f1
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -76,7 +76,7 @@ public function init() {
public function add_option_to_list( $option ) {
$this->allowed_options[] = $option['id'];

if ( isset( $option[ 'options' ] ) ){
if ( isset( $option['options'] ) ) {
$this->dropdown_menu_options[] = $option['id'];
}

Expand Down Expand Up @@ -112,8 +112,8 @@ public function track_setting_change( $option_name, $old_value, $new_value ) {

if ( in_array( $option_name, $this->dropdown_menu_options, true ) ) {
$this->modified_options[ $option_name ] = $new_value;
// Check and save toggled options.
} elseif ( in_array( $new_value, array( 'yes', 'no' ), true ) && in_array( $old_value, array( 'yes', 'no' ), true ) ) {
// Save toggled options.
$option_state = 'yes' === $new_value ? 'enabled' : 'disabled';
$this->toggled_options[ $option_state ][] = $option_name;
}
Expand Down

0 comments on commit db314f1

Please sign in to comment.