wc_untokenize_path()
Given a tokenized path, this will expand the tokens to their full path.
No Hooks.
Returns
String. The absolute path.
Usage
wc_untokenize_path( $path, $path_tokens );
- $path(string) (required)
- The absolute path to expand.
- $path_tokens(array) (required)
- An array keyed with the token, containing paths that should be expanded.
Changelog
| Since 4.3.0 | Introduced. |
wc_untokenize_path() wc untokenize path code WC 10.8.1
function wc_untokenize_path( $path, $path_tokens ) {
foreach ( $path_tokens as $token => $token_path ) {
$path = str_replace( '{{' . $token . '}}', $token_path, $path );
}
return $path;
}