Yoast\WP\SEO\Dashboard\Infrastructure\Endpoints
Site_Kit_Consent_Management_Endpoint{}└─ Dashboard_Endpoint_Interface
Represents the Site Kit consent management endpoint.
Хуков нет.
Использование
$Site_Kit_Consent_Management_Endpoint = new Site_Kit_Consent_Management_Endpoint(); // use class methods
Методы
- public get_name()
- public get_namespace()
- public get_route()
- public get_url()
Код Site_Kit_Consent_Management_Endpoint{} Site Kit Consent Management Endpoint{} Yoast 28.4
class Site_Kit_Consent_Management_Endpoint implements Dashboard_Endpoint_Interface {
/**
* Gets the name.
*
* @return string
*/
public function get_name(): string {
return 'siteKitConsentManagement';
}
/**
* Gets the namespace.
*
* @return string
*/
public function get_namespace(): string {
return Site_Kit_Consent_Management_Route::ROUTE_NAMESPACE;
}
/**
* Gets the route.
*
* @return string
*
* @throws Exception If the route prefix is not overwritten this throws.
*/
public function get_route(): string {
return Site_Kit_Consent_Management_Route::ROUTE_PREFIX;
}
/**
* Gets the URL.
*
* @return string
*/
public function get_url(): string {
return \rest_url( $this->get_namespace() . $this->get_route() );
}
}