- A324350A555E58F3B0AD3F90EB42221F7C16672925A02C1714573E2141CA4FA7FB36105906C98B1C60EBA1A3A9EAC655F5D841E361A81CFE17A29D4330CC0825
+ 209D66AB03788C276DF00EB43DE5DC5610305F655D48699ED07B52E4F909901BC4EA9C4741DFC6194AD1DC3EAF83FC8187F4FE96465ECECBD283FA2F7F8A9054
mp-wp/wp-admin/user-edit.php
(14 . 69)(14 . 6)
31021 else
31022 $is_profile_page = false;
31023
31024 /**
31025 * Display JavaScript for profile page.
31026 *
31027 * @since 2.5.0
31028 */
31029 function profile_js ( ) {
31030 ?>
31031 <script type="text/javascript">
31032 (function($){
31033
31034 function check_pass_strength () {
31035
31036 var pass = $('#pass1').val();
31037 var user = $('#user_login').val();
31038
31039 $('#pass-strength-result').removeClass('short bad good strong');
31040 if ( ! pass ) {
31041 $('#pass-strength-result').html( pwsL10n.empty );
31042 return;
31043 }
31044
31045 var strength = passwordStrength(pass, user);
31046
31047 if ( 2 == strength )
31048 $('#pass-strength-result').addClass('bad').html( pwsL10n.bad );
31049 else if ( 3 == strength )
31050 $('#pass-strength-result').addClass('good').html( pwsL10n.good );
31051 else if ( 4 == strength )
31052 $('#pass-strength-result').addClass('strong').html( pwsL10n.strong );
31053 else
31054 // this catches 'Too short' and the off chance anything else comes along
31055 $('#pass-strength-result').addClass('short').html( pwsL10n.short );
31056
31057 }
31058
31059 function update_nickname () {
31060
31061 var nickname = $('#nickname').val();
31062 var display_nickname = $('#display_nickname').val();
31063
31064 if ( nickname == '' ) {
31065 $('#display_nickname').remove();
31066 }
31067 $('#display_nickname').val(nickname).html(nickname);
31068
31069 }
31070
31071 $(document).ready( function() {
31072 $('#nickname').blur(update_nickname);
31073 $('#pass1').val('').keyup( check_pass_strength );
31074 $('.color-palette').click(function(){$(this).siblings('input[name=admin_color]').attr('checked', 'checked')});
31075 });
31076 })(jQuery);
31077 </script>
31078 <?php
31079 }
31080
31081 if ( $is_profile_page ) {
31082 add_action('admin_head', 'profile_js');
31083 wp_enqueue_script('jquery');
31084 wp_enqueue_script('password-strength-meter');
31085 }
31086
31087 $title = $is_profile_page? __('Profile') : __('Edit User');
31088 if ( current_user_can('edit_users') && !$is_profile_page )
31089 $submenu_file = 'users.php';
(192 . 35)(129 . 11)
31091 <h3><?php _e('Personal Options'); ?></h3>
31092
31093 <table class="form-table">
31094 <?php if (count($_wp_admin_css_colors) > 1 ) : ?>
31095 <tr>
31096 <th scope="row"><?php _e('Admin Color Scheme')?></th>
31097 <td><fieldset><legend class="hidden"><?php _e('Admin Color Scheme')?></legend>
31098 <?php
31099 $current_color = get_user_option('admin_color', $user_id);
31100 if ( empty($current_color) )
31101 $current_color = 'fresh';
31102 foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
31103 <div class="color-option"><input name="admin_color" id="admin_color_<?php echo $color; ?>" type="radio" value="<?php echo $color ?>" class="tog" <?php checked($color, $current_color); ?> />
31104 <table class="color-palette">
31105 <tr>
31106 <?php foreach ( $color_info->colors as $html_color ): ?>
31107 <td style="background-color: <?php echo $html_color ?>" title="<?php echo $color ?>"> </td>
31108 <?php endforeach; ?>
31109 </tr>
31110 </table>
31111
31112 <label for="admin_color_<?php echo $color; ?>"><?php echo $color_info->name ?></label>
31113 </div>
31114 <?php endforeach; ?>
31115 </fieldset></td>
31116 </tr>
31117 <tr>
31118 <th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th>
31119 <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. <a href="http://codex.wordpress.org/Keyboard_Shortcuts">More information</a>' ); ?></label></td>
31120 </tr>
31121 <?php
31122 endif;
31123 do_action('personal_options', $profileuser);
31124 ?>
31125 </table>