AI助手支持GPT4.0
Conditional Statements allows you to add logic into your pages.
条件语句使您可以在页面中添加逻辑。
The plugin supports various conditions allowing you to apply IF statements.
该插件支持各种条件,允许您应用IF语句。 p>
For example: “IF the user is logged in display X ELSE display Y” would look like:
例如:“如果用户已登录,显示X ELSE,则显示Y”如下所示: p>
[cs-if conditions=”is-logged-in”]
[cs-if条件=“已登录”] p>
Welcome Back!
欢迎回来! p>
[gallery] [图库] code> pre>[else] [else] p>You must be logged in to view the gallery.您必须先登录才能查看图库。 p>[/cs-if] [/ cs-if] p>You can also nest conditions e.g.您还可以嵌套条件,例如 p>[cs-if conditions=”is-logged-in”] [cs-if条件=“已登录”] p>The user is logged in.用户已登录。 p>[cs-if-1 conditions=”firstname”] [cs-if-1条件=“名字”] The user has entered a first name! 用户输入了名字! [else-1] [else-1] The user must enter a first name! 用户必须输入名字! [/cs-if-1] [/ cs-if-1] [cs-if-1 conditions=”lastname”] [cs-if-1条件=“姓氏”] The user has entered a last name! 用户输入了姓氏! [else-1] [else-1] The user must enter a last name! 用户必须输入姓氏! [/cs-if-1][/ cs-if-1] [/cs-if][/ cs-if] p>Simply add a hyphen and the depth (up to a maximum of 5) e.g.只需添加连字符和深度(最多5个)即可,例如[cs-if-1], [cs-if-2], [cs-if-3] and so on.[cs-if-1],[cs-if-2],[cs-if-3]等。 p>Examples示例 h4>Please look at these examples on how to use the Conditional Statements shortcode:请查看以下有关如何使用条件语句短代码的示例: p>Examples of how to use Conditional Statements 如何使用条件语句的示例 p>Features功能 h4>Supports nesting of IF statements (upto 5 deep)支持IF语句的嵌套(最多5个深度) li>AND logic.与逻辑。If you specify more than one condition, the conditions are AND’d (e.g. all conditions must be met for the condition to be true)如果您指定多个条件,则条件为AND(例如,必须满足所有条件才能使条件为真) li>ELSE conditions ELSE条件 li>Comparisons e.g.比较例如“does the post type equal ‘article'”“帖子类型等于'article'” li> ul>[cs-if conditions=”post-type” operator=”equals” compare-value=”article”] [cs-if条件=“后置类型”运算符=“等于”比较值=“文章”] Post Type is Article帖子类型为文章[else] [else] [cs-if-1 conditions=”post-type” operator=”equals” compare-value=”post”] [cs-if-1条件=“后置类型”运算符=“等于”比较值=“后置”] Post Type is Post 帖子类型为帖子 [else-1] [else-1] Post type is not Article or Post. 帖子类型不是文章或帖子。 [/cs-if-1][/ cs-if-1] [/cs-if][/ cs-if] p>Supported Conditions支持的条件 h4>[cs-if conditions=”is-logged-in”] (supported operators: equals) – User logged in [cs-if条件=”已登录”](支持的运营商:等于)–用户已登录 li>[cs-if conditions=”ip”] (supported operators: equals) – User’s IP [cs-if条件=“ ip”](支持的运算符:等于)–用户的IP li>[cs-if conditions=”first-name”] (supported operators: equals, exists, not-exists) – User’s first name [cs-if条件=“名字”](支持的运算符:等于,存在,不存在)–用户的名字 li>[cs-if conditions=”last-name”] (supported operators: equals, exists, not-exists) – User’s last name. [cs-if条件=“姓氏”](支持的运算符:等于,存在,不存在)–用户的姓氏。 li>[cs-if conditions=”display-name”] (supported operators: equals, exists, not-exists) – User’s display name. [cs-if条件=“显示名称”](受支持的运算符:等于,存在,不存在)–用户的显示名称。 li>[cs-if conditions=”user-id”] (supported operators: equals) – User’s ID. [cs-if条件=“用户ID”](支持的运算符:等于)–用户ID。 li>[cs-if conditions=”post-id”] (supported operators: equals) – Post ID of current post in loop. [cs-if条件=” post-id”](支持的运算符:等于)–当前循环中的帖子ID。 li>[cs-if conditions=”post-slug”] (supported operators: equals) – Slug of current post in loop. [cs-if条件=” post-slug”](支持的运算符:等于)–当前循环中的子弹。 li>[cs-if conditions=”post-type”] (supported operators: equals) – Post type of current post in loop. [cs-if条件=“帖子类型”](支持的运算符:等于)–当前循环中的帖子类型。 li> ul>To suggest new conditions, email me at: email@yeken.uk要提出新的条件,请发送电子邮件至:email@yeken.uk p>Coming Soon即将推出 h4>Support for ELSE IF statements支持ELSE IF语句 li>OR statements OR语句 li>New conditions (please email suggestions email@yeken.uk)新情况(请给电子邮件建议email@yeken.uk) li> ul>
[图库]
code> pre>
[else]
[else] p>
You must be logged in to view the gallery.
您必须先登录才能查看图库。 p>
[/cs-if]
[/ cs-if] p>
You can also nest conditions e.g.
您还可以嵌套条件,例如 p>
The user is logged in.
用户已登录。 p>
[cs-if-1 conditions=”firstname”]
[cs-if-1条件=“名字”]
The user has entered a first name!
用户输入了名字!
[else-1]
The user must enter a first name!
用户必须输入名字!
[/cs-if-1]
[/ cs-if-1]
[cs-if-1 conditions=”lastname”]
[cs-if-1条件=“姓氏”]
The user has entered a last name!
用户输入了姓氏!
The user must enter a last name!
用户必须输入姓氏!
Simply add a hyphen and the depth (up to a maximum of 5) e.g.
只需添加连字符和深度(最多5个)即可,例如
[cs-if-1], [cs-if-2], [cs-if-3] and so on.
[cs-if-1],[cs-if-2],[cs-if-3]等。 p>
Please look at these examples on how to use the Conditional Statements shortcode:
请查看以下有关如何使用条件语句短代码的示例: p>
Examples of how to use Conditional Statements
如何使用条件语句的示例 p>Features功能 h4>Supports nesting of IF statements (upto 5 deep)支持IF语句的嵌套(最多5个深度) li>AND logic.与逻辑。If you specify more than one condition, the conditions are AND’d (e.g. all conditions must be met for the condition to be true)如果您指定多个条件,则条件为AND(例如,必须满足所有条件才能使条件为真) li>ELSE conditions ELSE条件 li>Comparisons e.g.比较例如“does the post type equal ‘article'”“帖子类型等于'article'” li> ul>[cs-if conditions=”post-type” operator=”equals” compare-value=”article”] [cs-if条件=“后置类型”运算符=“等于”比较值=“文章”] Post Type is Article帖子类型为文章[else] [else] [cs-if-1 conditions=”post-type” operator=”equals” compare-value=”post”] [cs-if-1条件=“后置类型”运算符=“等于”比较值=“后置”] Post Type is Post 帖子类型为帖子 [else-1] [else-1] Post type is not Article or Post. 帖子类型不是文章或帖子。 [/cs-if-1][/ cs-if-1] [/cs-if][/ cs-if] p>Supported Conditions支持的条件 h4>[cs-if conditions=”is-logged-in”] (supported operators: equals) – User logged in [cs-if条件=”已登录”](支持的运营商:等于)–用户已登录 li>[cs-if conditions=”ip”] (supported operators: equals) – User’s IP [cs-if条件=“ ip”](支持的运算符:等于)–用户的IP li>[cs-if conditions=”first-name”] (supported operators: equals, exists, not-exists) – User’s first name [cs-if条件=“名字”](支持的运算符:等于,存在,不存在)–用户的名字 li>[cs-if conditions=”last-name”] (supported operators: equals, exists, not-exists) – User’s last name. [cs-if条件=“姓氏”](支持的运算符:等于,存在,不存在)–用户的姓氏。 li>[cs-if conditions=”display-name”] (supported operators: equals, exists, not-exists) – User’s display name. [cs-if条件=“显示名称”](受支持的运算符:等于,存在,不存在)–用户的显示名称。 li>[cs-if conditions=”user-id”] (supported operators: equals) – User’s ID. [cs-if条件=“用户ID”](支持的运算符:等于)–用户ID。 li>[cs-if conditions=”post-id”] (supported operators: equals) – Post ID of current post in loop. [cs-if条件=” post-id”](支持的运算符:等于)–当前循环中的帖子ID。 li>[cs-if conditions=”post-slug”] (supported operators: equals) – Slug of current post in loop. [cs-if条件=” post-slug”](支持的运算符:等于)–当前循环中的子弹。 li>[cs-if conditions=”post-type”] (supported operators: equals) – Post type of current post in loop. [cs-if条件=“帖子类型”](支持的运算符:等于)–当前循环中的帖子类型。 li> ul>To suggest new conditions, email me at: email@yeken.uk要提出新的条件,请发送电子邮件至:email@yeken.uk p>Coming Soon即将推出 h4>Support for ELSE IF statements支持ELSE IF语句 li>OR statements OR语句 li>New conditions (please email suggestions email@yeken.uk)新情况(请给电子邮件建议email@yeken.uk) li> ul>
p>
If you specify more than one condition, the conditions are AND’d (e.g. all conditions must be met for the condition to be true)
如果您指定多个条件,则条件为AND(例如,必须满足所有条件才能使条件为真) li>
“does the post type equal ‘article'”
“帖子类型等于'article'” li>
ul>
[cs-if conditions=”post-type” operator=”equals” compare-value=”article”]
[cs-if条件=“后置类型”运算符=“等于”比较值=“文章”]
Post Type is Article
帖子类型为文章
[cs-if-1 conditions=”post-type” operator=”equals” compare-value=”post”]
[cs-if-1条件=“后置类型”运算符=“等于”比较值=“后置”]
Post Type is Post
帖子类型为帖子
Post type is not Article or Post.
帖子类型不是文章或帖子。
To suggest new conditions, email me at: email@yeken.uk
要提出新的条件,请发送电子邮件至:email@yeken.uk p>
ol>
原文出处:http://www.sanshu.cn/a/8256.html
群主管理都是支付大佬