wpseo_replace_vars()Yoast 1.0

Replace %%variable_placeholders%% with their real value based on the current requested page/post/cpt.

Хуков нет.

Возвращает

Строку.

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

wpseo_replace_vars( $text, $args, $omit );
$text(строка) (обязательный)
The string to replace the variables in.
$args(объект) (обязательный)
The object some of the replacement values might come from, could be a post, taxonomy or term.
$omit(массив)
Variables that should not be replaced by this function.
По умолчанию: []

Код wpseo_replace_vars() Yoast 22.4

function wpseo_replace_vars( $text, $args, $omit = [] ) {
	$replacer = new WPSEO_Replace_Vars();

	return $replacer->replace( $text, $args, $omit );
}