Admin_Apple_Meta_Boxes::section_is_checked PHP Method

section_is_checked() public static method

Determine if a section is checked
public static section_is_checked ( array $sections, integer $section_id, integer $is_default )
$sections array
$section_id integer
$is_default integer
    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;
        }
    }