Skip to content

Instantly share code, notes, and snippets.

@stephen-lin
Last active February 18, 2016 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save stephen-lin/9763aeccb94cc5b8246e to your computer and use it in GitHub Desktop.
Save stephen-lin/9763aeccb94cc5b8246e to your computer and use it in GitHub Desktop.
GeoIP Debugger
<?php
/*
* Plugin Name: WP Engine GeoIP Debugger
* Version: 0.5
* Description: Debugging tool for WP Engine GeoIP
* Author: WP Engine
* Author URI: http://wpengine.com
*
* This will help confirm if GeoIP is returning the correct information. Check the error log after loading the front page of the site.
*/
function geoip_append_debug( $content ) {
$geoipdebugging = WPEngine\GeoIp::instance();
error_log(print_r($geoipdebugging, true));
return $content;
}
add_filter( 'the_content', 'geoip_append_debug' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment