Bustle Exporter
WordPress model exporter for Bustle
★ 5stars
1forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/bustle/wordpress-exporter/archive/refs/heads/master.zipFrom the readme
Bustle WordPress Exporter
WordPress model exporter for Bustle
Usage
HTTP Endpoints
The JSON representations of WordPress converted models can be accessed via HTTP requests to either the native WP JSON API like https://domain.tld/wp-json/bustle/{model}/{id} e.g. /wp-json/bustle/post/1774807 or a custom permalink endpoint like https://domain.tld/slug/bustle/
WP CLI
There is also a WP CLI command to output the models.
wp bustle-exporter export posts --ids 1234,1235
Invoking Directly
If you want to convert models on your own, simply instantiate the model, and call getmodel();
Mobiledoc only
If you want to just convert your post content to the Mobiledoc format for export to another Mobiledoc-capable system, you can call: new \Bustle\Mobiledoc\Wrapper( $post )
Filters
The plugin provides numerous filters throughout the request cycle. Many of these are dynamic.
To change the value of a model's property specifically, use
bustleexporter{$modelname}attribute{$key} - bustleexporterpostattributetitle
These values run through a sanitization function that defaults to escattr, but you can register your own callback with:
bustleexporter{$modelname}attribute{$key}sanitizer with an