[wp-trac] [WordPress Trac] #18234: get_bookmarks not order by id
WordPress Trac
wp-trac at lists.automattic.com
Sun Jul 24 18:28:36 UTC 2011
#18234: get_bookmarks not order by id
--------------------------+-------------------------------
Reporter: psophy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Filesystem | Version: 3.2.1
Severity: normal | Keywords: reporter-feedback
--------------------------+-------------------------------
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
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18234>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list