Forum Replies Created

Viewing 1 replies (of 1 total)
  • Forum: Hacks
    In reply to: Add menu page without submenu

    Here’s a nice hack: In add_menu_page, pass a non-existent capability (and you can leave off the function):

    add_menu_page( "Myplugin", "Myplugin", "nosuchcapability", "Myplugin");

    The automatically-generated submenu is blocked by the capability check.

Viewing 1 replies (of 1 total)