=== CMB2 Tabs === Contributors: stackadroid, polupraneeth Donate link: http://stackadroit.com/ Tags: metaboxes,fields, tabs Requires at least: 3.8.0 Tested up to: 4.7.2 Stable tag: 1.0.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html == Description == CMB2 Tabs is an extenstion for CMB2 which allow you to oragnize fields into tabs. ### Contribution Development occurs on Github, and all contributions welcome. [CONTRIBUT](https://github.com/stackadroit/cmb2-extensions). == Installation == 1. Upload `cmb2-tabs` to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress 1. Copy (and rename if desired) `example-functions.php` into to your theme or plugin's directory. 1. Edit to only include the fields you need and rename the functions. == Example Code == ```php $cmb = new_cmb2_box( array( "id" => "prefix-metabox-id", "title" => __( "Post Info", "cmb2-tabs" ), "object_types" => array( "post", ), // Post type "tabs" => array( "contact" => array( "label" => __( "Contact", "cmb2-tabs" ), //"show_on_cb" => "yourprefix_show_if_front_page", ), "social" => array( "label" => __( "Social Media", "cmb2-tabs" ), "icon" => "dashicons-share", // Dashicon ), ), "tab_style" => "default", ) ); $cmb_demo->add_field( array( "name" => esc_html__( "Test Text Medium", "cmb2-tabs"), "desc" => esc_html__( "field description (optional)", "cmb2-tabs" ), "id" => "textmedium", "type" => "text_medium", "tab" => "contact", "render_row_cb" => array( "CMB2_Tabs", "tabs_render_row_cb" ), ) ); $cmb_demo->add_field( array( "name" => esc_html__( "Test Text Medium", "cmb2-tabs" ), "desc" => esc_html__( "field description (optional)", "cmb2-tabs" ), "id" => "textmedium2", "type" => "text_medium", "tab" => "social", "render_row_cb" => array( "CMB2_Tabs", "tabs_render_row_cb" ), ) ); ``` ### Links * [Github project page](https://github.com/stackadroit/cmb2-extensions/) * [Documentation (GitHub wiki)](https://github.com/stackadroit/cmb2-extensions/wiki) == Frequently Asked Questions == FAQ's usually end up in the [github wiki](https://github.com/stackadroit/cmb2-extensions/wiki). ### Known Issues * tabs will not work in group fields.