jtsternberg / Shortcode_Button

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

Switched from self::url() to plugins_url() for enqueuing #12

Closed rogercoathup closed 7 years ago

rogercoathup commented 8 years ago

self::url() generates incorrect URL paths for enqueuing styles and scripts on certain setups. For example: on Vagrant setups using Chassis (https://github.com/Chassis/Chassis).

Using plugins_url() generates the correct path.

jtsternberg commented 8 years ago

There's a lot of history here with CMB2, but the short answer: https://github.com/WebDevStudios/CMB2/issues/27#issuecomment-64669295

To address for most cases, I'll likely need to swipe from what we're doing in CMB2.

jtsternberg commented 8 years ago

Also, your PR complete ignores the url() method, and the filter that gets run on the URL: https://github.com/21applications/Shortcode_Button/blob/7bffb90cc1182666cbafe821ea9660c757b699f4/lib/class-shortcode-button.php#L100

rogercoathup commented 8 years ago

Yep, I initially tried to use WDS Shortcodes as a library (via Composer, using the same setup I use successfully for cmb2 and autoloading), but ran into problems with the TGM integration throwing errors. I don't know if that's my limited understanding of Composer configuration, or a more fundamental issue.