| @@ -330,8 +330,13 @@ | ||
| 330 | 330 | self::asset_version( $display_css ) |
| 331 | 331 | ); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | + // Template theme CSS for the preview modal: fires | |
| 335 | + // `better_payment/campaign/enqueue_styles` ('builder'), where Pro loads its | |
| 336 | + // themes. A free install loads no Pro design here. See CampaignStyles. | |
| 337 | + CampaignStyles::enqueue_theme_styles( 'builder' ); | |
| 338 | + | |
| 334 | 339 | wp_enqueue_media(); |
| 335 | 340 | |
| 336 | 341 | // Zero out all WP admin chrome spacing so the builder fills edge-to-edge. |
| 337 | 342 | // The footer styling mirrors the Better Payment admin footer (see |
| @@ -373,8 +378,14 @@ | ||
| 373 | 378 | 'elements' => array_values( ElementRegistry::get_all() ), |
| 374 | 379 | // Picker-facing — retired designs are filtered out here, never in |
| 375 | 380 | // get_all(), which the renderer reads on every campaign pageview. |
| 376 | 381 | 'templates' => array_values( TemplateManager::get_for_picker() ), |
| 382 | + // `template key => theme_class`, over the WHOLE registry rather than | |
| 383 | + // the picker: a campaign on a retired design still renders under its | |
| 384 | + // theme class, and the Advanced tab's Background control reads this | |
| 385 | + // to resolve what that theme actually paints (utils/themeBackground.js). | |
| 386 | + // Keyed, not a list — the builder looks a single key up. | |
| 387 | + 'templateThemes' => TemplateManager::theme_classes(), | |
| 377 | 388 | // The category taxonomy, shared by the template picker's sidebar and |
| 378 | 389 | // the AI wizard's "What are you raising funds for?" tiles. Both used |
| 379 | 390 | // to hardcode their own list and drifted apart; this is the one list. |
| 380 | 391 | 'categories' => CategoryRegistry::for_client(), |