ure_content_view_access_data_for_user
filter (v. 4.55.1 and later) allows to set/change the Content view restrictions for selected user. For example,
add_filter( 'ure_content_view_access_data_for_user', 'my_content_view_access_data_for_role', 10, 2 ); function my_content_view_access_data_for_role( $restriction, $user_id ) { if ( $user_id==1215 ) { $restriction['access_model'] = 1; $restriction['access_error_action'] = 2; // $restriction['data']['posts'] = array( 10, 20, 30 ); // posts/pages ID list // $restriction['data']['authors'] = array( 11, 22, 32 ); // authors user ID list // $restriction['data']['terms'] = array( 10, 20, 30 ); // terms ID list // $restriction['data']['page_templates'] = array( 101, 202, 303 ); // page template ID list } return $restriction; } |