Last active
July 5, 2016 15:50
-
-
Save Godisgoodtoyou/bcd02ad82056b8a61321e0a2e3d807d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$group_field_id = $box->add_field( array( | |
'id' => $prefix . 'group', | |
'type' => 'group', | |
'options' => array( | |
'group_title' => ($box->title) ? $box->title : __( 'Snippet {#}', 'cmb2' ), // {#} gets replaced by row number | |
'add_button' => __( 'Add Another Snippet', 'cmb2' ), | |
'remove_button' => __( 'Remove Snippet', 'cmb2' ), | |
// 'closed' => true, | |
), | |
) ); | |
$box->add_group_field( $group_field_id, array( | |
'name' => __( 'Title', 'cmb2' ), | |
'id' => 'title', | |
'type' => 'text', | |
) ); | |
$box->add_group_field( $group_field_id, array( | |
'name' => __( 'Code', 'cmb2' ), | |
'description' => __( 'Enter the code for the snippet', 'cmb2' ), | |
'id' => 'code', | |
'type' => 'textarea_code', | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment