Ticket #14403: 14403.diff

File 14403.diff, 637 bytes (added by nacin, 3 years ago)

Simple patch.

Line 
1Index: wp-admin/options-reading.php
2===================================================================
3--- wp-admin/options-reading.php        (revision 15468)
4+++ wp-admin/options-reading.php        (working copy)
5@@ -38,7 +38,10 @@
6 <?php if ( ! get_pages() ) : ?>
7 <input name="show_on_front" type="hidden" value="posts" />
8 <table class="form-table">
9-<?php else :
10+<?php
11+       if ( 'posts' != get_option( 'show_on_front' ) )
12+               update_option( 'show_on_front', 'posts' );
13+else :
14        if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
15                update_option( 'show_on_front', 'posts' );
16 ?>