Redirect URL to Post

Redirect to Post, Version 0.3

This update of the Redirect to Post plugin consists of three parts:

Option ‘default_redirect_to’

Until now, the default destination for the case that no post could be found was the blog’s home page (site_url). Now you can choose any other page or post by its ID. If it cannot be found, the home page will be used again.

Criteria ‘has_password’ and ‘tag_id’

More a side-effect of other changes, you can now use the criteria to restrict the search to posts that have (or don’t have) a password and by a tag id.

Bug fix

Certain conditions (depending on the order of filters executed and the interaction of other plugins – such as Jetpack with its CSS module) that were impossible to control from within the plugin could cause the loss of some of the query parameters. The only reliable way was to drop the get_query_var function and instead retrieve and sanitize the parameters “on foot”.