When no pages are present add a hidden input field so that the show_on_front option is not blanked. Fixes is_front_page return value in an edge case. props sivel, fixes #12737, fixes #9105.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-03 06:30:21 +00:00
parent 0b597379e4
commit a4d7fcdbf8
1 changed files with 4 additions and 1 deletions

View File

@ -25,8 +25,11 @@ include( './admin-header.php' );
<form name="form1" method="post" action="options.php">
<?php settings_fields( 'reading' ); ?>
<?php if ( ! get_pages() ) : ?>
<input name="show_on_front" type="hidden" value="posts" />
<table class="form-table">
<?php else : ?>
<table class="form-table">
<?php if ( get_pages() ): ?>
<tr valign="top">
<th scope="row"><?php _e( 'Front page displays' ); ?></th>
<td id="front-static-pages"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Front page displays' ); ?></span></legend>