Skip to content

Commit

Permalink
Adding suppress function for tracking clicks in the Reset Password em… (
Browse files Browse the repository at this point in the history
#186)

* Adding suppress function for tracking clicks in the Reset Password emails. It will lead to long domain in the list. Experimental

Prepare new version

* Adding suppress function for tracking clicks in the Reset Password emails. It will lead to long domain in the list. Experimental

Prepare new version
  • Loading branch information
oleksandr-mykhailenko authored Jul 27, 2024
1 parent c1d21fd commit d1302d5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

2.1.0 (2024-07-27)
- Added ability to suppress Track Clicks when we send Reset Password email (it was an issue with domain url in the email)
- Added field to setup Reply-to(header) email for the emails.
- When constants MAILGUN_TRACK_CLICKS, MAILGUN_TRACK_OPENS are used, we disable field on the UI as we do for other fields

2.0.1 (2024-07-17)
- Updated changelog

Expand Down
7 changes: 5 additions & 2 deletions includes/options-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
$mailgun_use_api = !is_null($mailgun_use_api_const) ? ((string)(1 * $mailgun_use_api_const)) : $this->get_option('useAPI');
$icon = $mailgun->getAssetsPath() . 'icon-128x128.png';

$trackClicks = (defined('MAILGUN_TRACK_CLICKS') ? MAILGUN_TRACK_CLICKS : null);
$trackOpens = (defined('MAILGUN_TRACK_OPENS') ? MAILGUN_TRACK_OPENS : null);

$suppressClicks = $this->get_option('suppress_clicks') ?: 'no';

?>
Expand Down Expand Up @@ -262,7 +265,7 @@
<?php _e('Click Tracking', 'mailgun'); ?>
</th>
<td>
<select name="mailgun[track-clicks]">
<select name="mailgun[track-clicks]" <?php echo $trackClicks ? 'disabled="disabled"' : '' ?>>
<option value="htmlonly"<?php selected('htmlonly', $this->get_option('track-clicks')); ?>><?php _e('HTML Only', 'mailgun'); ?></option>
<option value="yes"<?php selected('yes', $this->get_option('track-clicks')); ?>><?php _e('Yes', 'mailgun'); ?></option>
<option value="no"<?php selected('no', $this->get_option('track-clicks')); ?>><?php _e('No', 'mailgun'); ?></option>
Expand All @@ -285,7 +288,7 @@
<?php _e('Open Tracking', 'mailgun'); ?>
</th>
<td>
<select name="mailgun[track-opens]">
<select name="mailgun[track-opens]" <?php echo $trackOpens ? 'disabled="disabled"' : '' ?>>
<option value="1"<?php selected('1', $this->get_option('track-opens')); ?>><?php _e('Yes', 'mailgun'); ?></option>
<option value="0"<?php selected('0', $this->get_option('track-opens')); ?>><?php _e('No', 'mailgun'); ?></option>
</select>
Expand Down
2 changes: 1 addition & 1 deletion mailgun.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Mailgun
* Plugin URI: http://wordpress.org/extend/plugins/mailgun/
* Description: Mailgun integration for WordPress
* Version: 2.0.1
* Version: 2.1.0
* Requires PHP: 7.4
* Requires at least: 4.4
* Author: Mailgun
Expand Down
9 changes: 7 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Mailgun for WordPress

Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller
Tags: mailgun, smtp, http, api, mail, email
Tested up to: 6.5.5
Stable tag: 2.0.1
Tested up to: 6.6.1
Stable tag: 2.1.0
License: GPLv2 or later

Easily send email from your WordPress site through Mailgun using the HTTP API or SMTP.
Expand Down Expand Up @@ -132,6 +132,11 @@ MAILGUN_REPLY_TO_ADDRESS Type: string

== Changelog ==

= 2.1.0 (2024-07-27): =
- Added ability to suppress Track Clicks when we send Reset Password email (it was an issue with domain url in the email)
- Added field to setup Reply-to(header) email for the emails.
- When constants MAILGUN_TRACK_CLICKS, MAILGUN_TRACK_OPENS are used, we disable field on the UI as we do for other fields

= 2.0.1 (2024-07-17): =
- Updated changelog

Expand Down
9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Mailgun for WordPress

Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller
Tags: mailgun, smtp, http, api, mail, email
Tested up to: 6.5.5
Stable tag: 2.0.1
Tested up to: 6.6.1
Stable tag: 2.1.0
License: GPLv2 or later

Easily send email from your WordPress site through Mailgun using the HTTP API or SMTP.
Expand Down Expand Up @@ -129,6 +129,11 @@ MAILGUN_TRACK_OPENS Type: string Choices: 'yes' or 'no'

== Changelog ==

= 2.1.0 (2024-07-27): =
- Added ability to suppress Track Clicks when we send Reset Password email (it was an issue with domain url in the email)
- Added field to setup Reply-to(header) email for the emails.
- When constants MAILGUN_TRACK_CLICKS, MAILGUN_TRACK_OPENS are used, we disable field on the UI as we do for other fields

= 2.0.1 (2024-07-17): =
- Updated changelog

Expand Down

0 comments on commit d1302d5

Please sign in to comment.