Created
November 23, 2013 21:02
-
-
Save mantismamita/7619924 to your computer and use it in GitHub Desktop.
custom fields for hostel_mama
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add-ons | |
include_once('add-ons/acf-repeater/acf-repeater.php'); | |
include_once('add-ons/acf-gallery/acf-gallery.php'); | |
/** | |
* Register Field Groups | |
* | |
* The register_field_group function accepts 1 array which holds the relevant data to register a field group | |
* You may edit the array as you see fit. However, this may result in errors if the array is not compatible with ACF | |
*/ | |
if(function_exists("register_field_group")) | |
{ | |
register_field_group(array ( | |
'id' => 'acf_directions', | |
'title' => __('Directions', 'hostel_mama' ), | |
'fields' => array ( | |
array ( | |
'key' => 'field_525edb77a78f6', | |
'label' => __('From', 'hostel_mama' ), | |
'name' => 'from', | |
'type' => 'text', | |
'default_value' => __('Airports', 'hostel_mama' ), | |
'placeholder' => __('Airports', 'hostel_mama' ), | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 20, | |
), | |
array ( | |
'key' => 'field_525edbdca78f7', | |
'label' => __('Directions', 'hostel_mama' ), | |
'name' => 'directions', | |
'type' => 'wysiwyg', | |
'default_value' => '', | |
'toolbar' => 'full', | |
'media_upload' => 'no', | |
), | |
array ( | |
'key' => 'field_525edc44a78f8', | |
'label' => __('From 2', 'hostel_mama' ), | |
'name' => 'from2', | |
'type' => 'text', | |
'default_value' => __('Train Stations', 'hostel_mama' ), | |
'placeholder' => __('Train Stations', 'hostel_mama' ), | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 20, | |
), | |
array ( | |
'key' => 'field_525ee133a78f9', | |
'label' => __('Directions 2', 'hostel_mama' ), | |
'name' => 'directions2', | |
'type' => 'wysiwyg', | |
'default_value' => '', | |
'toolbar' => 'full', | |
'media_upload' => 'no', | |
), | |
array ( | |
'key' => 'field_525ee14ba78fa', | |
'label' => __('From 3', 'hostel_mama' ), | |
'name' => 'from3', | |
'type' => 'text', | |
'default_value' => __('Bus Stations', 'hostel_mama' ), | |
'placeholder' => __('Bus Stations', 'hostel_mama' ), | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 20, | |
), | |
array ( | |
'key' => 'field_525ee1d3a78fc', | |
'label' => __('Directions 3', 'hostel_mama' ), | |
'name' => 'directions3', | |
'type' => 'wysiwyg', | |
'default_value' => '', | |
'toolbar' => 'full', | |
'media_upload' => 'no', | |
), | |
array ( | |
'key' => 'field_525ee1b7a78fb', | |
'label' => __('From 4', 'hostel_mama' ), | |
'name' => 'from4', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 20, | |
), | |
array ( | |
'key' => 'field_525ee1e2a78fd', | |
'label' => __('Directions 4', 'hostel_mama' ), | |
'name' => 'directions4', | |
'type' => 'wysiwyg', | |
'default_value' => '', | |
'toolbar' => 'full', | |
'media_upload' => 'no', | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '8', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '153', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '154', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '396', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '398', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '399', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'normal', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
), | |
), | |
'menu_order' => 0, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_e-mail-links-2', | |
'title' => 'E-mail Links', | |
'fields' => array ( | |
array ( | |
'key' => 'field_52667870f09ac', | |
'label' => __('Group e-mail', 'hostel_mama' ), | |
'name' => 'group_e-mail', | |
'type' => 'email', | |
'instructions' => __('E-mail address for sending the Groups form', 'hostel_mama' ), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
), | |
array ( | |
'key' => 'field_526678cef09ad', | |
'label' => __('Jobs e-mail', 'hostel_mama' ), | |
'name' => 'jobs_e-mail', | |
'type' => 'email', | |
'instructions' => __('E-mail address for sending the Groups form', 'hostel_mama' ), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
), | |
array ( | |
'key' => 'field_52667905f09ae', | |
'label' => __('Queries e-mail', 'hostel_mama' ), | |
'name' => 'queries_e-mail', | |
'type' => 'email', | |
'instructions' => __('E-mail address for sending the Queries form', 'hostel_mama' ), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
), | |
array ( | |
'key' => 'field_52667952f09af', | |
'label' => __('Reservations e-mail', 'hostel_mama' ), | |
'name' => 'reservations_e-mail', | |
'type' => 'email', | |
'instructions' => __('E-mail address for sending Reservations inquiries', 'hostel_mama' ), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '12', //Contact | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '124', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '126', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '373', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '375', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '376', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'normal', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
1 => 'excerpt', | |
2 => 'custom_fields', | |
3 => 'discussion', | |
4 => 'comments', | |
5 => 'format', | |
6 => 'featured_image', | |
7 => 'categories', | |
8 => 'tags', | |
9 => 'send-trackbacks', | |
), | |
), | |
'menu_order' => 0, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_facilities', | |
'title' => 'Facilities', | |
'fields' => array ( | |
array ( | |
'key' => 'field_5256ed466c24f', | |
'label' => __('Facilities Title', 'hostel_mama' ), | |
'name' => 'facilities_title', | |
'type' => 'text', | |
'instructions' => 'The title for the list of facilities', | |
'default_value' => __('Facilities', 'hostel_mama' ), | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 20, | |
), | |
array ( | |
'key' => 'field_5256e7a48b11c', | |
'label' => __('Facilities List', 'hostel_mama' ), | |
'name' => 'facilities_list', | |
'type' => 'wysiwyg', | |
'default_value' => '', | |
'toolbar' => 'full', | |
'media_upload' => 'yes', | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '299', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '348', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '359', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '361', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '363', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '365', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'normal', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
1 => 'excerpt', | |
2 => 'custom_fields', | |
3 => 'discussion', | |
4 => 'format', | |
5 => 'featured_image', | |
6 => 'categories', | |
7 => 'send-trackbacks', | |
), | |
), | |
'menu_order' => 0, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_faq-repeater', | |
'title' => 'FAQ Repeater', | |
'fields' => array ( | |
array ( | |
'key' => 'field_5260ed5e25c18', | |
'label' => __('Question / Answer', 'hostel_mama' ), | |
'name' => 'question_answer', | |
'type' => 'repeater', | |
'sub_fields' => array ( | |
array ( | |
'key' => 'field_5260edff995bb', | |
'label' => __('Question', 'hostel_mama' ), | |
'name' => 'question', | |
'type' => 'text', | |
'column_width' => '', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_5260ee0e995bc', | |
'label' => __('Answer', 'hostel_mama' ), | |
'name' => 'answer', | |
'type' => 'textarea', | |
'column_width' => '', | |
'default_value' => '', | |
'placeholder' => '', | |
'maxlength' => '', | |
'formatting' => 'html', | |
), | |
), | |
'row_min' => 0, | |
'row_limit' => '', | |
'layout' => 'row', | |
'button_label' => __('Add Row', 'hostel_mama' ), | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '10',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '129',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
),array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '131',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
),array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '389',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
),array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '391',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
),array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '392',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'normal', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
), | |
), | |
'menu_order' => 0, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_guides', | |
'title' => 'Guides', | |
'fields' => array ( | |
array ( | |
'key' => 'field_525fc50f6f343', | |
'label' => __('Guide Title', 'hostel_mama' ), | |
'name' => 'guide_title', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 20, | |
), | |
array ( | |
'key' => 'field_525fc5626f346', | |
'label' => __('Guide Image', 'hostel_mama' ), | |
'name' => 'guide_image', | |
'type' => 'image', | |
'instructions' => 'Front cover of guidebook', | |
'save_format' => 'url', | |
'preview_size' => 'medium', | |
'library' => 'all', | |
), | |
array ( | |
'key' => 'field_5260dcae661cf', | |
'label' => __('Guide Quote', 'hostel_mama' ), | |
'name' => 'guide_quote', | |
'type' => 'textarea', | |
'default_value' => '', | |
'placeholder' => '', | |
'maxlength' => 250, | |
'formatting' => 'br', | |
), | |
array ( | |
'key' => 'field_525fc53a6f344', | |
'label' => __('Guide Title 2', 'hostel_mama' ), | |
'name' => 'guide_title_2', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 20, | |
), | |
array ( | |
'key' => 'field_525fc5b06f347', | |
'label' => __('Guide Image 2', 'hostel_mama' ), | |
'name' => 'guide_image_2', | |
'type' => 'image', | |
'save_format' => 'url', | |
'preview_size' => 'medium', | |
'library' => 'all', | |
), | |
array ( | |
'key' => 'field_5260dd25661d1', | |
'label' => __('Guide Quote 2', 'hostel_mama' ), | |
'name' => 'guide_quote_2', | |
'type' => 'textarea', | |
'default_value' => '', | |
'placeholder' => '', | |
'maxlength' => 250, | |
'formatting' => 'br', | |
), | |
array ( | |
'key' => 'field_525fc5566f345', | |
'label' => __('Guide Title 3', 'hostel_mama' ), | |
'name' => 'guide_title_3', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 20, | |
), | |
array ( | |
'key' => 'field_525fc5bd6f348', | |
'label' => __('Guide Image 3', 'hostel_mama' ), | |
'name' => 'guide_image_3', | |
'type' => 'image', | |
'save_format' => 'url', | |
'preview_size' => 'medium', | |
'library' => 'all', | |
), | |
array ( | |
'key' => 'field_5260dd43661d3', | |
'label' => __('Guide Quote 3', 'hostel_mama' ), | |
'name' => 'guide_quote_3', | |
'type' => 'textarea', | |
'default_value' => '', | |
'placeholder' => '', | |
'maxlength' => 250, | |
'formatting' => 'br', | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '33', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '367', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '162', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '369', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '408', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '407', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'normal', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
), | |
), | |
'menu_order' => 0, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_information-groups', | |
'title' => __('Information Groups', 'hostel_mama' ), | |
'fields' => array ( | |
array ( | |
'key' => 'field_525ed54789a7c', | |
'label' => __('Information Group Title', 'hostel_mama' ), | |
'name' => 'information_group_title', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_525ed60789a7d', | |
'label' => __('Information Group Text', 'hostel_mama' ), | |
'name' => 'information_group_text', | |
'type' => 'wysiwyg', | |
'default_value' => '', | |
'toolbar' => 'full', | |
'media_upload' => 'no', | |
), | |
array ( | |
'key' => 'field_525ed63389a7e', | |
'label' => __('Information Images', 'hostel_mama' ), | |
'name' => 'information_images', | |
'type' => 'gallery', | |
'instructions' => 'Upload images to be used in slider', | |
'preview_size' => 'thumbnail', | |
'library' => 'all', | |
), | |
array ( | |
'key' => 'field_525ed667990f3', | |
'label' => __('Information Group Title 2', 'hostel_mama' ), | |
'name' => 'information_group_title_2', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_525ed683990f4', | |
'label' => __('Information Group Text 2', 'hostel_mama' ), | |
'name' => 'information_group_text_2', | |
'type' => 'wysiwyg', | |
'default_value' => '', | |
'toolbar' => 'full', | |
'media_upload' => 'no', | |
), | |
array ( | |
'key' => 'field_525ed695990f5', | |
'label' => __('Information Images 2', 'hostel_mama' ), | |
'name' => 'information_images_2', | |
'type' => 'gallery', | |
'instructions' => 'Upload images to be used in slider', | |
'preview_size' => 'thumbnail', | |
'library' => 'all', | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '8', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '153', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '154', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '396', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '398', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '399', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'acf_after_title', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
), | |
), | |
'menu_order' => 0, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_introduction', | |
'title' => __('Introduction', 'hostel_mama' ), | |
'fields' => array ( | |
array ( | |
'key' => 'field_5256b5a49f0e7', | |
'label' => __('Introduction Title', 'hostel_mama' ), | |
'name' => 'introduction_title', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 50, | |
), | |
array ( | |
'key' => 'field_5256b63e9f0e8', | |
'label' => __('Introduction Content', 'hostel_mama' ), | |
'name' => 'introduction_content', | |
'type' => 'textarea', | |
'instructions' => 'Introductory paragraph on home page', | |
'default_value' => '', | |
'placeholder' => '', | |
'maxlength' => 432, | |
'formatting' => 'html', | |
), | |
array ( | |
'key' => 'field_5256eab7ea41c', | |
'label' => __('Introduction Link', 'hostel_mama' ), | |
'name' => 'introduction_link', | |
'type' => 'page_link', | |
'instructions' => 'Choose a page from the site to Link to', | |
'post_type' => array ( | |
0 => 'all', | |
), | |
'allow_null' => 0, | |
'multiple' => 0, | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '299', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '348', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '359', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '361', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '363', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '365', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'acf_after_title', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
1 => 'excerpt', | |
2 => 'custom_fields', | |
3 => 'discussion', | |
4 => 'author', | |
5 => 'format', | |
6 => 'featured_image', | |
7 => 'categories', | |
8 => 'send-trackbacks', | |
), | |
), | |
'menu_order' => 0, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_repeating-room-type', | |
'title' => __('Repeating Room Type', 'hostel_mama' ), | |
'fields' => array ( | |
array ( | |
'key' => 'field_525e7303291eb', | |
'label' => __('Repeater Room Type', 'hostel_mama' ), | |
'name' => 'repeater_room_type', | |
'type' => 'repeater', | |
'sub_fields' => array ( | |
array ( | |
'key' => 'field_525e733c291ec', | |
'label' => __('Room Type Title', 'hostel_mama' ), | |
'name' => 'room_type_title', | |
'type' => 'text', | |
'instructions' => __('Title for room type example: Single bed in 6 person mixed dorm', 'hostel_mama' ), | |
'column_width' => '', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 50, | |
), | |
array ( | |
'key' => 'field_525e73b2291ed', | |
'label' => __('Room Type Image', 'hostel_mama' ), | |
'name' => 'room_type_image', | |
'type' => 'image', | |
'instructions' => 'a photo of this room type', | |
'column_width' => '', | |
'save_format' => 'id', | |
'preview_size' => 'thumbnail', | |
'library' => 'all', | |
), | |
array ( | |
'key' => 'field_525e73f2291ee', | |
'label' => __('Room Type Description', 'hostel_mama' ), | |
'name' => 'room_type_description', | |
'type' => 'wysiwyg', | |
'instructions' => __('a list of characteristics of this room', 'hostel_mama' ), | |
'column_width' => '', | |
'default_value' => '<ul class="inside-list"> | |
<li>' . __('6 person room with bunkbeds', 'hostel_mama' ) . '</li> | |
<li>' . __('Showers and toilets ensuite', 'hostel_mama' ) . '</li> | |
<li>' . __('Sheets and towels included', 'hostel_mama' ) . '</li> | |
<li>' . __('Breakfast included', 'hostel_mama' ) . '</li> | |
<li>' . __('Free Wi-Fi', 'hostel_mama' ) . '</li> | |
<li>' . __('Free internet in the reception area', 'hostel_mama' ) . '</li> | |
<li>' . __('Luggage area and lockers in the reception area', 'hostel_mama' ) . '</li> | |
</ul>', | |
'toolbar' => 'basic', | |
'media_upload' => 'no', | |
), | |
array ( | |
'key' => 'field_525e74882ea42', | |
'label' => __('Room Type Price', 'hostel_mama' ), | |
'name' => 'room_type_price', | |
'type' => 'number', | |
'instructions' => __('The lowest price currently available for this room type', 'hostel_mama' ), | |
'column_width' => '', | |
'default_value' => 25, | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'min' => 18, | |
'max' => 500, | |
'step' => 1, | |
), | |
array ( | |
'key' => 'field_525e74db2ea43', | |
'label' => __('Room Type Category', 'hostel_mama' ), | |
'name' => 'room_type_category', | |
'type' => 'select', | |
'column_width' => '', | |
'choices' => array ( | |
'dorms' => __('dorms', 'hostel_mama' ), | |
'private' => __('private', 'hostel_mama' ), | |
'group' => __('group', 'hostel_mama' ), | |
), | |
'default_value' => 'dorms', | |
'allow_null' => 0, | |
'multiple' => 0, | |
), | |
), | |
'row_min' => 0, | |
'row_limit' => '', | |
'layout' => 'row', | |
'button_label' => __('Add Row', 'hostel_mama' ), | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '6', // Rooms | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '371', // Rooms | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '408', // Rooms | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '404', // Rooms | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '405', // Rooms | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '406', // Rooms | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'normal', | |
'layout' => 'no_box', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
), | |
), | |
'menu_order' => 0, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_review-repeater', | |
'title' =>__( 'Review Repeater', 'hostel_mama' ), | |
'fields' => array ( | |
array ( | |
'key' => 'field_5260df2d9bd9e', | |
'label' => __('Client Review', 'hostel_mama' ), | |
'name' => 'client_review', | |
'type' => 'repeater', | |
'instructions' => __('Click the + button to add another review.', 'hostel_mama' ), | |
'sub_fields' => array ( | |
array ( | |
'key' => 'field_5260df7d9bd9f', | |
'label' => __('Client Name', 'hostel_mama' ), | |
'name' => 'client_name', | |
'type' => 'text', | |
'instructions' => 'First name and last initial', | |
'column_width' => '', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_5260dfbb9bda0', | |
'label' => __('Client Country', 'hostel_mama' ), | |
'name' => 'client_country', | |
'type' => 'text', | |
'column_width' => '', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_5260e0019bda1', | |
'label' => __('Client Quote', 'hostel_mama' ), | |
'name' => 'client_quote', | |
'type' => 'textarea', | |
'column_width' => '', | |
'default_value' => '', | |
'placeholder' => '', | |
'maxlength' => '', | |
'formatting' => 'br', | |
), | |
), | |
'row_min' => 0, | |
'row_limit' => '', | |
'layout' => 'table', | |
'button_label' => __('Add Row', 'hostel_mama' ), | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '33', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '367', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '162', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '369', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '408', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '407', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'normal', | |
'layout' => 'no_box', | |
'hide_on_screen' => array ( | |
), | |
), | |
'menu_order' => 0, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_headlines', | |
'title' => __('Headlines', 'hostel_mama' ), | |
'fields' => array ( | |
array ( | |
'key' => 'field_525d3ec0bccc4', | |
'label' => __('Headline', 'hostel_mama' ), | |
'name' => 'main_headline', | |
'type' => 'text', | |
'instructions' => __('This is the first headline that will appear on the page. It is used primarily when the title is not displayed. ', 'hostel_mama' ), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_525d42fa82cfd', | |
'label' => __('Secondary Headline', 'hostel_mama' ), | |
'name' => 'secondary_headline', | |
'type' => 'text', | |
'instructions' => __('This is a second headline that appears on the page', 'hostel_mama' ), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '10',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '129',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
),array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '131',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
),array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '389',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
),array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '391',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
),array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '392',//FAQ | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '299', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '348', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '359', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '361', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '363', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '365', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '33', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '367', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '162', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '369', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '408', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '407', // Reviews | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'acf_after_title', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
1 => 'excerpt', | |
2 => 'custom_fields', | |
3 => 'discussion', | |
4 => 'format', | |
5 => 'featured_image', | |
6 => 'categories', | |
7 => 'send-trackbacks', | |
), | |
), | |
'menu_order' => 1, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_5-image-gallery', | |
'title' => __('5 Image Gallery', 'hostel_mama' ), | |
'fields' => array ( | |
array ( | |
'key' => 'field_526e73da095ee', | |
'label' => __('5 Image gallery Title', 'hostel_mama' ), | |
'name' => '5_image_gallery_title', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_525d5732d365d', | |
'label' => __('5 Image Gallery', 'hostel_mama' ), | |
'name' => '5_image_gallery', | |
'type' => 'gallery', | |
'instructions' => __('Choose five images that will be displayed on the site\'s home page', 'hostel_mama' ), | |
'preview_size' => 'medium', | |
'library' => 'all', | |
), | |
array ( | |
'key' => 'field_525e3bcca5815', | |
'label' => __('Image Gallery Link', 'hostel_mama' ), | |
'name' => 'image_gallery_link', | |
'type' => 'page_link', | |
'instructions' => __('This link is placed below the image gallery and links to another page', 'hostel_mama' ), | |
'post_type' => array ( | |
0 => 'page', | |
), | |
'allow_null' => 0, | |
'multiple' => 0, | |
), | |
array ( | |
'key' => 'field_525e3ebe5c3eb', | |
'label' => __('Image Gallery Link Text', 'hostel_mama' ), | |
'name' => 'image_gallery_link_text', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => 50, | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '299', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '348', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '359', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '361', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '363', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
array ( | |
array ( | |
'param' => 'page', | |
'operator' => '==', | |
'value' => '365', //Home | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'normal', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
0 => 'the_content', | |
1 => 'excerpt', | |
2 => 'custom_fields', | |
3 => 'discussion', | |
4 => 'format', | |
5 => 'featured_image', | |
6 => 'categories', | |
7 => 'send-trackbacks', | |
), | |
), | |
'menu_order' => 4, | |
)); | |
register_field_group(array ( | |
'id' => 'acf_v-card', | |
'title' => __('V-Card', 'hostel_mama' ), | |
'fields' => array ( | |
array ( | |
'key' => 'field_5274cedfde39e', | |
'label' => __('Name', 'hostel_mama' ), | |
'name' => 'name', | |
'type' => 'text', | |
'default_value' => __('Plug-Inn Boutique Hostel', 'hostel_mama' ), | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_5274cf4fde39f', | |
'label' => __('Address', 'hostel_mama' ), | |
'name' => 'address', | |
'type' => 'text', | |
'instructions' => __('Street address', 'hostel_mama' ), | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_5274cfbdde3a0', | |
'label' => __('Post Code', 'hostel_mama' ), | |
'name' => 'post_code', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_5274cff5de3a1', | |
'label' => __('City', 'hostel_mama' ), | |
'name' => 'city', | |
'type' => 'text', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
'formatting' => 'html', | |
'maxlength' => '', | |
), | |
array ( | |
'key' => 'field_5274d1e8de3a2', | |
'label' => __('E-mail', 'hostel_mama' ), | |
'name' => 'e-mail', | |
'type' => 'email', | |
'default_value' => '', | |
'placeholder' => '', | |
'prepend' => '', | |
'append' => '', | |
), | |
array ( | |
'key' => 'field_5274d3ff1d1b5', | |
'label' => __('Logo', 'hostel_mama' ), | |
'name' => 'logo', | |
'type' => 'image', | |
'save_format' => 'url', | |
'preview_size' => 'full', | |
'library' => 'all', | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'post_type', | |
'operator' => '==', | |
'value' => 'v-card', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'normal', | |
'layout' => 'no_box', | |
'hide_on_screen' => array ( | |
), | |
), | |
'menu_order' => 0, | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment