WordPress at a glance
function is not described

Language_Pack_Upgrader::upgrade() WP 3.7.0

Upgrade a language pack.

This is a method of the class: Language_Pack_Upgrader

No Hooks.

Return

Array/true/false/WP_Error. The result of the upgrade, or a WP_Error object instead.

Usage

$Language_Pack_Upgrader = new Language_Pack_Upgrader();
$var = $Language_Pack_Upgrader->upgrade( $update, $args );
$update(string/false)
Whether an update offer is available.
Default: false
$args(array)
Other optional arguments, see Language_Pack_Upgrader::bulk_upgrade().
Default: empty array

Changelog

Since 3.7.0 Introduced.

Code of Language Pack Upgrader::upgrade: wp-admin/includes/class-language-pack-upgrader.php WP 5.2.2

<?php
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];
}