bbp_current_author_ip()
Get the poster IP address
Description Description
Return Return
(string)
Source Source
File: includes/users/functions.php
function bbp_current_author_ip() { // Check for remote address $remote_address = ! empty( $_SERVER['REMOTE_ADDR'] ) ? wp_unslash( $_SERVER['REMOTE_ADDR'] ) : '127.0.0.1'; // Remove any unsavory bits $retval = preg_replace( '/[^0-9a-fA-F:., ]/', '', $remote_address ); // Filter & return return apply_filters( 'bbp_current_author_ip', $retval, $remote_address ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | bbPress (r5609) Added empty() check for unit tests |
2.0.0 | Introduced. |