[WordPress] 外掛分享: Visibility Control for Sensei LMS

WordPress 外掛 Visibility Control for Sensei LMS 的封面圖片。

前言介紹

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

外掛協作開發者

liveaspankaj |

外掛標籤

lms | sensei | elearning | hide content | Hide Message |

內容簡介

以下是有關「Visibility Control for Sensei」外掛的總結:

- 這款外掛可協助你隱藏特定準則下 WordPress 頁面的訊息和內容。
- 你可以基於以下條件顯示/隱藏 HTML 元素、選單和其他細節:
1. 使用者存取特定的 Sensei LMS 課程。
2. 使用者特定 Sensei LMS 課程的完成狀態。
3. 使用者的登入或登出狀態。
4. 使用者的身份角色。

根據以上內容製作一組問題與答案:


  • 如何可以讓已登入的使用者看到特定的元素/選單項目?

  • 將這個 CSS 類別加到元素/選單項目中:visible_to_logged_in

  • 如何可以隱藏已登入的使用者所看不到的元素/選單項目?

  • 將這個 CSS 類別加到元素/選單項目中:hidden_to_logged_in

  • 為了讓只有管理員身份的使用者可以看到元素/選單項目,應該怎麼做?

  • 加入這個 CSS 類別到元素/選單項目中:visible_to_role_administrator

  • 如果課程 ID 是 123,如何可以讓有存取到該課程的使用者看到元素/選單項目?

  • 加入這個 CSS 類別到元素/選單項目中:visible_to_course_123

  • 如果要讓已完成課程 123 的使用者看到元素/選單項目,你應該怎麼做?

  • 加入這個 CSS 類別到元素/選單項目中:visible_to_course_complete_123



原文外掛簡介

Visibility Control for Sensei helps you hide messages and content for specific criterion anywhere on your WordPress page.
You can show/hide HTML elements, menus, and other details based on:
1. User’s access to a particular Sensei LMS Course,
2. User’s course completion status of a particular Sensei LMS Course, Or
3. User is Logged In or Logged Out.
4. User’s role.
You simply need to add a CSS class to your element div or span. As explained here:
Example:
Login/Logout Status:

To show the element/menu item to a logged-in user, add this CSS class: visible_to_logged_in OR hidden_to_logged_out
To hide the element/menu item from a logged-in user, add this CSS class: visible_to_logged_out OR hidden_to_logged_in

For user’s role:
* To show the element/menu item to a user will role administrator, add this CSS class: visible_to_role_administrator OR hidden_to_role_administrator
* Note: To show an element to multiple specific roles only, you need add the element multiple times, one for each role. To hide an element/menu from specific multiple roles only you can add the element once add multiple classes to the same element.
If Course ID is 123

To show the element/menu item to user with access to above Course, add this CSS class: visible_to_course_123
To hide the element/menu item from user with access to above Course, add this CSS class: hidden_to_course_123
To show the element/menu item to a logged-in user, add this CSS class: visible_to_logged_in OR hidden_to_logged_out
To hide the element/menu item from a logged-in user, add this CSS class: visible_to_logged_out OR hidden_to_logged_in

For a course completion status, if Course ID is 123:

To show the element/menu item to user who completed above course, add this CSS class: visible_to_course_complete_123
To hide the element/menu item from user who completed above course, add this CSS class: hidden_to_course_complete_123
To show the element/menu item to user who has not completed above course, add this CSS class: visible_to_course_incomplete_123
To hide the element/menu item from user who has not completed above course, add this CSS class: hidden_to_course_incomplete_123

Mechanism of Functioning

Multiple CSS Classes: If multiple visibility control classes are added, ALL of them must meet the criterion to keep the element visible. If any one of them hides the element, it will be hidden. For example: visible_to_course_123 visible_to_course_124 will show the element only to those who have access to both courses.
Hidden data/elements reaches the browser. Though user’s do not see it.
CSS is added to the page for all CSS elements that needs to be hidden based on above rules.
After page is loaded. These elements are removed from page using jQuery (if available), so it won’t be available on Inspect.
Elements rendered after the page load are hidden but not removed from DOM/page.

Future Development
Depending on the interest in this feature, we will decide on adding a shortcode and/or a Gutenberg Block to achieve this feature.
Other Visibility Control Plugins:
– Visibility Control for LearnDash LMS
– Visibility Control for WPCourseware LMS
– Visibility Control for LearnPress LMS
– Visibility Control for LifterLMS
– Visibility Control for TutorLMS
– Visibility Control for Sensei LMS
– Visibility Control for WooCommerce
Related Plugins for Sensei LMS:
– Experience API for Sensei LMS

各版本下載點

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

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


1.0 | trunk |

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

  • Visibility Control for TutorLMS 》以下是關於「Visibility Control for TutorLMS」的總結:, , - 這個外掛幫助您在 WordPress 頁面上隱藏特定標準下的消息和內容。, - 您可以基於以下條件來顯...。
  • Visibility Control for MasterStudy 》**概要:**, Visibility Control for MasterStudy 可讓您在 WordPress 頁面的任何地方根據特定標準隱藏訊息和內容。您可以根據以下條件來顯示/隱藏 HTML 元素...。

文章
Filter
Apply Filters
Mastodon