[wp-trac] Re: [WordPress Trac] #4015: Post and link category confusion

WordPress Trac wp-trac at lists.automattic.com
Thu May 3 19:01:44 GMT 2007

#4015: Post and link category confusion
 Reporter:  donncha         |        Owner:  ryan
     Type:  defect          |       Status:  new 
 Priority:  normal          |    Milestone:  2.3 
Component:  Administration  |      Version:  2.2 
 Severity:  normal          |   Resolution:      
 Keywords:  has-patch       |  
Comment (by Otto42):

 karmadude: I made the same change to my core code just after 2.1 came out
 too, and have continued to make the change every upgrade. It's a heck of a
 lot nicer to have all the categories available for both posts and links,
 even if I don't use them. All the user confusion goes away when you can
 see the categories as one unit.

 All I did was to change the return statements in return_categories_list()
 and return_link_categories_list() to both do this:
 return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE
 category_parent = $parent ORDER BY link_count DESC" );

 Completely eliminate the count checks and allow all categories to show
 everywhere. It's so much simpler and easier to use. Create a new category
 and it shows up right away. Categories don't disappear from links just
 because you make posts to them and vice versa. Things work the way that
 the user ''expects'' them to work.

 I'll continue making this change to my own code. And if we're not going to
 fix the broken core categories code to allow this, then we should at least
 add hooks so that I can turn this sort of behavior into a plugin instead
 of a core hack.

Ticket URL: <http://trac.wordpress.org/ticket/4015#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list