Make WordPress Core

Opened 20 years ago

Closed 18 years ago

Last modified 18 years ago

#3714 closed defect (bug) (invalid)

wp_get_linksbyname shows all categories

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

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

  • Resolution → wontfix
  • Status new → closed

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

#2 @foolswisdom
20 years ago

  • Milestone 2.1.1

#3 @ryan
20 years ago

  • Resolution wontfix
  • Status closed → 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
20 years ago

  • Milestone → 2.1.1

#5 @tandilboy
20 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
20 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
20 years ago

  • Milestone 2.1.1 → 2.1.2

#8 @foolswisdom
20 years ago

  • Milestone 2.1.3 → 2.3

#9 @Nazgul
19 years ago

  • Milestone 2.3 → 2.5

#10 @technosailor
18 years ago

  • Resolution → invalid
  • Status reopened → closed

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

#11 @thee17
18 years ago

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