Yoast\WP\SEO\Services\Importing

Importable_Detector_Service::detect_cleanups()publicYoast 1.0

Returns the detected cleanups that have data to work with.

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

Хуков нет.

Возвращает

Массив. The detected importers that have data to work with.

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

$Importable_Detector_Service = new Importable_Detector_Service();
$Importable_Detector_Service->detect_cleanups( $plugin );
$plugin(строка|null)
The plugin name of the cleanup.
По умолчанию: null

Код Importable_Detector_Service::detect_cleanups() Yoast 22.3

public function detect_cleanups( $plugin = null ) {
	$detectors = $this->filter_actions( $this->importers, $plugin, 'cleanup' );

	$detected = [];
	foreach ( $detectors as $detector ) {
		if ( $detector->is_enabled() && ! $detector->get_completed() && $detector->get_limited_unindexed_count( 1 ) > 0 ) {
			$detected[ $detector->get_plugin() ][] = $detector->get_type();
		}
	}

	return $detected;
}