This took me a little while to finally reproduce consistently. What’s going on is I have a place in my theme to add in Google Tag Manager embed code using an ACF Text Area field type. On a simple WordPress install this works exactly as expected. Admins are able to edit this and it retains the embed as is.
However, if the site is a multi-site install (mine is setup as a subdomain install), then users with the role of Admin have the script tags stripped when they save the Options page. It does work as expected if the user is a Super Admin though.
Has anyone else come across this? I’m aware I could use a plugin to add in GTM code (or other embed code), but I’m looking for a solution to script tags not being removed from Text Areas when you have a role of Admin in a multi-site install.
Yes it is, and it is a PITA. The only multisites I have only trusted people are given admin access. It’s not like I run any sites where anyone can just create a site. This is something I have to dig into every time I set one up. It will block a lot more than just scripts as well. Any attribute that’s not recognized will also be stripped.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users