Make WordPress Core

Ticket #12445: menu.php.diff

File menu.php.diff, 1.3 KB (added by validBen, 15 years ago)
  • menu.php

     
    124124                $ptype_class = 'post';
    125125        }
    126126
     127        $ptype_id = sanitize_html_class($ptype);
     128
    127129        // if $ptype_menu_position is already populated or will be populated by a hard-coded value below, increment the position.
    128130        $core_menu_positions = array(59, 60, 65, 70, 75, 80, 85, 99);
    129131        while ( isset($menu[$ptype_menu_position]) || in_array($ptype_menu_position, $core_menu_positions) )
    130132                $ptype_menu_position++;
    131133
    132         $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->label ), $ptype_obj->edit_type_cap, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-' . $ptype_class, 'menu-' . $ptype_class, $menu_icon );
     134        $menu[$ptype_menu_position] = array( esc_attr( $ptype_obj->label ), $ptype_obj->edit_type_cap, "edit.php?post_type=$ptype", '', 'menu-top menu-icon-' . $ptype_class, 'menu-' . $ptype_id, $menu_icon );
    133135        $submenu["edit.php?post_type=$ptype"][5]  = array( __('Edit'), $ptype_obj->edit_type_cap,  "edit.php?post_type=$ptype");
    134136        /* translators: add new custom post type */
    135137        $submenu["edit.php?post_type=$ptype"][10]  = array( _x('Add New', 'post'), $ptype_obj->edit_type_cap, "post-new.php?post_type=$ptype" );