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