Admin menu filter

  1. shanept

    I recently came across a job where I needed a filter on the admin menu, and could not find any such feature after extensive searching.

    I have managed to come to my own solution, however it would be great to see one in WP.

    By editing the _wp_menu_output function in wp-admin/menu-header.php I changed the output to concatenating on a variable, and then was able to apply a filter (I called it admin_menu_output) which I output.

    This adds loads more functionality and customization to the admin menu.
    In my case, I wished to add submenu seperators, so I created menu items where the HTML came out something like:
    <li class="wp-submenu-seperator">SEPERATOR</li>

    Then I filtered this and was then able to achieve my goal.

    Posted: 7 years ago #
  2. jelnet


    Hi there - this sounds like a great idea and seems to be exactly what I'm looking for. Is it possible to see the code you created for your filter etc.?

    Posted: 3 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    3 Votes
  • Status

    This idea is under consideration