From e45ec0a52c6589b60a6e98862fbc0c35c487554e Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@15227 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 e912f637ca..006f056941 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 26fa614b32..7cd4c463c7 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 fe3a3e967b..0004673c6b 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 6baf7b902a..b3712425d9 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