A bit more research… This is for 3.1.4
The bug appears to be in get_bookmarks in wp-includes/bookmark.php
It seems that when code was added to the orderby processing to change id to link_id etc, they forgot about notes and its friends.
As of 3.1.4, the following happens:
- length, rand and link_id get dealt with as special cases.
- Otherwise it’s assumed to be a list (maybe a list of one), exploded and for each element:
- ‘name’, ‘url’, ‘visible’, ‘rating’, ‘owner’, ‘updated’ are converted to link_name, link_url etc. Note that id is not in this list.
- Other entries are ignored and not passed at all.
To my mind, this would mean that the only arguments that would work would be name, url, visible, rating, owner, updated, link_id, length and rand, which agrees with raskull’s findings.
The workaround (which I can confirm only for 3.1.4 and for the argument notes, which was all I am interested in) is to
- edit wp-includes/bookmark.php
- find the line that says “if ( in_array( $ordparam, array( ‘name’, ‘url’, ‘visible’, ‘rating’, ‘owner’, ‘updated’) ) ) and add ,’notes’ to the end of the array.
- Note that the line following the above one seems to have a foreign character in it. Not sure why, but I just left it there.
Hopefully the bug will be fixed in a future version, but I’ll need to work out how to report it accurately so that something will actually be done.