Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5295 closed defect (bug) (fixed)

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

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

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

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

#2 @foolswisdom
17 years ago

  • Version set to 2.3.1

#3 @westi
17 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

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

  • Milestone changed from 2.3.2 to 2.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
17 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(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.