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

Ensure that preview urls are used as permalinks for customized posts #245

Merged
merged 5 commits into from Sep 4, 2016

Conversation

Projects
None yet
1 participant
@westonruter
Copy link
Contributor

commented Sep 4, 2016

This fixes an issue in snapshots frontend preview where auto-draft posts previewed as published would get erroneously redirected from the preview URL to instead have a URL like /-0001/11/30/ since the date is 0000-00-00 and the post_name is empty. This URL would then redirect to the homepage.

This also ensures that WordPress will be able to locate the customized post since the post_name may have been changed.

This PR also adds (for good measure) a validate_file() to the results of a glob(), and adds sanitize_text_field() for the input of post searching.

westonruter added some commits Sep 4, 2016

Ensure that preview urls are used as permalinks for customized posts
This fixes an issue in snapshots frontend preview where auto-draft posts previewed as published would get erroneously redirected from the preview URL to instead have a URL like /-0001/11/30/ since the date is 0000-00-00 and the post_name is empty. This URL would then redirect to the homepage.

This also ensures that WordPress will be able to locate the customized post since the post_name may have been changed.

@westonruter westonruter added this to the 0.8.0 milestone Sep 4, 2016

@westonruter westonruter merged commit 17e3cd2 into develop Sep 4, 2016

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls First build on develop at 96.327%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.