README.md 2.83 KB
Newer Older
Erick Hitter's avatar
Erick Hitter committed
1 2 3 4 5
# ETH Simple Shortlinks #
**Contributors:** ethitter  
**Donate link:** https://ethitter.com/donate/  
**Tags:** seo, meta tags  
**Requires at least:** 4.4  
Erick Hitter's avatar
Erick Hitter committed
6
**Tested up to:** 5.5  
7
**Stable tag:** 0.6  
Erick Hitter's avatar
Erick Hitter committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
**License:** GPLv2 or later  
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html  

Convert WordPress's query-based shortlinks to pretty permalinks that are cacheable. http://example.com/?p=123 becomes http://example.com/p/123/.

## Description ##

WordPress 3.0 introduced a native shortlinks feature, which builds URLs using query strings. This plugin converts those URLs to ones using pretty permalinks, which makes for a nicer-looking URL and improves shortlinks' ability to be cached.

Posts and pages are supported by default, while filters make it possible to support other post types.

For example, http://example.com/?p=123 becomes http://example.com/p/123/.

## Installation ##

1. Upload the plugin files to the `/wp-content/plugins/eth-simple-shortlinks` directory, or install the plugin through the WordPress plugins screen directly.
1. Activate the plugin through the 'Plugins' screen in WordPress.
1. Flush your site's rewrite rules by visiting Settings > Permalinks.

## Frequently Asked Questions ##

### Can I customize a shortlink? ###

No, shortlinks use the posts' IDs, so aren't available for modification.

33 34 35 36 37 38 39 40 41 42 43 44
### Why aren't redirects validated? ###

Sites may use plugins that allow a post object's permalink to be set to an external URL, and this plugin is designed to respect those plugins.

If you wish to validate the redirects issued by this plugin, you can use the `eth_simple_shortlinks_redirect_url` filter to apply `wp_validate_redirect()` to the destination URL.

### After upgrading to 0.6, redirects stopped working ###

Beginning with release 0.6, before performing a redirect, the plugin checks that the post type and post status are supported. Previously, these checks were only applied when overriding an object's shortlink.

If, after upgrading, redirects stop working, use the `eth_simple_shortlinks_allowed_post_types` and `eth_simple_shortlinks_allowed_post_statuses` filters to permit additional types and statuses, or use the `eth_simple_shortlinks_verify_requested_post_support` filter to disable the supports checks.

Erick Hitter's avatar
Erick Hitter committed
45 46
## Changelog ##

47 48 49 50 51
### 0.6 ###
* Introduce filters in redirection handling.
* Apply supported post-type and post-status checks before redirecting.
* Conform to WordPress VIP's Coding Standards.

Erick Hitter's avatar
Erick Hitter committed
52 53 54 55 56 57 58
### 0.5 ###
* Admin notices when permalinks won't support the plugin
* Disable plugin functionality when permalink structure is incompatible
* Translation support

### 0.4 ###
* Initial release
59 60 61 62 63 64

## Upgrade Notice ##

### 0.6 ###

Applies supported post-type and post-status checks before performing redirect. If, after upgrading, redirects stop working, see the "After upgrading to 0.6, redirects stopped working" section of the FAQ.