From 8d47975e7652d302e8b7549ab39c804f494289f8 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 18 Apr 2010 04:45:09 +0000 Subject: [PATCH] Allow orberby in wp_list_bookmarks to accept a comma-delimited list of fields, per docs. fixes #12421, props sorich87, scribu. git-svn-id: https://develop.svn.wordpress.org/trunk@14131 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 5e1af5915e..7cd014ce70 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -221,7 +221,10 @@ function get_bookmarks($args = '') { $orderby = 'rand()'; break; default: - $orderby = "link_" . $orderby; + $orderparams = array(); + foreach ( explode(',', $orderby) as $ordparam ) + $orderparams[] = 'link_' . trim($ordparam); + $orderby = implode(',', $orderparams); } if ( 'link_id' == $orderby )