WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Yoast\WP\SEO\Services\Importing

Aioseo_Replacevar_Handler::transform() public Yoast 1.0

Transforms AIOSEO replacevars into Yoast replacevars.

{} Это метод класса: Aioseo_Replacevar_Handler{}

Хуков нет.

Возвращает

Строку. The Yoast replacevar.

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

$Aioseo_Replacevar_Handler = new Aioseo_Replacevar_Handler();
$Aioseo_Replacevar_Handler->transform( $aioseo_replacevar );
$aioseo_replacevar(строка) (обязательный)
The AIOSEO replacevar.

Код Aioseo_Replacevar_Handler::transform() Yoast 17.9

public function transform( $aioseo_replacevar ) {
	$yoast_replacevar = \str_replace( \array_keys( $this->replace_vars_map ), \array_values( $this->replace_vars_map ), $aioseo_replacevar );

	// Transform the '#custom_field-<custom_field>' tags into '%%cf_<custom_field>%%' ones.
	$yoast_replacevar = preg_replace_callback(
		'/#custom_field-([a-zA-Z0-9_-]+)/',
		function ( $cf_matches ) {
			return '%%cf_' . $cf_matches[1] . '%%';
		},
		$yoast_replacevar
	);

	// Transform the '#tax_name-<custom-tax-name>' tags into '%%ct_<custom-tax-name>%%' ones.
	$yoast_replacevar = preg_replace_callback(
		'/#tax_name-([a-zA-Z0-9_-]+)/',
		function ( $ct_matches ) {
			return '%%ct_' . $ct_matches[1] . '%%';
		},
		$yoast_replacevar
	);

	return $yoast_replacevar;
}