| 开发者 |
intoxstudio
devinstitute keraweb freemius |
|---|---|
| 更新时间 | 2026年11月7日 17:00 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv3 |
rua_get_user()->add_level($level_id);
Example - Check if current user has an active level membership
if(rua_get_user()->has_level($level_id)) { //show restricted content } else { //show content if unauthorized }
View full RUA PHP API documentation here.
🎛️ Premium Add-ons for Restrict User Access
Complete your WordPress membership site with these powerful extensions
/wp-content/plugins/ directory or install the plugin through Plugins in the administrationPlugins in the administrationRestrict User Access has built-in lockout prevention. All administrators will by default have access to all content regardless of the Access Levels you create. If the plugin is deactivated, any restricted content will become accessible to everyone again; Restrict User Access does not permanently alter Roles or Capabilities in any way.
When you use Access Conditions to restrict some pages, only members of this level will be able to visit those pages, but they can still visit other pages too. You can change this behavior from the Options tab by toggling "Deny Access to Unprotected Content" to ON. With this option enabled, members can only visit the pages selected as Access Conditions. To prevent lockout, Administrators will have access to all content regardless of your levels.
By default, Access Conditions do not apply to items in archive pages, search results, widgets, WP REST API, or custom lists. Learn more about how to completely hide content here.
Restrict User Access does currently not support restricting deep links to files, only attachment urls.
Capabilities and Access Conditions serve different purposes and are not combined. Access Conditions are applied only to the frontend, while capabilities work throughout the site (both Admin Dashboard and frontend).
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.
Of course! Check out the links below: