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

Built from https://develop.svn.wordpress.org/trunk@25810


git-svn-id: http://core.svn.wordpress.org/trunk@25722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin
2013-10-16 14:34:10 +00:00
parent b02867a1c4
commit ba0ebf3736
2 changed files with 32 additions and 27 deletions

View File

@@ -355,25 +355,3 @@ function maintenance_nag() {
echo "<div class='update-nag'>$msg</div>";
}
add_action( 'admin_notices', 'maintenance_nag' );
/**
* Retrieves a list of all language updates available.
*
* @since 3.7.0
*/
function wp_get_translation_updates() {
$updates = array();
$transients = array( 'update_core' => 'core', 'update_plugins' => 'plugin', 'update_themes' => 'theme' );
foreach ( $transients as $transient => $type ) {
$transient = get_site_transient( $transient );
if ( empty( $transient->translations ) )
continue;
foreach ( $transient->translations as $translation ) {
$updates[] = (object) $translation;
}
}
return $updates;
}