From 144af9f1a44fc207f1721e2a6427adf46074e685 Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@14131 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 5e1af5915..7cd014ce7 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 )