Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: show_advanced_plugins

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
379 $search_plugins = array();
380 $active_plugins = array();
381 $inactive_plugins = array();
382 $recent_plugins = array();
383 $recently_activated = get_option('recently_activated', array());
384 $upgrade_plugins = array();
385 $network_plugins = array();
386 $mustuse_plugins = $dropins_plugins = array();
387 if ( ! is_multisite() || current_user_can('manage_network_plugins') ) {
388      if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) )
389           $mustuse_plugins = get_mu_plugins();
390      if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) )
391           $dropins_plugins = get_dropins();
392 }
393
394 set_transient( 'plugin_slugs', array_keys($all_plugins), 86400 );
395
396 // Clean out any plugins which were deactivated over a week ago.
397 foreach ( $recently_activated as $key => $time )
398      if ( $time + (7*24*60*60) < time() ) //1 week
399           unset($recently_activated[ $key ]);