From ae61439266b5e013029101c1475e1b29dde7b911 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 25 Aug 2006 00:27:15 +0000 Subject: [PATCH] Don't save if both title and content are empty. fixes #2390 git-svn-id: http://svn.automattic.com/wordpress/trunk@4117 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/post.php b/wp-includes/post.php index 45af008b63..ae91c8e24b 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -507,6 +507,9 @@ function wp_insert_post($postarr = array()) { $ping_status = apply_filters('ping_status_pre', $ping_status); } + if ( ('' == $post_content) && ('' == $post_title) ) + return 0; + // Make sure we set a valid category if (0 == count($post_category) || !is_array($post_category)) { $post_category = array(get_option('default_category'));