Changeset 2681
- Timestamp:
- 06/30/2005 06:44:14 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/wp-includes/functions-post.php
r2667 r2681 7 7 */ 8 8 function wp_insert_post($postarr = array()) { 9 global $wpdb, $ post_default_category, $allowedtags;9 global $wpdb, $allowedtags; 10 10 11 11 // export array as variables … … 17 17 // Make sure we set a valid category 18 18 if (0 == count($post_category) || !is_array($post_category)) { 19 $post_category = array( $post_default_category);19 $post_category = array(get_option('default_category')); 20 20 } 21 21 … … 111 111 // Make sure we set a valid category 112 112 if ( 0 == count($post_category) || !is_array($post_category) ) 113 $post_category = array( $post_default_category);113 $post_category = array(get_option('default_category')); 114 114 115 115 $post_modified = current_time('mysql'); … … 158 158 if (!is_array($post_categories)) { 159 159 if (!$post_categories) { 160 $post_categories = 1;160 $post_categories = get_option('default_category'); 161 161 } 162 162 $post_categories = array($post_categories);
Note: See TracChangeset
for help on using the changeset viewer.