Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save iamkingsleyf/425c9e92de750e48ed4f2151754ab83a to your computer and use it in GitHub Desktop.
Save iamkingsleyf/425c9e92de750e48ed4f2151754ab83a to your computer and use it in GitHub Desktop.
wp-config real ip with autosave
// Use X-Forwarded-For HTTP Header to Get Visitor's Real IP Address
if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
$http_x_headers = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] );
$_SERVER['REMOTE_ADDR'] = $http_x_headers[0];
}
// Modify AUTO SAVE INTERVAL
define( 'AUTOSAVE_INTERVAL', 300 ); // Seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment