WPSEO_Term_Metabox_Formatter::get_title_template()privateYoast 1.0

Retrieves the title template.

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

Хуков нет.

Возвращает

Строку. The title template.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_title_template( $fallback );
$fallback(true|false)
Whether to return the hardcoded fallback if the template value is empty.
По умолчанию: true

Код WPSEO_Term_Metabox_Formatter::get_title_template() Yoast 22.4

private function get_title_template( $fallback = true ) {
	$title = $this->get_template( 'title' );

	if ( $title === '' && $fallback === true ) {
		/* translators: %s expands to the variable used for term title. */
		$archives = sprintf( __( '%s Archives', 'wordpress-seo' ), '%%term_title%%' );
		return $archives . ' %%page%% %%sep%% %%sitename%%';
	}

	return $title;
}