Yoast\WP\SEO\Routes

Importing_Route::get_importer()protectedYoast 1.0

Gets the right importer for the given arguments.

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

Хуков нет.

Возвращает

Importing_Action_Interface|false. The importer, or false if no importer was found.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_importer( $plugin, $type );
$plugin(строка) (обязательный)
The plugin to import from.
$type(строка) (обязательный)
The type of entity to import.

Код Importing_Route::get_importer() Yoast 22.4

protected function get_importer( $plugin, $type ) {
	$importers = $this->importable_detector->filter_actions( $this->importers, $plugin, $type );

	if ( \count( $importers ) !== 1 ) {
		return false;
	}

	return \current( $importers );
}