Opened 11 years ago
Closed 11 years ago
#35382 closed defect (bug) (fixed)
get_terms with set fields 'id=>parent' not return the id key
| Reported by: | fantasyworld | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5 |
| Component: | Taxonomy | Version: | 2.7.1 |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: |
Description (last modified by )
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 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 array_slice( $terms, $offset, $number, true );
to keep the old id in the new array
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Introduced with [10416]