WordPress.org

Make WordPress Core

Ticket #22561: 22561.patch

File 22561.patch, 727 bytes (added by ocean90, 3 years ago)
  • wp-admin/menu.php

     
    102102 
    103103foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false, 'show_in_menu' => true ) ) as $ptype ) { 
    104104        $ptype_obj = get_post_type_object( $ptype ); 
    105         // Check if it should be a submenu. 
    106         if ( $ptype_obj->show_in_menu !== true ) 
    107                 continue; 
    108105        $ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first. 
    109106        $ptype_for_id = sanitize_html_class( $ptype ); 
    110107        if ( is_string( $ptype_obj->menu_icon ) ) {