You can bundle the entire CMB2 package as a library within your plugin (or theme). It was built to work this way primarily. It’s also built in such a way that it will handle only running one instance of CMB2, and only the instance that is the most current.
Thanks for prompt response. Is there a special documentation or usage instructions to include as library? Also this way will hide CMB2 from the installed plugins section of WordPress, correct?
Thanks.
The example-functions.php file should have some documented examples for how to include as a library in your own plugin. Essentially with the ww.wp.xz.cn plugin here, we did the exact same thing so that users don’t have to include the necessary files themselves.
Yes, it should remain hidden from the plugin list when you have it inside your own plugin folder. It won’t be listed and activateable directly.
Hi,
Recently I developed a plugin & bundled the entire CMB2 package as a library within my plugin but got this message from plugin review team. Can you please check this?
Is there any CMB2 class which I can extends and use at my plugin?
https://ww.wp.xz.cn/support/topic/how-to-use-cmb2-inside-new-plugins
Waiting for your response.
Thanks
I responded on your thread, samdani, but posting here as well:
This rejection/reasoning is completely new to me, and is something we will have to look into accounting for in the future. For more background, I have written this post: http://j.ustin.co/1oM7zL7
Please see plugin team’s response here: https://ww.wp.xz.cn/support/topic/how-to-use-cmb2-inside-new-plugins?replies=4#post-8097931
Don’t include plugins in plugins. You can use tgm or you can check if is-plugin-active, but you can’t include a plugin in a plugin.