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

Conditionally load core-widget library files #100

Open
jdub233 opened this issue Jul 19, 2021 · 0 comments
Open

Conditionally load core-widget library files #100

jdub233 opened this issue Jul 19, 2021 · 0 comments

Comments

@jdub233
Copy link
Contributor

jdub233 commented Jul 19, 2021

BU Navigation requires the core-widget library files directly, but the other package using that library only requires them if they haven't already been loaded:

https://github.com/bu-ist/bu-learning-blocks/blob/a7d5871370746203d24b15cee3a9de109a7f8b99/bu-learning-blocks.php#L90

This works in the BU context because we load BU Navigation as an MU plugin, so it is always loaded first.

Other installations may not load BU Navigation as an MU plugin, in which case BU Learning Blocks may load first. In this case, BU Navigation may throw errors because the library files were already loaded.

BU Navigation should probably also conditionally load the library files, as BU Learning blocks does.

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

No branches or pull requests

1 participant