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();
|
$orderparams = array();
|
||||||
foreach ( explode(',', $orderby) as $ordparam ) {
|
foreach ( explode(',', $orderby) as $ordparam ) {
|
||||||
$ordparam = trim($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;
|
$orderparams[] = 'link_' . $ordparam;
|
||||||
|
elseif ( in_array( $ordparam, $keys ) )
|
||||||
|
$orderparams[] = $ordparam;
|
||||||
}
|
}
|
||||||
$orderby = implode(',', $orderparams);
|
$orderby = implode(',', $orderparams);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue