I am including the meta-box-group plugin as part of our T(-) Countdown Event plugin, and we are using TGMPA to let users know that meta-box-group is a required plugin. However, between the time when our plugin and the meta-box-group plugin is activated, the system is throwing the following warnings:
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'RWMB_Group_Field' not found in .../wp-content/plugins/meta-box/inc/meta-box.php on line 351
and
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'RWMB__Field' not found in .../wp-content/plugins/meta-box/inc/meta-box.php on line 65
I understand why these warnings are being thrown.
I understand these will not be displayed if wp-debug is turned off.
I would just like to inquire about the best practices to avoid having these warnings thrown at all.
The first thing that comes to mind is to do a conditional check before registering the meta-box group files to ensure that the meta-box-group plugin is activated.
Another idea would be to only include the entire meta-box registration file if the meta-box-group plugin is activated.
Or maybe there is a flag that can be set when registering the meta_box grouped fields to suppress this message?
What are your thoughts on this?