WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/10/2012 01:23:48 AM (7 years ago)
Author:
azaozz
Message:

Set proper HTML5 input types in the admin, props georgestephanis, fixes #17863

File:
1 edited

Legend:

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

    r19507 r20168  
    6161<td>
    6262<label for="thumbnail_size_w"><?php _e('Width'); ?></label>
    63 <input name="thumbnail_size_w" type="text" 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="1" 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="text" 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="1" 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="text" 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="1" 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="text" 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="1" 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="text" 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="1" 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="text" 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="1" 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="text" 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="1" 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="text" 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="1" 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>
     
    129129<tr valign="top">
    130130<th scope="row"><label for="upload_url_path"><?php _e('Full URL path to files'); ?></label></th>
    131 <td><input name="upload_url_path" type="text" id="upload_url_path" value="<?php echo esc_attr( get_option('upload_url_path')); ?>" class="regular-text code" />
     131<td><input name="upload_url_path" type="url" id="upload_url_path" value="<?php echo esc_attr( get_option('upload_url_path')); ?>" class="regular-text code" />
    132132<span class="description"><?php _e('Configuring this is optional. By default, it should be blank.'); ?></span>
    133133</td>
Note: See TracChangeset for help on using the changeset viewer.