WordPress.org

Make WordPress Core

Changeset 17169


Ignore:
Timestamp:
12/29/2010 04:25:22 PM (7 years ago)
Author:
westi
Message:

Ensure the Parent menu is hilighted correctly when Custom Post Types are shown under an existing top level menu. Fixes #16015 props duck_.

File:
1 edited

Legend:

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

    r16847 r17169  
    163163        $submenu_file = "edit.php";
    164164    } else {
    165         $parent_file = "edit.php?post_type=$post_type";
     165        if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
     166            $parent_file = $post_type_object->show_in_menu;
     167        else
     168            $parent_file = "edit.php?post_type=$post_type";
    166169        $submenu_file = "edit.php?post_type=$post_type";
    167170    }
Note: See TracChangeset for help on using the changeset viewer.