// Disable REST API link tag remove_action('wp_head', 'rest_output_link_wp_head', 10); // Disable oEmbed Discovery Links remove_action('wp_head', 'wp_oembed_add_discovery_links', 10); // Disable REST API link in HTTP headers remove_action('template_redirect', 'rest_output_link_header', 11, 0); remove_action ('wp_head', 'rsd_link'); remove_action( 'wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'wp_generator'); function my_deregister_scripts(){ wp_deregister_script( 'wp-embed' ); } add_action( 'wp_footer', 'my_deregister_scripts' ); ?>