Support » Plugin: CMB2 » Multiple plugins using CMB2

  • Resolved ChiefAlchemist

    (@chiefalchemist)


    This is more of a curiosity question than a bug, although maybe it is a bug.

    While init.php selectively (?) loads CMB2, there didn’t seem to be any consideration for the enqueue’ning. That is, the handles remain the same, even if the release of the core code has changed. If this is the case, and the js/css is or can be “exclusive” to a particular version/release, than it’s possible the wrong files could be enqueue’d. That is what gets enqueue’d is not compatible with the php version.

    Furthermore, even if the handles change, the js selectors will continue to be the same. It would seem – perhaps – that each metabox’s CMB2 fields needs to have a version-centric wrapper, and then the js for each version need to be mindful of that particular selector.

    Yes? No?

    TIA –
    mfs

Viewing 1 replies (of 1 total)
  • Plugin Author Justin Sternberg

    (@jtsternberg)

    Thanks for asking. Since CMB2 only loads one version of itself, the handle will always reference the js/css sources that are in that version. You can test that theory by doing a require for several versions of CMB2, and seeing that only one version (the newest) of the assets are loaded.

Viewing 1 replies (of 1 total)
  • The topic ‘Multiple plugins using CMB2’ is closed to new replies.