[wp-trac] [WordPress Trac] #55162: Incorrect parameter passed to update_term_cache from _prime_term_caches

WordPress Trac noreply at wordpress.org
Tue Mar 8 04:21:10 UTC 2022


#55162: Incorrect parameter passed to update_term_cache from _prime_term_caches
-----------------------------------+---------------------
 Reporter:  david.binda            |       Owner:  (none)
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  6.0
Component:  Taxonomy               |     Version:  4.6
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+---------------------

Comment (by peterwilsoncc):

 Replying to [comment:2 azouamauriac]:
 > Also it seems like ''_prime_term_caches'' is the only function which
 uses ''update_term_cache'' with the second parameter, so I think we can
 remove safely its second parameter "$taxonomy" in
 > ''update_term_cache''.

 WordPress tends to keep the deprecated parameters listed to future proof
 against any upcoming changes:

 `fn( $string, $object, $array )` might have the final argument deprecated
 `fn( $string, $object, $deprecated )`. The deprecated parameter needs to
 be keep as a placeholder in case a new parameter is added at a later date,
 eg `fn( $string, $object, $deprecated, $boolean )`

 There's a little judgement involved each time.

 However, it doesn't look like the `$taxonomy` argument was formally
 deprecated in `update_term_cache()` so perhaps you could look at that on
 another ticket.

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


More information about the wp-trac mailing list