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 | |
/** | |
* Sanitize filenames. | |
* | |
* This script has been made because of a bug on Safari which | |
* does not display medias if its name contains special character | |
* such as "é", "à" or a simple " ". | |
* This script transform all these specials to prevent this bug. | |
* |
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 | |
/** | |
* Define what to clean from the theme header frontend, via the "remove_action" hook. | |
* | |
* @see https://github.com/GetOlympus/Zeus-Core | |
*/ | |
$optims = [ | |
'adjacent_posts_rel', // Removes the next and previous post links from the header |
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 | |
/** | |
* Disable emojicons introduced with WP 4.2 in frontend panel. | |
* | |
* @uses remove_action() | |
* @uses add_filter() | |
* @see https://github.com/crewstyle/clean-wordpress | |
*/ | |
add_action('init', '_cw_disable_wp_emojicons'); |
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 | |
//Remove admin bar since WP v3.1 | |
add_filter('show_admin_bar', '__return_false'); | |
remove_action('init', 'wp_admin_bar_init'); |
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 | |
//Remove WordPress version. | |
//<meta name="generator" content="WordPress __WP_VERSION__" /> | |
remove_action('wp_head', 'wp_generator'); | |
/** | |
* Remove WordPress generator info. | |
* | |
* @see https://github.com/crewstyle/clean-wordpress |
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 | |
/** | |
* Close database connections | |
* | |
* It's very dangerous to let connections opened. In a website | |
* with high traffic volume, you can kill your database just | |
* because of unclosed DB connections. | |
* This little snippet prevent that drama ;) | |
* |
NewerOlder