llms_is_page_restricted( int $post_id, int|null $user_id = null )
Get a boolean out of llms_page_restricted for easy if checks.
Parameters Parameters
- $post_id
-
(int) (Required) WordPress Post ID of the content.
- $user_id
-
(int|null) (Optional) WP User ID (will use get_current_user_id() if none supplied). Default
null.Default value: null
Return Return
(bool)
Source Source
File: includes/functions/llms.functions.access.php
function llms_is_page_restricted( $post_id, $user_id = null ) {
$restrictions = llms_page_restricted( $post_id, $user_id );
return $restrictions['is_restricted'];
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.37.10 | Made $user_id parameter optional. Default is null. |
| 3.0.0 | Introduced. |