mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-28 11:22:21 +08:00
7 lines
274 B
Text
7 lines
274 B
Text
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'];
|
|
}
|