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
136                 * The $type parameter allows you to differentiate between the type of advanced
137                 * plugins to filter the display of. Contexts include 'mustuse' and 'dropins'.
138                 *
139                 * @since 3.0.0
140                 *
141                 * @param bool   $show Whether to show the advanced plugins for the specified
142                 *                     plugin type. Default true.
143                 * @param string $type The plugin type. Accepts 'mustuse', 'dropins'.
144                 */
145                if ( apply_filters( 'show_advanced_plugins', true, 'mustuse' ) ) {
146                     $plugins['mustuse'] = get_mu_plugins();
147                }
148
149                /** This action is documented in wp-admin/includes/class-wp-plugins-list-table.php */
150                if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) ) {
151                     $plugins['dropins'] = get_dropins();
152                }
153
154                if ( current_user_can( 'update_plugins' ) ) {
155                     $current = get_site_transient( 'update_plugins' );
156                     foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
157                          if ( isset( $current->response[ $plugin_file ] ) ) {
158                               $plugins['all'][ $plugin_file ]['update'] = true;
159                               $plugins['upgrade'][ $plugin_file ]       = $plugins['all'][ $plugin_file ];