wp_skip_paused_themes

The timeline below displays how wordpress function wp_skip_paused_themes has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.5

/**
 * Filters a given list of themes, removing any paused themes from it.
 *
 * @since 5.2.0
 *
 * @global WP_Paused_Extensions_Storage $_paused_themes
 *
 * @param string[] $themes Array of absolute theme directory paths.
 * @return string[] Filtered array of absolute paths to themes, without any paused themes.
 */
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;
}

WordPress Version: 5.4

/**
 * Filters a given list of themes, removing any paused themes from it.
 *
 * @since 5.2.0
 *
 * @param string[] $themes Array of absolute theme directory paths.
 * @return string[] Filtered array of absolute paths to themes, without any paused themes.
 */
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;
}

WordPress Version: 5.2

/**
 * Filters a given list of themes, removing any paused themes from it.
 *
 * @since 5.2.0
 *
 * @param array $themes List of absolute theme directory paths.
 * @return array Filtered value of $themes, without any paused themes.
 */
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;
}