bp_core_current_user_ip()
Get the current user’s IP address.
Description Description
Return Return
(string) IP address.
Source Source
File: bp-core/bp-core-moderation.php
function bp_core_current_user_ip() {
$retval = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
/**
* Filters the current user's IP address.
*
* @since 1.6.0
*
* @param string $retval Current user's IP Address.
*/
return apply_filters( 'bp_core_current_user_ip', $retval );
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.6.0 | Introduced. |