CMB2 inclusion needs an update
-
Please review the linked support forum. I requested they update as well, but it’s important that CMB2 is included the way the documentation states, or CMB2 can’t do it’s magic.
Currently in this plugin you have:
if ( !class_exists( 'CMB2' ) ) { if ( file_exists( __DIR__ .'/lib/cmb2/init.php' ) ) { require_once __DIR__ .'/lib/cmb2/init.php'; } elseif ( file_exists( __DIR__ .'/lib/CMB2/init.php' ) ) { require_once __DIR__ .'/lib/CMB2/init.php'; } }
And that can/should be simplified to:
require_once __DIR__ .'/lib/CMB2/init.php';
Please see the caveats here: https://github.com/CMB2/CMB2/wiki/Basic-Usage#caveats-for-bundling-and-including-cmb2
If you care to do even more reading on it, you can read this: https://dsgnwrks.pro/plugins-and-scripts/dont-repeat-yourself-use-wp-lib-loader-instead/
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘CMB2 inclusion needs an update’ is closed to new replies.