Ticket #3714 (closed defect: invalid)

Opened 2 years ago

Last modified 4 months ago

wp_get_linksbyname shows all categories

Reported by: tandilboy Assigned to: anonymous
Priority: normal Milestone:
Component: Administration Version: 2.1
Severity: major Keywords:
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

01/29/07 19:25:49 changed by markjaquith

  • status changed from new to closed.
  • resolution set to wontfix.

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

01/30/07 16:25:25 changed by foolswisdom

  • milestone deleted.

01/30/07 18:25:14 changed by ryan

  • status changed from closed to reopened.
  • resolution deleted.

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?

01/30/07 21:23:52 changed by foolswisdom

  • milestone set to 2.1.1.

01/31/07 00:08:12 changed by tandilboy

<?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

(in reply to: ↑ description ) 02/12/07 22:28:50 changed by Nothus

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.

02/21/07 15:37:50 changed by Nazgul

  • milestone changed from 2.1.1 to 2.1.2.

03/28/07 00:56:52 changed by foolswisdom

  • milestone changed from 2.1.3 to 2.3.

09/19/07 22:07:54 changed by Nazgul

  • milestone changed from 2.3 to 2.5.

07/24/08 02:31:50 changed by technosailor

  • status changed from reopened to closed.
  • resolution set to invalid.

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

07/27/08 15:17:13 changed by thee17

  • milestone deleted.