# wordpress-seo/28.2/src/ai-consent/application/consent-handler-interface.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 28.2. 30 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/28.2/code/src/ai-consent/application/consent-handler-interface.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/28.2/raw/src/ai-consent/application/consent-handler-interface.php
- Modified: 2025-07-15T13:36:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/28.2/code/src/ai-consent/application/consent-handler-interface.php#L10-L20`.

```php
<?php

namespace Yoast\WP\SEO\AI_Consent\Application;

/**
 * Interface Consent_Handler_Interface
 *
 * This interface defines the methods for handling user consent.
 */
interface Consent_Handler_Interface {

	/**
	 * Handles consent revoked by deleting the consent user metadata from the database.
	 *
	 * @param int $user_id The user ID.
	 *
	 * @return void
	 */
	public function revoke_consent( int $user_id );

	/**
	 * Handles consent granted by adding the consent user metadata to the database.
	 *
	 * @param int $user_id The user ID.
	 *
	 * @return void
	 */
	public function grant_consent( int $user_id );
}

```
