Make WordPress Core

Opened 19 years ago

Closed 18 years ago

#973 closed defect (bug) (wontfix)

Wrong variable on line 509 of /wp-includes/links.php

Reported by: anonymousbugger's profile anonymousbugger Owned by:
Milestone: Priority: normal
Severity: minor Version: 1.5.1
Component: General Keywords:
Focuses: Cc:


The variable $orderby should be changed to $order on line 509 of /wp-includes/links.php. The incorrect variable means that any call to get_links_list() with the first argument filled will not have any effect. So get_links_list('name') was still ordering by rand() for me.

Change History (6)

#1 @anonymousbugger
19 years ago

  • Patch set to No

#2 @ryan
19 years ago

$orderby provides the sort order specified for the link category in the database. If you want to change an order for a link category, change it in the database. The $order argument of get_links_list() applies only to the order of the link categories, not the links within each category.

#3 @necrotic
19 years ago

If that's the case, rboren, then $orderby should be changed to something like null in the get_links call.

edited on: 02-26-05 04:36

#4 @ryan
19 years ago

$orderby (I suppose you mean that and not $order) picks up the database value for the category before being passed to get_links(). Changing it to null will ignore the database specified order. This is a change in behavior for get_links_list() that will result in lots of bug reports.

#5 @necrotic
19 years ago

yes, I meant $orderby.

It'd be nice to have a way to choose the order manually, then. On my Blogroll, I like random order with 15 limit. On my links page, I want ABC order with no limit. I did some hacking to do it, but having the feature already there would be nice.

#6 @filosofo
18 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

This is/was expected behavior.

Note: See TracTickets for help on using tickets.