Downloads Clubcommission
if ( ! function_exists('downloads') ) {
// Register Custom Post Type
function downloads() {
$labels = array(
'name' => _x( 'Downloads', 'Post Type General Name', 'cc' ),
'singular_name' => _x( 'Download', 'Post Type Singular Name', 'cc' ),
'menu_name' => __( 'Downloads', 'cc' ),
'name_admin_bar' => __( 'Downloads', 'cc' ),
'archives' => __( 'Download Archives', 'cc' ),
'attributes' => __( 'Download Attributes', 'cc' ),
'parent_item_colon' => __( 'Parent Download:', 'cc' ),
'all_items' => __( 'All Downloads', 'cc' ),
'add_new_item' => __( 'Add New Download', 'cc' ),
'add_new' => __( 'Add New', 'cc' ),
'new_item' => __( 'New Download', 'cc' ),
'edit_item' => __( 'Edit Download', 'cc' ),
'update_item' => __( 'Update Download', 'cc' ),
'view_item' => __( 'View Download', 'cc' ),
'view_items' => __( 'View Downloads', 'cc' ),
'search_items' => __( 'Search Download', 'cc' ),
'not_found' => __( 'Not found', 'cc' ),
'not_found_in_trash' => __( 'Not found in Trash', 'cc' ),
'featured_image' => __( 'Featured Image', 'cc' ),
'set_featured_image' => __( 'Set featured image', 'cc' ),
'remove_featured_image' => __( 'Remove featured image', 'cc' ),
'use_featured_image' => __( 'Use as featured image', 'cc' ),
'insert_into_item' => __( 'Insert into download', 'cc' ),
'uploaded_to_this_item' => __( 'Uploaded to this download', 'cc' ),
'items_list' => __( 'Items list', 'cc' ),
'items_list_navigation' => __( 'Downloads list navigation', 'cc' ),
'filter_items_list' => __( 'Filter downloads list', 'cc' ),
);
$args = array(
'label' => __( 'Download', 'cc' ),
'description' => __( 'Clubcommission downloads', 'cc' ),
'labels' => $labels,
'supports' => array( 'title', 'page-attributes' ),
'hierarchical' => false,
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 25,
'menu_icon' => 'dashicons-download',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => false,
'capability_type' => 'page',
);
register_post_type( 'downloads', $args );
}
add_action( 'init', 'downloads', 0 );
}