upgrader_package_options WordPress Filter Hook

The upgrader_package_options hook is used to filter the options used when upgrading a package. This hook is useful for adding or removing options from the package, or for changing the default values of options.

apply_filters( 'upgrader_package_options', array $options ) #

Filters the package options before running an update.


Description

See also ‘upgrader_process_complete’.


Top ↑

Parameters

$options

(array)Options used by the upgrader.

  • 'package'
    (string) Package for update.
  • 'destination'
    (string) Update location.
  • 'clear_destination'
    (bool) Clear the destination resource.
  • 'clear_working'
    (bool) Clear the working resource.
  • 'abort_if_destination_exists'
    (bool) Abort if the Destination directory exists.
  • 'is_multi'
    (bool) Whether the upgrader is running multiple times.
  • 'hook_extra'
    (array) Extra hook arguments.
    • 'action'
      (string) Type of action. Default 'update'.
    • 'type'
      (string) Type of update process. Accepts 'plugin', 'theme', or 'core'.
    • 'bulk'
      (bool) Whether the update process is a bulk update. Default true.
    • 'plugin'
      (string) Path to the plugin file relative to the plugins directory.
    • 'theme'
      (string) The stylesheet or template name of the theme.
    • 'language_update_type'
      (string) The language pack update type. Accepts 'plugin', 'theme', or 'core'.
    • 'language_update'
      (object) The language pack update offer.


Top ↑

Source

File: wp-admin/includes/class-wp-upgrader.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.