<?php

/**
 * Register a custom post type called "museum".
 *
 * @see get_post_type_labels() for label keys.
 */

function post_type__museum() {
    
    $labels = array(
        'name'                  => _x( 'Museum News', 'Post type general name', 'mpwbpk' ),
        'singular_name'         => _x( 'Museum News', 'Post type singular name', 'mpwbpk' ),
        'menu_name'             => _x( 'Museum News', 'Admin Menu text', 'mpwbpk' ),
        'name_admin_bar'        => _x( 'Museum News', 'Add New on Toolbar', 'mpwbpk' ),
        'add_new'               => __( 'Add Museum News', 'mpwbpk' ),
        'add_new_item'          => __( 'Add New Museum News', 'mpwbpk' ),
        'new_item'              => __( 'New Museum News', 'mpwbpk' ),
        'edit_item'             => __( 'Edit Museum News', 'mpwbpk' ),
        'view_item'             => __( 'View Museum News', 'mpwbpk' ),
        'all_items'             => __( 'All Museum News', 'mpwbpk' ),
        'search_items'          => __( 'Search Museum News', 'mpwbpk' ),
        'parent_item_colon'     => __( 'Parent News:', 'mpwbpk' ),
        'not_found'             => __( 'No Museum News found.', 'mpwbpk' ),
        'not_found_in_trash'    => __( 'No Museum News found in Trash.', 'mpwbpk' ),
        'featured_image'        => _x( 'News Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'mpwbpk' ),
        'set_featured_image'    => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'mpwbpk' ),
        'remove_featured_image' => _x( 'Remove cover image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'mpwbpk' ),
        'use_featured_image'    => _x( 'Use as cover image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'mpwbpk' ),
        'archives'              => _x( 'Museum News archives', 'The post type archive label used in nav menus. Default “Post Archives”. Added in 4.4', 'mpwbpk' ),
        'insert_into_item'      => _x( 'Insert into Museum News', 'Overrides the “Insert into post”/”Insert into page” phrase (used when inserting media into a post). Added in 4.4', 'mpwbpk' ),
        'uploaded_to_this_item' => _x( 'Uploaded to this Museum News', 'Overrides the “Uploaded to this post”/”Uploaded to this page” phrase (used when viewing media attached to a post). Added in 4.4', 'mpwbpk' ),
        'filter_items_list'     => _x( 'Filter Museum News list', 'Screen reader text for the filter links heading on the post type listing screen. Default “Filter posts list”/”Filter pages list”. Added in 4.4', 'mpwbpk' ),
        'items_list_navigation' => _x( 'Museum News list navigation', 'Screen reader text for the pagination heading on the post type listing screen. Default “Posts list navigation”/”Pages list navigation”. Added in 4.4', 'mpwbpk' ),
        'items_list'            => _x( 'Museum News list', 'Screen reader text for the items list heading on the post type listing screen. Default “Posts list”/”Pages list”. Added in 4.4', 'mpwbpk' ),
    );
 
    $args = array(
        'labels'             => $labels,
        'public'             => true, // false = Hide in SERP
        'menu_position'      => 5,
        'publicly_queryable' => true,
        'show_ui'            => true,
        'show_in_menu'       => true,
        'query_var'          => true,
        'rewrite'            => array( 'slug' => 'museum' ),
        'capability_type'    => 'post',
        'exclude_from_search' => false,
        'has_archive'        => true,
        'hierarchical'       => false,
        'menu_position'      => null,
        'supports'           => array( 'title', 'editor', 'thumbnail' ),
        'menu_icon'   		 => 'dashicons-media-document',
        'show_in_rest'       => true,
    );
 
    register_post_type( 'museum', $args );
}
 
add_action( 'init', 'post_type__museum' );