Make WordPress Core

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#3714 closed defect (bug) (invalid)

wp_get_linksbyname shows all categories

Reported by: tandilboy's profile tandilboy Owned by:
Milestone: Priority: normal
Severity: major Version: 2.1
Component: Administration Keywords:
Focuses: Cc:

Description

i using the wp_get_linksbyname in diferent instances showed by categories, in 2.1 the wp_get_linksbyname can´t filter categories and shows all links in all instances

Change History (11)

#1 @markjaquith
18 years ago

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

wp_get_linksbyname() has been deprecated. Look to get_bookmarks()

#2 @foolswisdom
18 years ago

  • Milestone 2.1.1 deleted

#3 @ryan
18 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

The huge number of themes in the wild will be using deprecated API for some time. I think we should not break those themes. I'll reopen and take a look.

tandilboy, how are you using wp_get_linksbyname()? Can you tell us exactly what arguments your theme is passing to it?

#4 @foolswisdom
18 years ago

  • Milestone set to 2.1.1

#5 @tandilboy
18 years ago

<?php wp_get_linksbyname('Secciones','orderby=rating&before=<li>&after=</li>&show_description=0'); ?>

2.1 cant filter the links by category

i using this code. any case reply me with the new code to update the theme

#6 in reply to: ↑ description @Nothus
18 years ago

Replying to tandilboy:

i using the wp_get_linksbyname in diferent instances showed by categories, in 2.1 the wp_get_linksbyname can´t filter categories and shows all links in all instances

It appears that the problem is not in wp_get_linksbyname it's in wp_get_links (bookmark-template.php).

parse_str($args) messes up the first var it's trying to parse in $args because it starts with something like '/?varname=var'. So, in the case where it's trying to look up a category, $category never gets set and will lookup all categories. My temp fix was to strip out everything up to the '?' and it now works as it should.

A quick grep through the code base show lots of parse_str($args) and I would imagine that this problem would also be happening there.

#7 @Nazgul
18 years ago

  • Milestone changed from 2.1.1 to 2.1.2

#8 @foolswisdom
18 years ago

  • Milestone changed from 2.1.3 to 2.3

#9 @Nazgul
18 years ago

  • Milestone changed from 2.3 to 2.5

#10 @technosailor
17 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

Any reason we're keeping this open? I believe [5444] fixes this.

#11 @thee17
17 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.