Make WordPress Core

Opened 20 years ago

Closed 19 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:

Description

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
20 years ago

  • Patch set to No

#2 @ryan
20 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
20 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
20 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
20 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
19 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.