From b7295866900925aac691516c0f8a0ab681e40cab Mon Sep 17 00:00:00 2001 From: Julien Gomes Dias Date: Sun, 7 Feb 2021 16:20:52 +0100 Subject: [PATCH] Add custom rtl shortcode --- config/plugins/shortcode-core.yaml | 1 + custom/shortcodes/RTLShortcode.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 config/plugins/shortcode-core.yaml create mode 100644 custom/shortcodes/RTLShortcode.php diff --git a/config/plugins/shortcode-core.yaml b/config/plugins/shortcode-core.yaml new file mode 100644 index 00000000..fe083e0b --- /dev/null +++ b/config/plugins/shortcode-core.yaml @@ -0,0 +1 @@ +custom_shortcodes: '/user/custom/shortcodes' \ No newline at end of file diff --git a/custom/shortcodes/RTLShortcode.php b/custom/shortcodes/RTLShortcode.php new file mode 100644 index 00000000..32032c92 --- /dev/null +++ b/custom/shortcodes/RTLShortcode.php @@ -0,0 +1,14 @@ +shortcode->getHandlers()->add('rtl', function(ShortcodeInterface $sc) { + return '
'.$sc->getContent().'
'; + }); + } +} \ No newline at end of file