PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | app/Agent/Controllers/WPController.php +11 -2 3.2.03.2.1 View file →
@@ -10,8 +10,9 @@
10 10
11 11 use Extendify\Agent\PostBlockFinder;
12 12 use Extendify\Agent\TemplatePartBlockFinder;
13 13 use Extendify\Constants;
14 +use Extendify\Shared\Services\HeroDescription;
14 15 use Extendify\Shared\Services\Sanitizer;
15 16 use Extendify\Shared\Services\SiteImages;
16 17
17 18 /**
@@ -572,10 +573,18 @@
572 573 1
573 574 );
574 575 }
575 576
576 - if ($description) {
577 + if (trim((string) $description) === '') {
578 + // Catalog paragraphs describe the slot, not the site.
577 579 $code = preg_replace(
580 + '/<!-- wp:paragraph[\s\S]*?<!-- \/wp:paragraph -->/m',
581 + '',
582 + $code,
583 + 1
584 + );
585 + } else {
586 + $code = preg_replace(
578 587 '/(<!-- wp:paragraph[^>]*-->[\s\S]*?<p[^>]*>)[\s\S]*?(<\/p>[\s\S]*?<!-- \/wp:paragraph -->)/m',
579 588 '${1}' . esc_html($description) . '${2}',
580 589 $code,
581 590 1
@@ -762,9 +771,9 @@
762 771
763 772 public static function getSiteDesignVariations(\WP_REST_Request $request)
764 773 {
765 774 $title = $request->get_param('title');
766 - $description = $request->get_param('description');
775 + $description = HeroDescription::resolve($request->get_param('description'));
767 776 $images = $request->get_param('images') ?? [];
768 777 $cta = $request->get_param('cta');
769 778 $featuredOnly = true; // Only show featured patterns
770 779 $currentHeroPattern = $request->get_param('currentHeroPattern');