Commit 51f91c5
committed
Taxonomy: Cache term objects in WP_Term_Query if query is filtered.
When utilizing the `terms_clauses` or `get_terms_fields` filters within `WP_Term_Query` and the selected fields are modified, the entire term object is now cached. This adjustment is necessary because filters can broaden the selected fields beyond just the term ID. Fields linked to the term object, such as the count or parent, may undergo modifications when queried. Caching the complete object ensures the accurate storage of these modified fields within the cache.
Props spacedmonkey, tnolte, peterwilsoncc.
Fixes #58116.
Built from https://develop.svn.wordpress.org/trunk@56555
git-svn-id: https://core.svn.wordpress.org/trunk@56067 1a063a9b-81f0-0310-95a4-ce76da25c4cd1 parent 537774d commit 51f91c5
2 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| 741 | + | |
| 742 | + | |
741 | 743 | | |
742 | 744 | | |
743 | 745 | | |
| |||
782 | 784 | | |
783 | 785 | | |
784 | 786 | | |
785 | | - | |
| 787 | + | |
786 | 788 | | |
787 | 789 | | |
788 | 790 | | |
| |||
884 | 886 | | |
885 | 887 | | |
886 | 888 | | |
| 889 | + | |
| 890 | + | |
887 | 891 | | |
888 | 892 | | |
889 | 893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments