Warning: This method has been deprecated. Use rest_get_route_for_post() instead.

WP_REST_Post_Search_Handler::detect_rest_item_route( WP_Post $post )

Attempts to detect the route to access a single item.

Description Description

See also See also

Top ↑

Parameters Parameters


(WP_Post) (Required) Post object.

Top ↑

Return Return

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

Top ↑

Source Source

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

	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 );

Top ↑

Changelog Changelog

Version Description
5.5.0 Use rest_get_route_for_post()
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.