Last active
February 27, 2017 17:24
-
-
Save JeffMatson/f21a081f8f356839bf348bcf21be2996 to your computer and use it in GitHub Desktop.
Filters the Gravity Forms entry IP.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'gform_ip_address', 'filter_gform_ip_address' ); | |
function filter_gform_ip_address( $ip ) { | |
// Return the IP address set by the proxy. | |
// E.g. $_SERVER['HTTP_X_FORWARDED_FOR'] or $_SERVER['HTTP_CLIENT_IP'] | |
return $_SERVER['HTTP_X_FORWARDED_FOR']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment