Make WordPress Core

Changeset 12891


Ignore:
Timestamp:
01/28/2010 08:20:18 PM (15 years ago)
Author:
westi
Message:

Don't both hooking in menu functions which will never get called. See #11922 props miqrogroove.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r12859 r12891  
    595595
    596596    $hookname = get_plugin_page_hookname( $file, '' );
    597     if (!empty ( $function ) && !empty ( $hookname ))
     597    if (!empty ( $function ) && !empty ( $hookname ) && current_user_can( $access_level ) )
    598598        add_action( $hookname, $function );
    599599
Note: See TracChangeset for help on using the changeset viewer.