Skip to content

Commit

Permalink
Alter that a bit #45, #49
Browse files Browse the repository at this point in the history
  • Loading branch information
JayWood committed Sep 30, 2016
1 parent 873cbd0 commit 2402993
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions includes/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ private function get_default_args( $args ) {
}

private function checked_array( $haystack, $cur, $show = true ) {
if ( is_array( $haystack ) && in_array( $cur, $haystack ) ) {
$cur = $haystack = 1;
}
if ( is_array( $haystack ) ) { //if $haystack is still an array, take first value
$haystack = array_shift( $haystack );
if ( is_array( $haystack ) ) {
if ( in_array( $cur, $haystack ) ) {
$cur = $haystack = 1;
} else {
$cur = 0;
$haystack = 1;
}
}

return checked( $haystack, $cur, $show );
Expand Down

0 comments on commit 2402993

Please sign in to comment.