Skip to content

Instantly share code, notes, and snippets.

@Kaiderella
Last active March 6, 2017 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kaiderella/17d1980912c8621d055d60f4c7326d2e to your computer and use it in GitHub Desktop.
Save Kaiderella/17d1980912c8621d055d60f4c7326d2e to your computer and use it in GitHub Desktop.
Xóa bỏ oEmbed
// Remove the REST API endpoint.
remove_action( 'rest_api_init', 'wp_oembed_register_route' );
// Turn off oEmbed auto discovery.
add_filter( 'embed_oembed_discover', '__return_false' );
// Don't filter oEmbed results.
remove_filter( 'oembed_dataparse', 'wp_filter_oembed_result', 10 );
// Remove oEmbed discovery links.
remove_action( 'wp_head', 'wp_oembed_add_discovery_links' );
// Remove oEmbed-specific JavaScript from the front-end and back-end.
remove_action( 'wp_head', 'wp_oembed_add_host_js' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment