WPSEO_Import_Plugin::__construct()publicYoast 1.0

Import class constructor.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Import_Plugin = new WPSEO_Import_Plugin();
$WPSEO_Import_Plugin->__construct( $importer, $action );
$importer(WPSEO_Plugin_Importer) (обязательный)
The importer that needs to perform this action.
$action(строка) (обязательный)
The action to perform.

Код WPSEO_Import_Plugin::__construct() Yoast 22.4

public function __construct( WPSEO_Plugin_Importer $importer, $action ) {
	$this->importer = $importer;

	switch ( $action ) {
		case 'cleanup':
			$this->status = $this->importer->run_cleanup();
			break;
		case 'import':
			$this->status = $this->importer->run_import();
			break;
		case 'detect':
		default:
			$this->status = $this->importer->run_detect();
	}

	$this->status->set_msg( $this->complete_msg( $this->status->get_msg() ) );
}