Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: adds a css class for the form design #7665

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading