Skip to content
Open
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
20 changes: 8 additions & 12 deletions classes/controllers/FrmSMTPController.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,14 @@ protected function output_section_step_install() {
<div>
<h2>%2$s</h2>
<p>%3$s</p>
<span><a rel="%4$s" class="button button-primary frm-button-primary %5$s" aria-label="%6$s">%7$s</a></span>
</div>
<span><a rel="%4$s" class="button button-primary frm-button-primary %5$s">%6$s</a></span>
</div>
</section>',
FrmAppHelper::kses( $icon, array( 'a', 'i', 'span', 'use', 'svg' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
esc_html( $label ),
esc_html__( 'Install WP Mail SMTP from the WordPress.org plugin repository.', 'formidable' ),
esc_attr( $step['plugin'] ),
esc_attr( $step['button_class'] ),
esc_attr( $step['button_action'] ),
esc_html( $step['button_text'] )
);
}
Expand Down Expand Up @@ -321,18 +320,16 @@ protected function get_data_step_install() {
$this->output_data['plugin_setup'] = false;

$step = array(
'icon' => 'frm_step1_icon',
'button_action' => '',
'icon' => 'frm_step1_icon',
);

$is_installed = $this->output_data['plugin_installed'] || $this->output_data['pro_plugin_installed'];

if ( ! $is_installed ) {
// Return the download url.
$step['button_text'] = __( 'Install WP Mail SMTP', 'formidable' );
$step['button_class'] = 'frm-install-addon';
$step['button_action'] = __( 'Install', 'formidable' );
$step['plugin'] = $this->config['lite_download_url'];
$step['button_text'] = __( 'Install WP Mail SMTP', 'formidable' );
$step['button_class'] = 'frm-install-addon';
$step['plugin'] = $this->config['lite_download_url'];
return $step;
}

Expand All @@ -346,9 +343,8 @@ protected function get_data_step_install() {
$step['button_text'] = __( 'WP Mail SMTP Installed & Activated', 'formidable' );
$step['button_class'] = 'grey disabled';
} else {
$step['button_text'] = __( 'Activate WP Mail SMTP', 'formidable' );
$step['button_class'] = 'frm-activate-addon';
$step['button_action'] = __( 'Activate', 'formidable' );
$step['button_text'] = __( 'Activate WP Mail SMTP', 'formidable' );
$step['button_class'] = 'frm-activate-addon';
}

return $step;
Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/FrmFormMigratorsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private static function install_button( $install, $label = '' ) {
}
} else {
?>
<a rel="<?php echo esc_attr( $install['package'] ); ?>" class="frm-install-addon button <?php echo esc_attr( $primary ); ?>" aria-label="<?php esc_attr_e( 'Install', 'formidable' ); ?>"><?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
<a rel="<?php echo esc_attr( $install['package'] ); ?>" class="frm-install-addon button <?php echo esc_attr( $primary ); ?>"><?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
<?php
if ( $label === 'auto' ) {
/* translators: %s: Name of the plugin */
Expand Down
Loading