get_theme_updates

The WordPress Core get theme updates function.

Description

(array) get_theme_updates(); 

Returns (array)


Usage

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

Defined (1)

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

/wp-admin/includes/update.php  
  1. function get_theme_updates() { 
  2. $current = get_site_transient('update_themes'); 
  3.  
  4. if ( ! isset( $current->response ) ) 
  5. return array(); 
  6.  
  7. $update_themes = array(); 
  8. foreach ( $current->response as $stylesheet => $data ) { 
  9. $update_themes[ $stylesheet ] = wp_get_theme( $stylesheet ); 
  10. $update_themes[ $stylesheet ]->update = $data; 
  11.  
  12. return $update_themes;