wc_untokenize_path( string $path, array $path_tokens )
Given a tokenized path, this will expand the tokens to their full path.
Description Description
Parameters Parameters
- $path
-
(Required) The absolute path to expand.
- $path_tokens
-
(Required) An array keyed with the token, containing paths that should be expanded.
Return Return
(string) The absolute path.
Source Source
File: includes/wc-core-functions.php
function wc_untokenize_path( $path, $path_tokens ) {
foreach ( $path_tokens as $token => $token_path ) {
$path = str_replace( '{{' . $token . '}}', $token_path, $path );
}
return $path;
}
Changelog Changelog
| Version | Description |
|---|---|
| 4.3.0 | Introduced. |