[wp-trac] [WordPress Trac] #32246: Fix a variety of phpDoc issues
WordPress Trac
noreply at wordpress.org
Wed May 25 14:33:34 UTC 2016
#32246: Fix a variety of phpDoc issues
----------------------------+-----------------------------
Reporter: DrewAPicture | Owner: DrewAPicture
Type: task (blessed) | Status: assigned
Priority: low | Milestone: Future Release
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: docs
----------------------------+-----------------------------
Comment (by DrewAPicture):
Replying to [comment:339 nextendweb]:
> 37550:
>
> @DrewAPicture I'm not sure that the modified documentation describes the
structure of that action.
> Here is an example action with type => plugin:
>
> {{{#!php
> <?php
> do_action( 'upgrader_process_complete', $this, array(
> 'action' => 'update',
> 'type' => 'plugin',
> 'bulk' => true,
> 'plugins' => $plugins,
> ) );
> }}}
>
>
> In your modified documentation it looks like:
>
> {{{
> @type string $plugin
> }}}
>
> but it should be :
>
> {{{
> @type array $plugins {
> Array of bulk item update data.
> ...
> ...
> ..
> }
> }}}
>
> Same applies for other types, as all of them placed under a different
array key.
The documentation was updated based on how core currently implements the
hook:
* Language packs [https://core.trac.wordpress.org/browser/trunk/src/wp-
admin/includes/class-language-pack-upgrader.php#L239 (0)]
* Plugins [https://core.trac.wordpress.org/browser/trunk/src/wp-
admin/includes/class-plugin-upgrader.php#L107 (0)],
[https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes
/class-plugin-upgrader.php#L174 (1)],
[https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes
/class-plugin-upgrader.php#L277 (2)]
* Themes [https://core.trac.wordpress.org/browser/trunk/src/wp-
admin/includes/class-theme-upgrader.php#L136 (0)],
[https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes
/class-theme-upgrader.php#L207 (1)],
[https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes
/class-theme-upgrader.php#L275 (2)],
[https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes
/class-theme-upgrader.php#L377 (3)]
Happy to update if you can provide examples in the wild that consistently
use a 'plugins' or 'themes' key.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32246#comment:340>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list