$types = array();
$post_types = get_post_types(array('_builtin' => false), 'object');
foreach($post_types as $type){
$types[$type->name] = $type->labels->singular_name;
}
$meta_boxes[] = array(
'id' => 'seasons',
'title' => __( 'Seasons', 'textdomain' ),
'settings_pages' => 'tura-settings',
'tab' => 'seasons',
'fields' => array(
...,
array(
'name' => __( 'Custom Post Types', 'textdomain' ),
'id' => 'primary_schedule_post_types',
'type' => 'checkbox_list',
'options' => $types,
),
...,
),
);
The checkbox list never displays any options. If I output the $types array, it comes up blank - [] - once, before displaying properly several more times.