Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#58329 new enhancement

Double sanitization in get_term function

Reported by: spacedmonkey's profile spacedmonkey Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch
Focuses: performance Cc:


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.

Change History (1)

This ticket was mentioned in PR #4461 on WordPress/wordpress-develop by @spacedmonkey.

3 weeks ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.