[wp-trac] [WordPress Trac] #36875: upgrader_process_complete action is not documented well
WordPress Trac
noreply at wordpress.org
Wed May 18 06:18:28 UTC 2016
#36875: upgrader_process_complete action is not documented well
-----------------------------+-----------------------------
Reporter: nextendweb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 4.5.2
Severity: normal | Keywords:
Focuses: docs |
-----------------------------+-----------------------------
The comment for upgrader_process_complete action indices that the
"packages" key will contain the updated packages, but in real for themes
it is the "themes" key and for plugins the "plugins" key.
{{{#!php
<?php
/**
* Fires when the bulk upgrader process is complete.
*
* @since 3.6.0
*
* @param Plugin_Upgrader $this Plugin_Upgrader instance.
In other contexts, $this, might
* be a Theme_Upgrader or
Core_Upgrade instance.
* @param array $data {
* Array of bulk item update data.
*
* @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 array $packages Array of plugin, theme, or
core packages to update.
* }
*/
do_action( 'upgrader_process_complete', $this, array(
'action' => 'update',
'type' => 'plugin',
'bulk' => true,
'plugins' => $plugins,
) );
}}}
{{{#!php
<?php
/** This action is documented in wp-admin/includes/class-
wp-upgrader.php */
do_action( 'upgrader_process_complete', $this, array(
'action' => 'update',
'type' => 'theme',
'bulk' => true,
'themes' => $themes,
) );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36875>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list