WordPress.org

Make WordPress Core

Changeset 20203


Ignore:
Timestamp:
03/16/2012 04:37:49 AM (9 years ago)
Author:
nacin
Message:

Size options on options-media.php are allowed to be 0 or otherwise empty. see #17863.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-media.php

    r20168 r20203  
    6161<td>
    6262<label for="thumbnail_size_w"><?php _e('Width'); ?></label>
    63 <input name="thumbnail_size_w" type="number" step="1" min="1" id="thumbnail_size_w" value="<?php form_option('thumbnail_size_w'); ?>" class="small-text" />
     63<input name="thumbnail_size_w" type="number" step="1" min="0" id="thumbnail_size_w" value="<?php form_option('thumbnail_size_w'); ?>" class="small-text" />
    6464<label for="thumbnail_size_h"><?php _e('Height'); ?></label>
    65 <input name="thumbnail_size_h" type="number" step="1" min="1" id="thumbnail_size_h" value="<?php form_option('thumbnail_size_h'); ?>" class="small-text" /><br />
     65<input name="thumbnail_size_h" type="number" step="1" min="0" id="thumbnail_size_h" value="<?php form_option('thumbnail_size_h'); ?>" class="small-text" /><br />
    6666<input name="thumbnail_crop" type="checkbox" id="thumbnail_crop" value="1" <?php checked('1', get_option('thumbnail_crop')); ?>/>
    6767<label for="thumbnail_crop"><?php _e('Crop thumbnail to exact dimensions (normally thumbnails are proportional)'); ?></label>
     
    7373<td><fieldset><legend class="screen-reader-text"><span><?php _e('Medium size'); ?></span></legend>
    7474<label for="medium_size_w"><?php _e('Max Width'); ?></label>
    75 <input name="medium_size_w" type="number" step="1" min="1" id="medium_size_w" value="<?php form_option('medium_size_w'); ?>" class="small-text" />
     75<input name="medium_size_w" type="number" step="1" min="0" id="medium_size_w" value="<?php form_option('medium_size_w'); ?>" class="small-text" />
    7676<label for="medium_size_h"><?php _e('Max Height'); ?></label>
    77 <input name="medium_size_h" type="number" step="1" min="1" id="medium_size_h" value="<?php form_option('medium_size_h'); ?>" class="small-text" />
     77<input name="medium_size_h" type="number" step="1" min="0" id="medium_size_h" value="<?php form_option('medium_size_h'); ?>" class="small-text" />
    7878</fieldset></td>
    7979</tr>
     
    8383<td><fieldset><legend class="screen-reader-text"><span><?php _e('Large size'); ?></span></legend>
    8484<label for="large_size_w"><?php _e('Max Width'); ?></label>
    85 <input name="large_size_w" type="number" step="1" min="1" id="large_size_w" value="<?php form_option('large_size_w'); ?>" class="small-text" />
     85<input name="large_size_w" type="number" step="1" min="0" id="large_size_w" value="<?php form_option('large_size_w'); ?>" class="small-text" />
    8686<label for="large_size_h"><?php _e('Max Height'); ?></label>
    87 <input name="large_size_h" type="number" step="1" min="1" id="large_size_h" value="<?php form_option('large_size_h'); ?>" class="small-text" />
     87<input name="large_size_h" type="number" step="1" min="0" id="large_size_h" value="<?php form_option('large_size_h'); ?>" class="small-text" />
    8888</fieldset></td>
    8989</tr>
     
    107107<td>
    108108<label for="embed_size_w"><?php _e('Width'); ?></label>
    109 <input name="embed_size_w" type="number" step="1" min="1" id="embed_size_w" value="<?php form_option('embed_size_w'); ?>" class="small-text" />
     109<input name="embed_size_w" type="number" step="1" min="0" id="embed_size_w" value="<?php form_option('embed_size_w'); ?>" class="small-text" />
    110110<label for="embed_size_h"><?php _e('Height'); ?></label>
    111 <input name="embed_size_h" type="number" step="1" min="1" id="embed_size_h" value="<?php form_option('embed_size_h'); ?>" class="small-text" />
     111<input name="embed_size_h" type="number" step="1" min="0" id="embed_size_h" value="<?php form_option('embed_size_h'); ?>" class="small-text" />
    112112<?php if ( !empty($content_width) ) echo '<br />' . __("If the width value is left blank, embeds will default to the max width of your theme."); ?>
    113113</td>
Note: See TracChangeset for help on using the changeset viewer.