wp_skip_paused_themes( array $themes )

Filters a given list of themes, removing any paused themes from it.


Description Description


Parameters Parameters

$themes

(array) (Required) List of absolute theme directory paths.


Top ↑

Return Return

(array) Filtered value of $themes, without any paused themes.


Top ↑

Source Source

File: wp-includes/load.php

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;
}

Top ↑

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.