Skip to content

Commit 5c1302f

Browse files
committed
chore: prepares for 2.0.0 release
1 parent 5b5a185 commit 5c1302f

File tree

12 files changed

+50
-50
lines changed

12 files changed

+50
-50
lines changed

src/Actions/EnqueueNoticesScriptsAndStyles.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
/**
1212
* Checks the given admin notices and enqueues their scripts and styles if they exist and should be rendered.
1313
*
14-
* @unreleased
14+
* @since 2.0.0
1515
*/
1616
class EnqueueNoticesScriptsAndStyles
1717
{
1818
use HasNamespace;
1919

2020
/**
21-
* @unreleased
21+
* @since 2.0.0
2222
*/
2323
public function __invoke(AdminNotice ...$notices)
2424
{

src/Actions/NoticeShouldRender.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
/**
1414
* Checks whether the given notice should be rendered based on the provided conditions.
1515
*
16-
* @unreleased
16+
* @since 2.0.0
1717
*/
1818
class NoticeShouldRender
1919
{
2020
use HasNamespace;
2121

2222
/**
23-
* @unreleased
23+
* @since 2.0.0
2424
*/
2525
public function __invoke(AdminNotice $notice): bool
2626
{
@@ -34,7 +34,7 @@ public function __invoke(AdminNotice $notice): bool
3434
/**
3535
* Checks whether the notice should be displayed based on the provided date limits.
3636
*
37-
* @unreleased moved to the NoticeShouldRender class
37+
* @since 2.0.0 moved to the NoticeShouldRender class
3838
* @since 1.0.0
3939
*/
4040
private function passesDateLimits(AdminNotice $notice): bool
@@ -59,7 +59,7 @@ private function passesDateLimits(AdminNotice $notice): bool
5959
/**
6060
* Checks whether the notice should be displayed based on the provided callback.
6161
*
62-
* @unreleased moved to the NoticeShouldRender class
62+
* @since 2.0.0 moved to the NoticeShouldRender class
6363
* @since 1.0.0
6464
*/
6565
private function passesWhenCallback(AdminNotice $notice): bool
@@ -77,7 +77,7 @@ private function passesWhenCallback(AdminNotice $notice): bool
7777
* Checks whether user limits were provided and they pass. Only one capability is required to pass, allowing for
7878
* multiple users have visibility.
7979
*
80-
* @unreleased moved to the NoticeShouldRender class
80+
* @since 2.0.0 moved to the NoticeShouldRender class
8181
* @since 1.0.0
8282
*/
8383
private function passesUserCapabilities(AdminNotice $notice): bool
@@ -101,7 +101,7 @@ private function passesUserCapabilities(AdminNotice $notice): bool
101101
* Checks whether the notice is limited to specific screens and the current screen matches the conditions. Only one
102102
* screen condition is required to pass, allowing for the notice to appear on multiple screens.
103103
*
104-
* @unreleased moved to the NoticeShouldRender class
104+
* @since 2.0.0 moved to the NoticeShouldRender class
105105
* @since 1.0.0
106106
*/
107107
private function passesScreenConditions(AdminNotice $notice): bool
@@ -144,7 +144,7 @@ private function passesScreenConditions(AdminNotice $notice): bool
144144
/**
145145
* Checks whether the notice has been dismissed by the user.
146146
*
147-
* @unreleased moved to the NoticeShouldRender class
147+
* @since 2.0.0 moved to the NoticeShouldRender class
148148
* @since 1.1.0 added namespacing to the preferences key
149149
* @since 1.0.0
150150
*/

src/Actions/RenderAdminNotice.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class RenderAdminNotice
2323
/**
2424
* Renders the admin notice
2525
*
26-
* @unreleased custom notices have a completely different render flow
26+
* @since 2.0.0 custom notices have a completely different render flow
2727
* @since 1.1.0 added namespacing and notice is passed to the __invoke method
2828
* @since 1.0.0
2929
*/
@@ -52,7 +52,7 @@ public function __invoke(AdminNotice $notice): string
5252
/**
5353
* Generates the classes for the standard WordPress notice wrapper.
5454
*
55-
* @unreleased notice is assumed to be standard only
55+
* @since 2.0.0 notice is assumed to be standard only
5656
* @since 1.1.0 notice is passed instead of accessed as a property
5757
* @since 1.0.0
5858
*/
@@ -81,7 +81,7 @@ private function getStandardWrapperClasses(AdminNotice $notice): string
8181
/**
8282
* Apply the needed custom attributes to the content.
8383
*
84-
* @unreleased
84+
* @since 2.0.0
8585
*/
8686
private function applyCustomAttributesToContent(
8787
string $content,

src/AdminNotice.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ public function standard(): self
348348
/**
349349
* Sets the notice to be inline
350350
*
351-
* @unreleased removed parameter in favor of new location parameter
351+
* @since 2.0.0 removed parameter in favor of new location parameter
352352
* @since 1.2.0
353353
*/
354354
public function inline(): self
@@ -361,7 +361,7 @@ public function inline(): self
361361
/**
362362
* Prevents the notice from being moved from the place it's rendered
363363
*
364-
* @unreleased
364+
* @since 2.0.0
365365
*/
366366
public function inPlace(): self
367367
{
@@ -417,7 +417,7 @@ public function getId(): string
417417
}
418418

419419
/**
420-
* @unreleased
420+
* @since 2.0.0
421421
*/
422422
public function enqueueScript(
423423
string $source,
@@ -435,15 +435,15 @@ public function enqueueScript(
435435
}
436436

437437
/**
438-
* @unreleased
438+
* @since 2.0.0
439439
*/
440440
public function getScriptToEnqueue(): ?Script
441441
{
442442
return $this->scriptToEnqueue;
443443
}
444444

445445
/**
446-
* @unreleased
446+
* @since 2.0.0
447447
*/
448448
public function enqueueStylesheet(
449449
string $source,
@@ -457,7 +457,7 @@ public function enqueueStylesheet(
457457
}
458458

459459
/**
460-
* @unreleased
460+
* @since 2.0.0
461461
*/
462462
public function getStyleToEnqueue(): ?Style
463463
{

src/AdminNotices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static function show(string $notificationId, $render): AdminNotice
5252
/**
5353
* Renders the notice in the current location while still honoring visibility conditions
5454
*
55-
* @unreleased mark notice as inPlace to prevent movement; return null if not being rendered
55+
* @since 2.0.0 mark notice as inPlace to prevent movement; return null if not being rendered
5656
* @since 1.0.0
5757
*
5858
* @param bool $echo whether to echo or return the notice

src/DataTransferObjects/NoticeElementProperties.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class NoticeElementProperties
3939
public $customWrapperAttributes;
4040

4141
/**
42-
* @unreleased
42+
* @since 2.0.0
4343
*/
4444
public function __construct(AdminNotice $notice, string $namespace)
4545
{
@@ -54,7 +54,7 @@ public function __construct(AdminNotice $notice, string $namespace)
5454
}
5555

5656
/**
57-
* @unreleased
57+
* @since 2.0.0
5858
*
5959
* @param 'hide'|'mark-dismissed' $behavior
6060
*/
@@ -68,7 +68,7 @@ public function customCloseBehaviorAttribute(string $behavior = self::CLOSE_BEHA
6868
}
6969

7070
/**
71-
* @unreleased
71+
* @since 2.0.0
7272
*
7373
* @param 'hide'|'mark-dismissed' $behavior
7474
*/
@@ -82,7 +82,7 @@ public function closeAttributes(string $behavior = self::CLOSE_BEHAVIOR_HIDE): s
8282
}
8383

8484
/**
85-
* @unreleased
85+
* @since 2.0.0
8686
*/
8787
private function behaviorIsValid(string $behavior): bool
8888
{

src/ValueObjects/NoticeLocation.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class NoticeLocation
1919
private $location;
2020

2121
/**
22-
* @unreleased
22+
* @since 2.0.0
2323
*/
2424
public static function aboveHeader(): self
2525
{
@@ -29,31 +29,31 @@ public static function aboveHeader(): self
2929
/**
3030
* An alias of aboveHeader(), as this is the standard WordPress location for admin notices.
3131
*
32-
* @unreleased
32+
* @since 2.0.0
3333
*/
3434
public static function standard(): self
3535
{
3636
return self::belowHeader();
3737
}
3838

3939
/**
40-
* @unreleased
40+
* @since 2.0.0
4141
*/
4242
public static function belowHeader(): self
4343
{
4444
return new self(self::BELOW_HEADER);
4545
}
4646

4747
/**
48-
* @unreleased
48+
* @since 2.0.0
4949
*/
5050
public static function inline(): self
5151
{
5252
return new self(self::INLINE);
5353
}
5454

5555
/**
56-
* @unreleased
56+
* @since 2.0.0
5757
*/
5858
public function __construct(string $location)
5959
{
@@ -63,23 +63,23 @@ public function __construct(string $location)
6363
}
6464

6565
/**
66-
* @unreleased
66+
* @since 2.0.0
6767
*/
6868
public function __toString()
6969
{
7070
return $this->location;
7171
}
7272

7373
/**
74-
* @unreleased
74+
* @since 2.0.0
7575
*/
7676
public function isAboveHeader(): bool
7777
{
7878
return $this->location === self::ABOVE_HEADER;
7979
}
8080

8181
/**
82-
* @unreleased
82+
* @since 2.0.0
8383
*/
8484
public function isBelowHeader(): bool
8585
{
@@ -89,23 +89,23 @@ public function isBelowHeader(): bool
8989
/**
9090
* An alias of isAboveHeader(), as this is the standard WordPress location for admin notices.
9191
*
92-
* @unreleased
92+
* @since 2.0.0
9393
*/
9494
public function isStandard(): bool
9595
{
9696
return $this->isBelowHeader();
9797
}
9898

9999
/**
100-
* @unreleased
100+
* @since 2.0.0
101101
*/
102102
public function isInline(): bool
103103
{
104104
return $this->location === self::INLINE;
105105
}
106106

107107
/**
108-
* @unreleased
108+
* @since 2.0.0
109109
*
110110
* @param string|self $location
111111
*/
@@ -123,7 +123,7 @@ public function equals($location): bool
123123
}
124124

125125
/**
126-
* @unreleased
126+
* @since 2.0.0
127127
*/
128128
private function validateLocation(string $location)
129129
{

src/ValueObjects/Script.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Represents a script that can be enqueued with WordPress
1010
*
11-
* @unreleased
11+
* @since 2.0.0
1212
*/
1313
class Script
1414
{
@@ -33,7 +33,7 @@ class Script
3333
private $args;
3434

3535
/**
36-
* @unreleased
36+
* @since 2.0.0
3737
*/
3838
public function __construct(
3939
string $source,
@@ -48,7 +48,7 @@ public function __construct(
4848
}
4949

5050
/**
51-
* @unreleased
51+
* @since 2.0.0
5252
*/
5353
public function enqueue(string $handle): void
5454
{

src/ValueObjects/Style.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Represents a stylesheet to be enqueued in WordPress
1010
*
11-
* @unreleased
11+
* @since 2.0.0
1212
*/
1313
class Style
1414
{
@@ -33,7 +33,7 @@ class Style
3333
private $media;
3434

3535
/**
36-
* @unreleased
36+
* @since 2.0.0
3737
*/
3838
public function __construct(
3939
string $source,
@@ -50,7 +50,7 @@ public function __construct(
5050
/**
5151
* Enqueues the stylesheet with WordPress
5252
*
53-
* @unreleased
53+
* @since 2.0.0
5454
*/
5555
public function enqueue(string $handle): void
5656
{

tests/unit/Actions/DisplayNoticesInAdminTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testShouldAcceptMultipleNotices(): void
5959
}
6060

6161
/**
62-
* @unreleased
62+
* @since 2.0.0
6363
*/
6464
private function getSimpleNoticeOutput(string $content): string
6565
{

0 commit comments

Comments
 (0)