Closed joedolson closed 7 months ago
There are no filters to remove the post types nor are there any class hooks I can use to hide them. Could do it with JS.
However, the array of event data is in a meta field in the post type. So I could take the export, then run a post-import action to set the event data for each imported post.
Could use the action import_post_meta
to do this.
do_action( 'import_post_meta', $post_id, $key, $value );
Also to do: when importing terms, create categories if don't exist. wp_import_insert_term
(runs only after a term is inserted, so will only apply for terms that don't already exist.
do_action( 'wp_import_insert_term', $t, $term, $post_id, $post );
Note: confirmed that yes, the meta data is being updated when the event is updated.
Hello. Excuse me, when I ask but, isn't that the purpose of the can_export attribute? Couldn't you use that?
@carstingaxion Yep, indeed it is. I should use that - at least until I've done the necessary work to make it a viable import/export methodology. Thanks! I hadn't thought about the post type registration options.
It won't work, so it would be better if they weren't available.