Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Make wplf-form post type unpublic #23
I think that forms should not be public. In most of the use cases (at least when i'm using), those are used via shortcode rather than linking directly to single form. Public single forms shows up in search engines and sitemaps, which isn't that nice. Especially if theme developer has forgotten to style basic single page for some reason.
Antti likes to have preview of form, and that's important in my opinion too. Preview can't be achieved unless post type is public, but maybe we could make a redirect when entering single form if you're role is subscriber or you haven't logged in. Other possible way that comes to my mind, is render form in html below editor while editing it. Kinda same way as field detector works now.
Oh, actually. Making a redirect isn't by far best practice in this situation, setting 404 would be a much better solution (props @TeemuSuoranta).
This way post type is public, preview and single view works for logged in users, but visitor gets 404. Google does not index 404, but there may still be issues with some plugins that generates sitemaps. However it's better situation than current, at least in my opinion.
There is also need for setting to disabling this feature on single forms, maybe a filter to disable it in all forms. Also a notification or some sort of message in editor or form view is needed to indicate that this don't work unless you are logged in.
Any thoughts? Because of time related matters, I wouldn't want to do PR if it wont be merged.