mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-29 03:18:27 +00:00
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:
parent
cab472f456
commit
0bee77d185
@ -64,7 +64,12 @@ include( './admin-header.php' );
|
|||||||
<?php if ( ! get_pages() ) : ?>
|
<?php if ( ! get_pages() ) : ?>
|
||||||
<input name="show_on_front" type="hidden" value="posts" />
|
<input name="show_on_front" type="hidden" value="posts" />
|
||||||
<table class="form-table">
|
<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' ) )
|
if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
|
||||||
update_option( 'show_on_front', 'posts' );
|
update_option( 'show_on_front', 'posts' );
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user