opencredit / badgeos

BadgeOS is a plugin to WordPress that allows you to easily create badges and set up the steps and achievements users take to earn them. Badges are Mozilla OBI compatible and sharable via Credly.
http://www.badgeos.org
GNU Affero General Public License v3.0
92 stars 64 forks source link

Update CMB to CMB2 #423

Open tw2113 opened 9 years ago

tw2113 commented 9 years ago

The original CMB library is no longer receiving development updates and focus has been shifted to CMB2 https://github.com/WebDevStudios/CMB2

I think it'd be beneficial to update BadgeOS core to use CMB2.

On top of that, I think we should do what we can to isolate our use of the library to just BadgeOS. We have had issues in the past from users who had 2 different versions of the library in their WP install, and depending on load order, one or the other was loaded. If they were at different versions, that meant code/features may have been missing, causing some disarray by the user whose metabox is no longer working like it should be.

So, to get around this, while retaining backwards compatibility with older PHP versions for the time being, I propose we prefix all of the appropriate functions/hooks in our bundled copy. This would allow us to isolate and use just our copy for our needs, and let other copies of the library use the other. The only real downside for this would be having to re-prefix each time we update the library, but I think the benefits outweigh the troubles.

tw2113 commented 9 years ago

Be mindful of custom extensions that are using or reliant on CMB1

tw2113 commented 9 years ago

As I recall, Justin said CMB2 loads the latest version available on a website, regardless of any other existing install, so there'll be low/no conflicts there.