這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Shorter Links

描述

The Shorter Links WordPress plugin overrides the default WordPress
“shortlink” URL with one that has a custom text in it. You can also set a
different base URL.

A custom field called “Shorter link” is created once a post is saved,
so that you can change the shortlink to a more memorable set of
characters.

The choice of base URL to use for the short link can be configured within
Settings->Shorter Links.

Related Links:

Licence

This plugin is licensed under the New BSD license.

History

2.1.0 – 8 August 2015
Rework to look for the shorter link after WordPress has done its processing. This
means that a shorterlink that represents a date won’t affect an archive list.

2.0.6 – 8 August 2015
Ensure that the short_link is correct when using a post id.

2.0.5 – 8 August 2015
Updated Tested up to 4.3

2.0.3 – 9 July 2012
Bug fix so that archives work.

2.0.2 – 23 June 2012
Fall back to REQUEST_URI if there’s nothing interesting in $query_vars.

2.0.1 – 20 June 2012
Updated to handle 4 digit short links that look like a year to WordPress.

2.0.0 – 21 November 2010
Updated to be WordPress 3.0 or above, so we only need to hook into the WordPress
shortlink system

1.8.2 – 21 November 2010
Fix permissions issue on settings page. This is the last version that works
on WordPress 2.9.x or earlier.

1.8.1 – 7 September 2010
Bug fix to remove a warning.

1.8 – 1 September 2010
use shortlink rather than shorturl for WordPress less than 3.
For WordPress 3 or higher, hook into the new shortlink system.
Fix the admin page so that it displays in WordPress 3.

1.7 – 11 Feburary 2010
Handle failures better.

1.6 – 10 January 2010
Update version number in correct places so that the WP plugins system notices the update.

1.5 – 29 December 2009
Support permalinks that start with /%category%/

1.4 – 14 April 2009
Support rel=”shorturl” as per Robert Spychala’s Short URL Auto-Discovery proposal.

1.3 – 14 April 2009
Add support for setting the base URL. Patch by Dave Marshall.

1.2 – 13 April 2009
Only send the Link HTTP header as recommended by Shiflett.

1.1 – 13 April 2009
Fixed output of HTTP headers. Patch by Jeff Waugh.

1.0 – 11 April 2009
Initial release.

安裝

  1. Upload shorter_links.php and config.php to /wp-content/plugins/shorter-links directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. If you want to set a different base URL, change it from
    Settings->Shorter Links.
  4. To set a custom shorter link, update a post so that the custom field is
    created and then fill in a unique value in the field.

常見問題

Is there a bookmarklet to extract shorturl links?

Try this bookmarklet: Short URL

(Just drag to your bookmarks bar)

The source of the bookmarklet is:

javascript:(function(){var%20url=document.location;var%20links=document.getElementsByTagName('link');var%20found=0;for(var%20i=0,l;l=links[i];i++){if(l.getAttribute('rel')=='shortlink'||(/alternateshort/).exec(l.getAttribute('rel'))){found=l.getAttribute('href');break;}}if(!found){for(var%20i=0;l=document.links[i];i++){if(l.getAttribute('rel')=='shorturl'){found=l.getAttribute('href');break;}}}if(found){prompt('URL:',found);}else{alert("No%20shortlink%20found");}})();

There’s also the “Short URL” Safari extension by Clink Ecker.

評價

2016年9月3日
I love this plugin, it does exactly what I need. It has a small issue for me, which certainly can be solved (it is reported here https://wordpress.org/support/topic/short-links-with-p?replies=1#post-7856701).
2016年9月3日
I used a different domain name for the short URL and it works, simple solution. No complications. But I wish there was an option to edit the shortlink instead of using WordPress’s default one?
閱讀全部4個評價

貢獻者及開發者

“Shorter Links” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Shorter Links 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