[wp-trac] [WordPress Trac] #58329: Double sanitization in get_term function

WordPress Trac noreply at wordpress.org
Tue May 16 15:31:31 UTC 2023


#58329: Double sanitization in get_term function
--------------------------+-----------------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-----------------------------
 In the `get_term` function, the method `filter` is called. However, in
 most cases `WP_Term::get_instance` is called in get_term which also calls
 `filter`. This results in the term being sanitization twice. This filter
 method can be extensive and can be called thousands of times on an average
 page load.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58329>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list