Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codearachnid/3250824 to your computer and use it in GitHub Desktop.
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.
<?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