In this post I summarise some of the problems I’ve noted while testing the compatibility of oik with the Shortcake plugin, shortcode-ui v0.5.0.
This post has been updated to reference any Issues raised on GitHub.
- Needed to disable expansion of some shortcodes
- Those accepting positional parameters: e.g. [bw_link] fusioneng/shortcake#128
- Those which generate content not suitable for formatting in the WYSIWYG editor: e.g. [bw_codes]
- This leads to unwanted embedded shortcode expansion if the containing shortcode is disabled. e.g. [bw_geshi] fusioneng/shortcake#414
- Nested shortcodes are not loaded into Inner_content. A known limitation? fusioneng/shortcake#129
- Switching from Text to Visual introduces unwanted breaks and tags fusioneng/shortcake#317
- Switching from Text to Visual introduces unwanted tags fusioneng/shortcake#457
- Checkbox fields for y/n values are not handled as I’d have hoped. fusioneng/shortcake#359
- It’s very difficult working with shortcodes that don’t appear to expand to anything. fusioneng/shortcake#303
- Question: Is the
Word countintended to count the words from the expanded shortcodes?
- The search facility misses out some matches. e.g. [bw_field], [bw_fields] fusioneng/shortcake#458
To overcome some of these problems
- I’ve written some new code for the oik base plugin: bw_sc_shortcake_compatible()
- I’ve added a field to the definition of the
oik_shortcodespost type, which is where I keep a catalog of shortcodes.
- But as I’ve not yet created this as a Virtual field, and haven’t completed the analysis, the value displayed will currently default to
- I’m currently working with over 200 shortcodes. I don’t yet know how many I feel happy to tell shortcode-ui about.
The bottom line is…
With the shortcode-ui active, I daren’t use the Visual editor for most of what I do.
Here’s a short video demonstrating the differences between the UI and some of the quirky behaviour that led me to this conclusion. It goes a bit quiet in the middle as I failed to add a commentary. You should be able to see the problems I encountered.
On the plus side
I have discovered that my own add shortcode button works the same as Add Media > Insert Post Element. So that’s a bonus for users who don’t use the complex shortcodes that I write.