Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#5295 closed defect (bug) (fixed)

wp-links-opml.php will not display a single link category

Reported by: vrypan Owned by: westi
Priority: normal Milestone: 2.5
Component: General Version: 2.3.1
Severity: major Keywords: opml
Cc: Focuses:

Description

wp-links-opml.php when called using ?link_cat=category_number should return an OPML including ONLY the category specified. However, it doesn't (it shows all link categories).

This can be fixed by replacing the line
$cats = array (get_category($link_cat));
with
$cats = get_categories('type=link&hierarchical=0&include='.$link_cat);

Change History (5)

#1 follow-up: @ryan
19 years ago

I think get_term($link_cat, 'link_category') will work.

#2 @foolswisdom
19 years ago

  • Version2.3.1

#3 @westi
19 years ago

  • Owner changed from anonymous to westi
  • Status newassigned

#4 in reply to: ↑ 1 @westi
19 years ago

  • Milestone 2.3.22.4

Replying to ryan:

I think get_term($link_cat, 'link_category') will work.

That doesn't work with the current code.

The suggest change in the ticket does though.

#5 @westi
19 years ago

  • Resolutionfixed
  • Status assignedclosed

(In [6308]) Allow wp-links-opml.php to return the links for just one category. Fixes #5295 props vrypan.

Note: See TracTickets for help on using tickets.