On this page
wp_skip_paused_themes( string[] $themes ): string[]
Filters a given list of themes, removing any paused themes from it.
Parameters
$themesstring[] Required-
Array of absolute theme directory paths.
Return
string[] Filtered array of absolute paths to themes, without any paused themes.
Source
File: wp-includes/load.php. View all references
function wp_skip_paused_themes( array $themes ) {
$paused_themes = wp_paused_themes()->get_all();
if ( empty( $paused_themes ) ) {
return $themes;
}
foreach ( $themes as $index => $theme ) {
$theme = basename( $theme );
if ( array_key_exists( $theme, $paused_themes ) ) {
unset( $themes[ $index ] );
// Store list of paused themes for displaying an admin notice.
$GLOBALS['_paused_themes'][ $theme ] = $paused_themes[ $theme ];
}
}
return $themes;
}
Related
Uses
| Uses | Description |
|---|---|
| wp_paused_themes() wp-includes/error-protection.php | Get the instance for storing paused extensions. |
Used By
| Used By | Description |
|---|---|
| wp_get_active_and_valid_themes() wp-includes/load.php | Retrieves an array of active and valid themes. |
Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_skip_paused_themes