wp_get_translation_updates()

Retrieves a list of all language updates available.


Description Description


Return Return

(object[]) Array of translation objects that have available updates.


Top ↑

Source Source

File: wp-includes/update.php

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;
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.7.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.