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

Yoast\WP\SEO\Integrations\Watchers

Indexable_System_Page_Watcher::check_option() public Yoast 1.0

Checks if the home page indexable needs to be rebuild based on option values.

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

Хуков нет.

Возвращает

null.

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

$Indexable_System_Page_Watcher = new Indexable_System_Page_Watcher();
$Indexable_System_Page_Watcher->check_option( $old_value, $new_value );
$old_value(массив) (обязательный)
The old value of the option.
$new_value(массив) (обязательный)
The new value of the option.

Код Indexable_System_Page_Watcher::check_option() Yoast 15.6.2

<?php
public function check_option( $old_value, $new_value ) {
	foreach ( Indexable_System_Page_Builder::OPTION_MAPPING as $type => $options ) {
		foreach ( $options as $option ) {
			// If both values aren't set they haven't changed.
			if ( ! isset( $old_value[ $option ] ) && ! isset( $new_value[ $option ] ) ) {
				return;
			}

			// If the value was set but now isn't, is set but wasn't or is not the same it has changed.
			if (
				! isset( $old_value[ $option ] )
				|| ! isset( $new_value[ $option ] )
				|| $old_value[ $option ] !== $new_value[ $option ]
			) {
				$this->build_indexable( $type );
			}
		}
	}
}