Yoast\WP\SEO\Llms_Txt\Application\File\Commands

Remove_File_Command_Handler::handlepublicYoast 1.0

Runs the command.

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

Хуков нет.

Возвращает

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

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

$Remove_File_Command_Handler = new Remove_File_Command_Handler();
$Remove_File_Command_Handler->handle();

Код Remove_File_Command_Handler::handle() Yoast 27.7

public function handle() {
	if ( $this->permission_gate->is_managed_by_yoast_seo() ) {
		$file_removed = $this->file_system_adapter->remove_file();

		if ( $file_removed ) {
			// Maybe move this to a class if we need to handle this option more often.
			\update_option( Populate_File_Command_Handler::CONTENT_HASH_OPTION, '' );
		}
	}
}