Files
2026-04-23 04:33:43 +03:30

47 lines
1.5 KiB
PHP

<?php
// Zoom Meeting
add_action('cmb2_admin_init', 'upstudy_zoom_meeting');
function upstudy_zoom_meeting()
{
$prefix = 'upstudy_zoom_';
$zoom_meta = new_cmb2_box( array(
'id' => $prefix . 'metabox',
'title' => __( 'Zoom Meta', 'upstudy' ),
'object_types' => array( 'zoom-meetings' ),
'context' => 'advanced',
'priority' => 'default',
'show_names' => true
) );
$zoom_meta->add_field( array(
'id' => $prefix . 'extra_meta_fields',
'type' => 'group',
'name' => __( 'Zoom Sidebar Extra Meta Information', 'upstudy' ),
'options' => array(
'group_title' => __( 'Meta Information{#}', 'upstudy' ),
'add_button' => __( 'Add Another Meta Information', 'upstudy' ),
'remove_button' => __( 'Remove Meta', 'upstudy' ),
'sortable' => true
),
'fields' => array(
array(
'name' => __( 'Meta Label', 'upstudy' ),
'id' => 'label',
'type' => 'text'
),
array(
'name' => __( 'Meta Value', 'upstudy' ),
'id' => 'value',
'type' => 'text'
),
array(
'name' => __( 'Meta Wrapper Class', 'upstudy' ),
'id' => 'wrapper_class',
'type' => 'text'
)
)
) );
}