mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Don't both hooking in menu functions which will never get called. See #11922 props miqrogroove.
git-svn-id: https://develop.svn.wordpress.org/trunk@12891 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -594,7 +594,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) ) {
|
||||
|
||||
Reference in New Issue
Block a user