From 2eadcb9aef6e43178a7f92fb1505f21fa39984a3 Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 11 Jun 2010 17:04:06 +0000 Subject: [PATCH] Fix warnings related to static pages. props zeo for initial patch. fixes #13830. git-svn-id: http://svn.automattic.com/wordpress/trunk@15227 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/schema.php | 4 ++++ wp-admin/options-reading.php | 9 ++++++--- wp-includes/formatting.php | 1 + wp-includes/general-template.php | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index e912f637c..006f05694 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -314,6 +314,10 @@ function populate_options() { 'embed_autourls' => 1, 'embed_size_w' => '', 'embed_size_h' => 600, + + // 3.0 + 'page_for_posts' => 0, + 'page_on_front' => 0, ); // 3.0 multisite diff --git a/wp-admin/options-reading.php b/wp-admin/options-reading.php index 26fa614b3..7cd4c463c 100644 --- a/wp-admin/options-reading.php +++ b/wp-admin/options-reading.php @@ -38,7 +38,10 @@ include( './admin-header.php' ); - +
@@ -54,8 +57,8 @@ include( './admin-header.php' );

Warning: these pages should not be the same!' ); ?>

diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index fe3a3e967..0004673c6 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2402,6 +2402,7 @@ function sanitize_option($option, $value) { case 'mailserver_port': case 'comment_max_links': case 'page_on_front': + case 'page_for_posts': case 'rss_excerpt_length': case 'default_category': case 'default_email_category': diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 6baf7b902..b3712425d 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -585,7 +585,7 @@ function wp_title($sep = '»', $display = true, $seplocation = '') { // If there is a post if ( is_single() || ( is_home() && !is_front_page() ) || ( is_page() && !is_front_page() ) ) { $post = $wp_query->get_queried_object(); - $title = apply_filters( 'single_post_title', empty( $post->post_title ) ? '' : $post->post_title ); + $title = apply_filters( 'single_post_title', $post->post_title ); } // If there's a taxonomy