Changeset 6086
- Timestamp:
- 09/11/2007 10:27:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r6026 r6086 1274 1274 global $wpdb, $user_ID; 1275 1275 1276 if ( is_object($object) ) 1277 $object = get_object_vars($object); 1278 1279 // Export array as variables 1276 $defaults = array('post_status' => 'draft', 'post_type' => 'post', 'post_author' => $user_ID, 1277 'ping_status' => get_option('default_ping_status'), 'post_parent' => 0, 1278 'menu_order' => 0, 'to_ping' => '', 'pinged' => '', 'post_password' => ''); 1279 1280 $object = wp_parse_args($object, $defaults); 1281 $object = sanitize_post($object, 'db'); 1282 1283 // export array as variables 1280 1284 extract($object, EXTR_SKIP); 1281 1282 // Get the basics.1283 $post_content = apply_filters('content_save_pre', $post_content);1284 $post_content_filtered = apply_filters('content_filtered_save_pre', $post_content_filtered);1285 $post_excerpt = apply_filters('excerpt_save_pre', $post_excerpt);1286 $post_title = apply_filters('title_save_pre', $post_title);1287 $post_category = apply_filters('category_save_pre', $post_category);1288 $post_name = apply_filters('name_save_pre', $post_name);1289 $comment_status = apply_filters('comment_status_pre', $comment_status);1290 $ping_status = apply_filters('ping_status_pre', $ping_status);1291 $post_mime_type = apply_filters('post_mime_type_pre', $post_mime_type);1292 1285 1293 1286 // Make sure we set a valid category … … 1295 1288 $post_category = array(get_option('default_category')); 1296 1289 } 1297 $post_cat = $post_category[0];1298 1290 1299 1291 if ( empty($post_author) ) … … 1329 1321 } 1330 1322 1331 if ( empty($post_date))1323 if ( empty($post_date) ) 1332 1324 $post_date = current_time('mysql'); 1333 if ( empty($post_date_gmt))1325 if ( empty($post_date_gmt) ) 1334 1326 $post_date_gmt = current_time('mysql', 1); 1335 1327 … … 1360 1352 if ( !isset($post_password) ) 1361 1353 $post_password = ''; 1362 1363 if ( isset($to_ping) )1364 $to_ping = preg_replace('|\s+|', "\n", $to_ping);1365 else1366 $to_ping = '';1367 1354 1368 1355 if ( ! isset($pinged) )
Note: See TracChangeset
for help on using the changeset viewer.