# wp_unregister_ability()

URL: https://chugunov.pro/api-wordpress/functions/wp_unregister_ability/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 6.9.0.

## Сигнатура

```php
wp_unregister_ability( string $name ): WP_Ability|null
```

## Описание

Removes a previously registered ability from the global registry. Use this to disable abilities provided by other plugins or when an ability is no longer needed.

Can be called at any time after the ability has been registered.

Example:

```
if ( wp_has_ability( 'other-plugin/some-ability' ) ) {
wp_unregister_ability( 'other-plugin/some-ability' );
}
```

[See also](#see-also)
- [WP_Abilities_Registry::unregister()](https://developer.wordpress.org/reference/classes/WP_Abilities_Registry/unregister/)

- [wp_register_ability()](https://developer.wordpress.org/reference/functions/wp_register_ability/)

## Параметры

- `$name` `string` — обязательный. Имя способности, регистрацию которой нужно отменить, включая префикс пространства имён (например, 'my-plugin/my-ability').

## Возвращаемое значение

`WP_Ability|null` — null

## Исходный код

Файл: `wp-includes/abilities-api.php:324`

```php
function wp_unregister_ability( string $name ): ?WP_Ability {
	$registry = WP_Abilities_Registry::get_instance();
	if ( null === $registry ) {
		return null;
	}

	return $registry->unregister( $name );
}
```

## История изменений

- 6.9.0 — Introduced.

## Связанные

Использует: `WP_Abilities_Registry::get_instance`.

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/wp_unregister_ability/
