- Rebases master
This commit is contained in:
@ -4,6 +4,8 @@ namespace MailPoet\Newsletter\Renderer\PostProcess;
|
||||
use MailPoet\Newsletter\Links\Links;
|
||||
|
||||
class OpenTracking {
|
||||
const OPEN_TRACKING_FILTER_NAME = 'mailpoet_rendering_post_process';
|
||||
|
||||
static function process($template) {
|
||||
$DOM = new \pQuery();
|
||||
$DOM = $DOM->parseStr($template);
|
||||
@ -18,6 +20,9 @@ class OpenTracking {
|
||||
}
|
||||
|
||||
static function addTrackingImage() {
|
||||
if(array_key_exists(self::OPEN_TRACKING_FILTER_NAME, $GLOBALS['wp_filter'])) {
|
||||
return;
|
||||
};
|
||||
add_filter('mailpoet_rendering_post_process', function ($template) {
|
||||
return OpenTracking::process($template);
|
||||
});
|
||||
|
Reference in New Issue
Block a user