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:
parent
34c57058bf
commit
144af9f1a4
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue