跳到内容

Wedepohl Engineering Time Since

v1.0.5

Martin Wedepohl · 2020年5月18日 上架

Shortcode to display the number of years or days since a certain date.

正在使用
10 以下
评分
暂无
累计下载
1,462
最近更新
2022年2月16日
需要 WordPress 4.9+已测试到 5.9.21PHP 5.6+

Shortcode to return the number of years or days since a certain date.

Usage: [we_time_since y=Y m=M d=D type="T"]

Where:
* Y = the year required
* M = the month (1 – 12) – optional Default = 1
* D = the day (1-31) – optional Default = 1
* T = the type (“year”, “day”) – optional Default = “year”

Returns:
The number of years or days since the supplied date or an error message if the date is invalid / no year supplied

Examples

I have worked at Wedepohl Engineering for [we_time_since y=1998 m=1 d=1] years

I have been sailing for [we_time_since y=2008 m=4] years

I have been on this journey for [we_time_since y=2020 m=5 d=5 type="day"] days

Actions

before_we_time_since - Called upon entry to the shortcode. Passed the array of arguments that are passed to the shortcode.
after_we_time_since - Called just before exit of the function. Passed the processed array of arguments from the shortcode.

Filters

we_time_since Called at exit of the function. Passed a string which is the results of the shortcode.

Active Contributors

  • Martin Wedepohl (Development)
  • Plums

    按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

    导航

    说明

    WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

    © 2026 Plums