From 028a3ee8ec11a2984432623c75b5ad50b038c8c9 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 30 Sep 2011 17:03:46 +0000 Subject: [PATCH] Allow 'id' to work in get_bookmarks(). Add link_notes even though such sorting is a bad idea. see #18068 for 3.3. git-svn-id: https://develop.svn.wordpress.org/trunk@18840 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/bookmark.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php index ee621a0787..c965d4c8db 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -227,8 +227,11 @@ function get_bookmarks($args = '') { $orderparams = array(); foreach ( explode(',', $orderby) as $ordparam ) { $ordparam = trim($ordparam); - if ( in_array( $ordparam, array( 'id', 'name', 'url', 'visible', 'rating', 'owner', 'updated' ) ) ) + $keys = array( 'link_id', 'link_name', 'link_url', 'link_visible', 'link_rating', 'link_owner', 'link_updated', 'link_notes' ); + if ( in_array( 'link_' . $ordparam, $keys ) ) $orderparams[] = 'link_' . $ordparam; + elseif ( in_array( $ordparam, $keys ) ) + $orderparams[] = $ordparam; } $orderby = implode(',', $orderparams); }