mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
Allow 'id' to work in get_bookmarks(). Add link_notes even though such sorting is a bad idea. see #18068 for 3.3.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
33113c01c7
commit
acbc9144dd
@ -227,8 +227,11 @@ function get_bookmarks($args = '') {
|
||||
$orderparams = array();
|
||||
foreach ( explode(',', $orderby) as $ordparam ) {
|
||||
$ordparam = trim($ordparam);
|
||||
if ( in_array( $ordparam, array( 'id', 'name', 'url', 'visible', 'rating', 'owner', 'updated' ) ) )
|
||||
$keys = array( 'link_id', 'link_name', 'link_url', 'link_visible', 'link_rating', 'link_owner', 'link_updated', 'link_notes' );
|
||||
if ( in_array( 'link_' . $ordparam, $keys ) )
|
||||
$orderparams[] = 'link_' . $ordparam;
|
||||
elseif ( in_array( $ordparam, $keys ) )
|
||||
$orderparams[] = $ordparam;
|
||||
}
|
||||
$orderby = implode(',', $orderparams);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user