- Rebases master

This commit is contained in:
Vlad
2016-06-17 15:00:46 -04:00
parent 999a0b3ede
commit c83ab0886f
5 changed files with 144 additions and 94 deletions

View File

@ -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);
});