Make WordPress Core


Ignore:
Timestamp:
10/16/2013 02:33:21 PM (13 years ago)
Author:
nacin
Message:

Include translations in the update bubbles (as +1 if there are any). see #18200.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update.php

    r25801 r25810  
    356356}
    357357add_action( 'admin_notices', 'maintenance_nag' );
    358 
    359 /**
    360  * Retrieves a list of all language updates available.
    361  *
    362  * @since 3.7.0
    363  */
    364 function wp_get_translation_updates() {
    365     $updates = array();
    366     $transients = array( 'update_core' => 'core', 'update_plugins' => 'plugin', 'update_themes' => 'theme' );
    367     foreach ( $transients as $transient => $type ) {
    368 
    369         $transient = get_site_transient( $transient );
    370         if ( empty( $transient->translations ) )
    371             continue;
    372 
    373         foreach ( $transient->translations as $translation ) {
    374             $updates[] = (object) $translation;
    375         }
    376     }
    377 
    378     return $updates;
    379 }
Note: See TracChangeset for help on using the changeset viewer.