WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#3446 closed defect (bug) (fixed)

Blogroll showing post categories but not link categories

Reported by: mattyrob Owned by: westi
Milestone: 2.1 Priority: high
Severity: major Version: 2.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

The function to call categories does not appear to be working as I am expecting.

As I understand from looking at the code, for WP2.1 post and link categories are to be amalgamanted. Functions are being written that allow WP and plugins to seperate categories containing only links and those containing only posts.

At the moment the blogroll page (link-manager.php) calls the get_categories function as follows:

get_categories("hide_empty=1&type=link");

but on my test site it returns categories containing POSTS not LINKS.

Is this a defect in the code as I am unable to find a way to call link categories only?

Attachments (1)

3446.diff (836 bytes) - added by westi 7 years ago.
Fix the blogroll category dropdown

Download all attachments as: .zip

Change History (6)

comment:1 westi7 years ago

  • Keywords has-patch added
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

Ok this is because by default in get_categories hierarchical is set to 1 and that means that get categories does not limit by type.

The attached patch fixes this issue.

However should we really be using wp_dropdown_cats here?

westi7 years ago

Fix the blogroll category dropdown

comment:3 tassoman7 years ago

  • Cc tassoman@… added

This still affect also the admin page /wp-admin/link-manager.php that's missing Link categories in the dropdown select.

comment:4 mattyrob7 years ago

This works for me using the latest SVN copy (revision 7169)

comment:5 foolswisdom7 years ago

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

Closing as FIXED since the original reporter updated it as such -- thanks mattyrob! and no other comments.

Note: See TracTickets for help on using tickets.