[wp-trac] [WordPress Trac] #44343: Add filter hook for parent dropdown arguments

WordPress Trac noreply at wordpress.org
Sun Jun 10 15:34:07 UTC 2018


#44343: Add filter hook for parent dropdown arguments
-----------------------------+------------------------------
 Reporter:  obiplabon        |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Taxonomy         |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  administration
-----------------------------+------------------------------
Changes (by birgire):

 * version:  trunk =>


Comment:

 Thanks for the ticket and the patch @obiplabon.

 That seems to make sense to have it easily filterable too, though I think
 one could use the {{{get_terms_args}}} filter, with a
 {{{doing_action()}}}/{{{did_action()}}} check for the corresponding ajax
 action hook, as a workaround.

 Some notes regarding [attachment:44343.diff]:

 - Missing {{{@since}}} in the filter's docblock.
 - It would be nice to have the description for the input {{{@param}}}.
 - It would be nice to have the default elements of the {{{$args}}} input
 documented.
 - Would we ever need to only change the ajax output of
 {{{wp_dropdown_categories()}}}? What about using the existing
 {{{post_edit_category_parent_dropdown_args}}} filter, for the ajax
 {{{wp_dropdown_categories()}}} arguments, as well, since those two outputs
 are so related? In that case, we can refer to the existing inline filter
 documentation. Here I'm assuming the ajax callback is only used for the
 post edit screen (we might have to verify that). Thoughts?

 I attached the screenshot [attachment:1528614160.png], just in case the
 external link goes down or changes.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44343#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list