wppaste
WordPress

apply_filters( 'upgrader_package_options', array $options )

Since
4.3.0
Filters the package options before running an update.

Description

See also 'upgrader_process_complete'.

Compatibility

WordPress
since 4.3.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

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

    Package for update.
  • $destinationstring

    Update location.
  • $clear_destinationbool

    Clear the destination resource.
  • $clear_workingbool

    Clear the working resource.
  • $abort_if_destination_existsbool

    Abort if the Destination directory exists.
  • $is_multibool

    Whether the upgrader is running multiple times.
  • $hook_extraarray

    Extra hook arguments.
    • $actionstring

      Type of action. Default 'update'.
    • $typestring

      Type of update process. Accepts 'plugin', 'theme', or 'core'.
    • $bulkbool

      Whether the update process is a bulk update. Default true.
    • $pluginstring

      Path to the plugin file relative to the plugins directory.
    • $themestring

      The stylesheet or template name of the theme.
    • $language_update_typestring

      The language pack update type. Accepts 'plugin', 'theme', or 'core'.
    • $language_updateobject

      The language pack update offer.

Where this hook fires · 1

  • wp-admin/includes/class-wp-upgrader.php:818WP_Upgrader::run()

Source code

		 *         @type string $language_update_type The language pack update type. Accepts 'plugin', 'theme',		 *                                            or 'core'.		 *         @type object $language_update      The language pack update offer.		 *     }		 * }		 */		$options = apply_filters( 'upgrader_package_options', $options ); 		if ( ! $options['is_multi'] ) { // Call $this->header separately if running multiple times.			$this->skin->header();		} 		// Connect to the filesystem first.

Changelog

Introduced in 4.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.