Red 2.0 Grad Profiles
if ( ! function_exists('red2_grad') ) {
// Register Custom Post Type
function red2_grad() {
$labels = array(
'name' => _x( 'Graduate Student Profiles', 'Post Type General Name', 'red2' ),
'singular_name' => _x( 'Graduate Student Profile', 'Post Type Singular Name', 'red2' ),
'menu_name' => __( 'Graduate Student Profiles', 'red2' ),
'parent_item_colon' => __( 'Parent Graduate Student Profile:', 'red2' ),
'all_items' => __( 'All Graduate Student Profiles', 'red2' ),
'view_item' => __( 'View Graduate Student Profile', 'red2' ),
'add_new_item' => __( 'Add New Graduate Student Profile', 'red2' ),
'add_new' => __( 'Add New', 'red2' ),
'edit_item' => __( 'Edit Graduate Student Profile', 'red2' ),
'update_item' => __( 'Update Graduate Student Profile', 'red2' ),
'search_items' => __( 'Search Graduate Student Profiles', 'red2' ),
'not_found' => __( 'Not found', 'red2' ),
'not_found_in_trash' => __( 'Not found in Trash', 'red2' ),
);
$rewrite = array(
'slug' => 'graduate-profiles',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$capabilities = array(
'edit_post' => 'edit_gradprofile',
'read_post' => 'read_gradprofile',
'delete_post' => 'delete_gradprofile',
'edit_posts' => 'edit_gradprofiles',
'edit_others_posts' => 'edit_others_gradprofiles',
'publish_posts' => 'publish_gradprofiles',
'read_private_posts' => 'read_private_gradprofiles',
);
$args = array(
'label' => __( 'grad_profile', 'red2' ),
'description' => __( 'Graduate Student Profiles', 'red2' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', ),
'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-id',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capabilities' => $capabilities,
);
register_post_type( 'grad_profile', $args );
}
// Hook into the 'init' action
add_action( 'init', 'red2_grad', 0 );
}