mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Allow sorting by id in get_bookmarks(). Props SergeyBiryukov. see #18234 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@18470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
55d7366c42
commit
05b3172a32
@ -227,7 +227,7 @@ function get_bookmarks($args = '') {
|
||||
$orderparams = array();
|
||||
foreach ( explode(',', $orderby) as $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;
|
||||
}
|
||||
$orderby = implode(',', $orderparams);
|
||||
|
Loading…
Reference in New Issue
Block a user