pessek/hypeshortcode

Shortcode support

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:elgg-plugin

v1.2.0 2021-05-29 13:28 UTC

This package is auto-updated.

Last update: 2024-03-29 04:33:10 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);