WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/08/2014 05:51:58 PM (7 years ago)
Author:
johnbillion
Message:

Implement email and url input types where appropriate. Props Kau-Boy. Fixes #22183.

File:
1 edited

Legend:

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

    r29007 r29030  
    8787<h2><?php echo esc_html( $title ); ?></h2>
    8888
    89 <form method="post" action="options.php">
     89<form method="post" action="options.php" novalidate="novalidate">
    9090<?php settings_fields('general'); ?>
    9191
     
    103103<tr>
    104104<th scope="row"><label for="siteurl"><?php _e('WordPress Address (URL)') ?></label></th>
    105 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) echo ' disabled' ?>" /></td>
     105<td><input name="siteurl" type="url" id="siteurl" value="<?php form_option( 'siteurl' ); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) echo ' disabled' ?>" /></td>
    106106</tr>
    107107<tr>
    108108<th scope="row"><label for="home"><?php _e('Site Address (URL)') ?></label></th>
    109 <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" />
     109<td><input name="home" type="url" id="home" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" />
    110110<p class="description"><?php _e('Enter the address here if you want your site homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></p></td>
    111111</tr>
    112112<tr>
    113113<th scope="row"><label for="admin_email"><?php _e('E-mail Address') ?> </label></th>
    114 <td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text ltr" />
     114<td><input name="admin_email" type="email" id="admin_email" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" />
    115115<p class="description"><?php _e('This address is used for admin purposes, like new user notification.') ?></p></td>
    116116</tr>
     
    131131<tr>
    132132<th scope="row"><label for="new_admin_email"><?php _e('E-mail Address') ?> </label></th>
    133 <td><input name="new_admin_email" type="text" id="new_admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text ltr" />
     133<td><input name="new_admin_email" type="email" id="new_admin_email" value="<?php form_option( 'admin_email' ); ?>" class="regular-text ltr" />
    134134<p class="description"><?php _e('This address is used for admin purposes. If you change this we will send you an e-mail at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></p>
    135135<?php
Note: See TracChangeset for help on using the changeset viewer.