Add job_listing into supported post types for forms

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

View File

@@ -19,6 +19,12 @@ class DisplayFormInWPContent {
FormEntity::DISPLAY_TYPE_SLIDE_IN, FormEntity::DISPLAY_TYPE_SLIDE_IN,
]; ];
const SUPPORTED_POST_TYPES = [
'post',
'product',
'job_listing',
];
/** @var WPFunctions */ /** @var WPFunctions */
private $wp; private $wp;
@@ -187,7 +193,7 @@ class DisplayFormInWPContent {
return false; return false;
} }
if ($this->wp->isSingular('post') || $this->wp->isSingular('product')) { if ($this->wp->isSingular(self::SUPPORTED_POST_TYPES)) {
if ($this->shouldDisplayFormOnPost($setup, 'posts')) return true; if ($this->shouldDisplayFormOnPost($setup, 'posts')) return true;
if ($this->shouldDisplayFormOnCategory($setup)) return true; if ($this->shouldDisplayFormOnCategory($setup)) return true;
if ($this->shouldDisplayFormOnTag($setup)) return true; if ($this->shouldDisplayFormOnTag($setup)) return true;