From f2d1f8460f5a88479feb562b7aff7830f0e18a1c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 18 Jun 2005 19:17:55 +0000 Subject: [PATCH] Use default_category option if not cat specified. git-svn-id: https://develop.svn.wordpress.org/trunk@2648 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions-post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index 710c11f4e2..c7988d3408 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -6,7 +6,7 @@ * generic function for inserting data into the posts table. */ function wp_insert_post($postarr = array()) { - global $wpdb, $post_default_category, $allowedtags, $user_ID; + global $wpdb, $allowedtags, $user_ID; // export array as variables extract($postarr); @@ -21,7 +21,7 @@ function wp_insert_post($postarr = array()) { // Make sure we set a valid category if (0 == count($post_category) || !is_array($post_category)) { - $post_category = array($post_default_category); + $post_category = array(get_option('default_category')); } $post_cat = $post_category[0];