检索已损坏主题的列表。

原型

get_broken_themes()

返回值

(array)  

源文件

路径:wp-admin/includes/deprecated.php

<?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;
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/get_broken_themes/