Created
July 16, 2017 13:36
-
-
Save salvatorecapolupo/bb0392f70363e30fb2fc1052a6322004 to your computer and use it in GitHub Desktop.
All you don't really need in WP. Please disable carefully!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
//note: you should use these hook in functions.php file and / or (mu)plugin | |
//disable WordPress emoji | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
//disable Gravatars support | |
function __default_local_avatar() | |
{ | |
// this assumes default_avatar.png is in wp-content/themes/active-theme/images | |
return get_bloginfo('template_directory') . '/images/default_avatar.png'; | |
} | |
add_filter( 'pre_option_avatar_default', '__default_local_avatar' ); | |
//to be continued... | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment