Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

rogercoathup
Copy link

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.

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
Copy link
Owner

There's a lot of history here with CMB2, but the short answer: CMB2/CMB2#27 (comment)

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

@jtsternberg
Copy link
Owner

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants