Allow sorting by id in get_bookmarks(). Props SergeyBiryukov. fixes #18234 for 3.2
git-svn-id: http://svn.automattic.com/wordpress/branches/3.2@18471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
af5fcb7e57
commit
a1671b30c7
|
@ -227,7 +227,7 @@ function get_bookmarks($args = '') {
|
||||||
$orderparams = array();
|
$orderparams = array();
|
||||||
foreach ( explode(',', $orderby) as $ordparam ) {
|
foreach ( explode(',', $orderby) as $ordparam ) {
|
||||||
$ordparam = trim($ordparam);
|
$ordparam = trim($ordparam);
|
||||||
if ( in_array( $ordparam, array( 'name', 'url', 'visible', 'rating', 'owner', 'updated' ) ) )
|
if ( in_array( $ordparam, array( 'id', 'name', 'url', 'visible', 'rating', 'owner', 'updated' ) ) )
|
||||||
$orderparams[] = 'link_' . $ordparam;
|
$orderparams[] = 'link_' . $ordparam;
|
||||||
}
|
}
|
||||||
$orderby = implode(',', $orderparams);
|
$orderby = implode(',', $orderparams);
|
||||||
|
|
Loading…
Reference in New Issue