Ah, I am using a multisite and as a single sub-site admin is when the issue presents itself. I can save fine as a super-admin.
Hello,
Thanks for the feedback. The problem come from WordPress MU admins (non-super admin) who don’t have the unfiltered_html capability. This capability let the user save content which may include unsafe content, like <iframe>, <oembed>, <script>, <input /> etc…
In your case, the admin want to submit an <input /> content in that field, when the account isn’t allowed to.
There’s multiple ways to fix this. Please take a look at:
– https://kellenmace.com/add-unfiltered_html-capability-to-admins-or-editors-in-wordpress-multisite/
– https://ww.wp.xz.cn/plugins/unfiltered-mu/
Now ACF has a special hook for this particular capability (when saving an ACF field). Here is a code which will fix the problem for ACF fields:
add_filter('acf/allow_unfiltered_html', 'my_acf_unfiltered_html');
function my_acf_unfiltered_html($unfiltered){
if(current_user_can('administrator')){
$unfiltered = true;
}
return $unfiltered;
}
Hope it helps!
have a nice day.
Regards.
Right, of course. Super helpful, I really appreciate your detailed response.
Hello,
You’re welcome! BTW, if you enjoy ACF Extended, feel free to submit a review. It always helps and it’s much appreaciated 🙂
Cya!
Regards.