[WordPress] 外掛分享: IF AS Shortcode

前言介紹

  • 這款 WordPress 外掛「IF AS Shortcode」是 2016-09-15 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2024-08-09,距離現在已有 267 天。
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

okfie |

外掛標籤

if | conditions | if_statement | page_templete_conditions | post_templete_conditions |

內容簡介

此外掛可讓您在任何文章類型、選單和小工具中添加條件限制內容,並使用簡碼代碼而不需要使用 PHP 或其他語言:)

文章/頁面/其他文章類型:

創建新內容,並在上方的 TinyMCE 編輯器中找到一個名為「IF」的按鈕。
點擊「IF」按鈕,選擇您需要在內容區域中使用的條件。
您可以選擇真正的區塊,並在 else 區塊中編寫其他內容。
保存您的內容以並發佈它!

選單:

點擊左側的「外觀」
從中選擇「選單」頁面。
您必須為每個選單顯示描述字段,方法如下:
點擊選單頁面上方的「屏幕選項」。
從該選項選擇「描述」。
現在您可以從「簡碼」選項卡中添加限制內容。

小工具:

點擊左側的「外觀」
從中選擇「小工具」頁面。
現在您有一個名為「受限內容」的框。
您可以將它移動到任何側邊欄中並填寫表單。

翻譯

阿拉伯文
英文

條件的列表

[if current_user_can capability=”administrator”]True content[else]False content[/if]
[if current_user_can capability=”editor”]True content[else]False content[/if]
[if current_user_can capability=”author”]True content[else]False content[/if]
[if current_user_can capability=”contributor”]True content[else]False content[/if]
[if current_user_can capability=”subscriber”]True content[else]False content[/if]
[if is_user_logged_in]True content[else]False content[/if]
[if has_post_thumbnail]True content[else]False content[/if]
[if comments_open]True content[else]False content[/if]
[if has_tag]True content[else]False content[/if]
[if is_attachment]True content[else]False content[/if]
[if has_excerpt]True content[else]False content[/if]
[if pings_open]True content[else]False content[/if]
[if is_home]True content[else]False content[/if]
[if is_rtl]True content[else]False content[/if]

示例

顯示登錄後的內容
[if is_user_logged_in]
歡迎
[else]
您必須登錄才能查看此內容
[/if]

原文外掛簡介

This is plugin help you to add conditions inside any post types, menus, and widgets to restrict the content by use shortcode without use php code or other language :).
Posts/Pages/Other Post Types :

Create new content and in above tinymce editor you will see button it’s name is “IF”.
Click “IF” button and choose the condition you need to use inside content area.
You can select the true block and write otherwise inside else block.
Save your content and publish to see it!

Menus :

Click in left side “Appearance”
Choose from it “Menus” page.
You must show description field for every menu by this way :
Click “Screen Options” up the menu page.
Chack “Description” from that tab.
Now you can add your restrict content from “Shortcode” tab.

Widgets :

Click in left side “Appearance”
Choose from it “Widgets” page.
Now you have box it’s name “The restricted content”.
You can move it to any sidebar and fill the felids.

Translations

Arabic
English

List of conditions

[if current_user_can capability=”administrator”]True content[else]False content[/if]
[if current_user_can capability=”editor”]True content[else]False content[/if]
[if current_user_can capability=”author”]True content[else]False content[/if]
[if current_user_can capability=”contributor”]True content[else]False content[/if]
[if current_user_can capability=”subscriber”]True content[else]False content[/if]
[if is_user_logged_in]True content[else]False content[/if]
[if has_post_thumbnail]True content[else]False content[/if]
[if comments_open]True content[else]False content[/if]
[if has_tag]True content[else]False content[/if]
[if is_attachment]True content[else]False content[/if]
[if has_excerpt]True content[else]False content[/if]
[if pings_open]True content[else]False content[/if]
[if is_home]True content[else]False content[/if]
[if is_rtl]True content[else]False content[/if]

Example

Show content for who logged in
[if is_user_logged_in]
Welcome
[else]
You must login to see this content
[/if]

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「IF AS Shortcode」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.1 | 1.2 | trunk |

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon