[wordpress插件] Conditions for Texts (Dynamic Content)文本条件(动态内容)

wordpress 插件 文章 2020-03-30 07:00 437 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

The WordPress plug-in Conditions for Texts allows bloggers to use IF- & IF-ELSE conditions in their posts and pages.

WordPress插件文本条件允许博主在其帖子和页面中使用IF-和IF-ELSE条件。

With this amazing plug-in specific content and texts can be published in accordance with certain conditions, for example date or time.

有了这个惊人的插件,可以根据某些条件(例如日期或时间)发布特定的内容和文本。

The plug-in comes in a standard- and extended version – this is the standard version! Please read the documentation to get information about the differences between the two versions and how to get the extended version.

-for-texts / english /“ rel =” nofollow“>文档以获得有关两个版本之间的差异以及如何获取扩展版本的信息。

Do you have any ideas, or wishes for more variables in the plug-in included or did you find a bug – please contact us!

nofollow“>与我们联系!

How to use this plug-in:

如何使用此插件:

// In Standard Version:

  //在标准版本中:

[IF $month == 12]It's christmas time[/IF]

[IF $ month == 12]现在是圣诞节[/ IF]

[IF $month != 12]It's not christmas time[/IF]

[IF $ month!= 12]现在不是圣诞节时间[/ IF]

[IF $hour <= 12]Before lunch[/IF][IF $hour > 12]After lunch[/IF]

[如果$ hour <= 12]在午餐前[/ IF] [如果$ hour> 12]在午餐后[/ IF]

[IF $month == 12]It's christmas time[ELSE]It's not christmas time[/IF]

[IF $ month == 12]现在是圣诞节[ELSE]现在不是圣诞节[/ IF]

// In Extended Version:

//在扩展版本中:

[IF $month == 12 AND $day==6]It's Saint Nicholas[ELSE]I's not Saint Nicholas[/IF]

[IF $ month == 12 AND $ day == 6]这是圣尼古拉斯[ELSE]我不是圣尼古拉斯[/ IF]

We recommend the use of the syntax in the plain text editing location.

我们建议在纯文本编辑位置使用该语法。

The following comparison operators are supported:

支持以下比较运算符:

!= , == , >= , <= , < , >

!=,==,> =,<=,<,>

The following variables for the conditions are available:

可以使用以下条件变量:

In Standard- & Extended Version:

在标准版和扩展版中:

    • $day – Day (1…31)
    • $ day –天(1…31)

    • $month – Month (1..12)
    • $ month –月(1..12)

    • $year – Year (2018)
    • $ year –年(2018年)

    • $hour – Hour (1..24)
    • $ hour –小时(1..24)

    • $minute – Minute (1..59)
    • $ minute -分钟(1..59)

    • $date – Date (2018-12-24)
    • $ date –日期(2018-12-24)

    Only included in the Extended Version:

    仅包含在扩展版本中:

      • $remoteIP – IP-Address of the visitor (123.123.123.123)
      • $ remoteIP –访问者的IP地址(123.123.123.123)

      • $userAgent – User-Agent of the visitor (String)
      • $ userAgent –访问者的用户代理(字符串)

      • $httpReferer – Referer-URL of the visitor (String)
      • $ httpReferer –访问者的参照URL(字符串)

      • $browserLanguage – Language of the Browser (e.g. de,en,…)
      • $ browserLanguage –浏览器的语言(例如de,en,…)

      • $permaLink – Permanent url of the current page or post (https://…/category/title)
      • $ permaLink –当前页面或帖子的永久网址(https://…/ category / title)

      • $dayOfWeek– Day of the week (0=Sonntag, 6=Samstag)
      • $ dayOfWeek –星期几(0 = Sonntag,6 = Samstag)

      • $dayOfYear – Day of the year (1…365)
      • $ dayOfYear –一年中的某一天(1…365)

      • $leapYear – Leap year (true, false)
      • $ leapYear – Le年(对,错)

      • $amORpm – Morning or Afternoon (am, pm)
      • $ amORpm –上午或下午(上午,下午)

      • $pageId– ID of the current page (int)
      • $ pageId –当前页面的ID(整数)

      • $postId – ID of the current post (int)
      • $ postId –当前帖子的ID(int)

      • $categoryName – Name of the category (String)
      • $ categoryName –类别的名称(字符串)

      • $authorId – ID of the author (int)
      • $ authorId –作者的ID(int)

      Do you have any ideas or wishes for more variables, please use our contact form!

      您对更多变量有任何想法或希望,请使用我们的联系表!

      Where can i use the condition statements and which third party plugins are supported?:

      我在哪里可以使用条件语句以及支持哪些第三方插件?

      You can use the conditions in the following sections:

      您可以使用以下部分中的条件:

        • Content text of a page or post (the_content)
        • 页面或帖子的内容文本(the_content)

        • Title of a page or post (the_title, pre_get_document_title)
        • 页面或帖子的标题(the_title,pre_get_document_title)

        • Meta-Title and Meta-Description (wpseo_title, wpseo_metadesc)
        • 元标题和元描述(wpseo_title,wpseo_metadesc)

        • Text in the header (wp_head)
        • 标题(wp_head)中的文本

        • Text in the footer (wp_footer)
        • 页脚中的文本(wp_footer)

        • Text in widgets (widget_text)
        • 小部件中的文本(widget_text)

        The following third party plugins are supported:

        支持以下第三方插件:

安装步骤

You can install this plugin directly from your WordPress dashboard:

您可以直接从WordPress仪表板安装此插件:

Standard-Version:

标准版:

    1. Go to the Plugins menu and click Add New.
    2. 转到插件菜单,然后单击添加新

    3. Search for Conditions for Texts or click on “Upload plugin” and choose the downloaded zip-file conditions-for-texts-standard.zip
    4. 搜索文本条件或单击“上传插件”,然后选择下载的zip文件 conditions-for-texts-standard.zip

    5. Click Install Now.
    6. 点击立即安装

    7. Activate the plug-in.
    8. 激活插件。

    9. Have fun!
    10. 玩得开心!

    Extended-Version:

    扩展版本:

      1. Download the Extended Version from here
      2. 从此处下载扩展版本

      3. Go to the Plugins menu and click Add New.
      4. 转到插件菜单,然后单击添加新

      5. Click on “Upload plugin” and choose the downloaded zip-file conditions-for-texts-extended.zip
      6. 点击“上传插件”,然后选择下载的zip文件 conditions-for-texts-extended.zip

      7. Click Install Now.
      8. 点击立即安装

      9. Activate the plug-in.
      10. 激活插件。

      11. Have fun!
      12. 玩得开心!

下载地址
https://downloads.wordpress.org/plugin/conditions-for-texts.zip
-EOF-

AI助手支持GPT4.0