WP_REST_Response::get_links() WordPress Method

The WP_REST_Response::get_links() function is used to retrieve the links associated with a response. The links are represented as an array of WP_REST_Response_Link objects, which contain the href and rel attributes for each link.

WP_REST_Response::get_links() #

Retrieves links for the response.


Return

(array) List of links.


Top ↑

Source

File: wp-includes/rest-api/class-wp-rest-response.php

	public function get_links() {
		return $this->links;
	}

Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.