Update show_on_front to posts if there are no pages, just in case. see #14403.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-12-08 21:02:07 +00:00
parent cab472f456
commit 0bee77d185
1 changed files with 6 additions and 1 deletions

View File

@ -64,7 +64,12 @@ include( './admin-header.php' );
<?php if ( ! get_pages() ) : ?>
<input name="show_on_front" type="hidden" value="posts" />
<table class="form-table">
<?php else :
<?php
if ( 'posts' != get_option( 'show_on_front' ) ) :
update_option( 'show_on_front', 'posts' );
endif;
else :
if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
update_option( 'show_on_front', 'posts' );
?>