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' nati

Author:John P. Bloch (profile at wordpress.org)
WordPress version required:3.2.1
WordPress version tested:3.5.2
Plugin version:0.1
Added to WordPress repository:18-08-2011
Last updated:12-01-2013
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:50
Rated by:2
Plugin URI:http://wordpress.org/extend/plugins/visual-sh...
Total downloads:2 850
Active installs:100+
plugin download
Click to start download

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.


FAQ
ChangeLog