Title: Embed Link ShortCode
Author: nosuko
Published: <strong>2015 年 11 月 4 日</strong>
Last modified: 2017 年 11 月 20 日

---

搜索插件

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

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

# Embed Link ShortCode

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

[下载](https://downloads.wordpress.org/plugin/embed-link-shortcode.3.1.1.zip)

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

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

## 描述

‘Embed Link ShortCode’ tries to emulate the functionality that facebook has when
a link is pasted to the input status.
 But it doesn’t happen when you paste a link
in the body of a new post (as when you paste a youtube link in the visual view of
a post), it’s done using a shortcode. The provided link to the shortcode is fetched
to get the meta tags, and these meta tags are used to render the new post content.
It tries to get an image and put it as post default thumbnail, and it uses some 
meta tags to get title text and to add a quote. The order in the post content is:
image, quote and link. If you don’t like the HTML render, you can always edit the
code to change format or suggest me some changes.

Usage:

1- Create a new post.

2- Add only the shortcode with the link (in HTML mode, not Visual) in the post body.
For example:

[embedlink]http://example.com/example[/embedlink]

3- Push ‘Save Draft’.

If all is ok, the post content will be rewritten with the rendered html code. An
image may be uploaded to the media library and added as post default thumbnail.

If nothing happens, click the preview link and some error message may be displayed.
If a blank entry is showed, all is ok, then click Edit and you will see the rendered
code. Otherwise, it will be a bug: please, report it adding the URL you used and
the plugin version (update to last version before report!).

4- Review the generated code.

### 笔记

 1. The post format will be set to ‘link’ by default.
 2. The image (if any is found) will be added to the media library and set to post 
    default thumbnail.
 3. The content post is rewritten when you save it.

## 安装

This section describes how to install the plugin and to get it working:

 1. Upload and unzip `embed-link-shortcode.zip` to the `/wp-content/plugins/` directory
    or use the standard WordPress GUI way through the ‘Plugins’ menu to install the.
    zip file.
 2. 通过WordPress的“插件”菜单激活插件。
 3. Enjoy the new shortcode!

## 常见问题

  Installation Instructions

This section describes how to install the plugin and to get it working:

 1. Upload and unzip `embed-link-shortcode.zip` to the `/wp-content/plugins/` directory
    or use the standard WordPress GUI way through the ‘Plugins’ menu to install the.
    zip file.
 2. 通过WordPress的“插件”菜单激活插件。
 3. Enjoy the new shortcode!

  Why the post content (with the shortcode) is rewritten?

Because if that were not done in that way, everytime the post were loaded in the
browser, the shortcode would be executed (recursion alike).

## 评价

![](https://secure.gravatar.com/avatar/3c418177cc07e7f05c45441275c7fc2588e11a4c2ab69a84307ca64a990c3667?
s=60&d=retro&r=g)

### 󠀁[Not working at all](https://wordpress.org/support/topic/not-working-at-all-164/)󠁿

 [yellofish](https://profiles.wordpress.org/yellofish/) 2018 年 1 月 14 日

Tried a few different URL. Result is always same: ERROR: downloading URL: https://
www.facebook.com/

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/embed-link-shortcode/reviews/)

## 贡献者及开发者

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

贡献者

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

「Embed Link ShortCode」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/embed-link-shortcode/contributors)
为本插件所做的贡献。

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

### 对开发感兴趣吗?

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

## 更新日志

#### 3.1.1

 * Fixed version numbers.

#### 3.1

 * Updated docs. Documented when render code is not showed and preview link must
   be clicked and then edit.

#### 3.0

 * Reverted internal changes introduced in versión 2.0. Now, it’s more simple: only
   shortcode code is used, and the hook is removed when save the post and added 
   just after to avoid annoying loops. I hope is the last internal big change.
 * Updated readme.
 * Tested in WP 4.7.

#### 2.0

 * Changed internals: now, the shortcode is applied after the post is saved, not
   before (changed from hook ‘content_save_pre’ to ‘save_post’). Also, the hook 
   is removed and added when the post is saved to avoid annoying loops.
 * Detect ISO-8859-1 encoding and convert to UTF-8 to avoid some issues.

#### 1.1

 * From WP 4.5 version, by default, the original plugin behaviour was restored (
   I don’t know… maybe some internal changes, but I can not find them). So I modified
   the readme to reflect both behaviours in case of future WP changes.

#### 1.0

 * After some testing months, and at same time WP 4.5, here is 1.0 version.

#### 0.9

 * Tested with WordPress 4.5.
 * The changes introduced in version 0.8 do not work properly, so the behaviour 
   had to be modified.
 * Updated usage section to reflect plugin latest changes.

#### 0.8

 * Tested and working in 4.4 version.
 * Add support for ‘news_keywords’ tag from meta web info.
 * From aprox Dec 1, 2015, shortcode doesn’t get processed when “Save Draft” is 
   pressed. Adding “content_save_pre” filter to get sure it gets processed.

#### 0.7

 * Clean title and description strings from tags, html entities, etc.

#### 0.6

 * Fix media title name generation for an image that must be inserted into library.

#### 0.5

 * Implemented translation. Added tranlation to spanish.
 * Improved HTML render.
 * Improved documentation.
 * Some minor fixes.

#### 0.4

 * Minor fixes.
 * Added better support to get a good title for the post.

#### 0.3

 * Fixes in dirs to get correctly packed by wordpress plugin publication system.

#### 0.2

 * Some minor fixes to readme.txt.

#### 0.1

 * Some minor fixes.
 * Added error control after modify the post.

#### 0.0.1

 * Initial version. Works fine.
 * Support to oEmbed will be added in a future version.

## 额外信息

 *  版本 **3.1.1**
 *  最后更新：**8 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 4.2 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  语言
 * [English (US)](https://wordpress.org/plugins/embed-link-shortcode/) 和 [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/embed-link-shortcode/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/embed-link-shortcode)
 * 标签
 * [embed](https://cn.wordpress.org/plugins/tags/embed/)[link](https://cn.wordpress.org/plugins/tags/link/)
   [shortcode](https://cn.wordpress.org/plugins/tags/shortcode/)
 *  [高级视图](https://cn.wordpress.org/plugins/embed-link-shortcode/advanced/)

## 评级

 1 星（最高 5 星）。

 *  [  0 条 5 星评价     ](https://wordpress.org/support/plugin/embed-link-shortcode/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/embed-link-shortcode/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/embed-link-shortcode/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/embed-link-shortcode/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/embed-link-shortcode/reviews/?filter=1)

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

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

## 贡献者

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

## 支持

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

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

## 捐助

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

 [ 捐助此插件 ](http://www.wordpress.org)