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


(int) (Required) WordPress Post ID of the content.


(int|null) (Optional) WP User ID (will use get_current_user_id() if none supplied). Default null.

Default value: null

Top ↑

Return Return


Top ↑

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'];

Top ↑

Changelog Changelog

Version Description
3.37.10 Made $user_id parameter optional. Default is null.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.