wp_skip_paused_themes() – Filters a given list of themes, removing any paused themes from it.

You appear to be a bot. Output may be restricted

Description

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

Usage

$string[] = wp_skip_paused_themes( $themes );

Parameters

$themes
( string[] ) required – Array of absolute theme directory paths.

Returns

string[] Filtered array of absolute paths to themes, without any paused themes.

Source

File name: wordpress/wp-includes/load.php
Lines:

1 to 20 of 20
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;
}
 

 View on GitHub View on Trac