WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Купить персональные IPV4 и IPV6 прокси
функция не описана

wp_maybe_grant_install_languages_cap() WP 4.9.0

Filters the user capabilities to grant the 'install_languages' capability as necessary.

A user must have at least one out of the 'update_core', 'install_plugins', and 'install_themes' capabilities to qualify for 'install_languages'.

Хуков нет.

Возвращает

true/false[]. Filtered array of the user's capabilities.

Использование

wp_maybe_grant_install_languages_cap( $allcaps );
$allcaps(true/false[]) (обязательный)
An array of all the user's capabilities.

Список изменений

С версии 4.9.0 Введена.

Код wp maybe grant install languages cap: wp-includes/capabilities.php WP 5.2.2

<?php
function wp_maybe_grant_install_languages_cap( $allcaps ) {
	if ( ! empty( $allcaps['update_core'] ) || ! empty( $allcaps['install_plugins'] ) || ! empty( $allcaps['install_themes'] ) ) {
		$allcaps['install_languages'] = true;
	}

	return $allcaps;
}