WordPress.org

Make WordPress Core

Ticket #14403: 14403.diff

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

Simple patch.

  • wp-admin/options-reading.php

     
    3838<?php if ( ! get_pages() ) : ?>
    3939<input name="show_on_front" type="hidden" value="posts" />
    4040<table class="form-table">
    41 <?php else :
     41<?php
     42        if ( 'posts' != get_option( 'show_on_front' ) )
     43                update_option( 'show_on_front', 'posts' );
     44else :
    4245        if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
    4346                update_option( 'show_on_front', 'posts' );
    4447?>