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
This commit is contained in:
nacin 2010-04-18 04:45:09 +00:00
parent 34c57058bf
commit 144af9f1a4
1 changed files with 4 additions and 1 deletions

View File

@ -221,7 +221,10 @@ function get_bookmarks($args = '') {
$orderby = 'rand()'; $orderby = 'rand()';
break; break;
default: default:
$orderby = "link_" . $orderby; $orderparams = array();
foreach ( explode(',', $orderby) as $ordparam )
$orderparams[] = 'link_' . trim($ordparam);
$orderby = implode(',', $orderparams);
} }
if ( 'link_id' == $orderby ) if ( 'link_id' == $orderby )