I'm working on a project where we need to implement shortcodes with a syntax that is incompatible with the WordPress style shortcodes; no closing tag and no trailing slash. Some examples:
[ITALIC "text"]
[BR]
[LINK "http://example.com" "link text"]
The result:
function MODULE_shortcode_info() {
$shortcodes['ITALIC'] = array(
'title' => t('Italic'),
'description' => t('Italicize the given text.'),
'process callback' => 'MODULE_shortcode_italic',
'standalone' => TRUE,
);
return $shortcodes;
}
function MODULE_shortcode_italic($attrs, $text) {
return '<em>' . $attrs[0] . '</em>';
}
Postponed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.