remove_action for generate_script to suppress jQuery errors
-
We’re currently only using a couple basic blocks from UAGB, and there’s no JavaScript requirements for them. However, UAGB still outputs a script tag for an empty jQuery binding:
( function( $ ) {})(jQuery)
.Our theme is being carefully crafted to eliminate any dependency on jQuery, and I would like to eliminate the generate_scripts action to prevent the JS error thrown as a result, but doing a
remove_action( 'wp_footer', array( 'UAGB_Helper', 'generate_script' ), 1001 );
doesn’t appear to suppress the function (I think because we need the object instance instead of the class name). I’m not seeing in the plugin code where there’s an exported object I can reference though to plug it in there, as the instance creation appears to use a self-reference.Ideally, I’d love for the plugin itself to know whether or not it needs to spit this out, and act accordingly. But in the mean time, what is considered the correct procedure for removing the action?
- The topic ‘remove_action for generate_script to suppress jQuery errors’ is closed to new replies.