Shortcode_Button
Shortcode_Button copied to clipboard
scripts_url not doing anything
Hi,
I just updated to the latest version but it's broken my installation - seems that the shortcode-button.js file is no longer being found.
I had this work before by passing `scripts_url' the correct path but it seems like this is no longer respected. I was passing this as the scripts_url argument:
$additional_args = [
'cmb_metabox_config' => 'get_latest_news_cmb2_config',
'scripts_url' => plugins_url('/ntrs/lib/classes/Vendor/jtsternberg/Shortcode_Button/js')
];
$button = new Shortcode_Button($button_slug, $js_button_data, $additional_args);
And I'm getting this back from TinyMCE in my Inspector's console:
Failed to load: undefined/C:Usersenpa_000SitesClientsLinbrooketrs-website-2015wp-contentpluginstrslibclassesVendorjtsternbergShortcode_Button/js/shortcode-button.js
Even if I change the scripts_url argument, that path/error remains the same so doesn't seem to be using my override.
Yes, that has moved to a filter, https://github.com/jtsternberg/Shortcode_Button/blob/master/shortcode-button.php#L91