public static function section_is_checked($sections, $section_id, $is_default)
{
// If no sections exist, return true if this is the default.
// If sections is an empty array, this is intentional though and nothing should be checked.
// If sections are provided, then only use those for matching.
if (empty($sections) && !is_array($sections) && 1 == $is_default || !empty($sections) && is_array($sections) && in_array($section_id, $sections)) {
return true;
} else {
return false;
}
}