Tribe__Events__REST__V1__Endpoints__Term_Single_Base::get( WP_REST_Request $request )

Handles GET requests on the endpoint.


Parameters

$request

(WP_REST_Request) (Required)


Top ↑

Return

(WP_Error|WP_REST_Response) An array containing the data on success or a WP_Error instance on failure.


Top ↑

Source

File: src/Tribe/REST/V1/Endpoints/Term_Single_Base.php

	public function get( WP_REST_Request $request ) {
		$term_response = $this->terms_controller->get_item( $request );

		if ( is_wp_error( $term_response ) ) {
			return $term_response;
		}

		$data = $this->repository->prepare_term_data( $term_response->get_data(), $this->get_taxonomy(), $this->get_term_namespace() );

		$term_response->set_data( $data );

		return $term_response;
	}

Top ↑

Changelog

Changelog
Version Description
4.6 Introduced.