load_script_translation_file

load_script_translation_file

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('load_script_translation_file') is found 1 times:

  • /wp-includes/l10n.php line 1311
    1307
    1308
    1309
    1310
    1311
    1312
    1313
    1314
    1315
    1316
    1317
    * @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.
     */
    $file = apply_filters( 'load_script_translation_file', $file, $handle, $domain );
     
    if ( ! $file || ! is_readable( $file ) ) {
        return false;
    }
     
    $translations = file_get_contents( $file );

See this hook used in plugins: