Skip to content

Commit 5e35bfb

Browse files
committed
Add groups with access to all posts only if there are groups checked on post to RSS feed
1 parent 19a9272 commit 5e35bfb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugins/bcc-login/includes/class-bcc-login-feed.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,9 @@ function add_groups_to_items($the_list, $visibility) {
194194
// Get groups that are checked on post
195195
$post_groups = get_post_meta($post->ID, 'bcc_groups', false);
196196

197-
// Visiblity Groups: Groups that are checked on post + groups with access to all posts
198-
if ($visibility != BCC_Login_Visibility::VISIBILITY_PUBLIC)
197+
// Visiblity Groups: Groups that are checked on post
198+
// + groups with access to all posts (only if there are groups checked on post)
199+
if ($visibility != BCC_Login_Visibility::VISIBILITY_PUBLIC && is_array($post_groups) && count($post_groups))
199200
{
200201
$visibility_post_groups = $this->array_union($post_groups, $this->_settings->full_content_access_groups);
201202
foreach ($visibility_post_groups as $group){

0 commit comments

Comments
 (0)