Make WordPress Core


Ignore:
Timestamp:
02/06/2010 05:27:30 PM (17 years ago)
Author:
ryan
Message:

Add a separate show_ui flag for post types. see #9674

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r12984 r12993  
    8282$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
    8383
    84 foreach ( (array) get_post_types( array('_show' => true) ) as $ptype ) {
     84foreach ( (array) get_post_types( array('show_ui' => true) ) as $ptype ) {
    8585        $_wp_last_object_menu++;
    8686        $ptype_obj = get_post_type_object($ptype);
    87         $menu[$_wp_last_object_menu] = array(esc_attr($ptype_obj->label), 'edit_' . $ptype_obj->capability_type . 's', "edit.php?post_type=$ptype", '', 'menu-top', 'menu-posts', 'div');
     87        $menu[$_wp_last_object_menu] = array(esc_attr($ptype_obj->label), $ptype_obj->edit_type_cap, "edit.php?post_type=$ptype", '', 'menu-top', 'menu-posts', 'div');
    8888        $submenu["edit.php?post_type=$ptype"][5]  = array( __('Edit'), 'edit_posts',  "edit.php?post_type=$ptype");
    8989        /* translators: add new custom post type */
Note: See TracChangeset for help on using the changeset viewer.