Announcing Pods Integration with CMB2 for Pods 3.0

If you’ve been following recent news in the land of Metadata and Custom Fields, you know that Justin Sternberg over at WebDevStudios recently announced their official release of CMB2 as a replacement for the old Custom Metaboxes and Fields, commonly referred to as CMB. The Pods team has been anxiously awaiting their formal announcement so we could let our own users know our own news: We’ll be incorporating CMB2 into the upcoming release of Pods 3.0 to support many new features of this release, most notably the long anticipated Loop and Repeating Fields. These fields allow users to create one field that can have multiple values, or create a group of fields with multiple values.

To facilitate answering everyone’s questions about the upcoming implementation, we had an informal Q&A with Justin Sternberg and Scott Kingsley Clark to explain how we were handling the work, what it would mean to both projects, and to answer any concerns our users might be having about the integration. You can watch the recorded YouTube session below and read some of the recap of the Q&A as well. As always if you have any questions, please feel free to drop us a line and we’ll be happy to provide further explanation.

We’re very excited about this new project because we believe it marks the first time two similar plugins in the open source space have set aside “ownership” and embraced creating a better product together for their combined users.

Selected Q & A’s from the Video:

How Will CMB2 integrate with Pods 3.0? What part of Pods is it replacing or augmenting?

CMB2 handles the Meta Box API, the output, form inputs, validation & saving process. We’re going to be pulling that into Pods as a dependency, but we will have some inputs and validation we’ll be overriding and the saving process will be Pods based. We currently have that part working; we’re working on the integration for Loop Fields to make sure they work with our data handling needs.

We get to re-use CMB2 for handling metabox handling and we’re able to abstract all of that kind of code that was specific to Pods and not have to spend coding cycles re-inventing what CMB2 is already handling so well. We are committed to making sure that the same validation applies to fields saved via the CMB2-powered UI and saving that occurs via our internal and JSON API.

What does this say about Pods?

We believe this creates a Mutually beneficial relationship between CMB2 and Pods; Pods development doesn’t have to work on code or features that CMB2 is focusing on, but we get to benefit from those features. Likewise, CMB2 doesn’t have to focus on features or coding that the Pods framework is already handling so they can benefit from being able to integrate that code where they need it. It’s a win-win scenario.

What will this mean for CMB2?

By putting CMB2 to use on a code base as large as Pods, we undoubtedly will find ways to improve it. We look forward to creating pull requests against CMB2 to help improve both CMB2 and Pods. Instead of just improving our own UI, we will be contributing back to a project that is used in many other WordPress projects and sites. We see this as a great way to increase the impact Pods has on the WordPress eco-system at large.

How does CMB2 handle when multiple plugins are using it at once with their own embedded versions?

One of the major advantages of CMB2 over the original CMB is how it handles this exact issue. CMB2 now includes a way to ensure that as new instances of CMB2 are initialized they are versioned properly to ensure that each plugin that is using CMB2 always addresses the correct instance.

Who’s behind CMB2?

Justin Sternberg is the lead developer for the CMB2 project. Everyone from WebDevStudios is contributing to the project, and contributions from other users are happening via the GitHub repo for CMB2.WebDevStudios use it in most of their work on a daily basis, so it has ongoing priority for their team.

What is the timeline for integration?

Timeline is ongoing; we already have the prototype setup within the Pods 3.0 Codebase. After we finish the 2.5 code fixes merge into the 3.0 codebase, we’re looking at a few more weeks of that and hopefully finish the CMB2 integration by end of February or start of March. We will still have a lot of clean-up in the JavaScript, Admin Screens and Unit Testing, but our goal is still for a 1st Quarter release.

How Can I Help?

As always we rely on the support of our community to help make Pods possible. There are many ways you can contribute.

Anyone who wants to, can get involved with Pods 3.0 development. We have a list of priority issues that are major blockers to producing a usable beta. If you’d like to help with those please read our Git Workflow doc and then jump in. If you haven’t already joined, please join our Slack chat. If you need any help contributing please ask @sc0ttkclark or @josh in the #dev-core channel.

Pods is made possible by the generous support of our sponsors and donors. You can also donate to the Pods Foundation.  Any donations that we get will help allow us to spend more time on Pods itself.

If you are plugin or theme developer, you may be interested in hearing that CalderaWP has just released the first commercial add-on to extend Pods. They will be donating 20% of all sales of their new visual query builder and front-end plugin Caldera Easy Pods straight back to the Pods project. We hope other companies and developers find ways to build Pods into their projects, providing donations so that we can continue to move forward and grow together.