Title: Link Shortcut
Author: husani
Published: <strong>2009 年 4 月 6 日</strong>
Last modified: 2009 年 4 月 23 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/link-shortcut.svg)

# Link Shortcut

 作者：[husani](https://profiles.wordpress.org/husani/)

[下载](https://downloads.wordpress.org/plugin/link-shortcut.1.4.zip)

 * [详情](https://cn.wordpress.org/plugins/link-shortcut/#description)
 * [评价](https://cn.wordpress.org/plugins/link-shortcut/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/link-shortcut/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/link-shortcut/#developers)

 [支持](https://wordpress.org/support/plugin/link-shortcut/)

## 描述

Ever want your own shortcuts without mucking about with permalink structures? The
Link Shortcut plugin allows you to create short (random numbers and letters, or 
short words) URLs under your blog’s domain that redirect (301 or 302, your choice)
a user to other pages, either in your site or on another site.

In other words, instead of sending this url to the author’s plugin page:
 http://
www.husani.com/ventures/wordpress-plugins/linkshortcut/

This shortcut could be created simply by installing this plugin and adding a link,
via the same traditional WordPress UI we all know and love:
 http://www.husani.com/
link123

You can also specify a specific “subdirectory” to be present in all Link Shortcut
URLs: yourblog/go/_STRING_, for example.

YOU MUST USE NON-UGLY PERMALINKS FOR THIS PLUGIN TO WORK. Your permalink structure
cannot be yourblog.com?p=84, it must be date-based, name-based, etc.

**IMPORTANT:** Link Shortcut creates a table inside your database. Upon deactivation,
the plugin creates a backup table and copies records to it before removing the main
table. If you decide to activate the plugin again — or have installed an upgrade—
it automatically copies your backed up links to the newly created table. You can
also delete the backup table if you remove Link Shortcut permanently.

Changelog:

 * 1.4:
    - Added configurable Redirect-Type (301, 302)
 * 1.3:
    - Added ability to set default length
    - Added ability to set directory name inside URL (yourblog.com/go/993ldx)
    - Added data backup on plugin deactivation (read Installation for more details)
    - Using _SERVER instead of WP_Query to account for WP version differences
 * 1.2:
    - Fixed WP 2.7 vs 2.7.1 bug
 * 1.1:
    - Fixed directory name bug

Link Shortcut is released to the WordPress community under the GPL. Please feel 
free to modify as you see fit, and if you find this plugin useful, donate to the
author. All feedback is welcome at wordpressplugins@husani.com, and you can visit
Husani’s website at http://www.husani.com.

## 屏幕截图

 * [[
 * List of links
 * [[
 * Add new link
 * [[
 * Edit link

## 安装

 1. Upload the Link Shortcut plugin to your blog (YOURBLOG/wp-content/plugins) and 
    activate it using the WordPress plugin admin screen.
 2. Click “Link Shortcuts” in the left-hand menu and manage your links.

**IMPORTANT:** Deactivating 1.2 and lower before upgrading to 1.3 will result in
loss of any links you’ve created with this plugin. If you’d like to keep that data,
simply replace the plugin files with the new version — but be aware of the following:
There has been a database change to enable you to set a longer character length.
If you want that new functionality, you’ll need to make manual edits to your DB 
structure to enable this (change wp_linkshortcut.ident’s field type to VARCHAR(255)).
If you don’t want to make manual edits but would like the new features, you’ll have
to bite the bullet and deactivate / unzip / re-activate. Sorry.

## 常见问题

  How does Link Shortcut work?

The Link Shortcut plugin attaches itself to various core WordPress methods and waits
for a request to be made for a shortcut URL saved to the database. When one is, 
it simply does a redirect to the saved URL. The redirect type can be changed (301
or 302) inside the options panel.

  I installed the plugin but it doesn’t work.

You must have non-ugly permalink settings. If there are variables in your URLs, 
you’ll have to use WordPress admin to change that.

  Does Link Shortcut use the WordPress database?

Yes. Upon activation, Link Shortcut creates a table and stores all links in that
table, so your existing structure does not change. If you decide to deactivate the
plugin, it removes this table but creates a backup table for your convenience.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Link Shortcut」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ husani ](https://profiles.wordpress.org/husani/)

[帮助将「Link Shortcut」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/link-shortcut)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/link-shortcut/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/link-shortcut/)，或通过[RSS](https://plugins.trac.wordpress.org/log/link-shortcut/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/link-shortcut/)。

## 额外信息

 *  版本 **1.4**
 *  最后更新：**17 年前**
 *  活跃安装数量 **30+**
 *  WordPress 版本 ** 2.7 或更高版本 **
 *  已测试的最高版本为 **2.7.1**
 *  语言
 * [English (US)](https://wordpress.org/plugins/link-shortcut/)
 * 标签
 * [link](https://cn.wordpress.org/plugins/tags/link/)[links](https://cn.wordpress.org/plugins/tags/links/)
   [permalink](https://cn.wordpress.org/plugins/tags/permalink/)[redirect](https://cn.wordpress.org/plugins/tags/redirect/)
   [shortcut](https://cn.wordpress.org/plugins/tags/shortcut/)
 *  [高级视图](https://cn.wordpress.org/plugins/link-shortcut/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/link-shortcut/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/link-shortcut/reviews/)

## 贡献者

 *   [ husani ](https://profiles.wordpress.org/husani/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/link-shortcut/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.husani.com/ventures/wordpress-plugins/linkshortcut/#donate)