Yoast\WP\SEO\AI\Consent\User_Interface
Consent_Route::register_routes
Registers routes with WordPress.
Метод класса: Consent_Route{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Consent_Route = new Consent_Route(); $Consent_Route->register_routes();
Код Consent_Route::register_routes() Consent Route::register routes Yoast 28.3
public function register_routes() {
\register_rest_route(
self::ROUTE_NAMESPACE,
self::ROUTE_PREFIX,
[
'methods' => 'POST',
'args' => [
'consent' => [
'required' => true,
'type' => 'boolean',
'description' => 'Whether the consent to use AI-based services has been given by the user.',
],
],
'callback' => [ $this, 'consent' ],
'permission_callback' => [ $this, 'check_permissions' ],
],
);
}