[wp-trac] [WordPress Trac] #16031: Bulk actions: Reactivate bulk actions hook + add hander hook for all admin screens
WordPress Trac
noreply at wordpress.org
Sat Oct 15 21:33:48 UTC 2016
#16031: Bulk actions: Reactivate bulk actions hook + add hander hook for all admin
screens
----------------------------+------------------------
Reporter: Veraxus | Owner: ericlewis
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.7
Component: Administration | Version: 3.1
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: docs
----------------------------+------------------------
Changes (by johnbillion):
* focuses: => docs
Comment:
Replying to [comment:98 Veraxus]:
> 3. Third argument is always the array of items (array).
> 4. Fourth argument applies to network screens only, but is the site id
(int)
The problem is that the items contained within the third parameter -- and
therefore the description needed for it -- differ between instances of
this hook. The items can be posts, comments, users, etc, and this means
the documentation for the same hook name varies across its different
instances. Same applies for the fourth argument - this argument is not
always present so its description differs.
By the way -- for clarity -- I'm thinking about this from the perspective
of the generated documentation on `developer.wordpress.org`. It's not
possible to have multiple different `@param` descriptions for one hook
that varies depending on the value of the dynamic part of its name.
> If you're looking at the patches, you might have noticed that the names
of the variables being fed to the hook vary from screen to screen, which
may be where this misunderstanding comes from.
The actual variable name doesn't matter to the hook docs -- its
description and contents does.
> * Separate the network-targetted hooks into
`handle_network_bulk_actions-*` solely because those hooks get the site id
as an extra argument (unnecessary, IMO).
Yes, this is a good idea to solve the problem of the fourth parameter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/16031#comment:99>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list