//Initiate Volunteering info meta box
    $my_meta5 = new AT_Meta_Box($config5);
    //Volunteering info fields
    $repeater_fields5[] = $my_meta5->addText($prefix . 'volunteering_title', array('name' => 'Volunteering Title '), true);
    $repeater_fields5[] = $my_meta5->addTextarea($prefix . 'volunteering_description', array('name' => 'Volunteering Description '), true);
    $repeater_fields5[] = $my_meta5->addDate($prefix . 'volunteering_fromdate', array('name' => 'Start Date '), true);
    $repeater_fields5[] = $my_meta5->addDate($prefix . 'volunteering_todate', array('name' => 'End Date ', 'desc' => 'Use "PRESENT", if you are still Volunteering'), true);
    $repeater_fields5[] = $my_meta5->addText($prefix . 'volunteering_name', array('name' => 'Volunteerers Name '), true);
    $repeater_fields5[] = $my_meta5->addText($prefix . 'volunteering_url', array('name' => 'Volunteerers Url ', 'desc' => 'Make sure to include http:// in the URL'), true);
    //Volunteering repeater block
    $my_meta5->addRepeaterBlock($prefix . 'volunteering_', array('inline' => true, 'name' => 'Enter your volunteering info', 'fields' => $repeater_fields5, 'sortable' => true));
    //Finish Volunteering info meta mox decleration
    $my_meta5->Finish();
    //Project info meta box config
    $config6 = array('id' => 'project', 'title' => 'Applied Projects', 'pages' => array('resume'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(), 'local_images' => true, 'use_with_theme' => true);
    //Initiate Project info meta box
    $my_meta6 = new AT_Meta_Box($config6);
    //Project info fields
    $repeater_fields6[] = $my_meta6->addText($prefix . 'project_title', array('name' => 'Project Title '), true);
    $repeater_fields6[] = $my_meta6->addTextarea($prefix . 'project_description', array('name' => 'Project Description '), true);
    $repeater_fields6[] = $my_meta6->addDate($prefix . 'project_fromdate', array('name' => 'Start Date '), true);
    $repeater_fields6[] = $my_meta6->addDate($prefix . 'project_todate', array('name' => 'End Date ', 'desc' => 'Use "PRESENT", if you are still Project'), true);
    $repeater_fields6[] = $my_meta6->addText($prefix . 'project_name', array('name' => 'Project Name '), true);
    $repeater_fields6[] = $my_meta6->addText($prefix . 'project_url', array('name' => 'Project Url ', 'desc' => 'Make sure to include http:// in the URL'), true);
    $repeater_fields6[] = $my_meta6->addText($prefix . 'project_blog', array('name' => 'Project Blog '), true);
    $repeater_fields6[] = $my_meta6->addText($prefix . 'project_blog_url', array('name' => 'Project Blog Url ', 'desc' => 'Make sure to include http:// in the URL'), true);
    //Project repeater block
    $my_meta6->addRepeaterBlock($prefix . 'project_', array('inline' => true, 'name' => 'Enter your project info', 'fields' => $repeater_fields6, 'sortable' => true));
    //Finish Project info meta mox decleration
    $my_meta6->Finish();
}
Beispiel #2
0
 $repeater_fields[] = $my_meta2->addTextarea($prefix . 'job_description', array('name' => 'Job Description '), true);
 $repeater_fields[] = $my_meta2->addDate($prefix . 'job_fromdate', array('name' => 'Start Date '), true);
 $repeater_fields[] = $my_meta2->addDate($prefix . 'job_todate', array('name' => 'End Date ', 'desc' => 'Use "PRESENT", if you are still employed'), true);
 $repeater_fields[] = $my_meta2->addText($prefix . 'job_employer', array('name' => 'Employer Name '), true);
 $repeater_fields[] = $my_meta2->addText($prefix . 'job_url', array('name' => 'Employer Url ', 'desc' => 'Make sure to include http:// in the URL'), true);
 //Employment repeater block
 $my_meta2->addRepeaterBlock($prefix . 'job_', array('inline' => true, 'name' => 'Enter your job info', 'fields' => $repeater_fields, 'sortable' => true));
 //Finish employment info meta mox decleration
 $my_meta2->Finish();
 //Education info meta box config
 $config3 = array('id' => 'education_info', 'title' => 'Education', 'pages' => array('resume'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(), 'local_images' => true, 'use_with_theme' => true);
 //Initiate education info meta box
 $my_meta3 = new AT_Meta_Box($config3);
 //Education info fields
 $repeater_fields1[] = $my_meta3->addText($prefix . 'edu_degree', array('name' => 'School/Degree '), true);
 $repeater_fields1[] = $my_meta3->addDate($prefix . 'edu_year', array('name' => 'Greduation Year '), true);
 //Education repeater block
 $my_meta3->addRepeaterBlock($prefix . 'edu_', array('inline' => true, 'name' => 'Enter your education info', 'fields' => $repeater_fields1, 'sortable' => true));
 //Finish education info meta mox decleration
 $my_meta3->Finish();
 //Skills info meta box config
 $config4 = array('id' => 'skills_info', 'title' => 'Skills', 'pages' => array('resume'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(), 'local_images' => true, 'use_with_theme' => true);
 //Initiate skills info meta box
 $my_meta4 = new AT_Meta_Box($config4);
 //Skills info fields
 $repeater_fields4[] = $my_meta4->addText($prefix . 'skill_name', array('name' => 'Skill Name '), true);
 $repeater_fields4[] = $my_meta4->addSelect($prefix . 'skill_level', array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10'), array('name' => 'Skill Level ', 'std' => array('2')), true);
 //Skills repeater block
 $my_meta4->addRepeaterBlock($prefix . 'skill_', array('inline' => true, 'name' => 'Enter your skill info', 'fields' => $repeater_fields4, 'sortable' => true));
 //Finish skills info meta mox decleration
 $my_meta4->Finish();
  */
 /* 
  * configure your meta box
  */
 $config2 = array('id' => 'demo_meta_box2', 'title' => 'Advanced Meta Box fields', 'pages' => array('post', 'page'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(), 'local_images' => false, 'use_with_theme' => true);
 /*
  * Initiate your 2nd meta box
  */
 $my_meta2 = new AT_Meta_Box($config2);
 /*
  * Add fields to your 2nd meta box
  */
 //add checkboxes list
 $my_meta2->addCheckboxList($prefix . 'CheckboxList_field_id', array('checkboxkey1' => 'checkbox Value1', 'checkboxkey2' => 'checkbox Value2'), array('name' => 'My checkbox list ', 'std' => array('checkboxkey2')));
 //date field
 $my_meta2->addDate($prefix . 'date_field_id', array('name' => 'My Date '));
 //Time field
 $my_meta2->addTime($prefix . 'time_field_id', array('name' => 'My Time '));
 //Color field
 $my_meta2->addColor($prefix . 'color_field_id', array('name' => 'My Color '));
 //wysiwyg field
 $my_meta2->addWysiwyg($prefix . 'wysiwyg_field_id', array('name' => 'My wysiwyg Editor '));
 //taxonomy field
 $my_meta2->addTaxonomy($prefix . 'taxonomy_field_id', array('taxonomy' => 'category'), array('name' => 'My Taxonomy '));
 //posts field
 $my_meta2->addPosts($prefix . 'posts_field_id', array('post_type' => 'post'), array('name' => 'My Posts '));
 //add Code editor field
 $my_meta2->addCode($prefix . 'code_field_id', array('name' => 'Code editor Field', 'syntax' => 'php', 'theme' => 'light'));
 /*
  * To Create a reapeater Block first create an array of fields
  * use the same functions as above but add true as a last param