[wordpress插件] Comment Timeout评论超时

wordpress 插件 文章 2020-03-29 01:00 532 0 全屏看文

AI助手支持GPT4.0

评分
80
描述

This plugin extends the comment closing functionality in WordPress to allow

此插件扩展了WordPress中的评论关闭功能,允许

you to extend the discussion time when older posts have recent comments

当旧帖子有最新评论时,您可以延长讨论时间

accepted, or to override the comment closing time on a post by post basis.

接受,或在逐个帖子的基础上覆盖评论的关闭时间。

Note: PHP 4 is no longer supported. As of version 2.1, Comment Timeout requires PHP 5.2 or later.

注意:不再支持PHP 4。从2.1版开始,Comment Timeout需要PHP 5.2或更高版本。

If you are still using PHP 4, you should use Comment Timeout 2.0.1.

如果仍在使用PHP 4,则应使用Comment Timeout 2.0.1。

Configuration

配置

You can change various settings globally on the “Comment Timeout” page under the

您可以在
下的“注释超时”页面上全局更改各种设置。

“Options” tab on the WordPress dashboard.

WordPress仪表板上的“选项”选项卡。

Most of the options are fairly

大多数选项都相当

self-explanatory.

不言自明。

You can also change options on a per-post basis by looking for the

您还可以通过查找
来按帖子更改选项

“Comment Timeout” section in the sidebar of the post or page editor.

帖子或页面编辑器侧栏中的“评论超时”部分。

Template tags

模板标签

Comment Timeout 2.1 introduces two new functions that you can use in your theme:

注释超时2.1引入了两个可以在主题中使用的新功能:

get_comment_timeout()

  get_comment_timeout()

Returns the UTC time, as a Unix timestamp, when comments will be closed for the current post.

返回UTC时间(以Unix时间戳记),关闭当前帖子的评论。

the_comment_timeout($relative, $dateformat, $before, $after, $moderated)

  the_comment_timeout($ relative,$ dateformat,$ before,$ after,$ moderated)

Formats and displays the date and time after which comments will no longer be

格式化并显示日期和时间,之后将不再注释。

accepted on this post.

在此职位上接受。

Parameters are:

参数为:

    • $relative: Set this to true if you want to display the date in terms of the time remaining

    • $ relative :如果要以剩余时间显示日期,请将其设置为 true

      (for instance “in 3 weeks”).

      (例如“在3周内”)。

      Set it to false to display it as an absolute date.

    • 将其设置为 false 以将其显示为绝对日期。

    • $dateformat: The format in which the date should be displayed, as used by the PHP

    • $ dateformat :PHP应该使用的显示日期的格式

      date() function.

      date()函数。

      If you set this to false, it will use the date format that you have configured

      如果将此设置为 false ,它将使用您配置的日期格式

      globally for your WordPress installation.

      在全球范围内安装WordPress。

        • If $relative is set to true, this parameter is ignored.
        • 如果将 $ relative 设置为 true ,则将忽略此参数。

      • $before: The HTML to insert before the date that comments will be closed.
      • $之前:要在评论关闭日期之前插入的HTML。

      • $after: The HTML to insert after the date that comments will be closed.
      • $之后:要在注释关闭日期之后插入的HTML。

      • $moderated: The HTML to display when late comments are being sent to the moderation queue

      • $ moderated :将最新评论发送到审核队列时显示的HTML

        rather than being rejected outright.

      • 而不是被彻底拒绝。

      Development and reporting bugs

      开发和报告错误

      When reporting bugs, please provide me with the following information:

      在报告错误时,请向我提供以下信息:

        1. Which version of Comment Timeout you are using;
        2. 您正在使用哪个版本的评论超时;

        3. Which version of WordPress you are using;
        4. 您正在使用哪个版本的WordPress;

        5. The URL of your blog;
        6. 您的博客的网址;

        7. Which platform (Windows/IIS/PHP or Linux/Apache/MySQL/PHP) your server

        8. 您的服务器使用哪个平台(Windows / IIS / PHP或Linux / Apache / MySQL / PHP)

          is running, and which versions of Apache and PHP you are using, if you

          正在运行,以及正在使用的Apache和PHP版本,如果您

          know them;

        9. 了解他们;

        10. The steps that need to be taken to reproduce the bug.
        11. 重现该错误所需采取的步骤。

        If you wish to get hold of the latest development version, or to contribute

        如果您希望掌握最新的开发版本,或者做出贡献

        bug fixes or new features, you can clone the project on GitHub:

        错误修复或新功能,您可以在GitHub上克隆项目:

        git clone git@github.com:jammycakes/comment-timeout.git

        Redistribution

          git clone git@github.com:jammycakes / comment-timeout.git 

        重新分发

        Copyright (c) 2007-2013 James McKay

        版权所有(c)2007-2013 James McKay

        http://jamesmckay.net/

        http://jamesmckay.net/

        Permission is hereby granted, free of charge, to any person obtaining a copy

        特此授予获得副本的任何人免费的许可

        of this software and associated documentation files (the “Software”), to deal

        软件和相关文档文件(以下简称“软件”)的交易

        in the Software without restriction, including without limitation the rights

        在软件中不受限制,包括但不限于权利

        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

        使用,复制,修改,合并,发布,分发,再许可和/或出售

        copies of the Software, and to permit persons to whom the Software is

        本软件的副本,并允许该软件所针对的人

        furnished to do so, subject to the following conditions:

        具备以下条件:

        The above copyright notice and this permission notice shall be included in

        上述版权声明和本许可声明应包含在

        all copies or substantial portions of the Software.

        软件的所有副本或主要部分。

        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

        “按原样”提供该软件,不提供任何形式的保证,无论是明示的还是

        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

        暗示,包括但不限于对适销性的担保,

        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

        适用于特定目的和非侵权。

        IN NO EVENT SHALL THE

        在任何情况下都不会

        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

        作者或版权持有人应对任何索赔,损害或其他责任

        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

        无论是因合同,侵权或其他形式的诉讼而引起的责任,

        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

        与本软件或本软件中的使用或其他交易无关或与之相关的

        SOFTWARE.

        软件。

        For more information

        更多信息

        For more information, please visit the plugin’s home page:

        有关更多信息,请访问插件的主页:

        https://github.com/jammycakes/comment-timeout

        https://github.com/jammycakes/comment-timeout

安装步骤

    • Copy the directory comment-timeout and all the files in it into your

    • 将目录 comment-timeout 及其中的所有文件复制到您的

      /wp-content/plugins directory.

    • / wp-content / plugins目录。

    • Activate the plugin through the “Plugins” menu in the WordPress dashboard.
    • 通过WordPress信息中心中的“插件”菜单激活插件。

    • Configure the plugin by going to the “Comment Timeout” page on the “Options” menu.
    • 通过转到“选项”菜单上的“注释超时”页面来配置插件。

下载地址
https://downloads.wordpress.org/plugin/comment-timeout.2.4.1.zip
-EOF-

AI助手支持GPT4.0