Plugin Directory

Blog Time

Display the time according to your blog via an admin toolbar widget, a sidebar widget, and/or a template tag.

3.4 (2016-01-15)

  • Bugfix: Properly output markup around widget.
  • Change: Update widget framework to 011:
    • Change class name to c2c_BlogTime_Widget_011 to be plugin-specific.
    • Set textdomain using a string instead of a variable.
    • Remove load_textdomain() and textdomain class variable.
    • Formatting improvements to inline docs.
  • Change: Add support for language packs:
    • Set textdomain using a string instead of a variable.
    • Don't load textdomain from file.
    • Remove .pot file and /lang subdirectory.
  • Change: Explicitly declare methods in unit tests as public or protected.
  • Change: Minor improvements to inline docs and test docs.
  • Add: Create empty index.php to prevent files from being listed if web server has enabled directory listings.
  • Change: Note compatibility through WP 4.4+.
  • Change: Update copyright date (2016).

3.3.2 (2015-08-22)

  • Change: Discontinue use of PHP4-style constructor invocation of WP_Widget to prevent PHP notices in PHP7.
  • Use DIRECTORY_SEPARATOR in path for include files instead of hard-coded /.
  • Change: Update widget framework to version 010.
  • Change: Minor widget file header reformatting.
  • Change: Update widget to version 005.
  • Change: Note compatibility through WP 4.3+.
  • New: Add unit tests for widget class versions.
  • New: Add c2c_BlogTimeWidget::version() to get version of the widget class.

3.3.1 (2015-03-12)

  • Revert back to using dirname(__FILE__); DIR is only PHP 5.3+

3.3 (2015-02-16)

  • Add unit tests
  • Explicitly declare all class methods static
  • Output dynamic clock time components more efficiently
  • Use DIR instead of dirname(__FILE__)
  • Various inline code documentation improvements (spacing, punctuation)
  • Use phpDoc formatting for example code in readme
  • Note compatibility through WP 4.1+
  • Update copyright date (2015)
  • Regenerate .pot

3.2 (2014-10-15)

  • Update widget to use C2C_Widget base class (v008)
  • Remove appending of random number to plugin JS version when enqueuing
  • Add check to prevent execution of code if file is directly accessed
  • Minor plugin header reformatting
  • Minor code reformatting (spacing, bracing)
  • Change documentation links to wp.org to be https
  • Note compatibility through WP 4.0+
  • Update copyright date (2014)
  • Add assets directory to plugin repository checkout
  • Add banner image
  • Add plugin icon
  • Move screenshots into repo's assets directory
  • Update screenshots
  • Update donate link
  • Regenerate .pot
  • Update some out-of-date documentation

3.1 (not publicly released)

  • Slight dynamic clock reimplementation that should fix DST off-by-one-hour bug
  • Add filter 'c2c_blog_time_format'
  • Deprecate support for 'blog_time_format' filter (use 'c2c_blog_time_format' instead)
  • Use string instead of variable to specify translation textdomain
  • Re-license as GPLv2 or later (from X11)
  • Add 'License' and 'License URI' header tags to readme.txt and plugin file
  • Remove ending PHP close tag
  • Note compatibility through WP 3.4+


  • Move admin widget into admin toolbar
  • Discontinue inclusion of jqClock jQuery plugin and instead use custom developed code
  • Fix bug with incorrect hour being shown for dynamic clock
  • Change JavaScript to detect if 'c2c-blog-time-dynamic' class is present on span to determine if clock should be dynamic
  • Add support for dynamic clock in sidebar widget
  • Support multiple occurrences of widget (admin and/or sidebar) on single page
  • Update widget to use C2C_Widget base class (v005)
  • Clear link title attribute when using dynamic clock since instructions for clicking to update don't apply
  • Enqueue JavaScript (which has been moved into new js/blog-time.js)
  • Enqueue JavaScript on front-end also if admin toolbar or widget are being shown
  • Add filter 'c2c_blog_time_toolbar_widget_for_user' for per-user control of admin toolbar widget (default is true)
  • Remove support for 'c2c_blog_time_js_insert_action' filter
  • Remove support for 'c2c_blog_time_target' filter
  • Add version() to return plugin version
  • Add admin_bar_menu(), is_wp_login(), show_in_toolbar_for_user()
  • Remove load_textdomain(), add_js()
  • Remove support for deprecated blog_time()
  • Code reformatting (function reorganization)
  • Note compatibility through WP 3.3+
  • Drop support for versions of WP older than 3.3
  • Create 'lang' subdirectory and move .pot file into it
  • Regenerate .pot
  • Change description
  • Add 'Domain Path' directive to top of main plugin file
  • Add link to plugin directory page to readme.txt
  • Update screenshots (now based on WP 3.3)
  • Update copyright date (2012)


  • Fix bug relating to showing time in incorrect timezone


  • Integrate jqClock to provide dynamic clock in admin section
  • Add filter 'c2c_blog_time_js_insert_action' to allow overriding default JS insertion method used to insert admin widget onto page
  • Add filter 'c2c_blog_time_target' to allow overriding target relative to which the JS insertion of the admin widget is performed
  • Add filter 'c2c_blog_time_active_clock' to allow disabling dynamic Javascript clock and use v1.x era static timestamp (that can be click to update time)
  • Display admin blog time widget even if JS is disabled
  • Create add_js() and use it to output JS (code moved from add_widget())
  • Hook add_widget() to 'in_admin_header' action
  • Add additional CSS rules to maintain appearance in latest WP
  • Remove unused JS variable wpcontenturl
  • Note compatibility through WP 3.2+
  • Drop support for versions of WP older than 3.1
  • Tiny code formatting change (spacing)
  • Documentation updates to reflect recent changes
  • Add Credits section to readme.txt
  • Fix plugin homepage and author links in description in readme.txt


  • Fix UI compatibility issue introduced by WP 3.1
  • Use class variable to store ID for the admin widget (and change it from previous value)
  • Switch from object instantiation to direct class invocation
  • Explicitly declare all functions public and class variables private
  • Move template tag functions and class initialization call within primary if(class_exists())
  • Output CSS in a single line
  • Rename widget class from 'BlogTimeWidget' to 'c2c_BlogTimeWidget'
  • Note compatibility through WP 3.1+
  • Update copyright date (2011)


  • Rename blog_time() template tag to c2c_blog_time()
  • Deprecate blog_time() template tag, but retain it for backwards compatibility
  • Add hook 'c2c_blog_time' (filter) to respond to the function of the same name so that users can use the apply_filters() notation for invoking template tag
  • Move most of the code in constructor into init()
  • Invoke add_widget() against 'admin_print_footer_scripts' hook rather than 'admin_footer'
  • Fix PHP warnings/notices in widget code
  • Full support for localization
  • Rename class from 'BlogTime' to 'c2c_BlogTime'
  • Note compatibility with WP 2.9+, 3.0+
  • Drop support for versions of WP older than 2.8
  • Assign object instance to global variable, $c2c_blog_time as global, to allow for external manipulation
  • Remove docs from top of plugin file (all that and more are in readme.txt)
  • Minor code reformatting (spacing)
  • Add PHPDoc documentation
  • Add package info
  • Remove trailing whitespace in header docs
  • Update copyright date
  • Add Changelog, Filters, and Upgrade Notice sections to readme.txt
  • Add .pot file


  • Initial release

Requires: 3.3 or higher
Compatible up to: 4.5.3
Last Updated: 5 months ago
Active Installs: 600+


3 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.