function mailchimp_campaign_filter_campaign_process in Mailchimp 7.2
Same name and namespace in other branches
- 7.5 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_filter_campaign_process()
- 7.3 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_filter_campaign_process()
- 7.4 modules/mailchimp_campaign/mailchimp_campaign.module \mailchimp_campaign_filter_campaign_process()
Process callback for mailchimp_campaign_filter_info().
Parameters
$text: The text string to be filtered.
$filter: The filter object containing settings for the given format.
$format: The text format object assigned to the text to be filtered.
$langcode: The language code of the text to be filtered.
$cache: A Boolean indicating whether the filtered text is going to be cached in {cache_filter}.
$cache_id: The ID of the filtered text in {cache_filter}, if $cache is TRUE.
Return value
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 424
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;
}