Yoast\WP\SEO\Llms_Txt\Infrastructure\File

WordPress_File_System_Adapter::get_file_contentspublicYoast 1.0

Gets the contents of the current llms.txt file.

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

Хуков нет.

Возвращает

Строку. The content of the file.

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

$WordPress_File_System_Adapter = new WordPress_File_System_Adapter();
$WordPress_File_System_Adapter->get_file_contents(): string;

Код WordPress_File_System_Adapter::get_file_contents() Yoast 28.3

public function get_file_contents(): string {
	if ( $this->is_file_system_available() ) {
		global $wp_filesystem;

		return $wp_filesystem->get_contents( $this->get_llms_file_path() );
	}

	return '';
}