Open rosswintle opened 5 years ago
I'm working on this now. Thought I could do it quickly on a quiet morning, but taking a little longer to get right and test properly.
Fix for this should also fix #14.
It's worth discussing tags and categories.
Currently the exported exports tags
and categories
. My change is going to look through all of the taxonomy names in WordPress and the internal taxonomy names are post_tag
and category
respectively.
Statamic will import these, of course, but they will be named differently to the default content that you get when you install Statamic. It all hangs together and works, but we'll need to make a quick call on if we're happy with the taxonomy names being imported to Statamic being post_tag
and category
as they are internally in WordPress.
I, personally, think that this is the right thing to do.
Note to myself: WordPress also has taxonomy meta now, which probably maps to the items in the fieldset in the Statamic taxonomy. I should explore if we can export the taxonomy meta too.
As described: Plugin doesn't export custom taxonomies
It exports categories and tags, but nothing else. I suggest two phases:
Initial MVP: export all taxonomies for all posts by looping through the output of the WordPress
get_taxonomies()
function instead of just doing tags and categoriesBetter, phase 2: Add an interface for selecting taxonomies to export.
I'll try to build, test and PR this at some point because I kinda want it.