Notifications
Clear all
Topic starter
Remove type="text/javascript" from osc_enqueue_script() function.
For the html5 validation in our sites the attribute 'type' is obsolete and should not be placed.
We could resolve this editing directly in the file' line:
But, the correct way to do fix this without touch the core osclass (original code) is make it from the template (for me is the best practice).
Open the function.php file of your template and paste this code starting or at the end:
osc_remove_hook('header', 'osc_load_scripts');
function cust_load_scripts() {
foreach (Scripts::newInstance()->getScripts() as $script) {
echo '<script src=""'.osc_apply_filter('theme_url'," $script).'"></script>'.PHP_EOL;
}
}
osc_add_hook('header', 'cust_load_scripts');
Posted : 20/01/2020 2:25 am
Thanks!
Posted : 21/01/2020 6:21 am