Skip to content

Commit

Permalink
Unenqueue default embeds script
Browse files Browse the repository at this point in the history
#performance
  • Loading branch information
aduth committed May 27, 2017
1 parent 33eef22 commit 5bf76c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,12 @@ function dones_default_site_icon( $url, $size ) {
return $url;
}
add_filter( 'get_site_icon_url', 'dones_default_site_icon', 10, 2 );

/**
* Unenqueues the default `wp-embed` script, since we're not expecting embeds
* to be shown (a small page load optimization).
*/
function dones_unenqueue_embeds() {
wp_deregister_script( 'wp-embed' );
}
add_action( 'wp_footer', 'dones_unenqueue_embeds' );

0 comments on commit 5bf76c9

Please sign in to comment.