wppaste
WordPress

apply_filters( 'load_script_textdomain_relative_path', string|false $relative, string $src )

Since
5.0.2
Filters the relative path of scripts used for finding translation files.

Compatibility

WordPress
since 5.0.2
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$relativestring|false
The relative path of the script. False if it could not be determined.
$srcstring
The full source URL of the script.

Where this hook fires · 1

  • wp-includes/l10n.php:1252load_script_textdomain()

Source code

	 *	 * @since 5.0.2	 *	 * @param string|false $relative The relative path of the script. False if it could not be determined.	 * @param string       $src      The full source URL of the script.	 */	$relative = apply_filters( 'load_script_textdomain_relative_path', $relative, $src ); 	// If the source is not from WP.	if ( false === $relative ) {		return load_script_translations( false, $handle, $domain );	}

Changelog

Introduced in 5.0.2. One change between 6.7.7 and 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

7.0.4
Parameter $is_module added.verified against source
5.0.2
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.