Ticket #5295 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

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:

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

comment:1 follow-up: ↓ 4   ryan4 years ago

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

  • Version set to 2.3.1
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

comment:4 in reply to: ↑ 1   westi4 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.

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

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