Yoast\WP\SEO\Abilities\Domain

Ability_Interface{} │ interface │ Yoast 1.0

Describes an ability that can be registered with the WordPress Abilities API.

Хуков нет.

Использование

$Ability_Interface = new Ability_Interface();
// use class methods

Методы

  1. public get_args()
  2. public get_name()
  3. public is_available()

Код Ability_Interface{} Yoast 28.9

interface Ability_Interface {

	/**
	 * Returns the full name of the ability, including the category prefix.
	 *
	 * @return string The ability name, e.g. `yoast-seo/get-seo-scores`.
	 */
	public function get_name(): string;

	// phpcs:disable SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint -- The registration arguments are heterogeneous by nature.

	/**
	 * Returns the arguments to register the ability with.
	 *
	 * @return array<string, mixed> The ability registration arguments.
	 */
	public function get_args(): array;

	// phpcs:enable SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint

	/**
	 * Returns whether the ability should be registered at all.
	 *
	 * @return bool Whether the ability is available.
	 */
	public function is_available(): bool;
}