From 2402993bc83993ef1b18a8492254420abe66a683 Mon Sep 17 00:00:00 2001 From: Jay Wood Date: Fri, 30 Sep 2016 10:43:14 -0400 Subject: [PATCH] Alter that a bit #45, #49 --- includes/settings.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/settings.php b/includes/settings.php index 74069bb..474bb44 100644 --- a/includes/settings.php +++ b/includes/settings.php @@ -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 );