The Events Manager Plugin populates all my ACF WYSIWYG fields with its entire content.
I found out, that my function to remove empty tags around shortcodes causes this trouble:
function remove_empty_tags_around_shortcodes_acf_wysiwyg( $value ) {
$tags = array(
'<p>[' => '[',
']</p>' => ']',
']<br>' => ']',
']<br />' => ']'
);
$content = apply_filters('the_content',$value);
$content = strtr($content, $tags);
return $content;
}
add_filter('acf_the_content', 'remove_empty_tags_around_shortcodes_acf_wysiwyg', 10, 1);
I’d really like to keep this filter, it works fine. But how can I prevent the conflict with the other plugin populating all my WYSIWYG fields?