wp/wp-includes/rest-api/class-wp-rest-response.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
   142 	 * @link https://tools.ietf.org/html/rfc5988
   142 	 * @link https://tools.ietf.org/html/rfc5988
   143 	 * @link https://www.iana.org/assignments/link-relations/link-relations.xml
   143 	 * @link https://www.iana.org/assignments/link-relations/link-relations.xml
   144 	 *
   144 	 *
   145 	 * @param string $rel   Link relation. Either an IANA registered type, or an absolute URL.
   145 	 * @param string $rel   Link relation. Either an IANA registered type, or an absolute URL.
   146 	 * @param string $link  Target IRI for the link.
   146 	 * @param string $link  Target IRI for the link.
   147 	 * @param array  $other Optional. Other parameters to send, as an assocative array.
   147 	 * @param array  $other Optional. Other parameters to send, as an associative array.
   148 	 *                      Default empty array.
   148 	 *                      Default empty array.
   149 	 */
   149 	 */
   150 	public function link_header( $rel, $link, $other = array() ) {
   150 	public function link_header( $rel, $link, $other = array() ) {
   151 		$header = '<' . $link . '>; rel="' . $rel . '"';
   151 		$header = '<' . $link . '>; rel="' . $rel . '"';
   152 
   152 
   276 		 *
   276 		 *
   277 		 * For example, a CURIE with name `example` and URI template
   277 		 * For example, a CURIE with name `example` and URI template
   278 		 * `http://w.org/{rel}` would transform a `http://w.org/term` relation
   278 		 * `http://w.org/{rel}` would transform a `http://w.org/term` relation
   279 		 * into `example:term`.
   279 		 * into `example:term`.
   280 		 *
   280 		 *
   281 		 * Well-behaved clients should expand and normalise these back to their
   281 		 * Well-behaved clients should expand and normalize these back to their
   282 		 * full URI relation, however some naive clients may not resolve these
   282 		 * full URI relation, however some naive clients may not resolve these
   283 		 * correctly, so adding new CURIEs may break backward compatibility.
   283 		 * correctly, so adding new CURIEs may break backward compatibility.
   284 		 *
   284 		 *
   285 		 * @since 4.5.0
   285 		 * @since 4.5.0
   286 		 *
   286 		 *