WordPress CMB2 how to embed in a plugin

https://github.com/WebDevStudios/CMB2

The installation instructions for this plugin say that you can include the library in another plugin or theme.

Read More

I’ve followed these instructions to include the library in my plugin and when I try to install the plugin I get an error message:
“The plugin does not have a valid header.”

Any thoughts on how to fix or debug this?

Related posts

Leave a Reply

1 comment

  1. To my mind, there is definitely an issue here when packaging the CMB2 library with a plugin and including it as per the recommended guidelines.

    When the parent plugin is activated it triggers a ‘plugin does not have a valid header’ error at CMB2/init.php. Removing the CMB2 plugin header completely (the commented out section before the main code) cures this issue.

    Not sure if this is a WordPress or CMB2 issue, but other packaged plugins seem to work fine when activated from the parent.