Simplify the condition for custom menu order

Nothing changed only simplified the use of condition for `custom_menu_order`.