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
This commit is contained in:
Andrew Nacin 2010-04-18 04:45:09 +00:00
parent b0293c96f9
commit 8d47975e76

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 )