Skip to content
Draft
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions classes/controllers/FrmAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,7 @@ public static function show_error_modal( $error_args ) {
'cancel_classes' => '',
'continue_url' => '',
'continue_classes' => '',
'continue_target' => '',
'icon' => 'frm_lock_simple',
);

Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@ public static function print_admin_banner( $should_show_lite_upgrade ) {
printf(
/* translators: %1$s: Start link HTML, %2$s: CTA text ("upgrading to PRO" by default), %3$s: End link HTML */
esc_html__( 'You\'re using Formidable Forms Lite. To unlock more features consider %1$s%2$s%3$s.', 'formidable' ),
'<a href="' . esc_url( $upgrade_link ) . '">',
'<a href="' . esc_url( $upgrade_link ) . '" target="_blank" rel="noopener">',
esc_html( $cta_text ),
'</a>'
);
Expand Down
2 changes: 1 addition & 1 deletion classes/models/FrmAntiSpam.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ private function maybe_get_support_text() {
return ' ' . sprintf(
// translators: %1$s start link, %2$s end link.
esc_html__( 'Please check out our %1$stroubleshooting guide%2$s for details on resolving this issue.', 'formidable' ),
'<a href="https://formidableforms.com/knowledgebase/add-spam-protection/">',
'<a href="https://formidableforms.com/knowledgebase/add-spam-protection/" target="_blank" rel="noopener">',
'</a>'
);
}
Expand Down
4 changes: 2 additions & 2 deletions classes/models/FrmMigrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ private function check_that_tables_exist() {
$message = array(
'key' => 'failed-to-create-tables',
'subject' => 'Something went wrong setting up the database',
'message' => 'For steps to continue, see our <a href="https://formidableforms.com/knowledgebase/install-formidable-forms/#kb-missing-database-tables">documentation</a>. If you need assistance, we recommend that you reach out to your hosting provider. Then <a href="' . esc_url( admin_url( 'admin.php?page=formidable&frm_add_tables=1' ) ) . '">click here</a> to try again.', // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
'cta' => '<a href="https://formidableforms.com/knowledgebase/install-formidable-forms/#kb-missing-database-tables">Learn More</a>',
'message' => 'For steps to continue, see our <a href="https://formidableforms.com/knowledgebase/install-formidable-forms/#kb-missing-database-tables" target="_blank" rel="noopener">documentation</a>. If you need assistance, we recommend that you reach out to your hosting provider. Then <a href="' . esc_url( admin_url( 'admin.php?page=formidable&frm_add_tables=1' ) ) . '">click here</a> to try again.', // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
'cta' => '<a href="https://formidableforms.com/knowledgebase/install-formidable-forms/#kb-missing-database-tables" target="_blank" rel="noopener">Learn More</a>', // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
'type' => 'error',
);

Expand Down
2 changes: 1 addition & 1 deletion classes/views/addons/min-version-notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'content' => 'min-pro-version-notice',
);
?>
Please <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $utm, 'account/downloads/' ) ); ?>">renew now</a> to get the latest version.
Please <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $utm, 'account/downloads/' ) ); ?>" target="_blank" rel="noopener">renew now</a> to get the latest version.
<?php else : ?>
Please <a href="<?php echo esc_url( admin_url( 'plugins.php?s=formidable%20forms%20pro' ) ); ?>">update now</a>.
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion classes/views/applications/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<?php do_action( 'frm_applications_header_inside_title_after_span', $context ); ?>
<?php do_action( 'frm_applications_header_after_title', $context ); ?>
<?php if ( 'index' === $context && ! FrmAppHelper::pro_is_installed() ) { ?>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'header' ) ); ?>" class="button button-secondary frm-button-secondary">
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'header' ) ); ?>" class="button button-secondary frm-button-secondary" target="_blank" rel="noopener">
<?php esc_html_e( 'Upgrade', 'formidable' ); ?>
</a>
<?php } ?>
Expand Down
2 changes: 1 addition & 1 deletion classes/views/frm-forms/error-modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

if ( ! empty( $error_args['continue_text'] ) ) :
?>
<a href="<?php echo esc_url( $error_args['continue_url'] ); ?>" class="button button-primary dismiss frm-button-primary <?php echo esc_attr( $error_args['continue_classes'] ); ?>"><?php echo esc_html( $error_args['continue_text'] ); ?></a>
<a href="<?php echo esc_url( $error_args['continue_url'] ); ?>" class="button button-primary dismiss frm-button-primary <?php echo esc_attr( $error_args['continue_classes'] ); ?>" <?php echo ! empty( $error_args['continue_target'] ) ? 'target="' . esc_attr( $error_args['continue_target'] ) . '" rel="noopener"' : ''; ?>><?php echo esc_html( $error_args['continue_text'] ); ?></a>
<?php endif; ?>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions classes/views/frm-settings/license_box.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
?>
<div id="frm_license_top" class="frm_unauthorized_box">
<p id="frm-connect-btns" class="frm-show-unauthorized">
<a href="<?php echo esc_url( FrmAddonsController::connect_link() ); ?>" class="button-primary frm-button-primary frm-button-sm">
<a href="<?php echo esc_url( FrmAddonsController::connect_link() ); ?>" class="button-primary frm-button-primary frm-button-sm" target="_blank" rel="noopener">
<?php esc_html_e( 'Connect an Account', 'formidable' ); ?>
</a>
<?php esc_html_e( 'or', 'formidable' ); ?>
Expand All @@ -59,7 +59,7 @@
printf(
/* translators: %1$s: Start link HTML, %2$s: CTA Text (Default is "upgrading to PRO"), %3$s: End link HTML */
esc_html__( 'To unlock more features consider %1$s%2$s%3$s.', 'formidable' ),
'<a href="' . esc_url( $unlock_more_upgrade_link ) . '">',
'<a href="' . esc_url( $unlock_more_upgrade_link ) . '" target="_blank" rel="noopener">',
esc_html( $unlock_more_upgrade_text ),
'</a>'
);
Expand Down
11 changes: 10 additions & 1 deletion classes/views/inbox/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,16 @@
<?php endif; ?>
</div>
<p><?php echo wp_kses_post( $message['message'] ); ?></p>
<?php echo wp_kses( $message['cta'], array( 'a' => array( 'href' => true ) ) ); ?>
<?php
$cta_allowed_html = array(
'a' => array(
'href' => true,
'target' => true,
'rel' => true,
),
);
echo wp_kses( $message['cta'], $cta_allowed_html );
?>
</div>
<?php endforeach; ?>

