HTTP/1.1 Class of Response
if ( ! function_exists('http_cor_post_type') ) {
// Register Custom Post Type
function http_cor_post_type() {
$labels = array(
'name' => _x( 'HTTP Classes of Response', 'Post Type General Name', 'rcce_http_cor' ),
'singular_name' => _x( 'HTTP Class of Response', 'Post Type Singular Name', 'rcce_http_cor' ),
'menu_name' => __( 'HTTP Classes of Response', 'rcce_http_cor' ),
'name_admin_bar' => __( 'HTTP Class of Response', 'rcce_http_cor' ),
'archives' => __( 'HTTP Class of Response Archives', 'rcce_http_cor' ),
'attributes' => __( 'HTTP Class of Response Attributes', 'rcce_http_cor' ),
'parent_item_colon' => __( 'Parent IHTTP Class of Response:', 'rcce_http_cor' ),
'all_items' => __( 'All HTTP Classes of Response', 'rcce_http_cor' ),
'add_new_item' => __( 'Add New HTTP Class of Response', 'rcce_http_cor' ),
'add_new' => __( 'Add New', 'rcce_http_cor' ),
'new_item' => __( 'New HTTP Class of Response', 'rcce_http_cor' ),
'edit_item' => __( 'Edit HTTP Class of Response', 'rcce_http_cor' ),
'update_item' => __( 'Update HTTP Class of Response', 'rcce_http_cor' ),
'view_item' => __( 'View HTTP Class of Response', 'rcce_http_cor' ),
'view_items' => __( 'View HTTP Classes of Response', 'rcce_http_cor' ),
'search_items' => __( 'Search HTTP Class of Response', 'rcce_http_cor' ),
'not_found' => __( 'Not found', 'rcce_http_cor' ),
'not_found_in_trash' => __( 'Not found in Trash', 'rcce_http_cor' ),
'featured_image' => __( 'Featured Image', 'rcce_http_cor' ),
'set_featured_image' => __( 'Set featured image', 'rcce_http_cor' ),
'remove_featured_image' => __( 'Remove featured image', 'rcce_http_cor' ),
'use_featured_image' => __( 'Use as featured image', 'rcce_http_cor' ),
'insert_into_item' => __( 'Insert into HTTP Class of Response', 'rcce_http_cor' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'rcce_http_cor' ),
'items_list' => __( 'HTTP Classes of Response list', 'rcce_http_cor' ),
'items_list_navigation' => __( 'HTTP Classes of Response list navigation', 'rcce_http_cor' ),
'filter_items_list' => __( 'Filter HTTP Classes of Response list', 'rcce_http_cor' ),
);
$capabilities = array(
'edit_post' => 'edit_item',
'read_post' => 'read_item',
'delete_post' => 'delete_item',
'edit_posts' => 'edit_items',
'edit_others_posts' => 'edit_others_items',
'publish_posts' => 'publish_items',
'read_private_posts' => 'read_private_items',
);
$args = array(
'label' => __( 'HTTP Class of Response', 'rcce_http_cor' ),
'description' => __( 'The first digit of the Status-Code defines the class of response (COR). The Reason-Phrase is intended to give a short textual description of the Status-Code.', 'rcce_http_cor' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'post-formats' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capabilities' => $capabilities,
'show_in_rest' => true,
);
register_post_type( 'httpcor', $args );
}
add_action( 'init', 'http_cor_post_type', 0 );
}