函数原型
get_broken_themes(): array
函数描述
Retrieves a list of broken themes.
是否弃用
Warning: This function has been deprecated. Use wp_get_themes() instead.
函数参数
无
函数返回值
array
函数位置
File: wp-admin/includes/deprecated.php.
函数源码
function get_broken_themes() {
_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'errors' => true )" );
$themes = wp_get_themes( array( 'errors' => true ) );
$broken = array();
foreach ( $themes as $theme ) {
$name = $theme->get('Name');
$broken[ $name ] = array(
'Name' => $name,
'Title' => $name,
'Description' => $theme->errors()->get_error_message(),
);
}
return $broken;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.4.0 | Use wp_get_themes() |
| 1.5.0 | Introduced. |

