wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_skip_paused_themes › WordPress Function
Since5.2.0
已弃用n/a
› wp_skip_paused_themes ( $themes )
| 参数: |
|
| 返回: |
|
| 定义在: |
|
| 文档: |
Filters a given list of themes, removing any paused themes from it.
Related Functions: wp_paused_themes, wp_skip_paused_plugins, wp_using_themes, wp_get_themes, wp_update_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;
}