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: https://develop.svn.wordpress.org/trunk@18840 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f1423b28e5
commit
028a3ee8ec
@ -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