Closed afragen closed 5 years ago
Adding the filter as follows to a theme's functions.php file should properly load the JS file.
add_filter(
'pand_dismiss_notice_js_url',
function( $js_url, $composer_path ) {
return get_stylesheet_directory_uri() . $composer_path;
},
10,
2
);
Unfortunately I see no way to do this automatically, though I could include this filter inside the code and create another filter to return a boolean if running from a theme.
@collizo4sky let me know your thoughts.
LGTM
We hard-coded the plugin URL. If this framework is used in a theme the JS won't be loaded. This hook allows for a simple method of returning a correct URL for enqueuing the JS file.
Hopefully, this fixes https://github.com/afragen/wp-dependency-installer/issues/29