#20129 closed defect (bug) (invalid)
get_bookmark object should return array of categories
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.3.1 |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
get_bookmark() returns a bookmark object with a single taxonomy and term_id, which are returned as strings.
In the WordPress admin section, it's possible to select multiple categories for a link (or bookmark, as it were).
get_bookmark() currently pulls all bookmarks for the categories you choose, and then runs array_unique on them to weed out duplicates. You only wind up with whatever the first category it pulled from.
It would be more consistent to merge those duplicate links, creating an array of term_ids for that bookmark, and allowing the developer to pull all of the terms for that bookmark.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Can you post a code example showing actual vs expected output? From what I can see, the function already returns an array of category IDs, which seems to be what you want: