-
-
Save brandondove/5e72f7497bbb01a6c1962c9d3846827e 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
<?php | |
$product_meta_box = new_cmb2_box( array( | |
'id' => 'product_meta_box', | |
'title' => __( 'Product Details', 'sample' ), | |
'object_types' => array( 'product' ), | |
'context' => 'normal', | |
'priority' => 'high', | |
'show_names' => true, | |
) ); | |
$product_meta_box->add_field( array( | |
'name' => __( 'Subheader', 'sample' ), | |
'id' => 'product-subheader', | |
'type' => 'text', | |
) ); | |
$case_study_options = array(); | |
$cast_studies = array( | |
'1' => 'Rad Case Study', | |
'2' => 'Wicked Case Study', | |
'3' => 'Cool Case Study', | |
); | |
$case_study_options['add_row_text'] = __( 'Add Case Study', 'sample' ); // Ruh Roh | |
$product_meta_box->add_field( array( | |
'name' => __( 'Case Study', 'sample' ), | |
'id' => 'prouct-case-study', | |
'type' => 'select', | |
'show_option_none' => true, | |
'repeatable' => true, | |
'options' => $case_study_options, | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment