WordPress.org

Make WordPress Core

Ticket #17863: 17863.diff

File 17863.diff, 20.1 KB (added by garyc40, 9 years ago)

An initial patch to get the ball rolling.

  • wp-admin/edit-form-comment.php

    $date = date_i18n( $datef, strtotime( $comment->comment_date ) ); 
    9292                        _e( 'E-mail:' );
    9393                }
    9494?></td>
    95         <td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" tabindex="2" id="email" /></td>
     95        <td><input type="email" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" tabindex="2" id="email" /></td>
    9696</tr>
    9797<tr valign="top">
    9898        <td class="first">
    $date = date_i18n( $datef, strtotime( $comment->comment_date ) ); 
    103103                } else {
    104104                        _e( 'URL:' );
    105105                } ?></td>
    106         <td><input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" tabindex="3" /></td>
     106        <td><input type="url" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" tabindex="3" /></td>
    107107</tr>
    108108</tbody>
    109109</table>
  • wp-admin/edit-link-form.php

    if ( 1 != $screen_layout_columns ) { 
    9898<div id="addressdiv" class="stuffbox">
    9999<h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
    100100<div class="inside">
    101         <input type="text" name="link_url" size="30" class="code" tabindex="1" value="<?php echo esc_attr($link->link_url); ?>" id="link_url" />
     101        <input type="url" name="link_url" size="30" class="code" tabindex="1" value="<?php echo esc_attr($link->link_url); ?>" id="link_url" />
    102102    <p><?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?></p>
    103103</div>
    104104</div>
  • wp-admin/includes/class-wp-list-table.php

    class WP_List_Table { 
    212212?>
    213213<p class="search-box">
    214214        <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
    215         <input type="text" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
     215        <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
    216216        <?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
    217217</p>
    218218<?php
  • wp-admin/includes/dashboard.php

    function wp_network_dashboard_right_now() { 
    463463
    464464        <form name="searchform" action="<?php echo network_admin_url('users.php'); ?>" method="get">
    465465                <p>
    466                         <input type="text" name="s" value="" size="17" />
     466                        <input type="search" name="s" value="" size="17" />
    467467                        <?php submit_button( __( 'Search Users' ), 'button', 'submit', false, array( 'id' => 'submit_users' ) ); ?>
    468468                </p>
    469469        </form>
    470470
    471471        <form name="searchform" action="<?php echo network_admin_url('sites.php'); ?>" method="get">
    472472                <p>
    473                         <input type="text" name="s" value="" size="17" />
     473                        <input type="search" name="s" value="" size="17" />
    474474                        <?php submit_button( __( 'Search Sites' ), 'button', 'submit', false, array( 'id' => 'submit_sites' ) ); ?>
    475475                </p>
    476476        </form>
  • wp-admin/includes/media.php

    function media_upload_library_form($errors) { 
    17771777
    17781778<p id="media-search" class="search-box">
    17791779        <label class="screen-reader-text" for="media-search-input"><?php _e('Search Media');?>:</label>
    1780         <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
     1780        <input type="search" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
    17811781        <?php submit_button( __( 'Search Media' ), 'button', '', false ); ?>
    17821782</p>
    17831783
  • wp-admin/includes/ms.php

    function upload_space_setting( $id ) { 
    423423        ?>
    424424        <tr>
    425425                <th><?php _e( 'Site Upload Space Quota '); ?></th>
    426                 <td><input type="text" size="3" name="option[blog_upload_space]" value="<?php echo $quota; ?>" /> <?php _e( 'MB (Leave blank for network default)' ); ?></td>
     426                <td><input type="number" size="3" name="option[blog_upload_space]" value="<?php echo $quota; ?>" /> <?php _e( 'MB (Leave blank for network default)' ); ?></td>
    427427        </tr>
    428428        <?php
    429429}
  • wp-admin/includes/nav-menu.php

    class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { 
    127127                                        <p class="field-url description description-wide">
    128128                                                <label for="edit-menu-item-url-<?php echo $item_id; ?>">
    129129                                                        <?php _e( 'URL' ); ?><br />
    130                                                         <input type="text" id="edit-menu-item-url-<?php echo $item_id; ?>" class="widefat code edit-menu-item-url" name="menu-item-url[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->url ); ?>" />
     130                                                        <input type="url" id="edit-menu-item-url-<?php echo $item_id; ?>" class="widefat code edit-menu-item-url" name="menu-item-url[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->url ); ?>" />
    131131                                                </label>
    132132                                        </p>
    133133                                <?php endif; ?>
    function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) { 
    691691                        }
    692692                        ?>
    693693                        <p class="quick-search-wrap">
    694                                 <input type="text" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" />
     694                                <input type="search" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" />
    695695                                <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
    696696                                <?php submit_button( __( 'Search' ), 'quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?>
    697697                        </p>
    function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) { 
    923923                        }
    924924                        ?>
    925925                        <p class="quick-search-wrap">
    926                                 <input type="text" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
     926                                <input type="search" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
    927927                                <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
    928928                                <?php submit_button( __( 'Search' ), 'quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?>
    929929                        </p>
  • wp-admin/includes/plugin-install.php

    function install_search_form(){ 
    127127                        <option value="author"<?php selected('author', $type) ?>><?php _e('Author'); ?></option>
    128128                        <option value="tag"<?php selected('tag', $type) ?>><?php _ex('Tag', 'Plugin Installer'); ?></option>
    129129                </select>
    130                 <input type="text" name="s" value="<?php echo esc_attr($term) ?>" />
     130                <input type="search" name="s" value="<?php echo esc_attr($term) ?>" />
    131131                <label class="screen-reader-text" for="plugin-search-input"><?php _e('Search Plugins'); ?></label>
    132132                <?php submit_button( __( 'Search Plugins' ), 'button', 'plugin-search-input', false ); ?>
    133133        </form><?php
  • wp-admin/includes/screen.php

    final class WP_Screen { 
    936936                <h5><?php _ex('Show on screen', 'Screen Options') ?></h5>
    937937                <div class='screen-options'>
    938938                        <?php if ( !empty($per_page_label) ): ?>
    939                                 <input type='text' class='screen-per-page' name='wp_screen_options[value]'
     939                                <input type='number' class='screen-per-page' name='wp_screen_options[value]'
    940940                                        id='<?php echo esc_attr( $option ); ?>' maxlength='3'
    941941                                        value='<?php echo esc_attr( $per_page ); ?>' />
    942942                                <label for='<?php echo esc_attr( $option ); ?>'>
  • wp-admin/includes/template.php

    function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', 
    320320
    321321                <div class="inside">
    322322                <label for="author-email"><?php _e('E-mail') ?></label>
    323                 <input type="text" name="newcomment_author_email" size="50" value="" tabindex="102" id="author-email" />
     323                <input type="email" name="newcomment_author_email" size="50" value="" tabindex="102" id="author-email" />
    324324                </div>
    325325
    326326                <div class="inside">
    327327                <label for="author-url"><?php _e('URL') ?></label>
    328                 <input type="text" id="author-url" name="newcomment_author_url" size="103" value="" tabindex="103" />
     328                <input type="url" id="author-url" name="newcomment_author_url" size="103" value="" tabindex="103" />
    329329                </div>
    330330                <div style="clear:both;"></div>
    331331        </div>
    function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { 
    593593        }
    594594        $month .= '</select>';
    595595
    596         $day = '<input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    597         $year = '<input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
    598         $hour = '<input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    599         $minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     596        $day = '<input type="number" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     597        $year = '<input type="number" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
     598        $hour = '<input type="number" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
     599        $minute = '<input type="number" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
    600600
    601601        echo '<div class="timestamp-wrap">';
    602602        /* translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */
  • wp-admin/includes/theme-install.php

    function install_theme_search_form() { 
    6262        <option value="author" <?php selected('author', $type) ?>><?php _e('Author'); ?></option>
    6363        <option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option>
    6464        </select>
    65         <input type="text" name="s" size="30" value="<?php echo esc_attr($term) ?>" />
     65        <input type="search" name="s" size="30" value="<?php echo esc_attr($term) ?>" />
    6666        <?php submit_button( __( 'Search' ), 'button', 'search', false ); ?>
    6767</form>
    6868<?php
  • wp-admin/network/settings.php

    if ( isset( $_GET['updated'] ) ) { 
    267267                        <tr valign="top">
    268268                                <th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ) ?></label></th>
    269269                                <td>
    270                                         <input type="text" size="40" name="first_comment_url" id="first_comment_url" value="<?php echo esc_attr( get_site_option( 'first_comment_url' ) ) ?>" />
     270                                        <input type="url" size="40" name="first_comment_url" id="first_comment_url" value="<?php echo esc_attr( get_site_option( 'first_comment_url' ) ) ?>" />
    271271                                        <br />
    272272                                        <?php _e( 'The URL for the first comment on a new site.' ) ?>
    273273                                </td>
  • wp-admin/network/site-users.php

    endif; ?> 
    290290                </tr>
    291291                <tr>
    292292                        <th scope="row"><?php _e( 'Email' ) ?></th>
    293                         <td><input type="text" class="regular-text" name="user[email]" /></td>
     293                        <td><input type="email" class="regular-text" name="user[email]" /></td>
    294294                </tr>
    295295                <tr>
    296296                        <th scope="row"><?php _e( 'Role'); ?></th>
  • wp-admin/themes.php

    if ( ! current_user_can( 'switch_themes' ) ) { 
    162162
    163163<p class="search-box">
    164164        <label class="screen-reader-text" for="theme-search-input"><?php _e('Search Installed Themes'); ?>:</label>
    165         <input type="text" id="theme-search-input" name="s" value="<?php _admin_search_query(); ?>" />
     165        <input type="search" id="theme-search-input" name="s" value="<?php _admin_search_query(); ?>" />
    166166        <?php submit_button( __( 'Search Installed Themes' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
    167167        <a id="filter-click" href="?filter=1"><?php _e( 'Feature Filter' ); ?></a>
    168168</p>
  • wp-admin/user-edit.php

    if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c 
    333333<table class="form-table">
    334334<tr>
    335335        <th><label for="email"><?php _e('E-mail'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
    336         <td><input type="text" name="email" id="email" value="<?php echo esc_attr($profileuser->user_email) ?>" class="regular-text" />
     336        <td><input type="email" name="email" id="email" value="<?php echo esc_attr($profileuser->user_email) ?>" class="regular-text" />
    337337        <?php
    338338        $new_email = get_option( $current_user->ID . '_new_email' );
    339339        if ( $new_email && $new_email != $current_user->user_email ) : ?>
    if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c 
    346346
    347347<tr>
    348348        <th><label for="url"><?php _e('Website') ?></label></th>
    349         <td><input type="text" name="url" id="url" value="<?php echo esc_attr($profileuser->user_url) ?>" class="regular-text code" /></td>
     349        <td><input type="url" name="url" id="url" value="<?php echo esc_attr($profileuser->user_url) ?>" class="regular-text code" /></td>
    350350</tr>
    351351
    352352<?php
  • wp-content/themes/twentyeleven/searchform.php

     
    99?>
    1010        <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    1111                <label for="s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label>
    12                 <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
     12                <input type="search" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    1313                <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />
    1414        </form>
  • wp-includes/class-wp-editor.php

    final class _WP_Editors { 
    764764                        <div class="link-search-wrapper">
    765765                                <label>
    766766                                        <span><?php _e( 'Search' ); ?></span>
    767                                         <input type="text" id="search-field" class="link-search-field" tabindex="60" autocomplete="off" />
     767                                        <input type="search" id="search-field" class="link-search-field" tabindex="60" autocomplete="off" />
    768768                                        <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
    769769                                </label>
    770770                        </div>
  • wp-includes/general-template.php

    function get_search_form($echo = true) { 
    159159
    160160        $form = '<form role="search" method="get" id="searchform" action="' . esc_url( home_url( '/' ) ) . '" >
    161161        <div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
    162         <input type="text" value="' . get_search_query() . '" name="s" id="s" />
     162        <input type="search" value="' . get_search_query() . '" name="s" id="s" />
    163163        <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
    164164        </div>
    165165        </form>';
  • wp-includes/theme-compat/comments-popup.php

    if ( post_password_required($post) ) { // and it doesn't match the cookie 
    7676        </p>
    7777
    7878        <p>
    79           <input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="28" tabindex="2" />
     79          <input type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="28" tabindex="2" />
    8080           <label for="email"><?php _e('E-mail'); ?></label>
    8181        </p>
    8282
    8383        <p>
    84           <input type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="28" tabindex="3" />
     84          <input type="url" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="28" tabindex="3" />
    8585           <label for="url"><?php _e('<abbr title="Universal Resource Locator">URL</abbr>'); ?></label>
    8686        </p>
    8787<?php endif; ?>
  • wp-includes/theme-compat/comments.php

    _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3. 
    7676<p><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
    7777<label for="author"><small><?php _e('Name'); ?> <?php if ($req) _e('(required)'); ?></small></label></p>
    7878
    79 <p><input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
     79<p><input type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
    8080<label for="email"><small><?php _e('Mail (will not be published)'); ?> <?php if ($req) _e('(required)'); ?></small></label></p>
    8181
    82 <p><input type="text" name="url" id="url" value="<?php echo  esc_attr($comment_author_url); ?>" size="22" tabindex="3" />
     82<p><input type="url" name="url" id="url" value="<?php echo  esc_attr($comment_author_url); ?>" size="22" tabindex="3" />
    8383<label for="url"><small><?php _e('Website'); ?></small></label></p>
    8484
    8585<?php endif; ?>