Advertisement
jcx1028

Profile-form.php

Jan 9th, 2012
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.96 KB | None | 0 0
  1. `<?php /* If you would like to edit this file, copy it to your current theme's directory and edit it there. Theme My Login will always look in your theme's directory first, before using this default template. */  $GLOBALS['current_user'] = $current_user = wp_get_current_user(); $GLOBALS['profileuser'] = $profileuser = get_user_to_edit( $current_user->ID );  $user_can_edit = false; foreach ( array( 'posts', 'pages' ) as $post_cap )  $user_can_edit |= current_user_can( "edit_$post_cap" ); ?>
  2.   <div class="login profile" id="theme-my-login<?php $template->the_instance(); ?>">
  3.     <?php $template->the_action_template_message( 'profile' ); ?>
  4.     <?php $template->the_errors(); ?>
  5.     <form id="your-profile" action="" method="post">
  6.         <?php wp_nonce_field( 'update-user_' . $current_user->ID ) ?>
  7.         <p>
  8.             <input type="hidden" name="from" value="profile" />
  9.             <input type="hidden" name="checkuser_id" value="<?php echo $current_user->ID; ?>" />
  10.         </p>
  11.         <h3><?php _e( 'Personal Options', 'theme-my-login' ); ?></h3>
  12.         <table class="form-table">
  13.         <?php if ( rich_edit_exists() && $user_can_edit ) : // don't bother showing the option if the editor has been removed ?>
  14.         <tr>
  15.             <th scope="row"><?php _e( 'Visual Editor', 'theme-my-login' )?></th>
  16.             <td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php checked( 'false', $profileuser->rich_editing ); ?> />
  17.  <?php _e( 'Disable the visual editor when writing', 'theme-my-login' ); ?></label></td>
  18.         </tr>
  19.         <?php endif; ?>
  20.         <?php if ( count( $GLOBALS['_wp_admin_css_colors'] ) > 1 && has_action( 'admin_color_scheme_picker' ) ) : ?>
  21.         <tr>
  22.             <th scope="row"><?php _e( 'Admin Color Scheme', 'theme-my-login' )?></th>
  23.             <td><?php do_action( 'admin_color_scheme_picker' ); ?></td>
  24.         </tr>
  25.         <?php       endif; // $_wp_admin_css_colors         if ( $user_can_edit ) : ?>
  26.         <tr>
  27.             <th scope="row"><?php _e( 'Keyboard Shortcuts', 'theme-my-login' ); ?></th>
  28.             <td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php if ( !empty( $profileuser->comment_shortcuts ) ) checked( 'true', $profileuser->comment_shortcuts ); ?> /> <?php _e( 'Enable keyboard shortcuts for comment moderation.', 'theme-my-login' ); ?></label> <?php _e( '<a href="http://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">More information</a>', 'theme-my-login' ); ?></td>
  29.         </tr>
  30.         <?php endif; ?>
  31.         <?php if ( function_exists( '_get_admin_bar_pref' ) ) : ?>
  32.         <tr class="show-admin-bar">
  33.             <th scope="row"><?php _e( 'Show Admin Bar', 'theme-my-login' )?></th>
  34.             <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Show Admin Bar', 'theme-my-login' ); ?></span></legend>               <label for="admin_bar_front">
  35.                 <input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1" <?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> />
  36.                 <?php /* translators: Show admin bar when viewing site */ _e( 'when viewing site', 'theme-my-login' ); ?></label><br />                 <label for="admin_bar_admin">
  37.                 <input name="admin_bar_admin" type="checkbox" id="admin_bar_admin" value="1" <?php checked( _get_admin_bar_pref( 'admin', $profileuser->ID ) ); ?> />
  38.                 <?php /* translators: Show admin bar in dashboard */ _e( 'in dashboard', 'theme-my-login' ); ?></label>
  39.             </td>
  40.         </tr>
  41.         <?php endif; // function exists ?>
  42.         <?php do_action( 'personal_options', $profileuser ); ?>         </table>
  43.         <?php do_action( 'profile_personal_options', $profileuser ); ?>         <h3><?php _e( 'Name', 'theme-my-login' ) ?></h3>
  44.         <table class="form-table">
  45.         <tr>
  46.             <th><label for="user_login"><?php _e( 'Username', 'theme-my-login' ); ?></label></th>
  47.             <td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profileuser->user_login ); ?>" disabled="disabled" class="regular-text" /> <span class="description">
  48. <?php _e( 'Your username cannot be changed.', 'theme-my-login' ); ?>`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement