Plugin Directory

wp-days-ago

Displays the number of years, days, hours and minutes since a post or a page was published in the same format as Facebook, Twitter etc.

Download Version 2.0.2

  1. Download the plugin.
  2. Unzip the contents of the downloaded file to the /wp-content/plugins/ directory of your WordPress installation.
  3. Log in to your WordPress dashboard and activate the wp_days_ago plugin that should now be visible in the list.
  4. You can now insert <? wp_days_ago(); ?> anywhere in The Loop in your WordPress theme.
  5. Optionally, you can use <? wp_days_ago(1); ?> instead to turn off the fine grained option (see changelog below). This will make the plugin behave like the 1.x version.

Plugin URL: http://www.vegard.net/archives/3781/

Usage

<?php wp_days_ago( $mode, $prepend, $append, $texts); ?>

Parameters

$mode (int) (optional) Use any value larger than 0 to turn off displaying minutes and hours and instead fall back to "Today" for everything published less than 24 hours ago. Default value is 0.

$prepend (string) (optional) This text will be prepended to the plugin's default output. Default value is "" (empty string).

$append (string) (optional) This text will be appended to the plugin's default output. Default value is "" (empty string).

$texts (array) (optional) This array allows you to change the texts used by the plugin. This will, for instance, allow you to translate the output to your language. The default value is array("Today", "Yesterday", "One week ago", "days ago", "year", "years", "ago", "day ago", "days ago", "Just now", "One minute ago", "minutes ago", "1 hour ago", "hours ago", "Some time in the future").

Requires: 1.5 or higher
Compatible up to: 3.3.1
Last Updated: 2011-12-19 Downloads: 1,481

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(2 ratings)

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

Log in to vote.

100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1
100,1,1