Question Protected by birgire
2 Cleaner title - no need to mention WordPress
| link

Remove WordPress JSON API links in header html

    Tweeted twitter.com/StackWordPress/status/676058800193986560
1
source | link

Remove WordPress JSON API links in header html

Does anyone know how to remove the WordPress JSON API links in the header tag?

<head>
...
<link rel='https://api.w.org/' href='http://example.com/wp-json/' />
<link rel="alternate" type="application/json+oembed" href="http://example.com/wp-json/oembed/1.0/embed?url=..." />
<link rel="alternate" type="text/xml+oembed" href="http://example.com/wp-json/oembed/1.0/embed?url=..." />
</head>

I'd like to avoid using a plugin. If possible, is there a way to remove them with the remove_action function?

remove_action( 'wp_head', 'rsd_link' );