Yoast\WP\SEO\Llms_Txt\User_Interface

Enable_Llms_Txt_Option_Watcher::check_llms_txt_selectionpublicYoast 1.0

Checks if any of the llms.txt settings were changed.

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

Хуков нет.

Возвращает

void. Ничего (null).

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

$Enable_Llms_Txt_Option_Watcher = new Enable_Llms_Txt_Option_Watcher();
$Enable_Llms_Txt_Option_Watcher->check_llms_txt_selection( $old_value, $new_value ): void;
$old_value(обязательный)
.
$new_value(обязательный)
.

Код Enable_Llms_Txt_Option_Watcher::check_llms_txt_selection() Yoast 28.4

public function check_llms_txt_selection( $old_value, $new_value ): void {
	if ( $this->options_helper->get( 'enable_llms_txt', false ) !== true ) {
		return;
	}

	foreach ( $this->option_names as $option_name ) {
		if ( ! \array_key_exists( $option_name, $old_value ) || ! \array_key_exists( $option_name, $new_value ) ) {
			continue;
		}

		if ( $old_value[ $option_name ] !== $new_value[ $option_name ] ) {
			$this->populate_file_command_handler->handle();
			return;
		}
	}
}