get_terms()
cache key.
Previously, the cache key included a serialization of `list_terms_exclusions` callbacks, to ensure that the cache was differentiated properly for different uses of the `list_terms_exclusions` filter. This strategy was flawed in a couple of ways: serialization doesn't work equally well for all callable types; the serialization required reaching into the `$wp_filter` global; serializing the callback itself didn't properly account for the possibility that the callback might return different values in different contexts; the cache key didn't account for other filters that similarly affect the cached values, such as `terms_clauses`. We skirt all these issues by concatenating the cache key using the SQL query string, which will reflect all filters applied earlier in `get_terms()`. Props boonebgorges, wonderboymusic. Fixes #21267. git-svn-id: https://develop.svn.wordpress.org/trunk@35120 602fd350-edb4-49c9-b593-d223f7449a82
Description
No description provided
Languages
PHP
76.7%
CSS
10.9%
JavaScript
9.2%
Modelica
2.4%
HTML
0.6%
Other
0.2%