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

In this article

Upgrades a language pack.

Parameters

$updatestring|falseoptional
Whether an update offer is available.

Default:false

$argsarrayoptional
Other optional arguments, see Language_Pack_Upgrader::bulk_upgrade().

Default:array()

Return

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

Source

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

Changelog

VersionDescription
3.7.0Introduced.

User Contributed Notes

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