Refactored admin_url() so it doesn't use db query for type detection