[wp-trac] [WordPress Trac] #35382: get_terms with set fields 'id=>parent' not return the id key
WordPress Trac
noreply at wordpress.org
Sat Jan 9 04:55:16 UTC 2016
#35382: get_terms with set fields 'id=>parent' not return the id key
--------------------------+-----------------------------
Reporter: fantasyworld | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.4.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
when use the id=>parent with number and fields in id=>name or and other
id=>xx type.
In same case if the query return $terms array items in bigger then the
number in you set with call the function.
It use the {{{#!php
<?php
array_slice( $terms, $offset, $number );
}}}
to cat the array into number you want
But this cat action will let the array id reset to 0, 1, 2 ... NOT the id
of the term
may use the {{{#!php
<?php
array_slice( $terms, $offset, $number, true );
}}}
to keep the old id in the new array
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35382>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list