Contributors
if ( ! function_exists('hm_register_cpt_contributors') ) {
// Register Custom Post Type
function hm_register_cpt_contributors() {
$labels = array(
'name' => _x( 'Contributors', 'Post Type General Name', 'hm_contributors' ),
'singular_name' => _x( 'Contributor', 'Post Type Singular Name', 'hm_contributors' ),
'menu_name' => __( 'Contributors', 'hm_contributors' ),
'name_admin_bar' => __( 'Contributors', 'hm_contributors' ),
'archives' => __( 'Contributors', 'hm_contributors' ),
'attributes' => __( 'Contributor Attributes', 'hm_contributors' ),
'parent_item_colon' => __( 'Parent Contributor:', 'hm_contributors' ),
'all_items' => __( 'All Contributors', 'hm_contributors' ),
'add_new_item' => __( 'Add New Contributor', 'hm_contributors' ),
'add_new' => __( 'Add New', 'hm_contributors' ),
'new_item' => __( 'New Contributor', 'hm_contributors' ),
'edit_item' => __( 'Edit Contributor', 'hm_contributors' ),
'update_item' => __( 'Update Contributor', 'hm_contributors' ),
'view_item' => __( 'View Contributor', 'hm_contributors' ),
'view_items' => __( 'View Contributors', 'hm_contributors' ),
'search_items' => __( 'Search Contributor', 'hm_contributors' ),
'not_found' => __( 'Not found', 'hm_contributors' ),
'not_found_in_trash' => __( 'Not found in Trash', 'hm_contributors' ),
'featured_image' => __( 'Featured Image', 'hm_contributors' ),
'set_featured_image' => __( 'Set featured image', 'hm_contributors' ),
'remove_featured_image' => __( 'Remove featured image', 'hm_contributors' ),
'use_featured_image' => __( 'Use as featured image', 'hm_contributors' ),
'insert_into_item' => __( 'Insert into Contributor', 'hm_contributors' ),
'uploaded_to_this_item' => __( 'Uploaded to this Contributor', 'hm_contributors' ),
'items_list' => __( 'Contributors list', 'hm_contributors' ),
'items_list_navigation' => __( 'Contributors list navigation', 'hm_contributors' ),
'filter_items_list' => __( 'Filter Contributors list', 'hm_contributors' ),
);
$args = array(
'label' => __( 'Contributor', 'hm_contributors' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ),
'taxonomies' => array( 'contributor_segment' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-superhero-alt',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'contributor', $args );
}
add_action( 'init', 'hm_register_cpt_contributors', 0 );
}