前言介紹
- 這款 WordPress 外掛「Visibility Control for LearnPress」是 2020-07-04 上架。
- 目前有 900 個安裝啟用數。
- 上一次更新是 2025-04-21,距離現在已有 12 天。
- 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
lms | hide | elearning | learnpress | hide content |
內容簡介
Visibility Control for LearnPress 能夠幫助您隱藏 WordPress 頁面上任何特定標准下的信息和內容。
根據以下標准,您可以顯示/隱藏 HTML 元素、菜單和其他細節:
1. 用戶對於特定 LearnPress 課程的訪問權限,或
2. 用戶是否已經登入或登出。
3. 用戶的角色。
您只需要將 CSS 類添加到要隱藏或顯示的 div 或 span 元素中。如下所解釋:
範例:
Login/Logout 狀態:
要向已登入用戶顯示元素/菜單項,請添加此 CSS 類: visible_to_logged_in 或 hidden_to_logged_out
要從已登入用戶隱藏元素/菜單項,請添加此 CSS 類: visible_to_logged_out 或 hidden_to_logged_in
對於用戶角色:
* 要向具有管理員角色的用戶顯示元素/菜單項,請添加此 CSS 類: visible_to_role_administrator 或 hidden_to_role_administrator
* 注意: 要僅顯示元素給多個特定角色,您需要為每個角色添加該元素。要從多個特定角色中隱藏單個元素/菜單項,您可以將多個 CSS 類添加到同一個元素中。
如果課程ID為123
要向上述課程訪問權限的用戶顯示元素/菜單項,請添加此 CSS 類: visible_to_course_123
要從上述課程訪問權限的用戶隱藏元素/菜單項,請添加此 CSS 類: hidden_to_course_123
要向已登入用戶顯示元素/菜單項,請添加此 CSS 類: visible_to_logged_in 或 hidden_to_logged_out
要從已登入用戶隱藏元素/菜單項,請添加此 CSS 類: visible_to_logged_out 或 hidden_to_logged_in
功能機制
多個 CSS 類: 如果添加了多個可見性控制類,則所有類都必須滿足標準才能保持元素可見。如果其中任何一個隱藏元素,元素將被隱藏。例如: visible_to_course_123 visible_to_course_124 只會顯示給那些有訪問兩個課程的人。
隱藏的數據/元素會到達瀏覽器。但用戶看不到它。
CSS 會為所有基於上述規則需要隱藏的 CSS 元素添加到頁面上。
加載頁面後,這些元素會使用 jQuery (如果可用) 從頁面中刪除,因此它在檢查中不會出現。
在頁面加載後呈現的元素會被隱藏,但不會從 DOM/頁面中刪除。
未來發展
根據此功能的興趣程度,我們將決定添加一個短代碼和/或可積木的區塊來實現此功能。
相關外掛
Visibility Control for LearnDash: 面向 LearnDash LMS 用戶的類似外掛。允許根據課程訪問和組訪問進行控制。同樣適用於 WooCommerce 用戶的類似外掛。
Visibility Control for WooCommerce: 允許根據用戶對特定 WooCommerce 產品或變體的購買進行控制
原文外掛簡介
Visibility Control for LearnPress 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 LearnPress Course, Or
2. User is Logged In or Logged Out.
3. 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 WP Courseware LMS
– Visibility Control for LifterLMS
– Visibility Control for TutorLMS
– Visibility Control for MasterStudyLMS
– Visibility Control for Sensei LMS
– Visibility Control for WooCommerce
Related Plugins for LearnPress:
– Experience API for LearnPress LMS
– Manual Completions for LearnPress LMS
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Visibility Control for LearnPress」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
LearnPress Export Import – WordPress extension for LearnPress 》LearnPress 是由 ThimPress 開發的 WordPress LMS 插件。, LearnPress 匯出/匯入功能能讓你將課程、單元、測驗、問題從一個 LearnPress 網站匯出備份,或匯入...。
Cool Integration for LearnPress & WooCommerce 》LearnPress課程與WooCommerce產品整合外掛。每當添加一個課程,就會添加一個產品(並相互關聯!)。這種關聯可以保持課程和產品的同步。, 此外,當用戶從WooCom...。
GamiPress – LearnPress integration 》透過強大的遊戲化外掛程式 GamiPress,您可以讓您的 LearnPress LMS 網站變得更具遊戲性!, 這個外掛程式自動與 LearnPress 連接,並新增新的活動事件。 , ...。
Experience API for LearnPress by GrassBlade 》這個外掛使得 LearnPress LMS 支援 Experience API (xAPI / Tin Can)、cmi5、SCORM 1.2、SCORM 2004 和 SCORM Dispatch,通過與 GrassBlade xAPI Companion ...。
Quiz Importer Plugin 》這是一個WordPress外掛程式,可以將MSWord測驗題目導入WordPress測驗題庫中。使用提供的MSWord模板準備測驗題目,並在Word模板中使用巨集創建XML文件。使用此...。
Learning Management System (LMS) Chat Application 》WP LMS Conversation 是一個像 LearnPress、MasterStudy LMS、LearnDash、LifterLMS、Tutor LMS、Sensei LMS 插件的 LMS 插件,並且非常容易使用。雖然市面上...。
IDPay Payment Gateway For LearnPress 》安裝並啟用此外掛後,您的客戶可以通過 IDPay 網關進行付款。, 要通過 IDPay 網關進行交易,您必須擁有 API 金鑰。, 您可以通過前往您的 IDPay 帳戶的儀表板...。
VoguePay Plugin for LearnPress 》VoguePay 是一個獨特的線上付款處理器,其願景是為買家和賣家提供安全、易於使用的在線交易方式。, 在 VoguePay 上,網站擁有者可以在其網站上接收商品和服務...。
LearnPress – Sepay Payment 》總結:SePay Add-on 是針對 LearnPress 使用者提供的現代化、自動化和高度安全的付款解決方案,建立在開放銀行技術平台上。, , 問題與答案:, 1. SePay Add-o...。
WPLMS LEARNPRESS MIGRATION 》WPLMS Learnpress Migrate外掛是一個免費的外掛程式,旨在協助使用者將他們的Learnpress課程全部轉移到WPLMS課程。使用者只需要簡單地點一下,就可以完成轉移...。
Manual Completions for LearnPress 》**總結:** , Manual Completions for LearnPress 提供簡單易用的介面,可檢查課程、章節、課程以及測驗的完成狀態,並手動標記為完成。可單獨或批量完成數...。
Vandar.io learnpress 》**Vandar.io for LearnPress ** 是一個連接 LearnPress 到國內銀行網路支付接口 Vandar.io 的 WordPress 外掛。, 功能, , 簡單的設定面板, 設定成功付款、取...。
درگاه پرداخت پی استار برای افزونه لرن.پرس وردپرس 》透過這個外掛,您可以輕鬆將 paystar.ir 付款頁面加入到 LearnPress LMS 中。, 使用此外掛,可以輕鬆在 LearnPress LMS 中為課程和講座付款。。