[wp-trac] [WordPress Trac] #25359: Add a filter in add_menu_page()
WordPress Trac
noreply at wordpress.org
Thu Sep 19 23:09:38 UTC 2013
#25359: Add a filter in add_menu_page()
-----------------------------+-----------------------------
Reporter: juliobox | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: trunk
Severity: trivial | Keywords:
-----------------------------+-----------------------------
Hello
Can we (i) was for a new hook here ?
In ''add_menu_page('') :
{{{
$new_menu = array( $menu_title, $capability, $menu_slug, $page_title,
'menu-top ' . $icon_class . $hookname, $hookname, $icon_url );
}}}
replaced by
{{{
$new_menu = apply_filters( 'add_menu_page_args', array( $menu_title,
$capability, $menu_slug, $page_title, 'menu-top ' . $icon_class .
$hookname, $hookname, $icon url ) );
$position = apply_filters( 'add_menu_page_position', $position );
}}}
The goal is to filter the capability, the icon etc and then the 2nd hook
for the menu position.
Thank you
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25359>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list