Ticket #12295: 12295.002.diff
File 12295.002.diff, 2.7 KB (added by , 13 years ago) |
---|
-
wp-includes/registration.php
323 323 */ 324 324 function _wp_get_user_contactmethods() { 325 325 $user_contactmethods = array( 326 'user_email' => __('E-Mail'), 327 'user_url' => __('Website'), 326 328 'aim' => __('AIM'), 327 329 'yim' => __('Yahoo IM'), 328 330 'jabber' => __('Jabber / Google Talk') … … (this hunk was shorter than expected) 281 289 </tr> 282 290 </table> 283 291 284 <h3><?php _e('Contact Info') ?></h3>285 292 286 <table class="form-table"> 287 <tr> 288 <th><label for="email"><?php _e('E-mail'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th> 289 <td><input type="text" name="email" id="email" value="<?php echo esc_attr($profileuser->user_email) ?>" class="regular-text" /></td> 290 </tr> 293 <?php 294 $user_contactmethods = _wp_get_user_contactmethods(); 291 295 292 <tr> 293 <th><label for="url"><?php _e('Website') ?></label></th> 294 <td><input type="text" name="url" id="url" value="<?php echo esc_attr($profileuser->user_url) ?>" class="regular-text code" /></td> 295 </tr> 296 // For backwards compatibility 297 function user_user_email_label($desc){ 298 return $desc.' <span class="description">'. __('(required)').'</span>'; 299 } 300 add_filter('user_user_email_label','user_user_email_label'); 296 301 297 <?php 298 foreach (_wp_get_user_contactmethods() as $name => $desc) { 302 if (!empty($user_contactmethods)) { 299 303 ?> 300 <tr> 304 305 <div id="profile-contact-info"> 306 307 <h3 id="profile-contact-info-title"><?php _e('Contact Info') ?></h3> 308 309 <table class="form-table"> 310 311 <?php 312 foreach ($user_contactmethods as $name => $desc) { 313 ?> 314 <tr id="profile-contact-info-<?php echo $name; ?>"> 301 315 <th><label for="<?php echo $name; ?>"><?php echo apply_filters('user_'.$name.'_label', $desc); ?></label></th> 302 316 <td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr($profileuser->$name) ?>" class="regular-text" /></td> 303 317 </tr> … … 306 321 ?> 307 322 </table> 308 323 309 <h3><?php IS_PROFILE_PAGE ? _e('About Yourself') : _e('About the user'); ?></h3> 324 </div> 325 <?php 326 } 327 ?> 310 328 329 <div id="profile-about-yourself"> 330 331 <h3 id="profile-about-yourself-title"><?php IS_PROFILE_PAGE ? _e('About Yourself') : _e('About the user'); ?></h3> 332 311 333 <table class="form-table"> 312 <tr >334 <tr id="profile-about-yourself-description"> 313 335 <th><label for="description"><?php _e('Biographical Info'); ?></label></th> 314 336 <td><textarea name="description" id="description" rows="5" cols="30"><?php echo esc_html($profileuser->description); ?></textarea><br /> 315 337 <span class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></span></td>