should I change text-domain of CMB2 plugin in my theme?

Hi,
I am trying to use the CMB2 plugin in my theme. I check my theme by the Envato theme check and it get some warning:

  • Warning: More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs.
    The domains found are fen, cmb2
  • WARNING: Found a translation function that is missing a text-domain. Function __ , with the arguments 'Toggle panel: %s’
  • WARNING: Found a translation function that is missing a text-domain. Function __ , with the arguments 'Scope under which the request is made; determines fields present in response.'
  • REQUIRED: cmb2/includes/CMB2_Options_Hookup.php . Themes should use add_theme_page() for adding admin pages.

Line 98: $page_hook = add_menu_page(

  • REQUIRED: cmb2/includes/CMB2_Options_Hookup.php . Themes should use add_theme_page() for adding admin pages.

Line 89: $page_hook = add_submenu_page(

  • INFO: cmb2/init.php The theme appears to use include or require. If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead.

Line 160: require( cmb2_dir( ‘bootstrap.php’ ) );

  • INFO: cmb2/includes/helper-functions.php The theme appears to use include or require. If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead.

Line 44: require( cmb2_dir( ‘$path/{$class_name}.php’ ) );

I have some questions:
1- should I change the cmb2 plugin text-domain to my theme text-domain?
2- should I change the cmb2 code to fix other INFO error?
3- do you have any advices?

I’m not a theme developer, but in my opinion, you shouldn’t change any of those (the text domain and the PHP errors/notices). One reason is that it will be extremely difficult for you then, in the future, to maintain the code of that plugin (you’ll have to do a lot of manual merges)

According to this help article: https://help.author.envato.com/hc/en-us/articles/360000481223-WordPress-Theme-Plugin-Requirements#h_37072131881524439813548

the plugins from wordpress dot org should not be included in the theme .zip package:

For plugins from wordpress dot org, the latest version must be installed directly from wordpress dot org rather than bundling them in the zip file. The source, external_url, and version TGM PA parameters must be left empty.

Let’s hope other theme developers will lend a hand here with something sure, I’m curious about the answer too.

Cheers :slight_smile:

2 Likes

Thank you I really appreciate your help. :kissing_heart::kissing_heart:

1 Like