Last active
August 29, 2015 14:01
-
-
Save Mamaduka/86b323c87cf2dc1efccb to your computer and use it in GitHub Desktop.
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 Browse Happy | |
*/ | |
function because_im_happy() { | |
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) { | |
return false; | |
} | |
$key = md5( $_SERVER['HTTP_USER_AGENT'] ); | |
set_site_transient( 'browser_' . $key, array( 'insecure' => false ); | |
} | |
add_action( 'admin_init', 'because_im_happy' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment