Linux 软件免费装

wp-days-ago

开发者 vskjefst
更新时间 2018年9月22日 01:15
捐献地址: 去捐款
PHP版本: 2.1 及以上
WordPress版本: 4.9.8

标签

posts dutch pages facebook english russian persian farsi date minutes hours ago twitter Deutsch hours day french spanish german swedish days relative date norwegian norsk bengali indonesian turkish years ago months ago days ago minutes ago bokmål nynorsk kuridsh ukranian malaysian

下载

2.5.2 2.6 2.6.1 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.4.1 3.0.4.2 3.0.4.3 3.1.0 3.1.1 3.1.2 3.1.3 3.1.5 2.0.2 2.5 2.5.1 2.0.1 3.2.1 3.2.2 3.2.3

详情介绍:

This plugin is no longer supported by its author. You're still free to use it of course, but the author will not fix bugs or reply to support forum threads. There are other plugins that provide the same functionality that you might want to try instead, like Meks Time Ago and The Time Ago. This plugin displays the number of years, months, days, hours and minutes since a post or a page was published or modified, or a comment was published, in the same format as Facebook, Twitter etc. Examples are "Just now" (less than a minute ago), "47 minutes ago" (less than an hour ago), "3 hours ago" (less than a day ago), "Yesterday", "3 days ago", "One week ago", "3 months ago", "3 months, 4 days ago", "2 years, 13 days ago" and so on. It's also possible to configure wp-days-ago to fall back to displaying the actual date and time when a certain number of seconds after publishing time has been reached. Cache plugins, like W3 Total Cache and WP Super Cache, are supported through the use of AJAX. This means that the plugin will show correct information even if the page is cached. Please see the installation instructions, and the stopUsingAjaxAfter parameter in particular, for details. Available translations

安装:

  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_v3(); ?> anywhere in The Loop for either posts or comments in your WordPress theme.
Usage <?php wp_days_ago_v3 ($stopUsingAjaxAfter, $showDateAfter, $showDateFormat, $showYesterday, $context); ?> $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. $showYesterday (boolean) (optional) Option to show the text "yesterday" if there is less than 24 hours since the post or page was published. Otherwise, the number of hours since the post or page was published will be showed until more than 24 hours have passed. Then, the number of days, etc, will be shown. The default value is true. $context (int) (optional) The plugin needs to know in what context it's called. Available values are 1 (post/page published date), 2 (post/page last modified date), and 3 (comment published date). So if you want to show use the plugin to display a post's modified date, you use 2 as context when calling the plugin in your post/page loop. For comments published date, use 3 as context in your comments loop. The default value is 1. Information for translators 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 translate the string "prepender" to "[none]" (without the quotes). This same is the case for the word "ago". If your language does not use this word, German is one example, simply translate the sting "ago" to "[none]" (without the quotes).

升级注意事项:

Version 3 is a complete rewrite of the plugin. Functions from version 2.x are still available to ensure backwards compatibility and will continue to work as they used to, but bugs will not be fixed and no new features will be added. It's highly recommended that you start to use the _v3 methods described in the installation instructions if you upgrade from version 2 or an even earlier version.

更新日志:

3.2.3 3.2.2 3.2.1 3.2 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.4.3 3.0.4.2 3.0.4.1 3.0.4 3.0.3 3.0.2 3.0.1 3.0.0 2.6.1 2.6 2.5.2 2.5.1 2.5 2.0.2 2.0.1 2.0 1.7.1 1.7 1.0