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

Modify javascript enqueue #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MattPurland
Copy link

Modify javascript enqueue to allow cmb2-conditionals to be included as a library as well as a plugin

@jrfnl
Copy link
Collaborator

jrfnl commented Jun 6, 2018

This shouldn't have any effect at all. It doesn't change when the library is included, just the path to the actual files.

@MattPurland
Copy link
Author

MattPurland commented Jun 6, 2018

That was the aim, sorry if I wasn't very clear.

The modification allows cmb2-conditionals (in its entirety) to be manually included in a theme, as well as being installed as a plugin, like so:

require_once dirname(__FILE__) . '/library/cmb2-conditionals/cmb2-conditionals.php'; cmb2_conditionals_init();

@jrfnl
Copy link
Collaborator

jrfnl commented Jun 6, 2018

@MattPurland In that case, I'm still not sure this is the best way to do it.
Also: code should comply with the coding standards & you can't use __DIR__ as the minimum supported PHP version for this plugin in PHP 5.2.

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