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


Force_Rewrite_Title::flush_cache() public Yoast 1.0

Used in the force rewrite functionality this retrieves the output, replaces the title with the proper SEO title and then flushes the output.

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

Хуков нет.


Null. Ничего.


$Force_Rewrite_Title = new Force_Rewrite_Title();

Код Force_Rewrite_Title::flush_cache() Yoast 15.6.2

public function flush_cache() {
	if ( $this->ob_started !== true ) {
		return false;

	$content = $this->get_buffered_output();

	$old_wp_query = $this->wp_query->get_query();


	// When the file has the debug mark.
	if ( \preg_match( '/(?\'before\'.*)<!-- This site is optimized with the Yoast SEO.*<!-- \/ Yoast SEO( Premium)? plugin. -->(?\'after\'.*)/is', $content, $matches ) ) {
		$content = $this->replace_titles_from_content( $content, $matches );

		unset( $matches );

	$GLOBALS['wp_query'] = $old_wp_query;

	echo $content;

	return true;