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.
<?php wp_days_ago_v3 ($stopUsingAjaxAfter, $showDateAfter, $showDateFormat) ?>
$stopUsingAjaxAfter (int) (optional) The number of seconds since a post or page was published before the plugin should stop using AJAX to display information. The default value is 0, which means the feature is turned off and AJAX is never used. If you have a cached site and the cache update interval is a day or less, 86400 (one day) is a good value for the plugin. The reason for this is that one day after a post or page was published, the plugin will start to show information in daily intervals ("yesterday", "2 days ago", "3 days ago", etc). If the post or page was published less than a day ago, the plugin will update in smaller intervals ("10 minutes ago", "3 hours ago", "4 hours ago", etc) and AJAX is needed to ensure that this is displayed correctly on a cached site. The minimum value should be the cache update interval.
$showDateAfter (int) (optional) The number of seconds since a post or page was published before the plugin falls back to showing the actual date and time the post or page was published, instead of in its usual "X days ago" format. The default is -1 seconds, i.e. the feature is turned off by default.
$showDateFormat (string) (optional) The format the plugin should use to display the date and time a post or page was published if the number of seconds configured in the showDateAfter parameter has been reached. The default behaviour is to use the date and time formats configured in WordPress, but if this parameter is set, the date and time format it defines will be used instead of the format you have configured in WordPress. See Formatting Date and Time for other time and date formats if you want to override the configured formats.
There's a POT file in the languages folder if you want to translate the plugin into another language. If you do that, I'd really appreciate it if you could provide me with the PO/POT and MO file so it can be included in future versions of the plugin. You will of course be credited for your work.
In the POT file, there's a string called "prepender". This is for languages that need to prepend a word before the number in the string. An example is Norwegian, which will prepend the word "for" before the number: "For 2 dager siden". "For" is the prepender. Some languages doesn't use the prepender, English being a natural example. The Norwegian example is "2 days ago" in English. If your language doesn't need to use a prepender, simply leave the string untranslated.
Requires: 2.1 or higher
Compatible up to: 3.9.2
Last Updated: 2014-8-7
0 of 1 support threads in the last two months have been resolved.
Got something to say? Need help?