[wp-trac] [WordPress Trac] #58404: Add pre_update_term filter hook

WordPress Trac noreply at wordpress.org
Mon Sep 25 19:43:24 UTC 2023


#58404: Add pre_update_term filter hook
-------------------------------------------------+-------------------------
 Reporter:  kobi1                                |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Taxonomy                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-unit-tests changes-  |     Focuses:
  requested 2nd-opinion reporter-feedback        |
-------------------------------------------------+-------------------------

Comment (by hellofromTonya):

 >Sorry for the mistaken review request. Looking at this, I'm unsure what
 the filter would provide that the current `wp_update_term_data` filter
 does not. Could you provide an example use case where this would be
 useful?

 I agree with @joemcgill in that I'm not sure what the filter is
 accomplishing and the use case for it.

 In the latest patch [attachment:"58404-3.patch"], what happens if the
 filtered `$term` is no longer an object or instance of `WP_Term`? A
 safeguard check is needed to protect user sites.

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


More information about the wp-trac mailing list