-
Notifications
You must be signed in to change notification settings - Fork 61
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
Make compatible to embed into theme #7
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
add_action('admin_enqueue_scripts', 'cmb2_conditionals_footer', CMB2_CONDITIONALS_PRIORITY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the hook change but I do not understand why to move this out of the function. Can you @theKhorshed please explain it to me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, It was actually not working inside the function. Probably because the function is called by the 'plugins_loaded' hook.
Hi @theKhorshed - first of all, thanks a lot for contributing, I really like the fact that people try to add improvements proactively. Awesome! |
/** | ||
* Decides whether include the scripts or not. | ||
*/ | ||
function cmb2_conditionals_footer() | ||
function cmb2_conditionals_footer($hook) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement. I was not aware of this.
I was trying to embed the plugin inside my theme but got issue with enqueueing the JS. I have tried to make the enqueue url compatible with both theme and plugin.
Thanks for the great work.