From 7b1e56dc064b023afd556fdc631a5c704efb62eb Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 13 May 2008 21:03:10 +0000 Subject: [PATCH] default is a valid page template. see #6098 git-svn-id: http://svn.automattic.com/wordpress/trunk@7925 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 977e0823fd..bae9f0182e 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1297,7 +1297,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) { if ( !empty($page_template) && 'page' == $post_type ) { $post->page_template = $page_template; $page_templates = get_page_templates(); - if ( ! in_array($page_template, $page_templates) ) { + if ( 'default' != $page_template && !in_array($page_template, $page_templates) ) { if ( $wp_error ) return new WP_Error('invalid_page_template', __('The page template is invalid.')); else