[wp-trac] [WordPress Trac] #34446: WordPress Notice after add support for post type archives in menu

WordPress Trac noreply at wordpress.org
Mon Oct 26 08:53:33 UTC 2015


#34446: WordPress Notice after add support for post type archives in menu
------------------------------+------------------------------
 Reporter:  sebastian.pisula  |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Menus             |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+------------------------------

Comment (by sebastian.pisula):

 {{{
 register_post_type( 'news', array(
             'label'               => 'News',
             'labels'              => array(
                 'name'               => 'News',
                 'singular_name'      => 'News',
                 'menu_name'          => 'News',
                 'name_admin_bar'     => 'News',
                 'parent_item_colon'  => 'Parent news:',
                 'all_items'          => 'All news',
                 'add_new_item'       => 'Add new item',
                 'add_new'            => 'Add new',
                 'new_item'           => 'New Item',
                 'edit_item'          => 'Edit item',
                 'update_item'        => 'Update item',
                 'view_item'          => 'View item',
                 'search_items'       => 'Search items',
                 'not_found'          => 'Not Found',
                 'not_found_in_trash' => 'Not found in trash',
             ),
             'supports'            => array(
                 'title',
                 'editor',
                 'excerpt',
                 'author',
                 'thumbnail',
                 'comments',
                 'trackbacks',
                 'revisions',
                 'custom-fields',
                 'post-formats',
             ),
             'hierarchical'        => true,
             'public'              => true,
             'show_ui'             => true,
             'show_in_menu'        => true,
             'menu_position'       => 5,
             'menu_icon'           => 'dashicons-update',
             'show_in_admin_bar'   => true,
             'show_in_nav_menus'   => true,
             'can_export'          => true,
             'has_archive'         => 'news',
             'exclude_from_search' => false,
             'publicly_queryable'  => true,
             'rewrite'             => array(
                 'slug'       => 'news',
                 'with_front' => true,
                 'pages'      => true,
                 'feeds'      => true,
             ),
             'capability_type'     => 'page',
         ) );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34446#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list