[wp-trac] [WordPress Trac] #35252: Add a `{$taxonomy}_term_edit_form_top` action (similar to the post editing form)
WordPress Trac
noreply at wordpress.org
Sat Feb 13 03:59:45 UTC 2016
#35252: Add a `{$taxonomy}_term_edit_form_top` action (similar to the post editing
form)
-------------------------+-----------------------------
Reporter: flixos90 | Owner: boonebgorges
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.5
Component: Taxonomy | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses: administration
-------------------------+-----------------------------
Comment (by boonebgorges):
Replying to [comment:4 flixos90]:
> Replying to [comment:3 boonebgorges]:
> > Is there a reason why the action has to be dynamic? If we're passing a
taxonomy to it, then the dynamic filter name is redundant. See
[attachment:35252.2.diff].
>
> Not specifically, I was just looking at the other actions within the
form most of which are dynamic, so I applied the same pattern to this new
one. But your version is perfectly fine too.
>
> In general however, I wonder which way is preferable. If you want to add
something to only specific taxonomies, the dynamic approach is better I
think because then you only add the filter where you actually need it -
but if you want to add to every one, the way you did it would be easier.
True. I guess all the other actions in this form use the taxonomy name.
I'm not a very big fan - it's more confusing to document, and passing the
`$taxonomy` as an argument rather than as part of the action name gives
you lots more flexibility, but I guess we should just go with the flow.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35252#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list