Make WordPress Core


Ignore:
Timestamp:
01/03/2004 12:37:24 AM (22 years ago)
Author:
saxmatt
Message:

Use default category if none specified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/post.php

    r695 r696  
    136136        // Insert categories
    137137        // Check to make sure there is a category, if not just set it to some default
    138         if (!$post_categories) $post_categories = $wpdb->get_var("SELECT cat_ID FROM $tablecategories LIMIT 1");
     138        if (!$post_categories) $post_categories[] = 1;
    139139        foreach ($post_categories as $post_category) {
    140140            // Double check it's not there already
Note: See TracChangeset for help on using the changeset viewer.