Support » Plugin: CMB2 » How to use CMB2 inside new plugins?

  • Resolved Golam Samdani

    (@samdani)


    CMB2 added inside my new plugin for metaboxes and got message from WP plugin reviewer team, How to use CMB2 inside new plugins?

    Here is the message-

    There are issues with your plugin code. Please read this ENTIRE email, address all listed issues, and reply to this email with your corrected code attached. It is required for you to read and reply to these emails, and failure to do so will result in your plugin being rejected.

    ## Including another plugin

    We cannot accept a plugin that includes an entire other plugin, wholesale, inside it.

    You have CMB2 – https://wordpress.org/plugins/cmb2/

    While we understand the use of framework (or boilerplate) plugins, and encourage the use of common libraries, full blown plugins should never be included inside another, as it causes multiple potential issues, such as function/attribute conflicts, and also opens your code up for issues should the included plugin be closed for a security hole.

    The proper way to include another plugin would be to require it in your own. You can use the hook is_plugin_active() to check to see if the plugin is, indeed, installed and active.

    https://codex.wordpress.org/Function_Reference/is_plugin_active

    The other alternative would be to actually fork the code, and not have a 100% copy in yours. Sadly, WordPress plugins don’t have the ability to do sub-modules, so you’ll have to actually customize the code for interaction.

    Thanks for your help in advance!

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

    (@jtsternberg)

    This rejection/reasoning is completely new to me, and is something we will have to look into accounting for in the future. For more background, I have written this post: http://j.ustin.co/1oM7zL7

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    He was pended. Rejected would have said ‘denied’ in the email. Justin, I understand your concerns, but don’t jump to a conclusion.

    Cmb2 is a plugin hosted on .org and we don’t permit you to include another plugin, wholesale, inside yours. The email was, I thought, pretty clear… Don’t include plugins in plugins. You can use tgm or you can check if is-plugin-active, but you can’t include a plugin in a plugin.

    Plugin Author Justin Sternberg

    (@jtsternberg)

    Thank you for reiterating your position Mika. I know it should be clear, (and your confirmation definitely helps), but I definitely had some confusion around this issue.

    Thanks for responses.
    Following …

    There are numerous plugins within other plugins.
    Just because CMB2 has the audacity to be open about doesn’t provide a legitimate excuse to ding it.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    Mike, that’s not what’s going on here at all.

    Subscribing.
    <3 CMB2

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Marking closed as, while still technically a potential issue, has no pending issue that we can immediately address.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’m going to have no way to answer in regards to the rejection and what reasoning was behind it. Just a for your info.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to use CMB2 inside new plugins?’ is closed to new replies.