WordPress.org

Make WordPress Core

Changeset 14299


Ignore:
Timestamp:
04/29/10 16:38:12 (4 years ago)
Author:
ryan
Message:

Don't call get_plugins() in menu.php. It is too slow to call on every admin page load. fixes #13117

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r14290 r14299  
    169169        /* translators: add new plugin */ 
    170170        $submenu['plugins.php'][10] = array(_x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php'); 
    171         $plugins = get_plugins(); 
    172         if( !empty($plugins) ) 
    173             $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' ); 
    174 } 
    175 unset($menu_perms, $update_plugins, $update_count, $plugins); 
     171        $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' ); 
     172} 
     173unset($menu_perms, $update_plugins, $update_count); 
    176174 
    177175if ( current_user_can('list_users') ) 
  • trunk/wp-admin/plugin-editor.php

    r14290 r14299  
    2222$plugins = get_plugins(); 
    2323 
    24 if( empty($plugins) ) 
     24if ( empty($plugins) ) 
    2525    wp_die( __('There are no plugins installed on this site.') ); 
    2626 
Note: See TracChangeset for help on using the changeset viewer.