Skip to content

Commit

Permalink
fix: Added check for Show/Hide setting
Browse files Browse the repository at this point in the history
- Updated the shortcode provider to check for the page setting
  • Loading branch information
SnowB1 committed Dec 22, 2023
1 parent 3fc2422 commit 3f6175b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/NewsletterShortcodeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ public static function handle_shortcode($args, $content, $parser, $shortcode, $e
$PopupContent .= '<div class="'.$args['class'].'">';
}
// Get Form HTML
$PopupContent .= Controller::curr()->NewsletterForm()
->setHTMLID("NewsletterForm".rand(0,100))
->setFormAction(Controller::join_links(Controller::curr()->owner->Link(), 'NewsletterForm'))
->forTemplate();
if (Controller::curr()->owner->NewsletterShowHide){
$PopupContent .= Controller::curr()->NewsletterForm()
->setHTMLID("NewsletterForm".rand(0,100))
->setFormAction(Controller::join_links(Controller::curr()->owner->Link(), 'NewsletterForm'))
->forTemplate();
}
// End wrapper div
if (isset($args['class'])){
$PopupContent .= '</div>';
Expand Down

0 comments on commit 3f6175b

Please sign in to comment.