Make WordPress Core

Changeset 2681


Ignore:
Timestamp:
06/30/2005 06:44:14 PM (20 years ago)
Author:
ryan
Message:

Use default_category option instead of now defunct post_default_category.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/wp-includes/functions-post.php

    r2667 r2681  
    77 */
    88function wp_insert_post($postarr = array()) {
    9     global $wpdb, $post_default_category, $allowedtags;
     9    global $wpdb, $allowedtags;
    1010   
    1111    // export array as variables
     
    1717    // Make sure we set a valid category
    1818    if (0 == count($post_category) || !is_array($post_category)) {
    19         $post_category = array($post_default_category);
     19        $post_category = array(get_option('default_category'));
    2020    }
    2121
     
    111111    // Make sure we set a valid category
    112112    if ( 0 == count($post_category) || !is_array($post_category) )
    113         $post_category = array($post_default_category);
     113        $post_category = array(get_option('default_category'));
    114114
    115115    $post_modified = current_time('mysql');
     
    158158    if (!is_array($post_categories)) {
    159159        if (!$post_categories) {
    160             $post_categories = 1;
     160            $post_categories = get_option('default_category');
    161161        }
    162162        $post_categories = array($post_categories);
Note: See TracChangeset for help on using the changeset viewer.