Language_Pack_Upgrader::upgrade()
最后更新于:2021-11-25 19:55:53
Language_Pack_Upgrader::upgrade( string|false$update=false, array$args=array())Upgrade a language pack.
参数
- $update
-
(string|false) (Optional) Whether an update offer is available.
Default value: false
- $args
-
(array) (Optional) Other optional arguments, see Language_Pack_Upgrader::bulk_upgrade().
Default value: array()
响应
(array|bool|GC_Error) The result of the upgrade, or a GC_Error object instead.
源文件
文件: gc-admin/includes/class-language-pack-upgrader.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];
}