Unregisters an ability category.
Description
Do not use this method directly. Instead, use the wp_unregister_ability_category() function.
See also
Parameters
$slugstringrequired- The slug of the registered ability category.
Source
public function unregister( string $slug ): ?WP_Ability_Category {
if ( ! $this->is_registered( $slug ) ) {
_doing_it_wrong(
__METHOD__,
/* translators: %s: Ability category slug. */
sprintf( __( 'Ability category "%s" not found.' ), esc_html( $slug ) ),
'6.9.0'
);
return null;
}
$unregistered_category = $this->registered_categories[ $slug ];
unset( $this->registered_categories[ $slug ] );
return $unregistered_category;
}
Changelog
| Version | Description |
|---|---|
| 6.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.