1
0
Fork 0
mirror of https://github.com/YunoHost/doc.git synced 2024-09-03 20:06:26 +02:00
doc/custom/shortcodes/RTLShortcode.php
2021-02-07 16:20:52 +01:00

14 lines
No EOL
337 B
PHP

<?php
namespace Grav\Plugin\Shortcodes;
use Thunder\Shortcode\Shortcode\ShortcodeInterface;
class RTLShortcode extends Shortcode
{
public function init()
{
$this->shortcode->getHandlers()->add('rtl', function(ShortcodeInterface $sc) {
return '<div dir="rtl">'.$sc->getContent().'</div>';
});
}
}