Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async enqueue #2317

Open
nosborzone opened this issue Mar 14, 2020 · 1 comment
Open

async enqueue #2317

nosborzone opened this issue Mar 14, 2020 · 1 comment

Comments

@nosborzone
Copy link

Good afternoon, does anyone know how to turn this function used for WordPress into something that we can use in Osclass
function ikreativ_async_scripts($url)
{
if ( strpos( $url, '#asyncload') === false )
return $url;
else if ( is_admin() )
return str_replace( '#asyncload', '', $url );
else
return str_replace( '#asyncload', '', $url )."' async='async";
}
add_filter( 'clean_url', 'ikreativ_async_scripts', 11, 1 );

@patriksh
Copy link

Ask on Osclass Community Forum. I'll be glad to help there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants