hypejunction/hypeshortcode

该软件包已被废弃且不再维护。未建议替代软件包。

短代码支持

安装: 20

依赖项: 1

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 1

类型:elgg-plugin

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

添加自定义 BB-style 短代码支持

使用方法

注册短代码

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

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

生成短代码标签

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

展开短代码

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

去除短代码

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