Replacing Core JS Files
-
I’m trying to update the version of jQuery my site uses, but it ends up breaking some of OceanWP’s functionality due to the following being deprecated:
$j( document ).on( 'ready', function() {This was mentioned in this thread a few months ago:
https://ww.wp.xz.cn/support/topic/bug-report-oceanwp-javascripts-dont-execute-on-fast-pages/It needs to be replaced with:
$j( document ).ready(function() {I believe that the /wp-content/uploads/oceanwp/main-scripts.js file is dynamically generated based on what has been enabled under Theme Panel > Scripts & Styles so I would have to modify the relevant files under /wp-content/themes/oceanwp/assets/js for the changes to be effective.
I’ve tested this and an updated main-scripts.js does contain my changes, but for numerous and obvious reasons, I rather not touch the core theme files.
Is there an alternate way of achieving this?
The topic ‘Replacing Core JS Files’ is closed to new replies.
