Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should posts with an unregistered post_type be imported? #7

Open
pbiron opened this issue Aug 23, 2017 · 1 comment
Open

Should posts with an unregistered post_type be imported? #7

pbiron opened this issue Aug 23, 2017 · 1 comment

Comments

@pbiron
Copy link
Owner

pbiron commented Aug 23, 2017

The standard importer (and the import redux plugin this is forked from) refuse to import a post if it's post_type is not registered.

My thoughts are that such posts should be imported...but that the user should be warned about the unregistered post type (so that they can decide whether to install/activate the plugin/theme from the exporting site that registered that post type).

Seeking feedback on this topic: should we import such posts?

@pbiron pbiron self-assigned this Aug 23, 2017
@pbiron
Copy link
Owner Author

pbiron commented Aug 23, 2017

wp_insert_post() will happily insert a post whose post_type is not registered.

A related issue has to do with importing terms whose taxonomy is not registered. Unlike wp_insert_post(), wp_insert_term() will NOT insert a term whose taxonomy is not registered.

So, maybe posts with an unregistered post_type should not be imported? Or maybe wp_insert_post() should be changed to not insert such posts (to match the behavior of wp_insert_term()? Or maybe wp_insert_term() should be changed to allow inserting terms whose taxonomy is not registered (to match the behavior of wp_insert_post()?

Confusing :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant