Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #22022


Ignore:
Timestamp:
01/11/2013 03:34:39 AM (12 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22022

    • Property Cc jjharr added
    • Property Component changed from Menus to Administration
  • Ticket #22022 – Description

    initial v3  
    11The following code illustrates the problem.
    2 
    3 add_menu_page(‘My Pages’, ‘My Pages’, ‘edit_posts’, ‘parentslug’, array(class, func));
    4 add_submenu_page(‘parentslug’, ‘Settings’, ‘Settings’, ‘edit_posts’, ‘mysettings’, array(class, func));
    5 add_submenu_page(‘parentslug’, ‘Custom Post Type’, ‘Custom Post Type’, ‘edit_posts’, ‘edit.php?post_type=xxx’);
    6 
     2{{{
     3add_menu_page('My Pages', 'My Pages', 'edit_posts', 'parentslug', array(class, func));
     4add_submenu_page('parentslug', 'Settings', 'Settings', 'edit_posts', 'mysettings', array(class, func));
     5add_submenu_page('parentslug', 'Custom Post Type', 'Custom Post Type', 'edit_posts', 'edit.php?post_type=xxx');
     6}}}
    77When you click on the first submenu item, the menu stays open, displaying the submenu items as it should. When you click on the item for the custom post type, the parent menu is closed and submenu pages are not displayed.
    88