wp_get_translation_updates

Retrieves a list of all language updates available.

Description

(array) wp_get_translation_updates(); 

Returns (array)


Usage

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

Defined (1)

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

/wp-includes/update.php  
  1. function wp_get_translation_updates() { 
  2. $updates = array(); 
  3. $transients = array( 'update_core' => 'core', 'update_plugins' => 'plugin', 'update_themes' => 'theme' ); 
  4. foreach ( $transients as $transient => $type ) { 
  5. $transient = get_site_transient( $transient ); 
  6. if ( empty( $transient->translations ) ) 
  7. continue; 
  8.  
  9. foreach ( $transient->translations as $translation ) { 
  10. $updates[] = (object) $translation; 
  11. return $updates;