get_broken_themes
Retrieves a list of broken themes.
Description
(array) get_broken_themes();
Returns (array)
Usage
if ( !function_exists( 'get_broken_themes' ) ) { require_once ABSPATH . '/wp-admin/includes/deprecated.php'; } // NOTICE! Understand what this does before running. $result = get_broken_themes();
Defined (1)
The function is defined in the following location(s).
- /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;
- }