Skip to content

Commit

Permalink
post_status=private events should still create activity items.
Browse files Browse the repository at this point in the history
  • Loading branch information
boonebgorges committed Aug 31, 2015
1 parent d7f1631 commit 2e2847f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion includes/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ function bpeo_create_activity_for_event( $event_id, $event = null, $update = nul
$event = get_post( $event_id );
}

if ( 'event' !== $event->post_type || 'publish' !== $event->post_status ) {
// Skip auto-drafts and other post types.
if ( 'event' !== $event->post_type ) {
return;
}

// Skip post statuses other than 'publish' and 'private' (the latter is for non-public groups).
if ( ! in_array( $event->post_status, array( 'publish', 'private' ), true ) ) {
return;
}

Expand Down

0 comments on commit 2e2847f

Please sign in to comment.