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

git-svn-id: https://develop.svn.wordpress.org/trunk@16816 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-12-08 21:02:07 +00:00
parent cfe4cf192b
commit 7a7e7542d1

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' );
?>