Needcoffee.com
PLEASE NOTE: “As an Amazon Associate, [Need Coffee] earns from qualifying purchases." You know we make money from Amazon links,
and I know you know this, but they make us say it anyway. More info, click here.

How to (Almost) Fix Checked Categories in WordPress 2.5.1

Checked Categories come first in WordPress 2.5.1

May the blessings of Cthulhu fall upon the makers of Changeset 1299.

Ken and I discuss often about why in the world functionality should disappear when upgrading. Upgrade and loss of functionality shouldn’t go together. Granted, this isn’t something that’s unique to WordPress. There’s a fine tradition of cool bits inexplicably going away in software, cars, you name it. I’m looking at you, Microsoft. I’m looking at you, car industry. Headsup displays are cool, you jerks.

Anyway, I’m posting this because it took searching on stuff like “categorychecklist” and “dropdown_categories” before I came across the changeset that would make your checked categories appear first just like in previous versions. And, of course, one of the files, edit-form-advanced.php, is also covered by the write post panel hack that puts the categories and such back on the right hand side where they belong. So I was concerned that I might blow up one hack with yet another hack.

[ad#shortpost]
The changeset calls for this, which for me was lines 164-168 of /wp-admin/edit-form-advanced.php:


But I had this:


So I figured what the hell, and replaced that line with what the changeset said to, making the whole thing look like this:


    ID, false, false, $popular_ids) ?>

So nothing–so far at least–has blown up after doing this. But it’s sooo much better now that I don’t have to scroll up and down to see all the checked categories. I think the WP developers must have stock in mice. And wrist braces.

Update: Well, that’s what I get for hacking WordPress with a WordPress MU change. But dammit, it does work. I’m getting an error–not a fatal one, just a warning. So don’t screw with this till I work it out. Stand by.

Update: Dammit. Can’t make it work. I keep getting this non-fatal error:


 [error]  PHP Warning:  in_array()
[function.in-array]: 
Wrong datatype for second argument in 
*directory tree*/httpdocs/wp-admin/includes/template.php on line 143

referred by post-new.php or wherever I’m working in the edit screen. If anybody knows how to fix that, let me know. I tried using $this-> but apparently what I’m screwing around with isn’t a class. Damn this oppression!

3 comments

  • Stay tuned, my friend. I figure if I don’t hack this out somebody will, and when they do, I’ll report it here. Bribe her with flowers to bide you time…