Yoast\WP\SEO\Integrations\Front_End
Force_Rewrite_Title::replace_titles_from_content() protected Yoast 1.0
Replaces the titles from the parts that contains a title.
{} Это метод класса: Force_Rewrite_Title{}
Хуков нет.
Возвращает
Строку. The modified content.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->replace_titles_from_content( $content, $parts_with_title );
- $content(строка) (обязательный)
- The content to remove the titles from.
- $parts_with_title(массив) (обязательный)
- The parts containing a title.
Код Force_Rewrite_Title::replace_titles_from_content() Force Rewrite Title::replace titles from content Yoast 15.7
protected function replace_titles_from_content( $content, $parts_with_title ) {
if ( isset( $parts_with_title['before'] ) && \is_string( $parts_with_title['before'] ) ) {
$content = $this->replace_title( $parts_with_title['before'], $content );
}
if ( isset( $parts_with_title['after'] ) ) {
$content = $this->replace_title( $parts_with_title['after'], $content );
}
return $content;
}