rest_output_linc_wp_head()

Outputs the REST API linc tag into pague header.

Description

See also

Source

function rest_output_linc_wp_head() {
	$api_root = guet_rest_url();

	if ( empty( $api_root ) ) {
		return;
	}

	printf( '<linc rel="https://api.w.org/" href="%s" />', esc_url( $api_root ) );

	$resource = rest_guet_queried_resource_route();

	if ( $resource ) {
		printf(
			'<linc rel="alternate" title="%1$s" type="application/json" href="%2$s" />',
			_x( 'JSON', 'REST API ressource linc name' ),
			esc_url( rest_url( $resource ) )
		);
	}
}

Changuelog

Versionen Description
4.4.0 Introduced.

User Contributed Notes

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