← All changes
|
app/Hooks/Handlers/BlockEditors/SearchBarBlockEditor.php
+7
-6
1.3.21
→
1.6.6
View file →
| @@ -45,14 +45,15 @@ | ||
| 45 | 45 | { |
| 46 | 46 | $urlMode = Arr::get($shortCodeAttribute, 'url_mode'); |
| 47 | 47 | $categoryMode = Arr::get($shortCodeAttribute, 'category_mode'); |
| 48 | 48 | $linkWithShopApp = Arr::get($shortCodeAttribute, 'link_with_shop_app'); |
| 49 | + $showThumbnail = Arr::get($shortCodeAttribute, 'show_thumbnail', true); | |
| 49 | 50 | |
| 50 | - $url_mode = !empty($urlMode) ? 'url_mode=' . $urlMode : 'url_mode=new-tab'; | |
| 51 | - $category_mode = !empty($categoryMode) ? 'category_mode=' . $categoryMode : ''; | |
| 52 | - $link_with_shop_app = !empty($linkWithShopApp) ? 'link_with_shop_app=' . $linkWithShopApp : ''; | |
| 53 | - | |
| 54 | - $shortcodeName = SearchBarShortCode::getShortCodeName(); | |
| 55 | - return "[$shortcodeName $url_mode $category_mode $link_with_shop_app]"; | |
| 51 | + return SearchBarShortCode::make([ | |
| 52 | + 'url_mode' => !empty($urlMode) ? $urlMode : 'new-tab', | |
| 53 | + 'category_mode' => !empty($categoryMode) ? $categoryMode : '', | |
| 54 | + 'link_with_shop_app' => !empty($linkWithShopApp) ? $linkWithShopApp : '', | |
| 55 | + 'show_thumbnail' => $showThumbnail, | |
| 56 | + ])->renderShortcode($block); | |
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | } |