Changeset 5609
- Timestamp:
- 01/30/2015 05:34:07 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/users/functions.php
r5590 r5609 144 144 */ 145 145 function bbp_current_author_ip() { 146 $retval = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] ); 147 148 return apply_filters( 'bbp_current_author_ip', $retval ); 146 147 // Check for remote address 148 $remote_address = ! empty( $_SERVER['REMOTE_ADDR'] ) 149 ? $_SERVER['REMOTE_ADDR'] 150 : '0.0.0.0'; 151 152 // Remove any unsavory bits 153 $retval = preg_replace( '/[^0-9a-fA-F:., ]/', '', $remote_address ); 154 155 return apply_filters( 'bbp_current_author_ip', $retval, $remote_address ); 149 156 } 150 157
Note: See TracChangeset
for help on using the changeset viewer.