ure_content_view_access_data_for_role
filter (v. 4.55.1 and later) allows to set/change the Content view restrictions for selected user role. For example,
add_filter( 'ure_content_view_access_data_for_role', 'my_content_view_access_data_for_role', 10, 2 ); function my_content_view_access_data_for_role( $restriction, $role_id ) { if ( $role_id=='author' ) { $restriction['access_model'] = 1; $restriction['access_error_action'] = 2; // $restriction['data']['own_data_only'] = 1; $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; } |