Add filter for displaying form on supported post types

[MAILPOET-3639]
This commit is contained in:
Jan Lysý
2021-07-30 10:45:51 +02:00
committed by Veljko V
parent e468663d15
commit d9f4a3f1d4

View File

@@ -193,7 +193,7 @@ class DisplayFormInWPContent {
return false;
}
if ($this->wp->isSingular(self::SUPPORTED_POST_TYPES)) {
if ($this->wp->isSingular($this->wp->applyFilters('mailpoet_display_form_supported_post_types', self::SUPPORTED_POST_TYPES))) {
if ($this->shouldDisplayFormOnPost($setup, 'posts')) return true;
if ($this->shouldDisplayFormOnCategory($setup)) return true;
if ($this->shouldDisplayFormOnTag($setup)) return true;