1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-11 23:54:06 +02:00

Flextype Core: Shortcodes - general names updates

- [snippet name] to [snippets get]
- [image] to [images]
- [image_url] to [images_url]
This commit is contained in:
Awilum
2019-01-30 00:39:15 +03:00
parent 2b09e27478
commit 7b99d4d750

View File

@@ -120,15 +120,15 @@ class Shortcodes {
});
// Snippets
// Shortcode: [snippet name=snippet-name]
Shortcodes::shortcode()->addHandler('snippet', function(ShortcodeInterface $s) {
return Snippets::get($s->getParameter('name'));
// Shortcode: [snippets get=snippet-name]
Shortcodes::shortcode()->addHandler('snippets', function(ShortcodeInterface $s) {
return Snippets::get($s->getParameter('get'));
});
// Images
// Shortcode: [image path="home/image.jpg"]
// Shortcode: [images path="home/image.jpg"]
// Result: Display image
Shortcodes::shortcode()->addHandler('image', function(ShortcodeInterface $s) {
Shortcodes::shortcode()->addHandler('images', function(ShortcodeInterface $s) {
$params = [];
$attributes = [];
@@ -171,9 +171,9 @@ class Shortcodes {
});
// Images
// Shortcode: [image_url path="home/image.jpg"]
// Shortcode: [images_url path="home/image.jpg"]
// Result: Display image url
Shortcodes::shortcode()->addHandler('image_url', function(ShortcodeInterface $s) {
Shortcodes::shortcode()->addHandler('images_url', function(ShortcodeInterface $s) {
$params = [];
// API