load_script_textdomain_relative_path хук-фильтрWP 5.0.2

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

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

add_filter( 'load_script_textdomain_relative_path', 'wp_kama_load_script_textdomain_relative_path_filter', 10, 2 );

/**
 * Function for `load_script_textdomain_relative_path` filter-hook.
 * 
 * @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.
 *
 * @return string|false
 */
function wp_kama_load_script_textdomain_relative_path_filter( $relative, $src ){

	// filter...
	return $relative;
}
$relative(строка|false)
The relative path of the script. False if it could not be determined.
$src(строка)
The full source URL of the script.

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

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

Где вызывается хук

load_script_textdomain()
load_script_textdomain_relative_path
wp-includes/l10n.php 1150
$relative = apply_filters( 'load_script_textdomain_relative_path', $relative, $src );

Где используется хук в WordPress

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