WordPress at Your Fingertips
function is not described

Language_Pack_Upgrader::upgrade() public WP 3.7.0

Upgrade a language pack.

{} It's 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();
$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 5.8.2

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