Make WordPress Core

Ticket #12737: 12737-hidden.diff

File 12737-hidden.diff, 728 bytes (added by sivel, 14 years ago)

When no pages are present add a hidden input field so that the option is not blanked

  • wp-admin/options-reading.php

     
    2525<form name="form1" method="post" action="options.php">
    2626<?php settings_fields( 'reading' ); ?>
    2727
     28<?php if ( ! get_pages() ) : ?>
     29<input name="show_on_front" type="hidden" value="posts" />
    2830<table class="form-table">
    29 <?php if ( get_pages() ): ?>
     31<?php else : ?>
     32<table class="form-table">
    3033<tr valign="top">
    3134<th scope="row"><?php _e( 'Front page displays' ); ?></th>
    3235<td id="front-static-pages"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Front page displays' ); ?></span></legend>