| <?php
function wasp_localbusiness_acf(){
    if(function_exists("register_field_group"))
    {
        register_field_group(array (
            'id' => 'acf_local-business',
            'title' => 'Local Business',
            'fields' => array (
                array (
                    'key' => 'field_56f3dbbd07f08',
                    'label' => 'Welcome',
                    'name' => '',
                    'type' => 'message',
                    'message' => '<h1>Local Business Settings</h1>
        <p>These options will populate you schema.org LocalBusiness markup for discovery by search engines such as Google</p>',
                ),
                array (
                    'key' => 'field_56f2f3ee7abbf',
                    'label' => 'Address',
                    'name' => '',
                    'type' => 'tab',
                ),
                array (
                    'key' => 'field_56f2f4337abc0',
                    'label' => 'Address 1',
                    'name' => 'wasp_lb_address_1',
                    'type' => 'text',
                    'instructions' => 'Civic Address, example: "' . apply_filters('wasp_lb_default_address_1', '2050 Gottingen St.') . '"',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_address_1', '2050 Gottingen St.'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f4447abc1',
                    'label' => 'Address 2',
                    'name' => 'wasp_lb_address_2',
                    'type' => 'text',
                    'instructions' => 'Delivery Address, example: "' . apply_filters('wasp_lb_default_address_2', 'Suite 1') . '"',
                    'default_value' => apply_filters('wasp_lb_default_address_2', 'Suite 1'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f44e7abc2',
                    'label' => 'City',
                    'name' => 'wasp_lb_city',
                    'type' => 'text',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_city', 'Halifax'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f4537abc3',
                    'label' => 'Province',
                    'name' => 'wasp_lb_province',
                    'type' => 'text',
                    'instructions' => 'Two letter code, example: "' . apply_filters('wasp_lb_default_province', 'NS') . '"',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_province', 'NS'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f4bd7abc4',
                    'label' => 'Postal Code',
                    'name' => 'wasp_lb_postal_code',
                    'type' => 'text',
                    'instructions' => '6-character postal code with space between characters 3 and 4, example: "' . apply_filters('wasp_lb_default_postal_code', 'B3K 3A9') . '"',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_postal_code', 'B3K 3A9'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f5a97abc5',
                    'label' => 'Country',
                    'name' => 'wasp_lb_country',
                    'type' => 'text',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_country', 'Canada'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f5ce7abc6',
                    'label' => 'Contact',
                    'name' => '',
                    'type' => 'tab',
                ),
                array (
                    'key' => 'field_56f2f5dc7abc7',
                    'label' => 'Toll Free Phone',
                    'name' => 'wasp_lb_toll_free_phone',
                    'type' => 'text',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_toll_free_phone', '866-667-3922'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f5ea7abc8',
                    'label' => 'Local Phone',
                    'name' => 'wasp_lb_local_phone',
                    'type' => 'text',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_local_phone', '902-444-3335'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f5f37abc9',
                    'label' => 'Fax',
                    'name' => 'wasp_lb_fax',
                    'type' => 'text',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_fax', '902-555-1212'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f6107abca',
                    'label' => 'Connect Sites',
                    'name' => 'wasp_lb_connect_sites',
                    'type' => 'repeater',
                    'instructions' => 'Add links to your other web properties such as a Facebook Page, Twitter Page, or LinkedIn Page.',
                    'required' => 1,
                    'sub_fields' => array (
                        array (
                            'key' => 'field_56f2f6387abcb',
                            'label' => 'URL',
                            'name' => 'url',
                            'type' => 'text',
                            'column_width' => '',
                            'default_value' => '',
                            'placeholder' => '',
                            'prepend' => '',
                            'append' => '',
                            'formatting' => 'html',
                            'maxlength' => '',
                        ),
                    ),
                    'row_min' => '',
                    'row_limit' => '',
                    'layout' => 'table',
                    'button_label' => 'Add Row',
                ),
                array (
                    'key' => 'field_56f2f64e7abcc',
                    'label' => 'Location & Hours',
                    'name' => '',
                    'type' => 'tab',
                ),
                array (
                    'key' => 'field_56f3e57f46d7c',
                    'label' => 'Type',
                    'name' => 'wasp_lb_type',
                    'type' => 'select',
                    'required' => 1,
                    'choices' => array (
                        'LocalBusiness' => 'LocalBusiness',
                        'AnimalShelter' => 'AnimalShelter',
                        'AutomotiveBusiness' => 'AutomotiveBusiness',
                        'ChildCare' => 'ChildCare',
                        'DryCleaningOrLaundry' => 'DryCleaningOrLaundry',
                        'EmergencyService' => 'EmergencyService',
                        'EmploymentAgency' => 'EmploymentAgency',
                        'EntertainmentBusiness' => 'EntertainmentBusiness',
                        'FinancialService' => 'FinancialService',
                        'FoodEstablishment' => 'FoodEstablishment',
                        'GovernmentOffice' => 'GovernmentOffice',
                        'HealthAndBeautyBusiness' => 'HealthAndBeautyBusiness',
                        'HomeAndConstructionBusiness' => 'HomeAndConstructionBusiness',
                        'InternetCafe' => 'InternetCafe',
                        'LegalService' => 'LegalService',
                        'Library' => 'Library',
                        'LodgingBusiness' => 'LodgingBusiness',
                        'MedicalOrganization' => 'MedicalOrganization',
                        'ProfessionalService' => 'ProfessionalService',
                        'RadioStation' => 'RadioStation',
                        'RealEstateAgent' => 'RealEstateAgent',
                        'RecyclingCenter' => 'RecyclingCenter',
                        'SelfStorage' => 'SelfStorage',
                        'ShoppingCenter' => 'ShoppingCenter',
                        'SportsActivityLocation' => 'SportsActivityLocation',
                        'Store' => 'Store',
                        'TelevisionStation' => 'TelevisionStation',
                        'TouristInformationCenter' => 'TouristInformationCenter',
                        'TravelAgency' => 'TravelAgency',
                    ),
                    'default_value' => apply_filters('wasp_lb_default_type', 'LocalBusiness'),
                    'allow_null' => 0,
                    'multiple' => 0,
                ),
                array (
                    'key' => 'field_56f2f6e67abcd',
                    'label' => 'Hours',
                    'name' => 'wasp_lb_hours',
                    'type' => 'repeater',
                    'sub_fields' => array (
                        array (
                            'key' => 'field_56f2f7207abce',
                            'label' => 'Day',
                            'name' => 'day',
                            'type' => 'select',
                            'column_width' => '',
                            'choices' => array (
                                'Su' => 'Su',
                                'Mo' => 'Mo',
                                'Tu' => 'Tu',
                                'We' => 'We',
                                'Th' => 'Th',
                                'Fr' => 'Fr',
                                'Sa' => 'Sa',
                            ),
                            'default_value' => '',
                            'allow_null' => 0,
                            'multiple' => 0,
                        ),
                        array (
                            'key' => 'field_56f2f7417abcf',
                            'label' => 'Open At',
                            'name' => 'open_at',
                            'type' => 'date_time_picker',
                            'column_width' => '',
                            'show_date' => 'false',
                            'date_format' => 'm/d/y',
                            'time_format' => 'HH:mm',
                            'show_week_number' => 'false',
                            'picker' => 'slider',
                            'save_as_timestamp' => 'false',
                            'get_as_timestamp' => 'false',
                        ),
                        array (
                            'key' => 'field_56f2f78d7abd0',
                            'label' => 'Close At',
                            'name' => 'close_at',
                            'type' => 'date_time_picker',
                            'column_width' => '',
                            'show_date' => 'false',
                            'date_format' => 'm/d/y',
                            'time_format' => 'HH:mm',
                            'show_week_number' => 'false',
                            'picker' => 'slider',
                            'save_as_timestamp' => 'false',
                            'get_as_timestamp' => 'false',
                        ),
                    ),
                    'row_min' => '',
                    'row_limit' => '',
                    'layout' => 'table',
                    'button_label' => 'Add Row',
                ),
                array (
                    'key' => 'field_56f2f7c27abd1',
                    'label' => 'Latitude',
                    'name' => 'wasp_lb_latitude',
                    'type' => 'text',
                    'instructions' => 'Example: "' . apply_filters('wasp_lb_default_latitude', '44.6512401') . '"',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_latitude', '44.6512401'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f7e67abd2',
                    'label' => 'Longitude',
                    'name' => 'wasp_lb_longitude',
                    'type' => 'text',
                    'instructions' => 'Example: "' . apply_filters('wasp_lb_default_longitude', '-63.58242899999999') . '"',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_longitude', '-63.58242899999999'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f2f8127abd3',
                    'label' => 'Map URL',
                    'name' => 'wasp_lb_map_url',
                    'type' => 'text',
                    'instructions' => 'Example: "' . apply_filters('wasp_lb_default_map_url', 'https://www.google.ca/maps/place/Norex+Creative+Web+Strategies/@44.6512401,-63.5846177,17z/data=!3m1!4b1!4m2!3m1!1s0x4b5a2031e4697215:0xf5ad0c8b65e1e134') . '"',
                    'required' => 1,
                    'default_value' => apply_filters('wasp_lb_default_map_url', 'https://www.google.ca/maps/place/Norex+Creative+Web+Strategies/@44.6512401,-63.5846177,17z/data=!3m1!4b1!4m2!3m1!1s0x4b5a2031e4697215:0xf5ad0c8b65e1e134'),
                    'placeholder' => '',
                    'prepend' => '',
                    'append' => '',
                    'formatting' => 'html',
                    'maxlength' => '',
                ),
                array (
                    'key' => 'field_56f3eaaa6f915',
                    'label' => 'Logo',
                    'name' => 'wasp_lb_logo',
                    'type' => 'image',
                    'required' => 1,
                    'save_format' => 'url',
                    'preview_size' => 'thumbnail',
                    'library' => 'all',
                ),
                array (
                    'key' => 'field_56f2f83d7abd4',
                    'label' => 'Image',
                    'name' => 'wasp_lb_image',
                    'type' => 'image',
                    'required' => 1,
                    'save_format' => 'url',
                    'preview_size' => 'thumbnail',
                    'library' => 'all',
                ),
            ),
            'location' => array (
                array (
                    array (
                        'param' => 'options_page',
                        'operator' => '==',
                        'value' => 'acf-options',
                        'order_no' => 0,
                        'group_no' => 0,
                    ),
                ),
            ),
            'options' => array (
                'position' => 'normal',
                'layout' => 'no_box',
                'hide_on_screen' => array (
                ),
            ),
            'menu_order' => 0,
        ));
    }
}
 |