Return early if should not be sent to social media
Return early and don't send the post to social media if the `Post to social media` checkbox is not checked. References #249
This commit is contained in:
parent
2d06f5e8d4
commit
eb23d93fe0
|
@ -53,6 +53,10 @@ final class PushBlogPostToSocialMedia implements EventSubscriberInterface {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!$entity->shouldSendToSocialMedia()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If this post has already been sent to social media, do not send it again.
|
||||
if ($entity->hasBeenSentToSocialMedia()) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue