| @@ -10,10 +10,10 @@ | ||
| 10 | 10 | } |
| 11 | 11 | ?> |
| 12 | 12 | <div id="poststuff" class="ui-sortable meta-box-sortables"> |
| 13 | 13 | <div class="postbox"> |
| 14 | - <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"><br /></div> | |
| 15 | - <h3 class="hndle" id="set_theme" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"><?php | |
| 14 | + <div class="handlediv" title="<?php esc_attr_e( 'Click to toggle' ); ?>"><br /></div> | |
| 15 | + <h3 class="hndle" id="set_theme" title="<?php esc_attr_e( 'Click to toggle' ); ?>"><?php | |
| 16 | 16 | esc_attr_e( 'Set Theme', 'adminimize' ) ?></h3> |
| 17 | 17 | |
| 18 | 18 | <div class="inside"> |
| 19 | 19 | <br class="clear" /> |
| @@ -23,9 +23,9 @@ | ||
| 23 | 23 | $_GET[ 'page' ] |
| 24 | 24 | ); ?>"> |
| 25 | 25 | <?php wp_nonce_field( 'mw_adminimize_nonce' ); ?> |
| 26 | 26 | <p><?php esc_attr_e( |
| 27 | - 'For better performance on sites with many users, you should load userlist data before making any changes in the theme options for users.', | |
| 27 | + 'For better peformance with many users on your blog; load only userlist, when you will change the theme options for users.', | |
| 28 | 28 | 'adminimize' |
| 29 | 29 | ); ?></p> |
| 30 | 30 | |
| 31 | 31 | <p id="submitbutton"> |
| @@ -44,20 +44,19 @@ | ||
| 44 | 44 | <table class="widefat usertheme"> |
| 45 | 45 | <thead> |
| 46 | 46 | <tr class="thead"> |
| 47 | 47 | <th class="num"> </th> |
| 48 | - <th class="num"><?php esc_attr_e( 'User-ID', 'adminimize' ) ?></th> | |
| 49 | - <th><?php esc_attr_e( 'Username', 'adminimize' ) ?></th> | |
| 50 | - <th><?php esc_attr_e( 'Display name publicly as', 'adminimize' ) ?></th> | |
| 51 | - <th><?php esc_attr_e( 'Admin Color Scheme', 'adminimize' ) ?></th> | |
| 52 | - <th><?php esc_attr_e( 'User Level', 'adminimize' ) ?></th> | |
| 53 | - <th><?php esc_attr_e( 'Role', 'adminimize' ) ?></th> | |
| 48 | + <th class="num"><?php esc_attr_e( 'User-ID' ) ?></th> | |
| 49 | + <th><?php esc_attr_e( 'Username' ) ?></th> | |
| 50 | + <th><?php esc_attr_e( 'Display name publicly as' ) ?></th> | |
| 51 | + <th><?php esc_attr_e( 'Admin-Color Scheme' ) ?></th> | |
| 52 | + <th><?php esc_attr_e( 'User Level' ) ?></th> | |
| 53 | + <th><?php esc_attr_e( 'Role' ) ?></th> | |
| 54 | 54 | </tr> |
| 55 | 55 | </thead> |
| 56 | 56 | <tbody id="users" class="list:user user-list"> |
| 57 | 57 | <?php |
| 58 | - /** @var \WPDB $wpdb */ | |
| 59 | - $wp_user_search = (array) $wpdb->get_results( | |
| 58 | + $wp_user_search = $wpdb->get_results( | |
| 60 | 59 | "SELECT ID, user_login, display_name FROM $wpdb->users ORDER BY ID" |
| 61 | 60 | ); |
| 62 | 61 | |
| 63 | 62 | foreach ( $wp_user_search as $userid ) { |
| @@ -68,20 +67,14 @@ | ||
| 68 | 67 | $user_level = (int) get_user_option( $table_prefix . 'user_level', $user_id ); |
| 69 | 68 | $user_object = new WP_User( $user_id ); |
| 70 | 69 | $roles = $user_object->roles; |
| 71 | 70 | $role = array_shift( $roles ); |
| 72 | - /** @var \WP_Roles $wp_roles */ | |
| 73 | - $role_name = ''; | |
| 74 | - if ( isset( $wp_roles->role_names[ $role ] ) ) { | |
| 75 | - $role_name = $wp_roles->role_names[ $role ]; | |
| 76 | - } | |
| 77 | - | |
| 78 | 71 | if ( function_exists( 'translate_user_role' ) ) { |
| 79 | - $role_name = translate_user_role( $role_name ); | |
| 72 | + $role_name = translate_user_role( $wp_roles->role_names[ $role ] ); | |
| 80 | 73 | } elseif ( function_exists( 'before_last_bar' ) ) { |
| 81 | - $role_name = before_last_bar( $role_name ); | |
| 74 | + $role_name = before_last_bar( $wp_roles->role_names[ $role ] ); | |
| 82 | 75 | } else { |
| 83 | - $role_name = strrpos( $role_name, '|' ); | |
| 76 | + $role_name = strrpos( $wp_roles->role_names[ $role ], '|' ); | |
| 84 | 77 | } |
| 85 | 78 | |
| 86 | 79 | $return = ''; |
| 87 | 80 | $return .= '<tr>' . "\n"; |
| @@ -102,12 +95,10 @@ | ||
| 102 | 95 | <td class="num"> </td> |
| 103 | 96 | <td> </td> |
| 104 | 97 | <td> </td> |
| 105 | 98 | <td> |
| 106 | - <label for="_mw_adminimize_set_theme"></label> | |
| 107 | - <select id="_mw_adminimize_set_theme" name="_mw_adminimize_set_theme"> | |
| 108 | - <?php /** @var array $_wp_admin_css_colors */ | |
| 109 | - foreach ( $_wp_admin_css_colors as $color => $color_info ): ?> | |
| 99 | + <select name="_mw_adminimize_set_theme"> | |
| 100 | + <?php foreach ( $_wp_admin_css_colors as $color => $color_info ): ?> | |
| 110 | 101 | <option value="<?php echo $color; ?>"><?php echo $color_info->name . ' (' . $color . ')' ?></option> |
| 111 | 102 | <?php endforeach; ?> |
| 112 | 103 | </select> |
| 113 | 104 | </td> |
| @@ -126,9 +117,9 @@ | ||
| 126 | 117 | </form> |
| 127 | 118 | <?php } ?> |
| 128 | 119 | |
| 129 | 120 | <p> |
| 130 | - <a class="alignright button adminimize-scroltop" href="#" style="margin:3px 0 0 30px;"><?php esc_attr_e( | |
| 121 | + <a class="alignright button" href="javascript:void(0);" onclick="window.scrollTo(0,0);" style="margin:3px 0 0 30px;"><?php esc_attr_e( | |
| 131 | 122 | 'scroll to top', 'adminimize' |
| 132 | 123 | ); ?></a><br class="clear" /></p> |
| 133 | 124 | </div> |
| 134 | 125 | </div> |