./large-files.sh 10
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 | |
/** | |
* Remove script versions from frontend static scripts. | |
* Place this code in your child theme's functions.php OR use the plugin below. | |
*/ | |
add_filter( 'style_loader_src', 'myprefix_remove_script_versions', 9999 ); | |
add_filter( 'script_loader_src', 'myprefix_remove_script_versions', 9999 ); | |
function myprefix_remove_script_versions( $src ) { |
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
/** | |
* jQuery function to replace one or more CSS classes with others. Separate multiple | |
* classes with spaces. | |
* @param {string} remove - CSS classes to remove. | |
* @param {string} add - CSS classes to add. | |
* @example | |
* $( '.selector' ).replaceClass( 'old-class', 'new-class some-other-class' ); | |
* $( '.selector' ).replaceClass( 'old-class another-class', 'new-class' ); | |
*/ | |
!function(s){s.fn.replaceClass=function(remove,add){var e=add||remove;return e&&this.removeClass(add?remove:this.className).addClass(e),this}}(jQuery); |
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 the following to your child theme's functions.php file to remove | |
* the "Try Gutenberg" callout introduced in WordPress 4.9.8 | |
*/ | |
remove_filter( 'try_gutenberg_panel', 'wp_try_gutenberg_panel' ); |
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 the following to your child theme's functions.php file to remove | |
* automatically tick the "Remember Me" checkbox at WordPress login. | |
*/ | |
add_action( 'init', function() { | |
add_filter( 'login_footer', function() { | |
echo "<script>document.getElementById('rememberme').checked = true;</script>"; | |
}); | |
}); |
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
# Boilerplate .gitignore for WPMU Dev Hosting. Copy this to .gitignore in your web root. | |
# Forked from: https://wpengine.com/wp-content/uploads/2013/10/recommended-gitignore-no-wp.txt | |
# Maintainer: Daniel M. Hendricks (https://daniel.hn) | |
# Version: 1.0.4 | |
*~ | |
.DS_Store | |
.env | |
.svn | |
.cvs | |
*.bak |
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 this to your child theme's functions.php to remove the generator meta tag from both | |
* your web sites page head and from your RSS feeds (ex: /feed/) | |
*/ | |
// Remove generator meta tag from page head | |
remove_action( 'wp_head', 'wp_generator' ); | |
// Remove generator tag from RSS feeds | |
add_filter( 'the_generator', '__return_null' ); |
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
# Plesk Onyx - Additional nginx Directives | |
# Version 1.0.0 | |
# Maintainer: Daniel M. Hendricks (https://www.danhendricks.com) | |
# Domains > example.com > Apache & nginx Settings > Additional nginx directives | |
# Disable directory indexing | |
autoindex off; | |
# Enable HSTS (optional) | |
add_header Strict-Transport-Security "max-age=31536000" always; |
OlderNewer