[wordpress插件] Age Calculator年龄计算器

wordpress 插件 文章 2020-02-11 14:20 614 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

A quicktag that will calculate the current age of a person/animal/whatever based on it’s birthdate.

一种快速标记,它将根据人/动物/出生日期的年龄来计算该年龄。

Supports changing the verbiage for year(s) and month(s) plus has a multiplier for animals (such as “in dog years”).

支持更改年份和月份的语言动词,并具有针对动物的乘数(例如“在狗年内”)。

Using the quicktag [agecalc birthdate=”1978-01-30] will display “31 years” using the default settings.

使用快捷标记[agecalc birthdate =” 1978-01-30”将使用默认设置显示“ 31岁”。

Visit www.joshcook.net for update information or to submit

访问 www.joshcook.net 以获得更新信息或提交

feature and support requests.

功能和支持请求。

Configuration

配置

Using the Quicktag

使用快速标记

The Age Calculator quicktag can be used in any post or page using the following format:

年龄计算器快捷标签可以在任何帖子或页面中使用以下格式使用:

[agecalc birthdate=”1978-01-30″ year=”” years=”” multipliery=”” month=”” months=”” multiplierm=””]

[agecalc birthdate =” 1978-01-30” year =”” years =”” multipliery =”” month =”” months =”” multiplierm =””]

The following attributes can be used within the quicktag.

可以在quicktag中使用以下属性。

Default values can be configured on the Age Calculator’s settings page.

可以在“年龄计算器”的设置页面上配置默认值。

birthdate

生日

The birthdate attribute is the only manditory attribute, which has to be entered Year, Month and then Day.

生日日期属性是唯一的强制属性,必须输入年,月,日。

You can use either a .

您可以使用。

(period), a / (forward slash) or a – (hyphen) as the seperator.

(句号), / (正斜杠)或–(连字符)作为分隔符。

Here are a few valid and invalid birthdate entries:

以下是一些有效和无效的生日日期条目:

    • 1978-01-30 – Valid
    • 1978-01-30 –有效

    • 1978/01//30 – Valid
    • 1978 / 01 / / 30 –有效

    • 1978.01.30 – Valid
    • 1978.01.30 –有效

    • 01-30-1978 – Invalid
    • 1978年1月30日–无效

    • 30.01.1978 – Invalid
    • 1978年3月31日–无效

    year

    Sets the text that is returned when the age is 1 year.

    设置年龄为1 year 时返回的文本。

    years

    Sets the text that is returned when the age is more than 1 year.

    设置年龄超过1岁时返回的文本。

    For example, 15 years.

    例如15年

    multipliery

    乘积

    Used as the multiplier for the year value.

    用作年份值的乘数。

    For example, if you had a pet web site you could multiply the age by 7 for “dog years”.

    例如,如果您有一个宠物网站,则可以将“狗年”的年龄乘以7。

    I giggle every time I say “miltipliery”

    每当我说“军事”时我都会咯咯笑。

    month

    Sets the text that is returned when the age is 1 month.

    设置年龄为1个时返回的文本。

    months

    个月

    Sets the text that is returned when the age is more than 1 month.

    设置年龄超过1个月时返回的文本。

    For example, 5 months.

    例如5个

    multiplierm

    乘数

    Used as the multiplier for the month value.

    用作月份值的乘数。

    Age Calculator options page

    年龄计算器选项页面

    Configure the default text used when the plugin returns the current age.

    配置插件返回当前年龄时使用的默认文本。

    All values can be overridden within the quicktag.

    所有值都可以在quicktag中覆盖。

安装步骤

    1. Upload the ‘age-calculator’ directory to the ‘/wp-content/plugins/’ directory
    2. 将“年龄计算器”目录上传到“ / wp-content / plugins /”目录

    3. Activate the plugin through the ‘Plugins’ section within WordPress
    4. 通过WordPress中的“插件”部分激活插件

    5. Configure Dashboard Links from the ‘Settings -> Age Calculator’ menu option
    6. 从“设置->年龄计算器”菜单选项配置仪表板链接

下载地址

https://downloads.wordpress.org/plugin/age-calculator.zip

https://downloads.wordpress.org/plugin/age-calculator.zip

-EOF-

AI助手支持GPT4.0