On my local machine, I edit my hosts file and create a VirtualHost entry in httpd-vhosts.conf, so SERVER_NAME is never localhost or 127.0.0.1 for me. This commit checks to see if SERVER_ADDR is 127.0.0.1, which is in fact true in my situation. I'm not certain this is the best method of detecting whether this is running on a 'local' site - thoughts?
additional detection of whether this is a local WP install
Thanks for the pull request. Increased compatibility has to be better. Your addition will still never be true for a production site, and no db calls needed, so let's add it. Thanks! :)