[wp-trac] [WordPress Trac] #16031: New bulk actions hook missing catcher behavior
WordPress Trac
noreply at wordpress.org
Wed Nov 12 16:08:46 UTC 2014
#16031: New bulk actions hook missing catcher behavior
-------------------------+-----------------------------
Reporter: Veraxus | Owner:
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Plugins | Version: 3.1
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+-----------------------------
Changes (by ragulka):
* severity: trivial => normal
Comment:
I have run twice into this now. IMHO, '''preventing new bulk actions from
being added''' just because there is no universal catcher/handler
available yet, '''is not a good idea at all'''. In fact, I think '''it is
counterproductive'''.
If developers could easily at least add new bulk actions to the menus,
sooner or later they would realise that handling those actions should be
easier/more universal. That itself could lead to someone coming up with a
better/good/acceptable patch that would take care of "catching".
At the moment, it is more than possible to manually catch those actions in
most (if not all?) screens. For example, the `do_action( 'admin_action_' .
$_REQUEST['action'] );` or even `do_action( 'load-' . $pagenow );` hook
can be used on most cases.
Why should we artificially limit innovation and exploration? I mean,
people used to build their own custom post type stuff way before WordPress
even supported custom post types. Why don't we let them figure out how to
handle bulk actions themselves and see where it takes us - perhaps a good
pattern will appear.
I'm not sure if anyone has realised this, but the 16031-no-new.diff ALSO
prevents from existing bulk action labels to be changed. This is an issue
when dealing with custom post types where the action labels need to be
customised based on the context (custom post type).
So, effectively it's impossible to add new bulk actions and even to edit
existing bulk actions. And all that because there is no universal ability
to handle those actions. The more I think about it, the more pointless it
seems - there's no real benefit or "protection" gained here - at least
none that I see.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/16031#comment:52>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list