get_broken_themes

Retrieves a list of broken themes.

Description

(array) get_broken_themes(); 

Returns (array)


Usage

  1. if ( !function_exists( 'get_broken_themes' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/deprecated.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_broken_themes(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/deprecated.php  
  1. function get_broken_themes() { 
  2. _deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'errors' => true )" ); 
  3.  
  4. $themes = wp_get_themes( array( 'errors' => true ) ); 
  5. $broken = array(); 
  6. foreach ( $themes as $theme ) { 
  7. $name = $theme->get('Name'); 
  8. $broken[ $name ] = array( 
  9. 'Name' => $name,  
  10. 'Title' => $name,  
  11. 'Description' => $theme->errors()->get_error_message(),  
  12. ); 
  13. return $broken;