Ticket #2938 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Don't have a category selected by default

Reported by: Viper007Bond Assigned to: markjaquith
Priority: low Milestone: 2.1
Component: Administration Version: 2.0.4
Severity: minor Keywords: bg|has-patch commit
Cc:

Description

It drives me nuts having to uncheck the box next to my default category when writing a new post if I don't want it in that category.

How about we just don't check any boxes off the bat and only then if the user doesn't pick any categories, we assign it to the default category?

I see no drawback to doing this. Does anyone else?

I'll have a patch shortly probably.

Attachments

edit-form-advanced.php.diff (0.5 kB) - added by darkfate on 07/11/06 15:40:29.
patch from Viper007Bond, "now in upload form!"
uncheck-default-category.php (0.6 kB) - added by mdawaffe on 07/12/06 00:09:46.
JS Plugin

Change History

07/11/06 09:44:20 changed by Viper007Bond

  • keywords set to bg|has-patch.
  • milestone set to 2.1.

Well, I edited /wp-admin/edit-form-advanced.php, but TortoiseSVN is being retarded and not realizing that I made any changes which means I can't make a patch.

So instead, here's the needed code change (on line 77):

<ul id="categorychecklist"><?php dropdown_categories(get_settings('default_category')); ?></ul></div>

to this:

<ul id="categorychecklist"><?php dropdown_categories(); ?></ul></div>

I tested it and it seems to work fine. :)

07/11/06 14:41:04 changed by darkfate

I found a trick to get TortoiseSVN to think the file has changed. Rename edit-form-advanced.php to something like edit-form-advanced1.php. Then run an update and tortoiseSVN will restore the file. Delete that file and rename edit-form-advanced1.php back to edit-form-advanced.php and it should show a red exclamation point. Then you can create the patch. That's what I do all the time.

07/11/06 15:40:29 changed by darkfate

  • attachment edit-form-advanced.php.diff added.

patch from Viper007Bond, "now in upload form!"

07/11/06 21:20:42 changed by mdawaffe

I've attached the JS I have used previously to do this.

I have conflicted opinions about what the core should do.

07/11/06 21:32:25 changed by filosofo

If anyone's interested, here is my plugin that uses JavaScript? to uncheck the default category, if someone checks another.

07/12/06 00:09:46 changed by mdawaffe

  • attachment uncheck-default-category.php added.

JS Plugin

08/30/06 10:41:02 changed by markjaquith

  • keywords changed from bg|has-patch to bg|has-patch commit.
  • owner changed from anonymous to markjaquith.
  • status changed from new to assigned.

+1

Default category will be selected if the post is published with no category selected... no need to pre-select the default. I often forget to uncheck the default one so my posts go in "Foo and Uncategorized."

10/04/06 06:17:24 changed by markjaquith

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

(In [4310]) default category starts out unchecked. Props Viper007Bond. fixes #2938

10/04/06 06:17:46 changed by markjaquith

(In [4311]) default category starts out unchecked. Props Viper007Bond. fixes #2938

10/04/06 06:19:08 changed by markjaquith

  • milestone changed from 2.1 to 2.0.5.

Now the default category only acts as a last resort when no categories have been defined.

10/04/06 06:20:25 changed by markjaquith

  • version changed from 2.1 to 2.0.4.

10/18/06 21:43:04 changed by markjaquith

  • milestone changed from 2.0.5 to 2.1.

[4406] Saving the default-category behavior change for 2.1