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

Display X-Geo-Country info #40

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

fbitti
Copy link
Contributor

@fbitti fbitti commented Oct 21, 2017

Motivation: wouldn't it be nice to display the visitor's location in the 404 alert email? This way the Wordpress admin won't have to waste time looking for this information online.
The X-Geo-Country header isn't available by default but may be added if the website uses a CDN (the wordpress admin might need to contact their CDN support to enable it).
This is a sample alert with the X-Geo-Country set:
with x-geo-country - 404-to-301 plugin
And this is an example when it doesn't exist:
without x-geo-country - 404-to-301 plugin
@Joel-James, you may want to review my modifications. I admit I didn't understand what the apply_filter function does but used it anyway to keep your code consistent. For example in line 231 of the file class-jj4t3-404-data.php. Luckily it seems to work. :)

@Joel-James Joel-James self-assigned this Nov 28, 2017
@Joel-James Joel-James added this to the Version 3.0.0 milestone Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants