Created
December 3, 2021 09:19
-
-
Save Alimir/3190845f2e30d872aea274a97d40a526 to your computer and use it in GitHub Desktop.
provide the wp ulike with the HTTP request header that contains the real visitor 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
<?php | |
/** | |
* Add a custom HTTP request header to fix IP address detection | |
* @param \Geminilabs\Vectorface\Whip $whip | |
* @return void | |
*/ | |
add_action('wp_ulike_whip_action', function ($whip) { | |
$customHeader = 'HTTP_X_SUCURI_CLIENTIP'; // change the header as needed | |
$whip->addCustomHeader($customHeader); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment