- Refactors sending queue worker by breaking it into smaller tasks
- Adds arrayUnique method to Helpers for multidimensional arrays
This commit is contained in:
@ -8,12 +8,18 @@ class OpenTracking {
|
||||
$DOM = new \pQuery();
|
||||
$DOM = $DOM->parseStr($template);
|
||||
$template = $DOM->query('body');
|
||||
$open_tracking_link = sprintf(
|
||||
$open_tracking_image = sprintf(
|
||||
'<img alt="" class="" src="%s/%s"/>',
|
||||
home_url(),
|
||||
esc_attr('?mailpoet&endpoint=track&action=open&data=' . Links::DATA_TAG)
|
||||
);
|
||||
$template->html($template->html() . $open_tracking_link);
|
||||
$template->html($template->html() . $open_tracking_image);
|
||||
return $DOM->__toString();
|
||||
}
|
||||
|
||||
static function addTrackingImage() {
|
||||
add_filter('mailpoet_rendering_post_process', function ($template) {
|
||||
return OpenTracking::process($template);
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user