wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
rest_output_link_wp_head › WordPress Function
Da4.4.0
Deprecaton/a
› rest_output_link_wp_head ( Nessun parametro )
Vedi: | |
Definito a: |
|
Codex: |
Outputs the REST API link tag into page header.
Funzioni correlate: rest_output_link_header, rest_output_rsd, adjacent_posts_rel_link_wp_head, wp_shortlink_wp_head, get_shortcut_link
Sorgenti
function rest_output_link_wp_head() { $api_root = get_rest_url(); if ( empty( $api_root ) ) { return; } printf( '<link rel="https://api.w.org/" href="%s" />', esc_url( $api_root ) ); $resource = rest_get_queried_resource_route(); if ( $resource ) { printf( '<link rel="alternate" type="application/json" href="%s" />', esc_url( rest_url( $resource ) ) ); } }