Uses
Uses | Description |
---|---|
wp-includes/error-protection.php: wp_paused_plugins() | Get the instance for storing paused plugins. |
wp-includes/plugin.php: plugin_basename() | Gets the basename of a plugin. |
Filters a given list of plugins, removing any paused plugins from it.
(string[]) (Required) Array of absolute plugin main file paths.
(string[]) Filtered array of plugins, without any paused plugins.
File: wp-includes/load.php
function wp_skip_paused_plugins( array $plugins ) { $paused_plugins = wp_paused_plugins()->get_all(); if ( empty( $paused_plugins ) ) { return $plugins; } foreach ( $plugins as $index => $plugin ) { list( $plugin ) = explode( '/', plugin_basename( $plugin ) ); if ( array_key_exists( $plugin, $paused_plugins ) ) { unset( $plugins[ $index ] ); // Store list of paused plugins for displaying an admin notice. $GLOBALS['_paused_plugins'][ $plugin ] = $paused_plugins[ $plugin ]; } } return $plugins; }
Version | Description |
---|---|
5.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_skip_paused_plugins