strip shortcodes in email body content
-
I’m using this plugin in conjunction with BuddyPress Activity Plus
https://en-gb.www.ads-software.com/plugins/buddypress-activity-plus/ .
This adds several options for adding content (image, video or link) to buddypress activities via shortcodes.
In the group notification emails that come through when someone posts, it displays the shortcode and in most cases the shortcode breaks the link to the image or video.
Something like this:
John Smith posted an update in the group test group: testing a link post [bpfb_link url='https://www.bbc.co.uk' title='BBC - Home' image='https://www.bbc.co.uk///homepage.files.bbci.co.uk/s/homepage-v5/5-2-1-90-47c143b28/images/bbc_homepage.png']The best of the BBC, with the latest news and sport headlines, weather, TV & radio highlights and much more from across the whole of BBC Online[/bpfb_link] – Go to the discussion to reply or catch up on the conversation. Your email setting for this group is: All Email
I’ve tried implementing this filter which I stumbled across with no luck:
function strip_shortcodes_from_notification_message( $message, $args ){ return strip_shortcodes($message); } add_filter( 'bp_ass_activity_notification_message', 'strip_shortcodes_from_notification_message', 10, 2 );
Can someone point me in the right direction to strip out shortcodes from email notifications?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘strip shortcodes in email body content’ is closed to new replies.