You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the filter, look for if (strpos($embed_code, 'flourish-embed') !== FALSE) { to see if the body contains a flourish embed. If it does, add the script. You can move the if block that starts with if ($media && $media->hasField('field_media_embed_code')) { out of wri_media_preprocess_media and use it here.
Add this filter to the "Full Html" and "Unrestricted text" formats and save those config changes back to web/profiles/contrib/wri_sites/modules/wri_media/config/install/editor.editor.full_html.yml and web/profiles/contrib/wri_sites/modules/wri_admin/config/install/filter.format.unrestricted_text.yml respectively.
Create an update hook that sets the config from the last step across all IOs.
The text was updated successfully, but these errors were encountered:
Coming out of #328 now any Flourish items that are Embeds have analytics, but if the Flourish item is embedded within the body, like https://es.wri.org/insights/el-financiamiento-climatico-es-la-historia-mas-importante-seguir-en-2025, flourish analytics do not show.
Dev tasks
drush generate plugin:filter
to create your own. Put it into thewri_media
module.if (strpos($embed_code, 'flourish-embed') !== FALSE) {
to see if the body contains a flourish embed. If it does, add the script. You can move the if block that starts withif ($media && $media->hasField('field_media_embed_code')) {
out ofwri_media_preprocess_media
and use it here.web/profiles/contrib/wri_sites/modules/wri_media/config/install/editor.editor.full_html.yml
andweb/profiles/contrib/wri_sites/modules/wri_admin/config/install/filter.format.unrestricted_text.yml
respectively.The text was updated successfully, but these errors were encountered: