quanzo / x51-shortcode
Implementation shortcodes
1.0.0
2019-08-31 08:31 UTC
Requires
- php: >=5.6
- quanzo/x51-functions: *
This package is auto-updated.
Last update: 2025-03-29 00:58:28 UTC
README
Add
$shortcodes = \x51\classes\shortcode\Shortcode::getInstance();
$shortcodes->add('bold', function ($arParams, $content = ''){
return '<strong>'.$content.'</strong>';
});
Processing
echo $shortcodes->process($content);
Remove
$shortcodes->remove('bold');
$shortcodes->clear();
Exist
if ($shortcodes->exists('bold')) {
....
}