Пример #1
0
function write_abouts()
{
    if (!class_exists('Super_Custom_Post_Type')) {
        return;
    }
    $about_posts = new Super_Custom_Post_Type('about');
    # Test Icon. Should be a square grid.
    $about_posts->set_icon('quote-right');
    # Add a meta box with every field type
    $about_posts->add_meta_box(array('id' => 'about-fields', 'context' => 'normal', 'fields' => array('applications' => array('type' => 'wysiwyg', 'default' => ''), 'our-mission' => array('type' => 'wysiwyg', 'default' => ''), 'president-message' => array('type' => 'wysiwyg', 'default' => ''), 'goals-for-the-year' => array('type' => 'wysiwyg', 'default' => ''), 'constitution' => array('type' => 'wysiwyg', 'default' => ''))));
}
Пример #2
0
function write_organizations()
{
    if (!class_exists('Super_Custom_Post_Type')) {
        return;
    }
    $organization_posts = new Super_Custom_Post_Type('organization');
    # Test Icon. Should be a square grid.
    $organization_posts->set_icon('users');
    # Taxonomy test, should be like tags
    //    $tax_tags = new Super_Custom_Taxonomy( 'Organization Type' );
    # Taxonomy test, should be like categories
    $tax_cats = new Super_Custom_Taxonomy('organization-type', 'Organization Type', 'Organization Types', 'cat');
    # Connect both of the above taxonomies with the post type
    connect_types_and_taxes($organization_posts, array($tax_cats));
    # Add a meta box with every field type
    $organization_posts->add_meta_box(array('id' => 'organization-fields', 'context' => 'normal', 'fields' => array('contact-phone-number' => array('default' => ''), 'email' => array('default' => ''), 'facebook' => array('default' => ''), 'twitter' => array('default' => ''), 'website' => array('default' => ''), 'hide' => array('type' => 'boolean', 'default' => ''))));
}
Пример #3
0
function write_abouts()
{
    if (!class_exists('Super_Custom_Post_Type')) {
        return;
    }
    $about_posts = new Super_Custom_Post_Type('about');
    # Test Icon. Should be a square grid.
    $about_posts->set_icon('quote-right');
    # Taxonomy test, should be like tags
    $tax_tags = new Super_Custom_Taxonomy('tax-tag');
    # Taxonomy test, should be like categories
    $tax_cats = new Super_Custom_Taxonomy('tax-cat', 'Tax Cat', 'Tax Cats', 'category');
    # Connect both of the above taxonomies with the post type
    connect_types_and_taxes($about_posts, array($tax_tags, $tax_cats));
    # Add a meta box with every field type
    $about_posts->add_meta_box(array('id' => 'about-fields', 'context' => 'normal', 'fields' => array('our-mission' => array('type' => 'wysiwyg', 'default' => ''), 'president-message' => array('type' => 'wysiwyg', 'default' => ''), 'goals-for-the-year' => array('type' => 'wysiwyg', 'default' => ''), 'constitution' => array('type' => 'wysiwyg', 'default' => ''))));
}
Пример #4
0
function write_exec()
{
    if (!class_exists('Super_Custom_Post_Type')) {
        return;
    }
    $exec_posts = new Super_Custom_Post_Type('exec');
    # Test Icon. Should be a square grid.
    $exec_posts->set_icon('beer');
    # Taxonomy test, should be like tags
    $tax_tags = new Super_Custom_Taxonomy('tax-tag');
    # Taxonomy test, should be like categories
    $tax_cats = new Super_Custom_Taxonomy('tax-cat', 'Tax Cat', 'Tax Cats', 'category');
    # Connect both of the above taxonomies with the post type
    connect_types_and_taxes($exec_posts, array($tax_tags, $tax_cats));
    # Add a meta box with every field type
    $exec_posts->add_meta_box(array('id' => 'event-fields', 'context' => 'normal', 'fields' => array('position' => array('type' => 'textarea', 'default' => ''), 'major' => array('type' => 'textarea', 'default' => ''), 'year' => array('default' => ''), 'facebook' => array('default' => ''), 'twitter' => array('default' => ''), 'linkedin' => array('default' => ''), 'email' => array('default' => ''))));
}
Пример #5
0
function write_events()
{
    if (!class_exists('Super_Custom_Post_Type')) {
        return;
    }
    $event_posts = new Super_Custom_Post_Type('event');
    # Test Icon. Should be a square grid.
    $event_posts->set_icon('calendar');
    # Taxonomy test, should be like tags
    $tax_tags = new Super_Custom_Taxonomy('tax-tag');
    # Taxonomy test, should be like categories
    $tax_cats = new Super_Custom_Taxonomy('tax-cat', 'Tax Cat', 'Tax Cats', 'category');
    # Connect both of the above taxonomies with the post type
    connect_types_and_taxes($event_posts, array($tax_tags, $tax_cats));
    # Add a meta box with every field type
    $event_posts->add_meta_box(array('id' => 'event-fields', 'context' => 'normal', 'fields' => array('featured' => array('type' => 'boolean', 'default' => ''), 'facebook-link' => array('default' => ''), 'event-venue-name' => array('default' => ''), 'event-address' => array('type' => 'textarea', 'default' => ''), 'start-date' => array('type' => 'date', 'default' => ''), 'start-time' => array('default' => ''), 'end-date' => array('type' => 'date', 'default' => ''), 'end-time' => array('default' => ''), 'contact-name' => array('default' => ''), 'contact-phone-number' => array('default' => ''), 'contact-email' => array('default' => ''), 'active_event' => array('type' => 'boolean', 'default' => ''), 'participating-organizations' => array('type' => 'checkbox', 'options' => array("ASA (Asian Students Association)", "CCC (Chinese Conversation Club)", "Carolina China Network", "Chinese House", "CUSA (Chinese Undergraduate Student Association)", "FACSS (Friendship Association of Chinese Students and Scholars)", "HSAC (Hmong Student Association of Carolina)", "Japan Club", "KASA (Korean American Students Association)", "Kasama", "KASS (Korean Association of Students and Scholars)", "LiNK (Liberty in North Korea)", "Pak-Sa (Pakistani Student Association)", "RadAsians", "Sangam", "SEAIA (Southeast Asia Interest Association)", "Thai Student Association", "Taiwanese Student Association", "VSA (Vietnamese Students Association)", "Bhangra Elite", "Carolina Kendo Club", "Carolina Monkey Kung Fu", "Carolina Tai-Chi", "Chalkaa", "Ek Taal", "Flying Silk Chinese Dance Troupe", "Kamikazi Dance Crew", "Moonlight Dance Crew", "Okinawan Karate-do Goju Ryu Club", "Tar Heel Raas", "Samaa", "aKDPhi", "DPO", "KPL", "LPhiE", "PAPhi"), 'default' => ''))));
}
Пример #6
0
function write_programs()
{
    if (!class_exists('Super_Custom_Post_Type')) {
        return;
    }
    $program_posts = new Super_Custom_Post_Type('program');
    # Test Icon. Should be a square grid.
    $program_posts->set_icon('star');
    # Taxonomy test, should be like tags
    $tax_tags = new Super_Custom_Taxonomy('tax-tag');
    # Taxonomy test, should be like categories
    $tax_cats = new Super_Custom_Taxonomy('program-type', 'Program Type', 'Program Types', 'category');
    # Connect both of the above taxonomies with the post type
    connect_types_and_taxes($program_posts, array($tax_tags, $tax_cats));
    # Add a meta box with every field type
    $program_posts->add_meta_box(array('id' => 'program-fields', 'context' => 'normal', 'fields' => array('date' => array('type' => 'date', 'default' => ''), 'time' => array('default' => ''), 'facebook-link' => array('default' => ''), 'title' => array('type' => 'textarea', 'default' => ''), 'subtitle' => array('type' => 'textarea', 'default' => ''), 'program-location' => array('type' => 'textarea', 'default' => ''), 'program-location-url' => array('default' => ''), 'coordinator-name' => array('default' => ''), 'coordinator-phone-number' => array('default' => ''), 'coordinator-email' => array('default' => ''), 'coordinator-message' => array('type' => 'wysiwyg', 'default' => ''), 'program-description' => array('type' => 'wysiwyg', 'default' => ''), 'active' => array('type' => 'radio', 'options' => array('Active', 'Past'), 'default' => ''), 'all' => array('type' => 'boolean', 'default' => ''))));
}
Пример #7
0
function jtw_work()
{
    if (!class_exists('Super_Custom_Post_Type')) {
        return;
    }
    $jtw_work = new Super_Custom_Post_Type('jtw_work', 'Project', 'Work', array('capability_type' => 'page', 'rewrite' => array('slug' => 'jtw_work'), 'supports' => array('title', 'editor', 'thumbnail', 'revisions', 'page-attributes')));
    $jtw_work->set_icon('desktop');
    /*$jtw_work->add_meta_box( array(
          'id' => 'doctor-information-wrapper',
          'title' => "Basic Doctor Information",
          'fields' => array(
              'doctor-location' => array( 'type' => 'select', 'multiple' => 'multiple', 'data' => 'cmh_locations', 'class'=> 'large-text' ),
              'doctor-video-link' => array( 'type' => 'text' ),
          )
      ) );*/
    $jtw_skill = new Super_Custom_Taxonomy('jtw_skills', 'Skill', 'Skills', 'categories');
    connect_types_and_taxes($jtw_work, array($jtw_skill));
}
Пример #8
0
function scpt_ff()
{
    if (!class_exists('Super_Custom_Post_Type')) {
        return;
    }
    // Setup custom post type
    $ff_custompost = new Super_Custom_Post_Type('atom', 'Atom', 'Atomer', array('supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'post-formats')));
    $ff_custompost->set_icon('info');
}