Don't both hooking in menu functions which will never get called. See #11922 props miqrogroove for 2.9 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
451711db8f
commit
fde35741d3
|
@ -591,7 +591,7 @@ function add_menu_page( $page_title, $menu_title, $access_level, $file, $functio
|
|||
$admin_page_hooks[$file] = sanitize_title( $menu_title );
|
||||
|
||||
$hookname = get_plugin_page_hookname( $file, '' );
|
||||
if (!empty ( $function ) && !empty ( $hookname ))
|
||||
if (!empty ( $function ) && !empty ( $hookname ) && current_user_can( $access_level ) )
|
||||
add_action( $hookname, $function );
|
||||
|
||||
if ( empty($icon_url) ) {
|
||||
|
|
Loading…
Reference in New Issue