WP_Translation_File::import( WP_Translation_File $source ): bool

In this article

Imports translations from another file.

Parameters

$sourceWP_Translation_Filerequired
Source file.

Return

bool True on success, false otherwise.

Source

protected function import( WP_Translation_File $source ): bool {
	if ( null !== $source->error() ) {
		return false;
	}

	$this->headers = $source->headers();
	$this->entries = $source->entries();
	$this->error   = $source->error();

	return null === $this->error;
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.