[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> class-language-pack-upgrader.php (summary)

Upgrade API: Language_Pack_Upgrader class

File Size: 474 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Language_Pack_Upgrader:: (7 methods):
  async_upgrade()
  upgrade_strings()
  upgrade()
  bulk_upgrade()
  check_package()
  get_name_for_update()
  clear_destination()


Class: Language_Pack_Upgrader  - X-Ref

Core class used for updating/installing language packs (translations)
for plugins, themes, and core.

async_upgrade( $upgrader = false )   X-Ref
Asynchronously upgrades language packs after other upgrades have been made.

Hooked to the {@see 'upgrader_process_complete'} action by default.

since: 3.7.0
param: false|WP_Upgrader $upgrader Optional. WP_Upgrader instance or false. If `$upgrader` is

upgrade_strings()   X-Ref
Initialize the upgrade strings.

since: 3.7.0

upgrade( $update = false, $args = array()   X-Ref
Upgrade a language pack.

since: 3.7.0
return: array|bool|WP_Error The result of the upgrade, or a WP_Error object instead.
param: string|false $update Optional. Whether an update offer is available. Default false.
param: array        $args   Optional. Other optional arguments, see

bulk_upgrade( $language_updates = array()   X-Ref
Bulk upgrade language packs.

since: 3.7.0
return: array|bool|WP_Error Will return an array of results, or true if there are no updates,
param: object[] $language_updates Optional. Array of language packs to update. @see wp_get_translation_updates().
param: array    $args {

check_package( $source, $remote_source )   X-Ref
Checks that the package source contains .mo and .po files.

Hooked to the {@see 'upgrader_source_selection'} filter by
Language_Pack_Upgrader::bulk_upgrade().

since: 3.7.0
return: string|WP_Error The source as passed, or a WP_Error object on failure.
param: string|WP_Error $source        The path to the downloaded package source.
param: string          $remote_source Remote file source location.

get_name_for_update( $update )   X-Ref
Get the name of an item being updated.

since: 3.7.0
return: string The name of the item being updated.
param: object $update The data for an update.

clear_destination( $remote_destination )   X-Ref
Clears existing translations where this item is going to be installed into.

since: 5.1.0
return: bool|WP_Error True upon success, WP_Error on failure.
param: string $remote_destination The location on the remote filesystem to be cleared.



Generated: Tue Mar 19 01:00:02 2024 Cross-referenced by PHPXref 0.7.1