66 *
77 * @package WordPress
88 * @subpackage Abilities API
9- * @since 0.3 .0
9+ * @since 6.9 .0
1010 */
1111
1212declare ( strict_types = 1 );
1313
1414/**
1515 * Manages the registration and lookup of ability categories.
1616 *
17- * @since 0.3 .0
17+ * @since 6.9 .0
1818 * @access private
1919 */
2020final class WP_Abilities_Category_Registry {
2121 /**
2222 * The singleton instance of the registry.
2323 *
24- * @since 0.3 .0
24+ * @since 6.9 .0
2525 * @var ?self
2626 */
2727 private static $ instance = null ;
2828
2929 /**
3030 * Holds the registered categories.
3131 *
32- * @since 0.3 .0
32+ * @since 6.9 .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 0.3 .0
42+ * @since 6.9 .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- '0.3 .0 '
69+ '6.9 .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- '0.3 .0 '
79+ '6.9 .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- '0.3 .0 '
88+ '6.9 .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 0.3 .0
96+ * @since 6.9 .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- '0.3 .0 '
110+ '6.9 .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 0.3 .0
124+ * @since 6.9 .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- '0.3 .0 '
137+ '6.9 .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 0.3 .0
153+ * @since 6.9 .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 0.3 .0
166+ * @since 6.9 .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 0.3 .0
180+ * @since 6.9 .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- '0.3 .0 '
193+ '6.9 .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 0.3 .0
205+ * @since 6.9 .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 0.3 .0
218+ * @since 6.9 .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 0.3 .0
231+ * @since 6.9 .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 0.3 .0
241+ * @since 6.9 .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 {
0 commit comments