Warning: This function has been deprecated. Use wp_get_themes() instead.

get_broken_themes() WordPress Function

The get_broken_themes() function is used to return an array of broken themes. This function is useful for debugging purposes.

get_broken_themes() #

Retrieves a list of broken themes.


Description

Top ↑

See also


Top ↑

Return

(array)


Top ↑

Source

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


Top ↑

Changelog

Changelog
VersionDescription
3.4.0Use wp_get_themes()
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More