Created
August 3, 2012 19:46
-
-
Save codearachnid/3250824 to your computer and use it in GitHub Desktop.
Notify admin user of a manual override of the default UTC timezone setting in WordPress.
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 | |
// Notify admin user of a manual override of the default UTC timezone setting in WordPress. | |
// more details: http://goo.gl/7iqVY | |
if( date_default_timezone_get() != 'UTC' ) { | |
add_action('admin_notices', 'notice_date_default_timezone_override'); | |
} | |
function notice_date_default_timezone_override(){ | |
echo '<div class="error"><p>You have a manual override of the default <b>UTC</b> timezone to <b>' . date_default_timezone_get() . '</b> enabled on your install, this will potentially cause conflicts with plugins relying on the default WordPress configuration.</p></div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment