Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Website: Preview the PR specified by the referer header
Enables easy linking to Playground PRs from WordPress and Gutenberg GitHub PRs without interpolating the PR number in the link. This PR adds a https://playground.wordpress.net/preview-referrer-pr.php script that looks at the Referer header, extracts the repo and the PR number from it, and redirects to the relevant PR previewer. ## Testing instructions 1. Run the script on a HTTPS domain (or use my link: https://adamadam.blog/referer.php) 2. Link to that script from a WordPress develop and a Gutenberg PR 3. Click those links 4. Confirm you were redirected to /wordpress.html or /gutenberg.html with a proper `?pr=` query parameter Props to @gziolo for the idea
- Loading branch information