Does anyone know if its possible to show tabs conditionally?
Hi Guys,
Just trying to figure out if its possible to show tabs conditionally. First thought was something like cmb2-conditionals... But this seems to be used only for fields.
Then also came to my intention is the "show_on/show_on_cb" solution. This is something i haven't tried myself yet so will look into this. But hoped to find people here that encountered the same thing.
Any other solutions available to your knowledge that may work?
Just to my surprise someone already made a PR for the show_on_cb solution #23 . Will give this a spin and see if this works out for me.
I have tested the branch and have some problems with the implementation.
- You need to have the "show_on_cb" specified on your tabs or you will get the following notices.
Notice: Undefined index: show_on_cb in C:\xampp\htdocs\dev1\wp-content\plugins\my-plugin\includes\cmb2-tabs\inc\cmb2-tabs.class.php on line 67 Notice: Undefined index: show_on_cb in C:\xampp\htdocs\dev1\wp-content\plugins\my-plugin\includes\cmb2-tabs\inc\cmb2-tabs.class.php on line 79