<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
This file contains 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 | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', false); |
This file contains 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 | |
add_filter('autoptimize_filter_cachecheck_maxsize', function () { | |
return 2 * 1024 * 1024 * 1024; // 2 GB | |
}, 10, 1); |
This file contains 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 | |
add_filter('autoptimize_filter_toolbar_show', '__return_false'); |
This file contains 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 | |
/** | |
* Disable the emoji's | |
*/ | |
function disable_emojis() { | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); |
This file contains 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 | |
/** | |
* Disable Emojis DNS Prefetch | |
* @return string | |
*/ | |
add_filter( 'wp_resource_hints', 'disable_emojis_dns_prefetch', 10, 2); | |
function disable_emojis_dns_prefetch( $urls, $relation_type ) { | |
if ( 'dns-prefetch' == $relation_type ) { | |
$emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2.2.1/svg/' ); | |
$urls = array_diff( $urls, array( $emoji_svg_url ) ); |
This file contains 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
add_action('admin_bar_menu', function() { | |
if (!is_admin()) { | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_node( 'autoptimize' ); | |
} | |
}, 101, 1); |
This file contains 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
// This style hides the autoptimize clear cache button for users in WordPress Dashboard. | |
add_action('admin_head', function() { ?> | |
<style> | |
#wp-admin-bar-autoptimize-delete-cache, | |
.wp-core-ui .button-primary[name="autoptimize_cache_clean"] { | |
display: none; | |
} | |
</style> | |
<?php }, 10, 1); |
This file contains 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
add_filter('body_class', 'wp_body_class'); | |
function wp_body_class($class) | |
{ | |
$class[] = 'my-custom-class'; // Add your class name here. Multiple class names can be added 'classname1 classname2'. | |
return $class; | |
} |