WordPress开发者和主题制作者的搜索引擎



get_broken_themes ›

Since1.5.0
已弃用3.4.0
get_broken_themes ( 没有参数 )
查看:
返回:
  • (array)
定义在:
文档:

Retrieves a list of broken themes.



源码

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