max_excerpt_length = $wp->applyFilters('mailpoet_newsletter_post_excerpt_length', $this->max_excerpt_length); } function getContent($post, $displayType) { if($displayType === 'titleOnly') { return ''; } elseif ($displayType === 'excerpt') { // get excerpt if(!empty($post->post_excerpt)) { return self::stripShortCodes($post->post_excerpt); } else { return $this->generateExcerpt(self::stripShortCodes($post->post_content)); } } else { return self::stripShortCodes($post->post_content); } } function filterContent($content, $display_type, $with_post_class = true) { $content = self::convertEmbeddedContent($content); // convert h4 h5 h6 to h3 $content = preg_replace('/<([\/])?h[456](.*?)>/', '<$1h3$2>', $content); // convert currency signs $content = str_replace( array('$', '€', '£', '¥'), array('$', '€', '£', '¥'), $content ); // strip useless tags $tags_not_being_stripped = array( '

', '', '', '', '', '', '', '