WordPress.org

Ready to get started?Download WordPress

Ideas

Admin menu filter

  1. shanept
    Member

    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: 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    1 Vote
  • Status

    This idea is under consideration