Home › Forums › Backend Issues (wp-admin) › ACF pro – weird behavior › Reply To: ACF pro – weird behavior
*SOLVED* (my bad!)
DOH – it seems that it does not like this function:
/*Function to defer or asynchronously load scripts*/
function js_async_attr($tag){
# Do not add defer or async attribute to these scripts
$scripts_to_exclude = array();
foreach($scripts_to_exclude as $exclude_script){
if(true == strpos($tag, $exclude_script ) )
return $tag;
}
# Defer or async all remaining scripts not excluded above
return str_replace( ' src', ' defer="defer" src', $tag );
}
add_filter( 'script_loader_tag', 'js_async_attr', 10 );
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.