Skip to content

Commit

Permalink
Feature: adds a css class for the form design (#7665)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonTheAdams authored Jan 3, 2025
1 parent 876d90d commit 38bb1f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DonationForms/ViewModels/DonationFormViewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ public function exports(): array
* 5. Finally, call the specific WP function wp_print_footer_scripts()
* - This will only print the footer scripts that are enqueued within our route.
*
* @unreleased Adds class for form design
* @since 3.11.0 Sanitize customCSS property
* @since 3.0.0
*/
Expand All @@ -277,7 +278,7 @@ public function render(): string
endif; ?>

<?php
$classNames = ['givewp-donation-form'];
$classNames = ['givewp-donation-form', "givewp-donation-form-design--{$this->designId()}"];

if ($this->previewMode) {
$classNames[] = 'givewp-donation-form--preview';
Expand Down

0 comments on commit 38bb1f5

Please sign in to comment.