WP_REST_Post_Search_Handler::detect_rest_item_route

Advertisement

Summery Summery

Attempts to detect the route to access a single item.

Syntax Syntax

WP_REST_Post_Search_Handler::detect_rest_item_route( WP_Post $post )

Parameters Parameters

$post

(Required) Post object.

Return Return

(string) REST route relative to the REST base URI, or empty string if unknown.

Source Source

File: wp-includes/rest-api/search/class-wp-rest-post-search-handler.php

	 * @return string REST route relative to the REST base URI, or empty string if unknown.
	 */
	protected function detect_rest_item_route( $post ) {
		_deprecated_function( __METHOD__, '5.5.0', 'rest_get_route_for_post()' );

		return rest_get_route_for_post( $post );
	}

}

Advertisement

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Advertisement

Leave a Reply