Permalink
Browse files

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
  • Loading branch information...
1 parent 451711d commit fde35741d33d0f5c9daeeaba8247e3e7f0f044a7 westi committed Jan 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 wp-admin/includes/plugin.php
@@ -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) ) {

0 comments on commit fde3574

Please sign in to comment.