функция
since 5.2.0
wp_skip_paused_themes()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_skip_paused_themes( string[] $themes ): string[]
Описание
Фильтрует переданный список тем, удаляя из него все приостановленные темы.
Параметры
$themes
string[]
обязательный
Массив абсолютных путей к каталогам тем.
Возвращаемое значение
string[]
Исходный код
wp-includes/load.php:1137
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;
}
История изменений
| Версия | Описание |
|---|---|
| 5.2.0 | Introduced. |

