diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-06 10:24:47 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-06 10:24:47 +0000 |
| commit | e45949fbbdb8ee7e63099c97f6b5f60bb310e6a3 (patch) | |
| tree | 64f646a2b7b4ab718aa92f8f0e128bfa69b7cd04 /wp-inst/wp-includes/functions-post.php | |
| parent | 808fef533c5187217e80f703bdb3c422b35a8234 (diff) | |
| download | wordpress-mu-e45949fbbdb8ee7e63099c97f6b5f60bb310e6a3.tar.gz wordpress-mu-e45949fbbdb8ee7e63099c97f6b5f60bb310e6a3.tar.xz wordpress-mu-e45949fbbdb8ee7e63099c97f6b5f60bb310e6a3.zip | |
Changes from WordPress
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@133 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/functions-post.php')
| -rw-r--r-- | wp-inst/wp-includes/functions-post.php | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/wp-inst/wp-includes/functions-post.php b/wp-inst/wp-includes/functions-post.php index 7339a26..87c9e1a 100644 --- a/wp-inst/wp-includes/functions-post.php +++ b/wp-inst/wp-includes/functions-post.php @@ -20,12 +20,14 @@ function wp_insert_post($postarr = array()) { } // Get the basics. - $post_content = apply_filters('content_save_pre', $post_content); - $post_excerpt = apply_filters('excerpt_save_pre', $post_excerpt); - $post_title = apply_filters('title_save_pre', $post_title); - $post_category = apply_filters('category_save_pre', $post_category); - $post_status = apply_filters('status_save_pre', $post_status); - $post_name = apply_filters('name_save_pre', $post_name); + $post_content = apply_filters('content_save_pre', $post_content); + $post_excerpt = apply_filters('excerpt_save_pre', $post_excerpt); + $post_title = apply_filters('title_save_pre', $post_title); + $post_category = apply_filters('category_save_pre', $post_category); + $post_status = apply_filters('status_save_pre', $post_status); + $post_name = apply_filters('name_save_pre', $post_name); + $comment_status = apply_filters('comment_status_pre', $comment_status); + $ping_status = apply_filters('ping_status_pre', $ping_status); // Make sure we set a valid category if (0 == count($post_category) || !is_array($post_category)) { @@ -61,9 +63,13 @@ function wp_insert_post($postarr = array()) { if (empty($post_date_gmt)) $post_date_gmt = current_time('mysql', 1); - if (empty($comment_status)) - $comment_status = get_settings('default_comment_status'); - if (empty($ping_status)) + if ( empty($comment_status) ) { + if ( $update ) + $comment_status = 'closed'; + else + $comment_status = get_settings('default_comment_status'); + } + if ( empty($ping_status) ) $ping_status = get_settings('default_ping_status'); if ( empty($post_pingback) ) $post_pingback = get_option('default_pingback_flag'); |
