-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Expected behaviour for Open Download in New Tab #7
base: bugfix/issue-1-extract-warning
Are you sure you want to change the base?
Conversation
Fix #1: Warning when using extract
@@ -4,7 +4,7 @@ | |||
<?php endif; ?> | |||
|
|||
<div class='wpcf7-download'> | |||
<a href='<?= $url; ?>' class='<?= $button_classes; ?> wpcf7-btn' download> | |||
<a href='<?= $url; ?>' class='<?= $button_classes; ?> wpcf7-btn' download target="<?= $target ?>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a href='' class=' wpcf7-btn' download target="">
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First time trying to do this on gitHub so not sure I got it right, my code suggestion is:
<a href='<?= $url; ?>' class='<?= $button_classes; ?> wpcf7-btn' <?php if ( $target=="_blank" ) : ?>download <?php endif; ?> target="<?= $target ?>">
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry think I might have got comparator wrong way round, should read:
<?php if ( $target!="_blank" )
Update to support older versions of CF7
Add new show for admin feature
Ticking Open Download in New Tab adds in target="_blank" but leaves download. This can override the target instruction. Added a quick check to see if target is specified as _blank and not to include it if true.