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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user