function mailchimp_campaign_filter_campaign_process in Mailchimp 7.4
Same name and namespace in other branches
- 7.5 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_filter_campaign_process()
- 7.2 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_filter_campaign_process()
- 7.3 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_filter_campaign_process()
Process callback for mailchimp_campaign_filter_info().
@string $text The text string to be filtered. @object object $filter The filter object containing settings for the given format. @string $format The text format object assigned to the text to be filtered. @string $langcode The language code of the text to be filtered. @bool $cache A Boolean indicating whether the filtered text is going to be cached in {cache_filter}. @int $cache_id The ID of the filtered text in {cache_filter}, if $cache is TRUE.
Return value
string The filtered text.
1 string reference to 'mailchimp_campaign_filter_campaign_process'
- mailchimp_campaign_filter_info in modules/
mailchimp_campaign/ mailchimp_campaign.module - Implements hook_filter_info().
File
- modules/
mailchimp_campaign/ mailchimp_campaign.module, line 675 - Module file for mailchimp_campaign.
Code
function mailchimp_campaign_filter_campaign_process($text, $filter, $format, $langcode, $cache, $cache_id) {
// Replace node macros with entity content:
$pattern = '/\\[mailchimp_campaign\\|entity_type=(\\w+)\\|entity_id=(\\d+)\\|view_mode=(\\w+)\\]/s';
$text = preg_replace_callback($pattern, 'mailchimp_campaign_process_callback', $text);
// Convert URL to absolute:
$text = mailchimp_campaign_convert_url($text);
return $text;
}