Our plugin is designed to provide users with the highest level of security and customization. One unique feature is the ability to whitelist specific IP addresses, which allows users to grant access to certain users while blocking others.
This can be particularly useful for businesses or organizations that want to grant access to employees or trusted partners while blocking access to unauthorized users.
If you want to deactivate the WP Ghost plugin for logged users with specific roles, you can add this code to the functions.php file of the theme:
add_action('template_redirect','hidePathsByUserRole');
function hidePathsByUserRole(){
if (function_exists('wp_get_current_user')) {
$user = wp_get_current_user();
$allowed_roles = array(
'administrator',
'editor',
'author'
);
if( isset($user->roles) && is_array($user->roles) && array_intersect($allowed_roles, $user->roles ) ) {
add_filter('hmwp_process_paths', '__return_false');
add_filter('hmwp_process_buffer', '__return_false');
add_filter('hmwp_process_hide_disable', '__return_false');
add_filter('hmwp_process_find_replace', '__return_false');
}
}
} The above code will disable WP Ghost for administrators, editors, and authors. You can add new roles or remove roles from the code.
Because hackers often use bots to search for security flaws in your website, it is…
The easiest way to change the default media uploads path is to use the WP…
To hide all CSS and JS you need to follow the steps to Combine the…
https://youtu.be/6ylhojSi-_E In this video, we’ll explore why website security matters and what can happen if…
The security of your WordPress site depends on multiple factors, such as the strength of…
When you enable two-factor authentication (2FA) for your WordPress website, it adds an extra layer…