Expand Down
2 changes: 1 addition & 1 deletion classes/views/shared/admin-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
} elseif ( ! FrmAppHelper::pro_is_installed() ) {
?>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'header' ) ); ?>" class="button button-secondary frm-button-secondary">
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'header' ) ); ?>" class="button button-secondary frm-button-secondary" target="_blank" rel="noopener">
<?php esc_html_e( 'Upgrade', 'formidable' ); ?>
</a>
<?php
Expand Down
2 changes: 1 addition & 1 deletion classes/views/shared/upgrade_overlay.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<?php FrmAppHelper::kses_echo( $message, array( 'span' ) ); ?>
</p>
<?php if ( $is_pro ) { ?>
<a href="<?php echo esc_url( $default_link ); ?>" class="button button-primary frm-button-primary frm-upgrade-link" data-default="<?php echo esc_url( $default_link ); ?>">
<a href="<?php echo esc_url( $default_link ); ?>" class="button button-primary frm-button-primary frm-upgrade-link" target="_blank" rel="noopener" data-default="<?php echo esc_url( $default_link ); ?>">
<?php
if ( FrmAddonsController::is_license_expired() ) {
esc_html_e( 'Renew', 'formidable' );
Expand Down
4 changes: 2 additions & 2 deletions classes/views/shared/views-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
'content' => 'view-demos-button',
);
?>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $demo_link_args, 'demos/' ) ); ?>" class="frm-mb-md frm-ml-xs frm-button-secondary"><?php esc_html_e( 'View Demos', 'formidable' ); ?></a>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $demo_link_args, 'demos/' ) ); ?>" class="frm-mb-md frm-ml-xs frm-button-secondary" target="_blank" rel="noopener"><?php esc_html_e( 'View Demos', 'formidable' ); ?></a>

<div class="frm-views-features frm_grid_container">
<div class="frm4">
Expand Down Expand Up @@ -116,7 +116,7 @@
<div class="frm-views-learn-more">
<h3><?php esc_html_e( 'Learn more', 'formidable' ); ?></h3>
<p style="margin-bottom: var(--gap-md);"><?php esc_html_e( 'Bring entries to the front-end of your site for full-featured applications or just to show the content.', 'formidable' ); ?></p>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $learn_more_utm, 'features/display-form-data-views/' ) ); ?>" class="frm-button-secondary"><?php esc_html_e( 'Learn more', 'formidable' ); ?></a>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $learn_more_utm, 'features/display-form-data-views/' ) ); ?>" class="frm-button-secondary" target="_blank" rel="noopener"><?php esc_html_e( 'Learn more', 'formidable' ); ?></a>
</div>
</div>
<div class="frm6">
Expand Down
2 changes: 1 addition & 1 deletion classes/views/summary-emails/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<tr>
<td><?php esc_html_e( 'Need help? Get in touch with our team', 'formidable' ); ?></td>
<td align="right">
<a href="<?php echo esc_url( $args['support_url'] ); ?>" style="color: #F15A24; font-weight: 700; text-decoration: none;"><?php esc_html_e( 'Contact support', 'formidable' ); ?></a>
<a href="<?php echo esc_url( $args['support_url'] ); ?>" style="color: #F15A24; font-weight: 700; text-decoration: none;" target="_blank" rel="noopener"><?php esc_html_e( 'Contact support', 'formidable' ); ?></a>
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion classes/views/test-mode/container.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<?php esc_html_e( 'Reset', 'formidable' ); ?>
</a>
<?php if ( ! empty( $should_show_upsell ) ) { ?>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'test-mode' ) ); ?>" class="frm-gradient" id="frm_testmode_upgrade">
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'test-mode' ) ); ?>" class="frm-gradient" id="frm_testmode_upgrade" target="_blank" rel="noopener">
<?php FrmAppHelper::icon_by_class( 'frmfont frm_speaker_icon', array( 'aria-hidden' => 'true' ) ); ?>
<?php esc_html_e( 'Unlock these powerful, time saving testing features by upgrading!', 'formidable' ); ?>
</a>
Expand Down
2 changes: 2 additions & 0 deletions js/admin/applications.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@

function addTemplatesToGrid( templates ) {
templates.forEach(
application => elements.templatesGrid.append( createApplicationCard( application ) )

Check warning on line 147 in js/admin/applications.js

View workflow job for this annotation

GitHub Actions / Run ESLint

Avoid calling appendChild in a loop. Use DocumentFragment to batch DOM operations and prevent multiple reflows
);
maybeTriggerSearch();
}
Expand Down Expand Up @@ -525,6 +525,8 @@
if ( data.upgradeUrl ) {
primaryActionButton.classList.remove( 'dismiss' );
primaryActionButton.setAttribute( 'href', data.upgradeUrl );
primaryActionButton.target = '_blank';
primaryActionButton.rel = 'noopener';
}

const hookName = 'frm_view_application_modal_primary_action_button';
Expand Down
Loading