mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Fix warnings related to static pages. props zeo for initial patch. fixes #13830.
git-svn-id: https://develop.svn.wordpress.org/trunk@15227 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -38,7 +38,10 @@ include( './admin-header.php' );
|
||||
<?php if ( ! get_pages() ) : ?>
|
||||
<input name="show_on_front" type="hidden" value="posts" />
|
||||
<table class="form-table">
|
||||
<?php else : ?>
|
||||
<?php else :
|
||||
if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
|
||||
update_option( 'show_on_front', 'posts' );
|
||||
?>
|
||||
<table class="form-table">
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e( 'Front page displays' ); ?></th>
|
||||
@@ -54,8 +57,8 @@ include( './admin-header.php' );
|
||||
</label>
|
||||
</p>
|
||||
<ul>
|
||||
<li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __( '— Select —' ), 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
|
||||
<li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' => 'page_for_posts', 'echo' => 0, 'show_option_none' => __( '— Select —' ), 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
|
||||
<li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __( '— Select —' ), 'option_none_value' => '0', 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
|
||||
<li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' => 'page_for_posts', 'echo' => 0, 'show_option_none' => __( '— Select —' ), 'option_none_value' => '0', 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
|
||||
</ul>
|
||||
<?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
|
||||
<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
|
||||
|
||||
Reference in New Issue
Block a user