Custom Fields
Support General Best way to Bundle Reply To: Best way to Bundle



Hi Anh,
Please note a comma is missing on line 6 and there’s an extra comma on line 10.
Line 39 has an extra trailing “s” on the plug-in name (meta-box/meta-box-include-exclude).

Once I fixed those typos, I was able to checkout the whole thing through composer. Then I added vendor/autoload.php to my custom plug-in and I get another issue: it will try to instantiate some classes twice — one time from the standard wordpress plug-in and another time from my custom plug-in.

CMB2 does a smart thing in this: since it’s thought to be bundled with themes and plug-ins, it will only load the most recent version of itself. I think you should consider implementing a similar check on each plug-in initialiser.

I removed the existing plug-ins, now I get this error:
Fatal error: require(): Failed opening required ‘/Users/mauro/GitHub/mundana_wordpress/wp-content/plugins/mundana-foundation/vendor/composer/../meta-box/mb-relationships/mb-relationships.php’ (include_path=’.:/Applications/MAMP/bin/php/php7.2.1/lib/php’) in /Users/mauro/GitHub/mundana_wordpress/wp-content/plugins/mundana-foundation/vendor/composer/autoload_real.php on line 66

How do I fix this?