badcow/shortcodes
Composer 安装命令:
composer require badcow/shortcodes
包简介
README 文档
README
This is a port of WordPress' brilliant shortcode feature for use outside of WordPress. The code has remained largely unchanged.
The purpose of this project is to use the familiar WordPress shortcode syntax in any system.
Basic Usage
$shortcodes = new Badcow\Shortcodes\Shortcodes;
$shortcodes->addShortcode('hello', function ($attributes, $content, $tagName) {
return $attributes['greeting'] . ', ' . $content;
});
echo $shortcodes->process('My shortcode does this: [hello greeting="Konnichiwa"]world![/hello]');
Installation
Use Composer. That's what all the cool kids use.
"require" : { "badcow/shortcodes": "dev-master" }
Running Tests
phpunit /path/to/shortcodes
Build Status
统计信息
- 总下载量: 31.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2013-06-07