From 7b99d4d7507ff62af10f91cf9337b93e0ada624e Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 30 Jan 2019 00:39:15 +0300 Subject: [PATCH] Flextype Core: Shortcodes - general names updates - [snippet name] to [snippets get] - [image] to [images] - [image_url] to [images_url] --- flextype/Shortcodes.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/flextype/Shortcodes.php b/flextype/Shortcodes.php index 8092f06f..fc122f7d 100644 --- a/flextype/Shortcodes.php +++ b/flextype/Shortcodes.php @@ -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