[wordpress插件] By this Author作者作者

wordpress 插件 文章 2020-03-14 23:30 463 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Sometimes in a website the articles are not authored by the respective registered users but still need to be attributed to them somehow.

有时在网站上,文章不是由各自的注册用户撰写的,但仍需要以某种方式归因于他们。

This plugin addresses this specific situation and offers a way to deal with it.

此插件解决了这种特殊情况,并提供了一种处理它的方法。

The idea is that articles are tagged with the names of people to which they should be attributed.

这个想法是,文章标记有应归因于他们的人的名字。

Thus, when making an author’s bio page a shortcode can be inserted that will show a list of articles authored by or attributed to a registered user.

因此,在制作作者的个人简介页面时,可以插入简码,以显示由注册用户撰写或归因于注册用户的文章列表。

If the user later registers using the same name and starts publishing his/her own posts, they will auto-magically be inserted in his bio page.

如果用户以后使用相同的名称注册并开始发布他/她自己的帖子,则会自动将其神奇地插入他的个人主页。

The shortcode is:

简码是:

[by-this-author name="name of the author" post_types="authored_by, attributed_to" posts_per_page=#]

  [作者本人姓名=“作者姓名” post_types =“ authored_by,attributed_to” posts_per_page =#]

post_types is optional and may contain one of or both keywords

post_types 是可选的,可以包含一个或两个关键字

posts_per_page is optional and specifies how many posts to display

posts_per_page 是可选的,并指定要显示的帖子数

There is no support for pagination so the only way of limiting very long pages is to use the posts_per_page parameter.

不支持分页,因此限制超长页面的唯一方法是使用 posts_per_page 参数。

The plugin solves a very specific problem of a very specific website.

该插件解决了非常具体的网站的非常具体的问题。

It may be useful to someone else too.

对其他人也可能有用。

A single translation file is provided for it_IT.

为此提供了一个翻译文件。

There are two other, unrelated, shortcodes included.

还包括另外两个不相关的短代码。

Age calculation

年龄计算

[get-age ref_date="reference date" end_date="end date"]

  [获取年龄ref_date =“参考日期” end_date =“结束日期”]

Calculates the age (in years) since a reference date.

计算自参考日期以来的年龄(以年为单位)。

The age is calculated until the current moment, unless end_date is specified.

除非指定 end_date ,否则年龄会一直计算到当前时刻。

This is meant to show ages of people (possibly at the time of their death) but may also be used for other events that have a start and maybe an end date.

这是为了显示人们的年龄(可能在他们死亡时),但也可以用于其他具有开始日期和结束日期的事件。

ref_date is the date (typically in the past) to which the age refers

ref_date 是年龄所指的日期(通常是过去的日期)

end_date is optional and represents the date up to which the age is calculated (typically in the past too but may also be in the future)

end_date 是可选的,它表示计算年龄的日期(通常也是过去的日期,也可能是将来的日期)

Time machine

时间机器

[time-machine ref_time="reference moment" future_text="text to show before ref_time" past_text="text to show after ref_time"]

  [时间机器ref_time =“参考时刻” future_text =“在ref_time之前显示的文本” past_text =“在ref_time之后显示的文本”]

Allows altering the text of the post based on the current moment relative to a reference moment.

允许根据当前时刻(相对于参考时刻)来更改帖子的文字。

Suppose a post is published before an event, is should refer to that event in terms of the future.

假设某个帖子是在某个事件之前发布的,那么就将来而言,应该指该事件。

However, after the time of the event (the reference time) has passed, the same post should refer to the event in terms of the past.

但是,在事件时间(参考时间)过去之后,同一帖子应以过去的方式指代该事件。

This simple change avoids the post looking stale until you manually edit it to maybe add post-event information.

这项简单的更改可以避免帖子看起来过时,直到您手动对其进行编辑以添加事件后信息为止。

ref_time is the date and time of the event;

ref_time 是事件的日期和时间;

up until midnight after the event it will show the future_text, then the past_text

直到事件发生后的午夜,它将显示future_text,然后显示past_text

future_text is the text to show while the event is still in the future

future_text 是事件仍在将来显示的文本

past_text is the text to show when the event is in the past

past_text 是事件过去时显示的文本

安装步骤

    1. Download the zip file, and use WordPress’ plugin installation page in the dashboard
    2. 下载zip文件,并在信息中心中使用WordPress的插件安装页面

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Place the shortcode(s) you need in your post
    6. 在帖子中放置所需的简码

下载地址
https://downloads.wordpress.org/plugin/by-this-author.1.2.0.zip
-EOF-

AI助手支持GPT4.0