A wordpress importer that handles various operations.
A Wordpress Importer that handles various operations:
---
Name: wordpress_import
After:
- 'framework/*'
- 'cms/*'
---
WordpressImportBasicTask:
default_db:
database: 'my-wordpress-db'
username: 'root'
password: ''
table_prefix: 'wp'
navigation_slug: 'top-navigation'
This Wordpress importer is designed to allow you to take the functionality you want to use specifically and then easily tack your own logic on top. The simplest way to do this is to create your own task that extends 'WordpressImportBasicTask' and override the 'runCustom' function. From here you can either choose to call 'parent::runCustom()' or copy-paste the seperate import function calls and comment out what you don't need.
<?php
class WordpressTask extends WordpressImportBasicTask {
public function runCustom($request) {
/**
* Uncomment this or copy-paste the various functions called in the
* parent into this and comment out what you don't need.
*/
//parent::runCustom($request);
try {
// Overriden to just import a flat list of pages
$this->wordpressImportService->importPages();
// ... and fix the content href's/src's
$this->wordpressImportService->fixPostContentURLs();
} catch (Exception $e) {
throw $e;
}
}
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem