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: https://develop.svn.wordpress.org/trunk@14362 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-05-03 06:30:21 +00:00
parent 7ce20b12cf
commit d422587302
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>