<?php
Yii::app()->hooks->addFilter('campaigns_get_common_tags_search_replace', function($searchReplace, $campaign, $subscriber, $server) {
if (empty($server)) {
return $searchReplace;
}
$signatureTag = '[DS_CUSTOM_SIGNATURE]';
$signature = '';
if ($server->server_id == 1) {
$signature = 'Signature 1';
} elseif ($server->server_id == 2) {
$signature = 'Signature 2';
}
$searchReplace[$signatureTag] = $signature;
return $searchReplace;
});