upgrader_package_options хук-фильтр . WP 4.3.0
Filters the package options before running an update.
See also 'upgrader_process_complete'.
Использование
add_filter( 'upgrader_package_options', 'filter_function_name_4781' ); function filter_function_name_4781( $options ){ // filter... return $options; }
- $options(массив)
Options used by the upgrader.
-
$package (строка)
Package for update. -
$destination (строка)
Update location. -
$clear_destination (true/false)
Clear the destination resource. -
$clear_working (true/false)
Clear the working resource. -
$abort_if_destination_exists (true/false)
Abort if the Destination directory exists. -
$is_multi (true/false)
Whether the upgrader is running multiple times. -
$hook_extra (массив)
Extra hook arguments.-
$action (строка)
Type of action.
По умолчанию: 'update' -
$type (строка)
Type of update process. Accepts 'plugin', 'theme', or 'core'. -
$bulk (true/false)
Whether the update process is a bulk update.
По умолчанию: true -
$plugin (строка)
Path to the plugin file relative to the plugins directory. -
$theme (строка)
The stylesheet or template name of the theme. -
$language_update_type (строка)
The language pack update type. Accepts 'plugin', 'theme', or 'core'. - $language_update (объект)
The language pack update offer.
-
-
Список изменений
С версии 4.3.0 | Введена. |
Где вызывается хук
upgrader_package_options
$options = apply_filters( 'upgrader_package_options', $options );