jtsternberg / Shortcode_Button

Tinymce and Quicktag buttons for outputting shortcodes. Built to work with CMB2.
81 stars 7 forks source link

scripts_url not doing anything #6

Open 0Neji opened 8 years ago

0Neji commented 8 years ago

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.

jtsternberg commented 8 years ago

Yes, that has moved to a filter, https://github.com/jtsternberg/Shortcode_Button/blob/master/shortcode-button.php#L91