Opened 22 months ago
Closed 22 months ago
#18234 closed defect (bug) (fixed)
get_bookmarks not order by id
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2.2 |
| Component: | General | Version: | 3.2.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
When I use get_bookmarks() function to get links and I want to order by link id:
$bookmarks = get_bookmarks(array(
'orderby' => 'id',
'order' => 'DESC',
'category' => 6
));
But it not order by link id It still use link name to order and I see SQL result :
SELECT * FROM wp_links INNER JOIN wp_term_relationships AS tr ON (wp_links.link_id = tr.object_id) INNER JOIN wp_term_taxonomy as tt ON tt.term_taxonomy_id = tr.term_taxonomy_id WHERE 1=1 AND link_visible = 'Y' AND ( tt.term_id = 6 ) AND taxonomy = 'link_category' ORDER BY link_name DESC
Attachments (1)
Change History (7)
- Component changed from Filesystem to General
- Keywords reporter-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
- Milestone set to 3.2.2
- Resolution worksforme deleted
- Status changed from closed to reopened
Man, I missed that. "id" used to work. Alright.
SergeyBiryukov — 22 months ago
comment:3
follow-up:
↓ 4
SergeyBiryukov — 22 months ago
- Keywords has-patch added
Replying to SergeyBiryukov:
Thank you for your patch SergeyBiryukov!
Note: See
TracTickets for help on using
tickets.

Since WordPress 3.2 it's link_id, see r18345.