Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $meta_boxes[] = array(
- 'id' => 'ce_info',
- 'title' => __('CE info', 'comsi-ce'),
- 'post_types' => 'comsi_ce',
- 'context' => 'normal',
- 'priority' => 'high',
- 'fields' => array(
- // this works
- array(
- 'name' => __('Recurring start date', 'comsi-ce'),
- 'id' => 'comsi_start_date',
- 'type' => 'date',
- 'inline' => false,
- 'timestamp' => false,
- 'size' => '14',
- 'save_format' => 'Y-m-d',
- 'js_options' => array(
- 'dateFormat' => 'dd-mm-yy',
- 'showButtonPanel' => false,
- ),
- ),
- // this does not work
- // Warning: DateTime::createFromFormat() expects parameter 2 to be string, array given in /Users/ronald/Sites/ronald.local:5757/wp-content/plugins/comsi-ce/vendor/meta-box/meta-box/inc/fields/datetime.php on line 175
- array(
- 'name' => __('Recurring dates', 'comsi-ce'),
- 'id' => 'comsi_dates_recurring',
- 'type' => 'date',
- 'clone' => true, // << this is the problem
- 'clone_as_multiple' => true,
- 'inline' => false,
- 'timestamp' => false,
- 'size' => '14',
- 'save_format' => 'Y-m-d',
- 'js_options' => array(
- 'dateFormat' => 'dd-mm-yy',
- 'showButtonPanel' => false,
- ),
- ),
- )
- );
Advertisement
Add Comment
Please, Sign In to add comment