Yoast\WP\SEO\Dashboard\Infrastructure\Endpoints

Time_Based_SEO_Metrics_Endpoint{}Yoast 1.0

Represents the time based SEO metrics endpoint.

Хуков нет.

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

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

Методы

  1. public get_name()
  2. public get_namespace()
  3. public get_route()
  4. public get_url()

Код Time_Based_SEO_Metrics_Endpoint{} Yoast 25.1

class Time_Based_SEO_Metrics_Endpoint implements Endpoint_Interface {

	/**
	 * Gets the name.
	 *
	 * @return string
	 */
	public function get_name(): string {
		return 'timeBasedSeoMetrics';
	}

	/**
	 * Gets the namespace.
	 *
	 * @return string
	 */
	public function get_namespace(): string {
		return Time_Based_SEO_Metrics_Route::ROUTE_NAMESPACE;
	}

	/**
	 * Gets the route.
	 *
	 * @return string
	 */
	public function get_route(): string {
		return Time_Based_SEO_Metrics_Route::ROUTE_NAME;
	}

	/**
	 * Gets the URL.
	 *
	 * @return string
	 */
	public function get_url(): string {
		return \rest_url( $this->get_namespace() . $this->get_route() );
	}
}