tl;dr – The commented demo plugin is available at GitHub.
You should test pull requests locally before you merge them with your code. Fetching a pull request from a remote repository is simple, just do:
- In your local project folder, do:
git ls-remoteYou’ll get a list like this:
- Find the pull request in the list above, and fetch it, eg:
git fetch origin refs/pull/4/head
- Temporarly checkout the pull request:
git checkout FETCH_HEAD
- Test the code
- Return to the master:
git checkout master
- If everything is fine, you can now merge the pull request in the remote repository and pull it down to your local project:
Tested & found compatible with WordPress 4.6. My plugins are following the WordPress Coding Standards.