true ], 'objects' ); $options = []; foreach ( $post_types as $pt ) { $options[] = [ 'value' => $pt->name, 'label' => $pt->label, ]; } return [ 'type' => 'select', 'options' => $options, ]; } }