Open infn8 opened 1 week ago
Currently, we do not support the creation of preview deployments based on changes coming from forked repositories. Learn more about preview environments in our documentation.
Latest commit: dc757777b657d70bdb1e6b44565e8d41b0838536
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
🤞 I hope I made that changeset properly. First one!!!
Adding support for users to change the redirect status code from a
302
to another code of their choice, likely301
.Tasks
Description
Added new filter
faustwp_public_redirect_status_code
, allowing WordPress plugins and themes to choose the HTTP status code to use when generating redirects when the enable public route redirects setting is active.Related Issue(s):
None
Testing
I added this locally and ensured that the redirects were still
302
status codes. I then added this in my theme'sfunctions.php
file to test itThen I tried calling the exact same URL which resulted in a
301
status code with no change to other headers including thex-redirect-by: WP Engine Headless plugin
headerScreenshots
none
Documentation Changes
There is nowhere in the repo docs that cover this functionality but there is the following on the live site:
https://faustjs.org/reference/faust-wordpress-plugin-filters
So I am writing here markdown that will get you close, if not all the way to an update for that page which i do not know how to edit:
faustwp_exclude_from_public_redirect
: Choose the HTTP status code to use when generating redirects when the enable public route redirects setting is active.Parameter: $status_code (int): HTTP Status code to use on redirects. Default:
302
Example Usage
Dependant PRs
none