Skip to content

Commit d1302d5

Browse files
Adding suppress function for tracking clicks in the Reset Password em… (#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
1 parent c1d21fd commit d1302d5

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
2.1.0 (2024-07-27)
5+
- Added ability to suppress Track Clicks when we send Reset Password email (it was an issue with domain url in the email)
6+
- Added field to setup Reply-to(header) email for the emails.
7+
- When constants MAILGUN_TRACK_CLICKS, MAILGUN_TRACK_OPENS are used, we disable field on the UI as we do for other fields
8+
49
2.0.1 (2024-07-17)
510
- Updated changelog
611

includes/options-page.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
$mailgun_use_api = !is_null($mailgun_use_api_const) ? ((string)(1 * $mailgun_use_api_const)) : $this->get_option('useAPI');
5656
$icon = $mailgun->getAssetsPath() . 'icon-128x128.png';
5757

58+
$trackClicks = (defined('MAILGUN_TRACK_CLICKS') ? MAILGUN_TRACK_CLICKS : null);
59+
$trackOpens = (defined('MAILGUN_TRACK_OPENS') ? MAILGUN_TRACK_OPENS : null);
60+
5861
$suppressClicks = $this->get_option('suppress_clicks') ?: 'no';
5962

6063
?>
@@ -262,7 +265,7 @@
262265
<?php _e('Click Tracking', 'mailgun'); ?>
263266
</th>
264267
<td>
265-
<select name="mailgun[track-clicks]">
268+
<select name="mailgun[track-clicks]" <?php echo $trackClicks ? 'disabled="disabled"' : '' ?>>
266269
<option value="htmlonly"<?php selected('htmlonly', $this->get_option('track-clicks')); ?>><?php _e('HTML Only', 'mailgun'); ?></option>
267270
<option value="yes"<?php selected('yes', $this->get_option('track-clicks')); ?>><?php _e('Yes', 'mailgun'); ?></option>
268271
<option value="no"<?php selected('no', $this->get_option('track-clicks')); ?>><?php _e('No', 'mailgun'); ?></option>
@@ -285,7 +288,7 @@
285288
<?php _e('Open Tracking', 'mailgun'); ?>
286289
</th>
287290
<td>
288-
<select name="mailgun[track-opens]">
291+
<select name="mailgun[track-opens]" <?php echo $trackOpens ? 'disabled="disabled"' : '' ?>>
289292
<option value="1"<?php selected('1', $this->get_option('track-opens')); ?>><?php _e('Yes', 'mailgun'); ?></option>
290293
<option value="0"<?php selected('0', $this->get_option('track-opens')); ?>><?php _e('No', 'mailgun'); ?></option>
291294
</select>

mailgun.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Mailgun
44
* Plugin URI: http://wordpress.org/extend/plugins/mailgun/
55
* Description: Mailgun integration for WordPress
6-
* Version: 2.0.1
6+
* Version: 2.1.0
77
* Requires PHP: 7.4
88
* Requires at least: 4.4
99
* Author: Mailgun

readme.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Mailgun for WordPress
33

44
Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller
55
Tags: mailgun, smtp, http, api, mail, email
6-
Tested up to: 6.5.5
7-
Stable tag: 2.0.1
6+
Tested up to: 6.6.1
7+
Stable tag: 2.1.0
88
License: GPLv2 or later
99

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

133133
== Changelog ==
134134

135+
= 2.1.0 (2024-07-27): =
136+
- Added ability to suppress Track Clicks when we send Reset Password email (it was an issue with domain url in the email)
137+
- Added field to setup Reply-to(header) email for the emails.
138+
- When constants MAILGUN_TRACK_CLICKS, MAILGUN_TRACK_OPENS are used, we disable field on the UI as we do for other fields
139+
135140
= 2.0.1 (2024-07-17): =
136141
- Updated changelog
137142

readme.txt

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Mailgun for WordPress
33

44
Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller
55
Tags: mailgun, smtp, http, api, mail, email
6-
Tested up to: 6.5.5
7-
Stable tag: 2.0.1
6+
Tested up to: 6.6.1
7+
Stable tag: 2.1.0
88
License: GPLv2 or later
99

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

130130
== Changelog ==
131131

132+
= 2.1.0 (2024-07-27): =
133+
- Added ability to suppress Track Clicks when we send Reset Password email (it was an issue with domain url in the email)
134+
- Added field to setup Reply-to(header) email for the emails.
135+
- When constants MAILGUN_TRACK_CLICKS, MAILGUN_TRACK_OPENS are used, we disable field on the UI as we do for other fields
136+
132137
= 2.0.1 (2024-07-17): =
133138
- Updated changelog
134139

0 commit comments

Comments
 (0)