Skip to content

Commit c1b24b8

Browse files
gzioloemdashcodes
andauthored
Update version to 0.3.0 in preparation to Composer package release (#116)
* Update version to 0.3.0 in preparation to Composer package release * Fix styling issues raised on WP Core CI Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org>
1 parent 9ffcc0e commit c1b24b8

File tree

9 files changed

+58
-58
lines changed

9 files changed

+58
-58
lines changed

abilities-api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Plugin URI: https://github.com/WordPress/abilities-api
1313
* Description: Provides a framework for registering and executing AI abilities in WordPress.
1414
* Requires at least: 6.8
15-
* Version: 0.2.0
15+
* Version: 0.3.0
1616
* Requires PHP: 7.2
1717
* Author: WordPress.org Contributors
1818
* Author URI: https://github.com/WordPress/abilities-api/graphs/contributors

includes/abilities-api.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function wp_get_abilities(): array {
107107
/**
108108
* Registers a new ability category.
109109
*
110-
* @since n.e.x.t
110+
* @since 0.3.0
111111
*
112112
* @see WP_Abilities_Category_Registry::register()
113113
*
@@ -131,7 +131,7 @@ function wp_register_ability_category( string $slug, array $args ): ?WP_Ability_
131131
/**
132132
* Unregisters an ability category.
133133
*
134-
* @since n.e.x.t
134+
* @since 0.3.0
135135
*
136136
* @see WP_Abilities_Category_Registry::unregister()
137137
*
@@ -145,7 +145,7 @@ function wp_unregister_ability_category( string $slug ): ?WP_Ability_Category {
145145
/**
146146
* Retrieves a registered ability category.
147147
*
148-
* @since n.e.x.t
148+
* @since 0.3.0
149149
*
150150
* @see WP_Abilities_Category_Registry::get_registered()
151151
*
@@ -159,7 +159,7 @@ function wp_get_ability_category( string $slug ): ?WP_Ability_Category {
159159
/**
160160
* Retrieves all registered ability categories.
161161
*
162-
* @since n.e.x.t
162+
* @since 0.3.0
163163
*
164164
* @see WP_Abilities_Category_Registry::get_all_registered()
165165
*

includes/abilities-api/class-wp-abilities-category-registry.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@
66
*
77
* @package WordPress
88
* @subpackage Abilities API
9-
* @since n.e.x.t
9+
* @since 0.3.0
1010
*/
1111

1212
declare( strict_types = 1 );
1313

1414
/**
1515
* Manages the registration and lookup of ability categories.
1616
*
17-
* @since n.e.x.t
17+
* @since 0.3.0
1818
* @access private
1919
*/
2020
final class WP_Abilities_Category_Registry {
2121
/**
2222
* The singleton instance of the registry.
2323
*
24-
* @since n.e.x.t
24+
* @since 0.3.0
2525
* @var ?self
2626
*/
2727
private static $instance = null;
2828

2929
/**
3030
* Holds the registered categories.
3131
*
32-
* @since n.e.x.t
32+
* @since 0.3.0
3333
* @var \WP_Ability_Category[]
3434
*/
3535
private $registered_categories = array();
@@ -39,7 +39,7 @@ final class WP_Abilities_Category_Registry {
3939
*
4040
* Do not use this method directly. Instead, use the `wp_register_ability_category()` function.
4141
*
42-
* @since n.e.x.t
42+
* @since 0.3.0
4343
*
4444
* @see wp_register_ability_category()
4545
*
@@ -66,7 +66,7 @@ public function register( string $slug, array $args ): ?WP_Ability_Category {
6666
'<code>abilities_api_categories_init</code>',
6767
'<code>' . esc_html( $slug ) . '</code>'
6868
),
69-
'n.e.x.t'
69+
'0.3.0'
7070
);
7171
return null;
7272
}
@@ -76,7 +76,7 @@ public function register( string $slug, array $args ): ?WP_Ability_Category {
7676
__METHOD__,
7777
/* translators: %s: Category slug. */
7878
esc_html( sprintf( __( 'Category "%s" is already registered.' ), $slug ) ),
79-
'n.e.x.t'
79+
'0.3.0'
8080
);
8181
return null;
8282
}
@@ -85,15 +85,15 @@ public function register( string $slug, array $args ): ?WP_Ability_Category {
8585
_doing_it_wrong(
8686
__METHOD__,
8787
esc_html__( 'Category slug must contain only lowercase alphanumeric characters and dashes.' ),
88-
'n.e.x.t'
88+
'0.3.0'
8989
);
9090
return null;
9191
}
9292

9393
/**
9494
* Filters the category arguments before they are validated and used to instantiate the category.
9595
*
96-
* @since n.e.x.t
96+
* @since 0.3.0
9797
*
9898
* @param array<string,mixed> $args The arguments used to instantiate the category.
9999
* @param string $slug The slug of the category.
@@ -107,7 +107,7 @@ public function register( string $slug, array $args ): ?WP_Ability_Category {
107107
_doing_it_wrong(
108108
__METHOD__,
109109
esc_html( $e->getMessage() ),
110-
'n.e.x.t'
110+
'0.3.0'
111111
);
112112
return null;
113113
}
@@ -121,7 +121,7 @@ public function register( string $slug, array $args ): ?WP_Ability_Category {
121121
*
122122
* Do not use this method directly. Instead, use the `wp_unregister_ability_category()` function.
123123
*
124-
* @since n.e.x.t
124+
* @since 0.3.0
125125
*
126126
* @see wp_unregister_ability_category()
127127
*
@@ -134,7 +134,7 @@ public function unregister( string $slug ): ?WP_Ability_Category {
134134
__METHOD__,
135135
/* translators: %s: Ability category slug. */
136136
sprintf( esc_html__( 'Ability category "%s" not found.' ), esc_attr( $slug ) ),
137-
'n.e.x.t'
137+
'0.3.0'
138138
);
139139
return null;
140140
}
@@ -150,7 +150,7 @@ public function unregister( string $slug ): ?WP_Ability_Category {
150150
*
151151
* Do not use this method directly. Instead, use the `wp_get_ability_categories()` function.
152152
*
153-
* @since n.e.x.t
153+
* @since 0.3.0
154154
*
155155
* @see wp_get_ability_categories()
156156
*
@@ -163,7 +163,7 @@ public function get_all_registered(): array {
163163
/**
164164
* Checks if a category is registered.
165165
*
166-
* @since n.e.x.t
166+
* @since 0.3.0
167167
*
168168
* @param string $slug The slug of the category.
169169
* @return bool True if the category is registered, false otherwise.
@@ -177,7 +177,7 @@ public function is_registered( string $slug ): bool {
177177
*
178178
* Do not use this method directly. Instead, use the `wp_get_ability_category()` function.
179179
*
180-
* @since n.e.x.t
180+
* @since 0.3.0
181181
*
182182
* @see wp_get_ability_category()
183183
*
@@ -190,7 +190,7 @@ public function get_registered( string $slug ): ?WP_Ability_Category {
190190
__METHOD__,
191191
/* translators: %s: Ability category slug. */
192192
sprintf( esc_html__( 'Ability category "%s" not found.' ), esc_attr( $slug ) ),
193-
'n.e.x.t'
193+
'0.3.0'
194194
);
195195
return null;
196196
}
@@ -202,7 +202,7 @@ public function get_registered( string $slug ): ?WP_Ability_Category {
202202
*
203203
* The instance will be created if it does not exist yet.
204204
*
205-
* @since n.e.x.t
205+
* @since 0.3.0
206206
*
207207
* @return \WP_Abilities_Category_Registry The main registry instance.
208208
*/
@@ -215,7 +215,7 @@ public static function get_instance(): self {
215215
*
216216
* Categories should be registered on this action to ensure they're available when needed.
217217
*
218-
* @since n.e.x.t
218+
* @since 0.3.0
219219
*
220220
* @param \WP_Abilities_Category_Registry $instance Categories registry object.
221221
*/
@@ -228,7 +228,7 @@ public static function get_instance(): self {
228228
/**
229229
* Wakeup magic method.
230230
*
231-
* @since n.e.x.t
231+
* @since 0.3.0
232232
* @throws \LogicException If the registry is unserialized. This is a security hardening measure to prevent unserialization of the registry.
233233
*/
234234
public function __wakeup(): void {
@@ -238,7 +238,7 @@ public function __wakeup(): void {
238238
/**
239239
* Serialization magic method.
240240
*
241-
* @since n.e.x.t
241+
* @since 0.3.0
242242
* @throws \LogicException If the registry is serialized. This is a security hardening measure to prevent serialization of the registry.
243243
*/
244244
public function __sleep(): array {

includes/abilities-api/class-wp-abilities-registry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function register( string $name, array $args ): ?WP_Ability {
111111
esc_attr( $args['category'] ),
112112
esc_attr( $name )
113113
),
114-
'n.e.x.t'
114+
'0.3.0'
115115
);
116116
return null;
117117
}

includes/abilities-api/class-wp-ability-category.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
*
77
* @package WordPress
88
* @subpackage Abilities API
9-
* @since n.e.x.t
9+
* @since 0.3.0
1010
*/
1111

1212
declare( strict_types = 1 );
1313

1414
/**
1515
* Encapsulates the properties and methods related to a specific ability category.
1616
*
17-
* @since n.e.x.t
17+
* @since 0.3.0
1818
*
1919
* @see WP_Abilities_Category_Registry
2020
*/
@@ -23,31 +23,31 @@ final class WP_Ability_Category {
2323
/**
2424
* The unique slug for the category.
2525
*
26-
* @since n.e.x.t
26+
* @since 0.3.0
2727
* @var string
2828
*/
2929
protected $slug;
3030

3131
/**
3232
* The human-readable category label.
3333
*
34-
* @since n.e.x.t
34+
* @since 0.3.0
3535
* @var string
3636
*/
3737
protected $label;
3838

3939
/**
4040
* The detailed category description.
4141
*
42-
* @since n.e.x.t
42+
* @since 0.3.0
4343
* @var string
4444
*/
4545
protected $description;
4646

4747
/**
4848
* The optional category metadata.
4949
*
50-
* @since n.e.x.t
50+
* @since 0.3.0
5151
* @var array<string,mixed>
5252
*/
5353
protected $meta = array();
@@ -59,7 +59,7 @@ final class WP_Ability_Category {
5959
*
6060
* @access private
6161
*
62-
* @since n.e.x.t
62+
* @since 0.3.0
6363
*
6464
* @see wp_register_ability_category()
6565
*
@@ -88,7 +88,7 @@ public function __construct( string $slug, array $args ) {
8888
'<code>' . esc_html( $this->slug ) . '</code>',
8989
'<code>' . esc_html( self::class ) . '</code>'
9090
),
91-
'n.e.x.t'
91+
'0.3.0'
9292
);
9393
continue;
9494
}
@@ -100,7 +100,7 @@ public function __construct( string $slug, array $args ) {
100100
/**
101101
* Prepares and validates the properties used to instantiate the category.
102102
*
103-
* @since n.e.x.t
103+
* @since 0.3.0
104104
*
105105
* @param array<string,mixed> $args An associative array of arguments used to instantiate the class.
106106
* @return array<string,mixed> The validated and prepared properties.
@@ -140,7 +140,7 @@ protected function prepare_properties( array $args ): array {
140140
/**
141141
* Retrieves the slug of the category.
142142
*
143-
* @since n.e.x.t
143+
* @since 0.3.0
144144
*
145145
* @return string The category slug.
146146
*/
@@ -151,7 +151,7 @@ public function get_slug(): string {
151151
/**
152152
* Retrieves the human-readable label for the category.
153153
*
154-
* @since n.e.x.t
154+
* @since 0.3.0
155155
*
156156
* @return string The human-readable category label.
157157
*/
@@ -162,7 +162,7 @@ public function get_label(): string {
162162
/**
163163
* Retrieves the detailed description for the category.
164164
*
165-
* @since n.e.x.t
165+
* @since 0.3.0
166166
*
167167
* @return string The detailed description for the category.
168168
*/
@@ -173,7 +173,7 @@ public function get_description(): string {
173173
/**
174174
* Retrieves the metadata for the category.
175175
*
176-
* @since n.e.x.t
176+
* @since 0.3.0
177177
*
178178
* @return array<string,mixed> The metadata for the category.
179179
*/
@@ -184,7 +184,7 @@ public function get_meta(): array {
184184
/**
185185
* Wakeup magic method.
186186
*
187-
* @since n.e.x.t
187+
* @since 0.3.0
188188
* @throws \LogicException If the category is unserialized. This is a security hardening measure to prevent unserialization of the category.
189189
*/
190190
public function __wakeup(): void {
@@ -194,7 +194,7 @@ public function __wakeup(): void {
194194
/**
195195
* Serialization magic method.
196196
*
197-
* @since n.e.x.t
197+
* @since 0.3.0
198198
* @throws \LogicException If the category is serialized. This is a security hardening measure to prevent serialization of the category.
199199
*/
200200
public function __sleep(): array {

0 commit comments

Comments
 (0)