_wp_relative_upload_path хук-фильтрWP 2.9.0

Filters the relative path to an uploaded file.

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

add_filter( '_wp_relative_upload_path', 'wp_kama__wp_relative_upload_path_filter', 10, 2 );

/**
 * Function for `_wp_relative_upload_path` filter-hook.
 * 
 * @param string $new_path Relative path to the file.
 * @param string $path     Full path to the file.
 *
 * @return string
 */
function wp_kama__wp_relative_upload_path_filter( $new_path, $path ){

	// filter...
	return $new_path;
}
$new_path(строка)
Relative path to the file.
$path(строка)
Full path to the file.

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

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

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

_wp_relative_upload_path()
_wp_relative_upload_path
wp-includes/post.php 907
return apply_filters( '_wp_relative_upload_path', $new_path, $path );

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

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