<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[15227] trunk: Fix warnings related to static pages.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15227">15227</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-06-11 17:04:06 +0000 (Fri, 11 Jun 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix warnings related to static pages. props zeo for initial patch. fixes <a href="http://trac.wordpress.org/ticket/13830">#13830</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesschemaphp">trunk/wp-admin/includes/schema.php</a></li>
<li><a href="#trunkwpadminoptionsreadingphp">trunk/wp-admin/options-reading.php</a></li>
<li><a href="#trunkwpincludesformattingphp">trunk/wp-includes/formatting.php</a></li>
<li><a href="#trunkwpincludesgeneraltemplatephp">trunk/wp-includes/general-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesschemaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/schema.php (15226 => 15227)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/schema.php        2010-06-11 16:55:41 UTC (rev 15226)
+++ trunk/wp-admin/includes/schema.php        2010-06-11 17:04:06 UTC (rev 15227)
</span><span class="lines">@@ -314,6 +314,10 @@
</span><span class="cx">         'embed_autourls' =&gt; 1,
</span><span class="cx">         'embed_size_w' =&gt; '',
</span><span class="cx">         'embed_size_h' =&gt; 600,
</span><ins>+
+        // 3.0
+        'page_for_posts' =&gt; 0,
+        'page_on_front' =&gt; 0,
</ins><span class="cx">         );
</span><span class="cx"> 
</span><span class="cx">         // 3.0 multisite
</span></span></pre></div>
<a id="trunkwpadminoptionsreadingphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-reading.php (15226 => 15227)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-reading.php        2010-06-11 16:55:41 UTC (rev 15226)
+++ trunk/wp-admin/options-reading.php        2010-06-11 17:04:06 UTC (rev 15227)
</span><span class="lines">@@ -38,7 +38,10 @@
</span><span class="cx"> &lt;?php if ( ! get_pages() ) : ?&gt;
</span><span class="cx"> &lt;input name=&quot;show_on_front&quot; type=&quot;hidden&quot; value=&quot;posts&quot; /&gt;
</span><span class="cx"> &lt;table class=&quot;form-table&quot;&gt;
</span><del>-&lt;?php else : ?&gt;
</del><ins>+&lt;?php else :
+        if ( 'page' == get_option( 'show_on_front' ) &amp;&amp; ! get_option( 'page_on_front' ) &amp;&amp; ! get_option( 'page_for_posts' ) )
+                update_option( 'show_on_front', 'posts' );
+?&gt;
</ins><span class="cx"> &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx"> &lt;tr valign=&quot;top&quot;&gt;
</span><span class="cx"> &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Front page displays' ); ?&gt;&lt;/th&gt;
</span><span class="lines">@@ -54,8 +57,8 @@
</span><span class="cx">         &lt;/label&gt;
</span><span class="cx">         &lt;/p&gt;
</span><span class="cx"> &lt;ul&gt;
</span><del>-        &lt;li&gt;&lt;label for=&quot;page_on_front&quot;&gt;&lt;?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' =&gt; 'page_on_front', 'echo' =&gt; 0, 'show_option_none' =&gt; __( '&amp;mdash; Select &amp;mdash;' ), 'selected' =&gt; get_option( 'page_on_front' ) ) ) ); ?&gt;&lt;/label&gt;&lt;/li&gt;
-        &lt;li&gt;&lt;label for=&quot;page_for_posts&quot;&gt;&lt;?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' =&gt; 'page_for_posts', 'echo' =&gt; 0, 'show_option_none' =&gt; __( '&amp;mdash; Select &amp;mdash;' ), 'selected' =&gt; get_option( 'page_for_posts' ) ) ) ); ?&gt;&lt;/label&gt;&lt;/li&gt;
</del><ins>+        &lt;li&gt;&lt;label for=&quot;page_on_front&quot;&gt;&lt;?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' =&gt; 'page_on_front', 'echo' =&gt; 0, 'show_option_none' =&gt; __( '&amp;mdash; Select &amp;mdash;' ), 'option_none_value' =&gt; '0', 'selected' =&gt; get_option( 'page_on_front' ) ) ) ); ?&gt;&lt;/label&gt;&lt;/li&gt;
+        &lt;li&gt;&lt;label for=&quot;page_for_posts&quot;&gt;&lt;?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' =&gt; 'page_for_posts', 'echo' =&gt; 0, 'show_option_none' =&gt; __( '&amp;mdash; Select &amp;mdash;' ), 'option_none_value' =&gt; '0', 'selected' =&gt; get_option( 'page_for_posts' ) ) ) ); ?&gt;&lt;/label&gt;&lt;/li&gt;
</ins><span class="cx"> &lt;/ul&gt;
</span><span class="cx"> &lt;?php if ( 'page' == get_option( 'show_on_front' ) &amp;&amp; get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?&gt;
</span><span class="cx"> &lt;div id=&quot;front-page-warning&quot; class=&quot;error inline&quot;&gt;&lt;p&gt;&lt;?php _e( '&lt;strong&gt;Warning:&lt;/strong&gt; these pages should not be the same!' ); ?&gt;&lt;/p&gt;&lt;/div&gt;
</span></span></pre></div>
<a id="trunkwpincludesformattingphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/formatting.php (15226 => 15227)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/formatting.php        2010-06-11 16:55:41 UTC (rev 15226)
+++ trunk/wp-includes/formatting.php        2010-06-11 17:04:06 UTC (rev 15227)
</span><span class="lines">@@ -2402,6 +2402,7 @@
</span><span class="cx">                 case 'mailserver_port':
</span><span class="cx">                 case 'comment_max_links':
</span><span class="cx">                 case 'page_on_front':
</span><ins>+                case 'page_for_posts':
</ins><span class="cx">                 case 'rss_excerpt_length':
</span><span class="cx">                 case 'default_category':
</span><span class="cx">                 case 'default_email_category':
</span></span></pre></div>
<a id="trunkwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/general-template.php (15226 => 15227)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/general-template.php        2010-06-11 16:55:41 UTC (rev 15226)
+++ trunk/wp-includes/general-template.php        2010-06-11 17:04:06 UTC (rev 15227)
</span><span class="lines">@@ -585,7 +585,7 @@
</span><span class="cx">         // If there is a post
</span><span class="cx">         if ( is_single() || ( is_home() &amp;&amp; !is_front_page() ) || ( is_page() &amp;&amp; !is_front_page() ) ) {
</span><span class="cx">                 $post = $wp_query-&gt;get_queried_object();
</span><del>-                $title = apply_filters( 'single_post_title', empty( $post-&gt;post_title ) ? '' : $post-&gt;post_title );
</del><ins>+                $title = apply_filters( 'single_post_title', $post-&gt;post_title );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // If there's a taxonomy
</span></span></pre>
</div>
</div>

</body>
</html>