hypejunction/hypeshortcode

This package is abandoned and no longer maintained. No replacement package was suggested.

Shortcode support

1.2.0 2018-06-29 20:01 UTC

This package is not auto-updated.

Last update: 2020-01-18 13:22:33 UTC


README

Add support for custom BB-style shortcodes

Usage

Register shortcode

elgg()->shortcodes->register('mycode');

// then add a view in shortcodes/mycode
// view vars will contain attributes of the shortcode

Generate a shortcode tag

elgg()->shortcodes->generate('mycode', [
	'foo' => 'bar',
]);

Expand shortcodes

elgg()->shortcodes->expand($text);

Strip shortcodes

elgg()->shortcodes->strip($text);