Skip to content

Commit d2d1c56

Browse files
Version update
1 parent b03ef13 commit d2d1c56

6 files changed

Lines changed: 22 additions & 22 deletions

File tree

includes/admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MailgunAdmin extends Mailgun {
2929
/**
3030
* @var array
3131
*/
32-
protected array $options = array();
32+
protected array $options = [];
3333

3434
/**
3535
* @var string $hook_suffix

includes/mg-filter.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function mg_detect_from_address( $from_addr_header = null ): string {
162162
'wp_mail_from',
163163
$from_addr
164164
);
165-
if ( ! is_null($filter_from_addr) || ! empty($filter_from_addr)) {
165+
if (!is_null($filter_from_addr)) {
166166
$from_addr = $filter_from_addr;
167167
}
168168
}
@@ -193,9 +193,9 @@ function mg_detect_from_address( $from_addr_header = null ): string {
193193
*
194194
* @since 1.5.8
195195
*/
196-
function mg_parse_headers( $headers = array() ): array {
196+
function mg_parse_headers( $headers = []): array {
197197
if (empty($headers)) {
198-
return array();
198+
return [];
199199
}
200200

201201
if ( ! is_array($headers)) {
@@ -204,7 +204,7 @@ function mg_parse_headers( $headers = array() ): array {
204204
$tmp = $headers;
205205
}
206206

207-
$new_headers = array();
207+
$new_headers = [];
208208
if ( ! empty($tmp)) {
209209
$name = null;
210210
$value = null;
@@ -232,7 +232,7 @@ function mg_parse_headers( $headers = array() ): array {
232232
$value = trim($value);
233233

234234
if ( ! isset($new_headers[ $name ])) {
235-
$new_headers[ $name ] = array();
235+
$new_headers[ $name ] = [];
236236
}
237237

238238
$new_headers[ $name ][] = array(
@@ -264,7 +264,7 @@ function mg_dump_headers( array $headers = null ): string {
264264
$header_string = '';
265265
foreach ($headers as $name => $values) {
266266
$header_string .= sprintf('%s: ', $name);
267-
$header_values = array();
267+
$header_values = [];
268268

269269
foreach ($values as $content) {
270270
// XXX - Is it actually okay to discard `parts` and `boundary`?

includes/wp-mail-api.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function mg_mutate_to_rcpt_vars_cb( $to_addrs ): array {
7171
}
7272

7373
if (has_filter('mg_use_recipient_vars_syntax')) {
74-
$rcpt_vars = array();
74+
$rcpt_vars = [];
7575
$use_rcpt_vars = apply_filters('mg_use_recipient_vars_syntax', null);
7676
if ($use_rcpt_vars) {
7777

@@ -122,7 +122,7 @@ function mg_mutate_to_rcpt_vars_cb( $to_addrs ): array {
122122
* @return bool
123123
* @throws \PHPMailer\PHPMailer\Exception
124124
*/
125-
function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
125+
function wp_mail( $to, $subject, $message, $headers = '', $attachments = []) {
126126
$mailgun = get_option('mailgun');
127127
$region = ( defined('MAILGUN_REGION') && MAILGUN_REGION ) ? MAILGUN_REGION : $mailgun['region'];
128128
$apiKey = ( defined('MAILGUN_APIKEY') && MAILGUN_APIKEY ) ? MAILGUN_APIKEY : $mailgun['apiKey'];
@@ -169,12 +169,12 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
169169
$attachments = explode("\n", str_replace("\r\n", "\n", $attachments));
170170
}
171171

172-
$cc = array();
173-
$bcc = array();
172+
$cc = [];
173+
$bcc = [];
174174

175175
// Headers
176176
if (empty($headers)) {
177-
$headers = array();
177+
$headers = [];
178178
} else {
179179
if ( ! is_array($headers)) {
180180
// Explode the headers out, so this function can take both
@@ -183,9 +183,9 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
183183
} else {
184184
$tempheaders = $headers;
185185
}
186-
$headers = array();
187-
$cc = array();
188-
$bcc = array();
186+
$headers = [];
187+
$cc = [];
188+
$bcc = [];
189189

190190
// If it's actually got contents
191191
if ( ! empty($tempheaders)) {
@@ -273,7 +273,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
273273
$body['recipient-variables'] = $rcpt_data['rcpt_vars'];
274274
}
275275

276-
$body['o:tag'] = array();
276+
$body['o:tag'] = [];
277277
if (defined('MAILGUN_TRACK_CLICKS')) {
278278
$trackClicks = MAILGUN_TRACK_CLICKS;
279279
} else {

mailgun.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* Plugin Name: Mailgun
44
* Plugin URI: http://wordpress.org/extend/plugins/mailgun/
55
* Description: Mailgun integration for WordPress
6-
* Version: 2.1.9
6+
* Version: 2.1.10
77
* Requires PHP: 7.4
8-
* Requires at least: 4.4
8+
* Requires at least: 5.6
99
* Author: Mailgun
1010
* Author URI: http://www.mailgun.com/
1111
* License: GPLv2 or later
@@ -213,7 +213,7 @@ public function deactivate_and_die( $file ): void {
213213
*
214214
* @return string
215215
*/
216-
public function api_call( string $uri, array $params = array(), string $method = 'POST' ): string {
216+
public function api_call( string $uri, array $params = [], string $method = 'POST' ): string {
217217
$options = get_option( 'mailgun' );
218218
$getRegion = ( defined( 'MAILGUN_REGION' ) && MAILGUN_REGION ) ? MAILGUN_REGION : $options['region'];
219219
$apiKey = ( defined( 'MAILGUN_APIKEY' ) && MAILGUN_APIKEY ) ? MAILGUN_APIKEY : $options['apiKey'];
@@ -369,7 +369,7 @@ public function add_list(): void {
369369
* @param array $args widget arguments
370370
* @throws JsonException
371371
*/
372-
public function list_form( string $list_address, array $args = array() ): void {
372+
public function list_form( string $list_address, array $args = []): void {
373373
$widgetId = $args['widget_id'] ?? 0;
374374
$widget_class_id = "mailgun-list-widget-{$widgetId}";
375375
$form_class_id = "list-form-{$widgetId}";

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Mailgun for WordPress
44
Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller
55
Tags: mailgun, smtp, http, api, mail, email
66
Tested up to: 6.8.1
7-
Stable tag: 2.1.9
7+
Stable tag: 2.1.10
88
Requires PHP: 7.4
99
License: GPLv2 or later
1010

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Mailgun for WordPress
44
Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller
55
Tags: mailgun, smtp, http, api, mail, email
66
Tested up to: 6.8.1
7-
Stable tag: 2.1.9
7+
Stable tag: 2.1.10
88
Requires PHP: 7.4
99
License: GPLv2 or later
1010

0 commit comments

Comments
 (0)