Skip to content

Commit 8e0c1c6

Browse files
Add updates
- Change wp_remote_get() to wp_safe_remote_get() - Change wp_remote_post() to wp_safe_remote_post() - Update node dependencies - Update min version reference and test
1 parent f94c52b commit 8e0c1c6

10 files changed

Lines changed: 773 additions & 866 deletions

File tree

README.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: analytics, utm codes, analytics, google analytics, campaign marketing, lin
55
Requires at least: 5.1.0
66
Tested up to: 6.8
77
Requires PHP: 7.1.0
8-
Stable tag: 1.9.0
8+
Stable tag: 1.9.1
99
License: GPLv2
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -99,6 +99,11 @@ That isn't a question. But thank you.
9999

100100
== Changelog ==
101101

102+
= 1.9.1 =
103+
- Change usage of wp_remote_get() to wp_safe_remote_get()
104+
- Change usage of wp_remote_post() to wp_safe_remote_post()
105+
- Update dependencies
106+
102107
= 1.9.0 =
103108
- Supports WordPress v6.6, 6.7, 6.8
104109
- Update dependencies

_test/tests/TestUtmDotCodesActivation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function test_deactivation_hook_non_admin() {
173173
public function test_wordpress_version_failure() {
174174
global $wp_version;
175175
$wp_version_actual = $wp_version;
176-
$wp_version = 4.6;
176+
$wp_version = 5.0;
177177

178178
wp_set_current_user( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
179179

@@ -184,7 +184,7 @@ public function test_wordpress_version_failure() {
184184
$output = ob_get_flush();
185185
ob_end_clean();
186186
} catch ( Exception $exception ) {
187-
$this->assertEquals( $exception->getMessage(), 'utm.codes plugin requires WordPress 4.7 or newer.' );
187+
$this->assertEquals( $exception->getMessage(), 'utm.codes plugin requires WordPress 5.1.0 or newer.' );
188188
}
189189

190190
$this->assertFalse( get_option( 'utmdc_version' ) );

classes/class-utmdotcodes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ public function check_url_response() {
15731573
$args = array( 'sslverify' => false );
15741574
}
15751575

1576-
$url_check = wp_remote_get( $request_url, $args );
1576+
$url_check = wp_safe_remote_get( $request_url, $args );
15771577

15781578
if ( is_wp_error( $url_check ) ) {
15791579
$response['message'] = $url_check->get_error_messages();

classes/shorten/class-bitly.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function shorten( $data, $query_string ) {
6060
}
6161

6262
if ( '' !== $this->api_key ) {
63-
$response = wp_remote_post(
63+
$response = wp_safe_remote_post(
6464
self::API_URL . '/shorten',
6565
// Selective overrides of WP_Http() defaults.
6666
array(

classes/shorten/class-rebrandly.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function shorten( $data, $query_string ) {
7878
);
7979
}
8080

81-
$response = wp_remote_post(
81+
$response = wp_safe_remote_post(
8282
self::API_URL . '/links',
8383
// Selective overrides of WP_Http() defaults.
8484
array(
@@ -138,7 +138,7 @@ public function get_domains() {
138138

139139
if ( '' !== $this->api_key ) {
140140

141-
$response = wp_remote_get(
141+
$response = wp_safe_remote_get(
142142
self::API_URL . '/domains?' . http_build_query(
143143
array(
144144
'orderBy' => 'fullName',

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "asdfdotdev/utm.codes",
3-
"version": "1.9.0",
3+
"version": "1.9.1",
44
"description": "A plugin that makes building analytics friendly links quick and easy.",
55
"type": "wordpress-plugin",
66
"require-dev": {

languages/utm-dot-codes.pot

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
# This file is distributed under the GPL v2.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: utm.codes 1.9.0\n"
5+
"Project-Id-Version: utm.codes 1.9.1\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/utm.codes\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <LL@li.org>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2025-04-09T19:02:11+00:00\n"
12+
"POT-Creation-Date: 2025-06-17T10:25:08+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14-
"X-Generator: WP-CLI 2.11.0\n"
14+
"X-Generator: WP-CLI 2.12.0\n"
1515
"X-Domain: utm-dot-codes\n"
1616

1717
#. Plugin Name of the plugin
@@ -436,6 +436,7 @@ msgstr ""
436436

437437
#. translators: Placeholder in this string is the minimum WordPress version.
438438
#: classes/class-utmdotcodesactivation.php:44
439+
#, php-format
439440
msgctxt "Placeholder is minimum WordPress version."
440441
msgid "utm.codes plugin requires WordPress %s or newer."
441442
msgstr ""

0 commit comments

Comments
 (0)