Language_Pack_Upgrader::upgrade( string|false $update = false, array $args = array() ): array|bool|WP_Error

Upgrades a language pack.


$update string|false Optional
Whether an update offer is available.

Default: false

$args array Optional
Other optional arguments, see Language_Pack_Upgrader::bulk_upgrade().
More Arguments from Language_Pack_Upgrader::bulk_upgrade( ... $args ) Other arguments for upgrading multiple language packs.
  • clear_update_cache bool
    Whether to clear the update cache when done.
    Default true.

Default: array()

Top ↑


array|bool|WP_Error The result of the upgrade, or a WP_Error object instead.

Top ↑


File: wp-admin/includes/class-language-pack-upgrader.php. View all references

public function upgrade( $update = false, $args = array() ) {
	if ( $update ) {
		$update = array( $update );

	$results = $this->bulk_upgrade( $update, $args );

	if ( ! is_array( $results ) ) {
		return $results;

	return $results[0];

Top ↑


Version Description
3.7.0 Introduced.

Top ↑

User Contributed Notes

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