WPSEO_Frontend::add_to_title()publicYoast 1.0

Add part to title, while ensuring that the $seplocation variable is respected.

Метод класса: WPSEO_Frontend{}

Хуков нет.

Возвращает

Строку.

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

$WPSEO_Frontend = new WPSEO_Frontend();
$WPSEO_Frontend->add_to_title( $sep, $seplocation, $title, $title_part );
$sep(строка) (обязательный)
Separator used in the title.
$seplocation(строка) (обязательный)
Whether the separator should be left or right.
$title(строка) (обязательный)
The title to append the title_part to.
$title_part(строка) (обязательный)
The part to append to the title.

Код WPSEO_Frontend::add_to_title() Yoast 22.4

public function add_to_title( $sep, $seplocation, $title, $title_part ) {
	_deprecated_function( __METHOD__, 'Yoast SEO 14.0' );

	if ( $seplocation === 'right' ) {
		return $title . $sep . $title_part;
	}

	return $title_part . $sep . $title;
}