plugins_update_check_locales filter-hookWP 3.7.0

Filters the locales requested for plugin translations.

Usage

add_filter( 'plugins_update_check_locales', 'wp_kama_plugins_update_check_locales_filter' );

/**
 * Function for `plugins_update_check_locales` filter-hook.
 * 
 * @param array $locales Plugin locales.
 *
 * @return array
 */
function wp_kama_plugins_update_check_locales_filter( $locales ){

	// filter...
	return $locales;
}
$locales(array)
Plugin locales.
Default: all available locales of the site

Changelog

Since 3.7.0 Introduced.
Since 4.5.0 The default value of the $locales parameter changed to include all locales.

Where the hook is called

wp_update_plugins()
plugins_update_check_locales
WP_REST_Plugins_Controller::create_item()
plugins_update_check_locales
wp-includes/update.php 368
$locales = apply_filters( 'plugins_update_check_locales', $locales );
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php 381
$installed_locales = apply_filters( 'plugins_update_check_locales', $installed_locales );

Where the hook is used in WordPress

Usage not found.