Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function user_can_access( $post_id, $user_id = false ) {
- if ( empty( $post_id ) ) {
- return true;
- }
- if ( $user_id == false ) {
- $user_id = get_current_user_id();
- }
- // If admins are excluded from restrictions
- if ( wp_fusion()->settings->get( 'exclude_admins' ) == true && user_can( $user_id, 'manage_options' ) ) {
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement