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

Opened 2 years ago

Last modified 2 years ago

Blogroll showing post categories but not link categories

Reported by: mattyrob Assigned to: westi
Priority: high Milestone: 2.1
Component: Administration Version: 2.1
Severity: major Keywords: has-patch
Cc: tassoman@gmail.com

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

3446.diff (0.8 kB) - added by westi on 12/07/06 09:04:56.
Fix the blogroll category dropdown

Change History

12/07/06 09:04:31 changed by westi

  • keywords set to has-patch.
  • 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?

12/07/06 09:04:56 changed by westi

  • attachment 3446.diff added.

Fix the blogroll category dropdown

12/07/06 21:19:51 changed by mdawaffe

12/10/06 10:18:15 changed by tassoman

  • cc set to tassoman@gmail.com.

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

12/28/06 21:49:29 changed by mattyrob

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

01/03/07 23:34:03 changed by foolswisdom

  • status changed from assigned to closed.
  • resolution set to fixed.

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