Ready to get started?Download WordPress


WP 3.0 not aware of post_type and assigning "wp-has-current-submenu" incorrectly (1 post)

  1. benjitastic
    Posted 4 years ago #

    Using: WP 3.0 RC3

    I am creating a plugin and adding 2 submenu pages to appear under two custom content types ('Cars' and 'Trucks'). This issue is that WordPress assigns the "wp-has-current-submenu' to the first "edit.php" item even when another is selected.

    add_submenu_page('edit.php?post_type=cars', "Details", "Details", $minlevel,  __FILE__, 'main_details');
    add_submenu_page('edit.php?post_type=trucks', "Details", "Details", $minlevel,  __FILE__, 'main_details');

    So when I click "Details" under "Cars" or "Trucks" the "Pages" post_type menu item still receives the "wp-has-current-submenu" CSS class.

    Is there anyway to make the menu aware of &post_type when assigning the current CSS class instead of just placing it on the first edit.php?


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.