Language_Pack_Upgrader::upgrade()
Upgrades a language pack.
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. |
Language_Pack_Upgrader::upgrade() Language Pack Upgrader::upgrade code WP 6.6.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]; }