[wp-trac] [WordPress Trac] #55441: In wp_insert_term, pass $args as an additional parameter to after-insert actions (create_term, created_term, et al)

WordPress Trac noreply at wordpress.org
Fri Jul 1 21:06:48 UTC 2022


#55441: In wp_insert_term, pass $args as an additional parameter to after-insert
actions (create_term, created_term, et al)
-------------------------+--------------------------
 Reporter:  mboynes      |       Owner:  johnbillion
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  6.1
Component:  Taxonomy     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+--------------------------

Comment (by mboynes):

 @SergeyBiryukov good question, I appreciate your observation. `$args` was
 already documented in some filters (see
 [https://github.com/WordPress/WordPress/blob/74dcee85d065fe9f700f3459c44b845aba98f01a
 /wp-includes/taxonomy.php#L3253 here in wp_update_term()] and
 [https://github.com/WordPress/WordPress/blob/74dcee85d065fe9f700f3459c44b845aba98f01a
 /wp-includes/taxonomy.php#L2551 here in wp_insert_term()]), so I opted for
 consistency within each function over consistency within the patch. Having
 said that, I didn't notice at the time that there was also
 [https://github.com/WordPress/WordPress/blob/74dcee85d065fe9f700f3459c44b845aba98f01a
 /wp-includes/taxonomy.php#L2493 this param doc in wp_insert_term()], so my
 rationale just went out the window. Ultimately I agree with your vote for
 consistency, and would also support updating the docblock for
 `wp_insert_term_duplicate_term_check` to match the other pattern.

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


More information about the wp-trac mailing list