Title: Visual Shortcodes
Author: J B
Published: <strong>2011 年 8 月 18 日</strong>
Last modified: 2013 年 1 月 12 日

---

搜索插件

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

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

# Visual Shortcodes

 作者：[J B](https://profiles.wordpress.org/johnpbloch/)

[下载](https://downloads.wordpress.org/plugin/visual-shortcodes.0.1.zip)

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

 [支持](https://wordpress.org/support/plugin/visual-shortcodes/)

## 描述

This is a utility plugin that will allow other plugins and themes to swap out shortcodes
with custom images, in the same way that WordPress’ native gallery shortcode does
this. Replacement images can be clicked to reveal a ‘delete’ button.

This works extremely well when your shortcode already has a tinymce button, but 
does work for manual shortcodes too.

This plugin does not support multi-line shortcodes or non-self-closing shortcodes(
e.g. it supports `[foo bar="baz"]` but not `[foo]bar baz[/foo]`). Honestly, I don’t
even know what would happen if you tried to use one. It may work, but it’s entirely
unsupported.

To add your shortcode, hook onto the filter `'jpb_visual_shortcodes'`. That filter
will pass one array as an argument. Each element of that array is an associative
array which must contain values for the following keys:

 * `shortcode` The name of the shortcode to replace
 * `image` The url of the image to replace the shortcode with.

Additionally, the array may contain the optional parameter `command`, which must
be a valid tinymce command. If present, this value will trigger a second UI button(‘
Edit’) when the user clicks the replacement image which, when clicked, will execute
the tinymce command passed as the value.

## 安装

Really? I think we all know how this works at this point.

## 常见问题

  Does this plugin support “ shortcode?

Yes and no. It can, theoretically; but only if the developer of that plugin/theme
adds that support to the plugin.

## 评价

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

### 󠀁[No history record (if you click on the red cross, you can't restore the shortcod](https://wordpress.org/support/topic/no-history-record-if-you-click-on-the-red-cross-you-cant-restore-the-shortcod/)󠁿

 [fakakakakaka](https://profiles.wordpress.org/fakakakakaka/) 2017 年 2 月 7 日

There is no history record for the delete operation, meaning that if you accidentally
click on the red (“delete”) button over an image, you couldn’t restore it (neither
via Ctrl+Z nor via the arrow-back button in the toolbar). Regular images can be 
restored if deleted. No those generated by this shortcode. I will change my rating
back to 5 stars once this bug has been fixed.

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/visual-shortcodes/reviews/)

## 贡献者及开发者

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

贡献者

 *   [ J B ](https://profiles.wordpress.org/johnpbloch/)

[帮助将「Visual Shortcodes」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/visual-shortcodes)

### 对开发感兴趣吗?

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

## 更新日志

#### 0.1

Initial release

## 额外信息

 *  版本 **0.1**
 *  最后更新：**13 年前**
 *  活跃安装数量 **100+**
 *  WordPress 版本 ** 3.2.1 或更高版本 **
 *  已测试的最高版本为 **3.5.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/visual-shortcodes/)
 * 标签
 * [editor](https://cn.wordpress.org/plugins/tags/editor/)[shortcodes](https://cn.wordpress.org/plugins/tags/shortcodes/)
   [visual editor](https://cn.wordpress.org/plugins/tags/visual-editor/)
 *  [高级视图](https://cn.wordpress.org/plugins/visual-shortcodes/advanced/)

## 评级

 2.5 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ J B ](https://profiles.wordpress.org/johnpbloch/)

## 支持

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

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