nsrosenqvist/cmb2-post-types

This package is abandoned and no longer maintained. No replacement package was suggested.

1.0.0 2018-06-18 17:03 UTC

This package is auto-updated.

Last update: 2020-06-09 20:10:04 UTC


README

A multi-check field to select post types.

$list = new_cmb2_box(array(
    'id'            => 'list',
    'title'         => __('List', 'theme'),
));

$post_types = $list->add_field(array(
    'name' => __( 'Post Types Included In List', 'theme'),
    'id'   => 'post_types',
    'type'    => 'multicheck_post_type',
    'default' => ['page', 'post'],
));