Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dustin

    (@djboling)

    Ok, I found the declaration of the add_menu_page function and found that this is how you can change your code:

    Was:

    add_menu_page('Section', 'Section', 10, __FILE__, 'section');
    add_submenu_page(__FILE__, 'Edit', 'Edit', 10, 'section-edit', 'section_edit');

    Fixed:

    add_menu_page('Section', 'Section', 10, __FILE__, 'section');
    add_submenu_page(__FILE__, 'Edit', 'Edit', 10, __FILE__, 'section_edit');

    I personally use basename(__FILE__), so it would look like:

    add_menu_page('Section', 'Section', 10, basename(__FILE__), 'section');
    add_submenu_page(basename(__FILE__), 'Edit', 'Edit', 10, basename(__FILE__), 'section_edit');

    Hope this helps.

    Dustin

    (@djboling)

    I’d be very interested to learn about a solution to this as well. I find it a bit irritating. Maybe its a little OCD, but I really can’t stand the redundancy.

Viewing 2 replies - 1 through 2 (of 2 total)