WordPress.org

Make WordPress Core

Ticket #13830: 13830.diff

File 13830.diff, 2.8 KB (added by nacin, 8 years ago)
  • wp-includes/formatting.php

     
    24022402                case 'mailserver_port':
    24032403                case 'comment_max_links':
    24042404                case 'page_on_front':
     2405                case 'page_for_posts':
    24052406                case 'rss_excerpt_length':
    24062407                case 'default_category':
    24072408                case 'default_email_category':
  • wp-admin/includes/schema.php

     
    314314        'embed_autourls' => 1,
    315315        'embed_size_w' => '',
    316316        'embed_size_h' => 600,
     317
     318        // 3.0
     319        'page_for_posts' => 0,
     320        'page_on_front' => 0,
    317321        );
    318322
    319323        // 3.0 multisite
  • 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 else :
     42        if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
     43                update_option( 'show_on_front', 'posts' );
     44?>
    4245<table class="form-table">
    4346<tr valign="top">
    4447<th scope="row"><?php _e( 'Front page displays' ); ?></th>
     
    5457        </label>
    5558        </p>
    5659<ul>
    57         <li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
    58         <li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' => 'page_for_posts', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
     60        <li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
     61        <li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' => 'page_for_posts', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
    5962</ul>
    6063<?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
    6164<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>