A smart shortcode is one which alters its behaviour taking in account the context in which it’s invoked.
Smart shortcodes understand the context in which they’re being executed and adjust their behaviour accordingly
Say you wanted to use a short code in a title, such as on this page. The [oik] shortcode will happily expand for when it’s used on a page title, but when the title is displayed in the administrative interface the shortcode should not included unwanted HTML tags.
Conversely you would not want the [bw_pages] shortcode to expand in a page title. So it’s smart enough to only expand when used in the content.
Smart shortcodes are defined using
- bw_add_shortcode() – Add a shortcode that safely expands in admin page titles but is properly expanded in content and widget text
Smart shortcodes are also able to provide help, syntax, example(s), generated code snippets and extended help.
For more information see smart shortcodes.
- Are the shortcode parameters documented?
- From where can I download oik?
- How do I get shortcodes to expand in the header or footer?
- How do I install oik?
- How should I read the shortcode syntax?
- What does the oik base plugin do?
- What does oik stand for?
- What’s a lazy shortcode?
- Which version of oik should I use?