Properties

$singular_page

$singular_page : boolean

If true then we use individual restrict content options for post

Type

boolean

$redirect_handler

$redirect_handler : boolean

Type

boolean

$allow_access

$allow_access : boolean

Type

boolean

$current_single_post

$current_single_post : \WP_Post

Type

\WP_Post

Methods

__construct()

__construct() 

Access constructor.

um_custom_restriction()

um_custom_restriction(array  $restriction) : boolean

Parameters

array $restriction

Returns

boolean

um_access_check_individual_term_settings()

um_access_check_individual_term_settings() 

Check individual term Content Restriction settings

um_access_check_global_settings()

um_access_check_global_settings() 

Check global accessible settings

template_redirect()

template_redirect() 

Set custom access actions and redirection

Old global restrict content logic

check_access()

check_access() : boolean

Check access

Returns

boolean

set_referer()

set_referer(string  $url, string  $referer) : string

Sets a custom access referer in a redirect URL

Parameters

string $url
string $referer

Returns

string

user_can()

user_can(  $user_id,   $roles) : boolean

User can some of the roles array Restrict content new logic

Parameters

$user_id
$roles

Returns

boolean

get_post_privacy_settings()

get_post_privacy_settings(  $post) : boolean|array

Get privacy settings for post return false if post is not private Restrict content new logic

Parameters

$post

Returns

boolean|array

filter_protected_posts()

filter_protected_posts(  $posts,   $query) : array

Protect Post Types in query Restrict content new logic

Parameters

$posts
$query

Returns

array

replace_post_content()

replace_post_content(  $content) : string

Parameters

$content

Returns

string

filter_menu()

filter_menu(  $menu_items,   $args) : array

Protect Post Types in menu query Restrict content new logic

Parameters

$menu_items
$args

Returns

array