Skip to content

Commit f2bacf6

Browse files
author
Jacob Middag
committed
Fix readme and links in notices
1 parent 404f325 commit f2bacf6

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The API key can also be configured in wp-config.php. You can add a TINY_API_KEY
7070

7171
== Changelog ==
7272

73-
= 1.3.0
73+
= 1.3.0 =
7474
* Improved bulk compressions from media library. You can now also bulk compress your whole media library in one step.
7575
* Intelligent detection if file is already compressed or was altered by another plugin and should be recompressed.
7676

src/scripts/admin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@
157157
jQuery('#tiny-compress-status').load(ajaxurl + '?action=tiny_compress_status')
158158
}
159159

160-
jQuery('.tiny-notice a').click(dismiss_notice)
160+
jQuery('.tiny-notice.is-dismissible a').click(dismiss_notice)
161161
jQuery(function() {
162-
jQuery('.tiny-notice button').unbind('click').click(dismiss_notice)
162+
jQuery('.tiny-notice.is-dismissible button').unbind('click').click(dismiss_notice)
163163
})
164164

165165
window.tinyBulkCompress = bulk_compress

test/integration/SettingsIntegrationTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public function testShouldShowNoNoticeIfApiKeyIsSet() {
4141
$this->assertEquals(0, count($elements));
4242
}
4343

44+
public function testNoApiKeyNoticeShouldLinkToSettings() {
45+
self::$driver->findElement(WebDriverBy::cssSelector('.error a'))->click();
46+
$this->assertStringEndsWith('options-media.php#tiny-compress-images', self::$driver->getCurrentURL());
47+
}
48+
49+
4450
public function testDefaultSizesBeingCompressed() {
4551
$elements = self::$driver->findElements(
4652
WebDriverBy::xpath('//input[@type="checkbox" and starts-with(@name, "tinypng_sizes") and @checked="checked"]'));

0 commit comments

Comments
 (0)