[wordpress插件] A While Ago不久以前

wordpress 插件 文章 2020-01-23 05:40 732 0 全屏看文

AI助手支持GPT4.0

评分

60

60

描述

Show timestamp for a post or page using a relative description (e.g. “Hours ago”, “5 days ago”).

使用相对描述(例如“小时前”,“ 5天前”)显示帖子或页面的时间戳。

The strings can be be changed easily for translations, and custom text can be prepended or appended to the timestamp.

可以轻松更改字符串以进行翻译,并且可以在时间戳上添加或添加自定义文本。

The rules for the descriptions are (along with the default strings):

描述规则为(以及默认字符串):

    • Within the last 60 minutes: “Moments ago”
    • 最近60分钟内:“片刻前”

    • Within the last 8 hours: “Hours ago”
    • 最近8小时内:“几小时前”

    • Today: “Today”
    • 今天:“今天”

    • Yesterday: “Yesterday”
    • 昨天:“昨天”

    • 3-6 days ago: “4 days ago”
    • 3-6天前:“ 4天前”

    • 1-8 weeks ago: “5 weeks ago”
    • 1-8周前:“ 5周前”

    • 2-11 months ago: “7 months ago”
    • 2-11个月前:“ 7个月前”

    • 1-4 years ago: “2 years 5 months ago”
    • 1-4年前:“ 2年5个月前”

    • 4 or more years ago: “4 years ago”
    • 4年前或更早:“ 4年前”

安装步骤

    1. Download the plugin.
    2. 下载插件。

    3. Unzip the contents of the downloaded file to the /wp-content/plugins/ directory of your WordPress installation.
    4. 将下载文件的内容解压缩到WordPress安装的/ wp-content / plugins /目录中。

    5. Log in to your WordPress dashboard and activate the wp_days_ago plugin that should now be visible in the list.
    6. 登录到WordPress仪表板并激活wp_days_ago插件,该插件现在应该在列表中可见。

    7. You can now insert

    8. 您现在可以插入<?

      wp_awhileago();

      wp_awhileago();

      ?> anywhere in The Loop in your WordPress theme.

    9. ?> WordPress主题中 The Loop 中的任何地方。

    Usage

    用法

      <?php wp_awhileago($ prepend,$ append,$ descriptions); 

    ?>

    ?>

    Parameters

    参数

    $prepend
     

    $ prepend
     

    (string) (optional) This text will be prepended to the plugin’s default output.

    (字符串)(可选),此文本将位于插件的默认输出之前。

    Default value is "" (empty string).

    默认值为“”(空字符串)。

    $append
     

    $ append
     

    (string) (optional) This text will be appended to the plugin’s default output.

    (字符串)(可选),此文本将附加到插件的默认输出中。

    Default value is "" (empty string).

    默认值为“”(空字符串)。

    $descriptions
     

    $ descriptions
     

    (array) (optional) This array allows you to change the descriptive strings displayed by the plugin.

    (数组)(可选)此数组允许您更改插件显示的描述性字符串。

    The default value is array: “Moments ago”, “Hours ago”, “Today”, “Yesterday”, “days”, “week”, “weeks”, “month”, “months”, “year”, “years

    默认值为数组:“前一刻”,“几小时前”,“今天”,“昨天”,“天”,“周”,“周”,“月”,“月”,“年”,“年”

    ”, “ago”, “At some point in time”.

    ”,“ ago”,“在某个时间点”。

下载地址

https://downloads.wordpress.org/plugin/a-while-ago.zip

https://downloads.wordpress.org/plugin/a-while-ago.zip

-EOF-

AI助手支持GPT4.0