'basic-information', 'title' => 'Basic Information', 'object_types' => ['page'], 'show_on' => ['key' => 'page-template', 'value' => 'page-cv.php'], 'context' => 'normal', 'priority' => 'high', 'show_names' => true ]); $meta->add_field([ 'id' => ARS_CMBP . 'age', 'name' => 'Age', 'type' => 'text_small' ]); $meta->add_field([ 'id' => ARS_CMBP . 'email', 'name' => 'Email', 'type' => 'text_email' ]); $meta->add_field([ 'id' => ARS_CMBP . 'phone', 'name' => 'Phone Number', 'type' => 'text_medium' ]); $meta->add_field([ 'id' => ARS_CMBP . 'address', 'name' => 'Address', 'type' => 'textarea_small' ]); $meta->add_field([ 'id' => ARS_CMBP . 'language', 'name' => 'Language', 'type' => 'text' ]); $meta->add_field([ 'id' => ARS_CMBP . 'cv_file', 'name' => 'Curriculum Vitae', 'type' => 'file', 'text' => ['add_upload_file_text' => 'Add Curriculum Vitae'], 'query_args' => ['type' => 'application/pdf'] ]); } function ars_register_social_link() { $meta = new_cmb2_box([ 'id' => 'social-link', 'title' => 'Social Link', 'object_types' => ['page'], 'show_on' => ['key' => 'page-template', 'value' => 'page-cv.php'], 'context' => 'side', 'priority' => 'low', 'show_names' => true ]); $meta->add_field([ 'id' => ARS_CMBP . 'facebook', 'name' => 'Facebook', 'show_names' => false, 'type' => 'text_url', 'protocols' => ['http', 'https'], 'attributes' => [ 'placeholder' => 'Facebook' ] ]); $meta->add_field([ 'id' => ARS_CMBP . 'twitter', 'name' => 'Twitter', 'show_names' => false, 'type' => 'text_url', 'protocols' => ['http', 'https'], 'attributes' => [ 'placeholder' => 'Twitter' ] ]); $meta->add_field([ 'id' => ARS_CMBP . 'linkedin', 'name' => 'LinkedIn', 'show_names' => false, 'type' => 'text_url', 'protocols' => ['http', 'https'], 'attributes' => [ 'placeholder' => 'LinkedIn' ] ]); $meta->add_field([ 'id' => ARS_CMBP . 'instagram', 'name' => 'Instagram', 'show_names' => false, 'type' => 'text_url', 'protocols' => ['http', 'https'], 'attributes' => [ 'placeholder' => 'Instagram' ] ]); } function ars_register_professional_skills() { $meta = new_cmb2_box([ 'id' => 'professional-skills', 'title' => 'Professional Skills', 'object_types' => ['page'], 'show_on' => ['key' => 'page-template', 'value' => 'page-cv.php'], 'context' => 'normal', 'priority' => 'high', 'show_names' => true ]); $group = $meta->add_field([ 'id' => ARS_CMBP . 'skills', 'type' => 'group', 'options' => [ 'group_title' => __('Skill {#}', 'cmb2'), 'add_button' => __('Add Another Skill', 'cmb2'), 'remove_button' => __('Remove Skill', 'cmb2'), 'sortable' => true, 'closed' => true ] ]); $meta->add_group_field($group, [ 'id' => 'name', 'name' => 'Skill Name', 'type' => 'text', ]); $meta->add_group_field($group, [ 'id' => 'score', 'name' => 'Skill Score', 'type' => 'text_small', 'description' => 'In persentase.' ]); } function ars_register_work_experience() { $meta = new_cmb2_box([ 'id' => 'work-experience', 'title' => 'Work Experience', 'object_types' => ['page'], 'show_on' => ['key' => 'page-template', 'value' => 'page-cv.php'], 'context' => 'normal', 'priority' => 'high', 'show_names' => true ]); $group = $meta->add_field([ 'id' => ARS_CMBP . 'experience', 'type' => 'group', 'options' => [ 'group_title' => __('Experience {#}', 'cmb2'), 'add_button' => __('Add Another Experience', 'cmb2'), 'remove_button' => __('Remove Experience', 'cmb2'), 'sortable' => true, 'closed' => true ] ]); $meta->add_group_field($group, [ 'id' => 'company', 'name' => 'Company Name', 'type' => 'text', ]); $meta->add_group_field($group, [ 'id' => 'since', 'name' => 'Since', 'type' => 'text', ]); $meta->add_group_field($group, [ 'id' => 'position', 'name' => 'Position', 'type' => 'text', ]); $meta->add_group_field($group, [ 'id' => 'description', 'name' => 'Description', 'type' => 'textarea_small', ]); } function ars_register_education() { $meta = new_cmb2_box([ 'id' => 'education', 'title' => 'Education', 'object_types' => ['page'], 'show_on' => ['key' => 'page-template', 'value' => 'page-cv.php'], 'context' => 'normal', 'priority' => 'high', 'show_names' => true ]); $group = $meta->add_field([ 'id' => ARS_CMBP . 'education', 'type' => 'group', 'options' => [ 'group_title' => __('Education {#}', 'cmb2'), 'add_button' => __('Add Another Education', 'cmb2'), 'remove_button' => __('Remove Education', 'cmb2'), 'sortable' => true, 'closed' => true ] ]); $meta->add_group_field($group, [ 'id' => 'name', 'name' => 'Name', 'type' => 'text', ]); $meta->add_group_field($group, [ 'id' => 'since', 'name' => 'Since', 'type' => 'text', ]); $meta->add_group_field($group, [ 'id' => 'level', 'name' => 'Level', 'type' => 'text', ]); $meta->add_group_field($group, [ 'id' => 'departement', 'name' => 'Departement', 'type' => 'text', ]); $meta->add_group_field($group, [ 'id' => 'description', 'name' => 'Description', 'type' => 'textarea_small', ]); } function ars_register_contact_background() { $meta = new_cmb2_box([ 'id' => 'contact-background', 'title' => 'Contact Background', 'object_types' => ['page'], 'show_on' => ['key' => 'page-template', 'value' => 'page-cv.php'], 'context' => 'side', 'priority' => 'low', 'show_names' => true ]); $meta->add_field([ 'id' => ARS_CMBP . 'contact_bg', 'name' => 'Background', 'type' => 'file', 'show_names' => false, 'text' => ['add_upload_file_text' => 'Add Background'], 'query_args' => ['type' => ['image/jpeg', 'image/png']] ]); }