=== Plugin Name === Contributors: chokladzingo Donate link: http://dessibelle.se/ Tags: host, domain, name, hostname, domainname, multiple, any, many, url, address Requires at least: 2.7 Tested up to: 3.2.1 Stable tag: 0.2 Any Hostname alters all WordPress-generated URLs according to the servers current hostname, allowing you to use a single site on multiple hostnames. == Description == Any Hostname alters all WordPress-generated URLs according to the servers current hostname, so that they will always correspond to the actual hostname as entered by the user, as opposed to always using the URL specified in the WordPress options. The plugin is ideal for making a site available across multiple domains or running local development servers. == Installation == This section describes how to install the plugin and get it working. 1. Upload the `any-hostname` directory to the `/wp-content/plugins/` directory 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Optionally edit the list of allowed hosts under 'Options' » 'Privacy' == Screenshots == 1. Any Hostname settings == Changelog == = 1.0b2 = * Added host name caching, preventing a host from being evaluated against the regular expression patterns more than once per page load. * The plugin will nog disable host filters on the Options » General page in order to avoid obscuring the Site URL (`home`) and WordPress URL (`siteurl`) settings, potentially resulting in involuntary changing the sites default host name * The settings page will now display a warning when the list of allowed hosts does not include the current host. * **Bug fix**: Javascript needed used by the plugin on the admin pages will now also load from the filtered URL instead of `WP_PLUGIN_URL` = 1.0b1 = * Initial Release == Known Issues == This plugin will not be able to alter the contents of constants such as `WP_CONTENT_URL` and `WP_PLUGIN_URL` as these are (quite naturally) defined before any plugins are loaded. Plugin developers should instead rely on the `get_option()` function, which will always return the filtered hostname. Any Hostname might also obscure the value of WordPress and Site URL settings on the Options » General settings page, due to the fact that these values are retrieved using the `get_option()` function. The values actually stored in WordPress' database is in fact your site's true URL. From 1.0b2 up the plugin will deactivate the host filters on this page, which might cause some page resources to load from the default URL (potentially being unreachable). Due to a bug in the WordPress Settings API (http://core.trac.wordpress.org/ticket/9296) the plugin settings are temporarily located on the Privacy page. These settings will likely be moved to the Permalinks page in a future version. == Filters == Any Hostname has two filters, allowing you to programatically override the filtered hostname or the list of allowed hostnames. These are described below. = `any_hostname_host` = * Arguments: `$host` (required) * Return value: `$host` (required) Takes a host as argument, and returns a host that will be used when substituting the domain in URLs supplied by WordPress. This filter can be used to make the plugin use a specific host under certain circumstances. = `any_hostname_allowed_hosts` = * Arguments: `$hosts` (required) * Return value: `$hosts` (required) Takes an array of allowed hosts as argument, and returns an array of hosts to be used when checking if the user specified host should be allowed. Hosts should be treated as regular expression patterns.