[wp-trac] [WordPress Trac] #32144: get_terms with child_of
WordPress Trac
noreply at wordpress.org
Wed Apr 29 07:18:16 UTC 2015
#32144: get_terms with child_of
--------------------------+------------------------------
Reporter: shifty51 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by shifty51):
Replying to [comment:3 boonebgorges]:
> Replying to [comment:2 shifty51]:
> > Ok, first thank you for your reply! The term in question is at level 1
of the taxonomy. It contains more than 800 childs (889).Not very nested.
Some of the child have one lower level with a few children (10 at most). I
tried to replace in_array by isset. The site no longer crashes but all
terms are not apparent.
> > The structure :
> > Dossier (taxonomy)
> > --artiste (the term with 800 childs)
> > --localisation (less childs, no problem)
>
> Thanks for the additional details. When you said you tried to replace
in_array by isset, did you try something like [attachment:32144.diff]? If
not, would you mind giving it a spin to see if it solves your problem? If
so, I'll try to run some more precise benchmarks.
I tried just to change this part of the code.
{{{
if ( isset( $ancestors[ $term->term_id ] ) )
}}}
With all of your changes, it works!
Thank you! Will it is likely that this change to take effect in future
versions?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32144#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list