chore: Update version to 1.4.2 and enhance redirect functionality#16
Merged
chore: Update version to 1.4.2 and enhance redirect functionality#16
Conversation
- Updated version number in package.json, passwp-posts.php, and readme.txt to 1.4.2. - Added changelog entry for version 1.4.2 detailing fixes for redirect caching issues and improvements in redirect handling. - Implemented no-cache headers in Protection.php, Shortcodes.php, and password-form.php to prevent browser caching of redirects. - Changed redirect logic to use the template_redirect hook for authenticated users in Shortcodes.php, replacing the previous meta refresh method. - Updated tests in ShortcodesTest.php to reflect changes in redirect handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses a redirect caching issue that previously required users to perform a hard refresh after authentication. It introduces proper HTTP redirects using the
template_redirecthook, ensures no-cache headers are sent with all redirect responses, and updates documentation and tests to reflect these changes. The update also bumps the plugin version to 1.4.2.Redirect and Caching Improvements:
template_redirecthook inShortcodes.php, replacing the previous meta refresh approach. This ensures more reliable and standards-compliant redirection. [1] [2]Testing and Documentation:
nocache_headersfunction to prevent header warnings during tests.Version Bump:
package.json,passwp-posts.php, andreadme.txt. [1] [2] [3] [4]