Docs: Update hook docs for the upgrader_package_options
filter and upgrader_process_complete
action to reflect expected values in the core, language pack, theme, and plugin contexts.
Props nextendweb for the initial patch. See [37550]. Fixes #36875. git-svn-id: https://develop.svn.wordpress.org/trunk@37558 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e20bc6cc46
commit
0decd27a3f
@ -651,6 +651,8 @@ class WP_Upgrader {
|
|||||||
/**
|
/**
|
||||||
* Filters the package options before running an update.
|
* Filters the package options before running an update.
|
||||||
*
|
*
|
||||||
|
* See also {@see 'upgrader_process_complete'}.
|
||||||
|
*
|
||||||
* @since 4.3.0
|
* @since 4.3.0
|
||||||
*
|
*
|
||||||
* @param array $options {
|
* @param array $options {
|
||||||
@ -662,7 +664,18 @@ class WP_Upgrader {
|
|||||||
* @type bool $clear_working Clear the working resource.
|
* @type bool $clear_working Clear the working resource.
|
||||||
* @type bool $abort_if_destination_exists Abort if the Destination directory exists.
|
* @type bool $abort_if_destination_exists Abort if the Destination directory exists.
|
||||||
* @type bool $is_multi Whether the upgrader is running multiple times.
|
* @type bool $is_multi Whether the upgrader is running multiple times.
|
||||||
* @type array $hook_extra Extra hook arguments.
|
* @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 The base plugin path from 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.
|
||||||
|
* }
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
$options = apply_filters( 'upgrader_package_options', $options );
|
$options = apply_filters( 'upgrader_package_options', $options );
|
||||||
@ -745,6 +758,8 @@ class WP_Upgrader {
|
|||||||
/**
|
/**
|
||||||
* Fires when the upgrader process is complete.
|
* Fires when the upgrader process is complete.
|
||||||
*
|
*
|
||||||
|
* See also {@see 'upgrader_package_options'}.
|
||||||
|
*
|
||||||
* @since 3.6.0
|
* @since 3.6.0
|
||||||
* @since 3.7.0 Added to WP_Upgrader::run().
|
* @since 3.7.0 Added to WP_Upgrader::run().
|
||||||
*
|
*
|
||||||
@ -753,14 +768,11 @@ class WP_Upgrader {
|
|||||||
* @param array $hook_extra {
|
* @param array $hook_extra {
|
||||||
* Array of bulk item update data.
|
* Array of bulk item update data.
|
||||||
*
|
*
|
||||||
* @type string $action Type of action. Default 'update'.
|
* @type string $action Type of action. Default 'update'.
|
||||||
* @type string $type Type of update process. Accepts 'plugin', 'theme', or 'core'.
|
* @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 bool $bulk Whether the update process is a bulk update. Default true.
|
||||||
* @type string $plugin The base plugin path from the plugins directory.
|
* @type array $plugins Array of the basename paths of the plugins' main files.
|
||||||
* @type string $theme The stylesheet or template name of the theme.
|
* @type array $themes The theme slugs.
|
||||||
* @type string $language_update_type The language pack update type. Accepts 'plugin', 'theme',
|
|
||||||
* or 'core'.
|
|
||||||
* @type object $language_update The language pack update offer.
|
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
|
do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
|
||||||
|
Loading…
Reference in New Issue
Block a user