CMC | MK | Tools | Extra View
if ( ! function_exists('extra_view_post_type') ) {
// Register Custom Post Type
function extra_view_post_type() {
$labels = array(
'name' => _x( 'Extra views', 'Post Type General Name', 'mktools' ),
'singular_name' => _x( 'Extra view', 'Post Type Singular Name', 'mktools' ),
'menu_name' => __( 'Extra view', 'mktools' ),
'parent_item_colon' => __( 'Parent view:', 'mktools' ),
'all_items' => __( 'All views', 'mktools' ),
'view_item' => __( 'View view', 'mktools' ),
'add_new_item' => __( 'Add new view', 'mktools' ),
'add_new' => __( 'Add view', 'mktools' ),
'edit_item' => __( 'Edit view', 'mktools' ),
'update_item' => __( 'Update view', 'mktools' ),
'search_items' => __( 'Search view', 'mktools' ),
'not_found' => __( 'Not found', 'mktools' ),
'not_found_in_trash' => __( 'Not found in Trash', 'mktools' ),
);
$rewrite = array(
'slug' => 'extra_view',
'with_front' => true,
'pages' => false,
'feeds' => false,
);
$args = array(
'label' => __( 'extra_view', 'mktools' ),
'description' => __( 'Extra views to use with camera positions', 'mktools' ),
'labels' => $labels,
'supports' => array( 'title', ),
'taxonomies' => array( 'mk_snapshot_position_ctax' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-tagcloud',
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'extra_view', $args );
}
// Hook into the 'init' action
add_action( 'init', 'extra_view_post_type', 0 );
}