• I have made a Theme, where I add theme options using add_menu_page(). I then use a filter to modify the submenu items slightly, with a function and add_filter( 'custom_menu_order', '__return_true' );

    When I install and activate Admin Menu Editor, my custom filter is suppressed. Why? Does Admin Menu Editor override all other filters interacting with the admin menu? Is there a way to fix this?

    https://www.ads-software.com/plugins/admin-menu-editor/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Letting users change the menu order is one of the main features of Admin Menu Editor. It does not suppress the custom_menu_order or menu_order filters in particular, but it does override the menu order in other ways.

    Are you looking for a way to override the custom menu order set by the end user? Or have you found a situation where the menu settings haven’t been changed at all (i.e. AME was just installed and no changes have been made yet), but your modified order still doesn’t work?

    Thread Starter Stian Andreassen

    (@stiand)

    I’m have a filter add_filter( 'menu_order', 'custom_submenu_order' ); where I make changes (renaming and reordering) the submenu for a menu page. The filter works fine, until I activate AME. Then it’s as if the filter is suppressed, all my changes are gone.

    Thread Starter Stian Andreassen

    (@stiand)

    Update: Seems like changing the filter from menu_order to admin_menu helped.

    Plugin Author Janis Elsts

    (@whiteshadow)

    It sounds like you’re directly modifying the global $submenu array, which is not what the menu_order filter was intended for. If you’re going to do that kind of thing, admin_menu would indeed be more appropriate.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Admin Menu Editor overrides custom_menu_order’ is closed to new replies.