Created
August 4, 2010 04:58
-
-
Save mgirouard/507667 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 | |
/* | |
Plugin Name: Show Server Time | |
Description: Shows the current server time when scheduling posts. This is helpful when there is a time difference between your local computer and the remote server | |
Version: 0 | |
Author: Michael Girouard | |
Author URI: http://www.lovemikeg.com/ | |
*/ | |
add_action('post_submitbox_misc_actions', 'mg_show_servertime'); | |
function mg_show_servertime() | |
{ | |
?> | |
<script> | |
jQuery(function ($) { | |
$('a[href="#edit_timestamp"]').click(function (ev) { | |
$('#mg-display-servertime').slideToggle(); | |
}); | |
}); | |
</script> | |
<p id="mg-display-servertime" class="updated" style="display:none; margin:10px 5px 0"> | |
Local Time is <?php echo date(get_option('time_format') . ' ' . get_option('date_format')) ?> | |
</p> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Happy Birthday!