static function required_access($object_id = false) { if (BPMediaPrivacy::is_enabled() == false) { return; } if ($object_id == false) { return; } $privacy = BPMediaPrivacy::get_privacy($object_id); $parent = get_post_field('post_parent', $object_id, 'raw'); $parent_privacy = BPMediaPrivacy::get_privacy($parent); if ($privacy === false) { if ($parent_privacy !== false) { $privacy = $parent_privacy; } else { $privacy = BPMediaPrivacy::default_privacy(); } } return $privacy; }