Filter hook 'pre_load_script_translations'

in WP Core File wp-includes/l10n.php at line 1304

Description

Pre-filters script translations for the given file, script handle and text domain. Returning a non-null value allows to override the default logic, effectively short-circuiting the function.

Occurrences

Filename Line Number
wp-includes/l10n.php 1304

Parameters

Type Name Description
string|false|null $translations JSON-encoded translation data. Default null.
string|false $file Path to the translation file to load. False if there isn't one.
string $handle Name of the script to register a translation domain to.
string $domain The text domain.

PHP Doc

/**
	 * Pre-filters script translations for the given file, script handle and text domain.
	 *
	 * Returning a non-null value allows to override the default logic, effectively short-circuiting the function.
	 *
	 * @since 5.0.2
	 *
	 * @param string|false|null $translations JSON-encoded translation data. Default null.
	 * @param string|false      $file         Path to the translation file to load. False if there isn't one.
	 * @param string            $handle       Name of the script to register a translation domain to.
	 * @param string            $domain       The text domain.
	 */