/**
 * Variables List required for meta boxes
 *
 * @since 1.0
 */
function epl_allimport_get_meta_fields()
{
    global $epl_settings;
    $opts_property_status = apply_filters('epl_opts_property_status_filter', array('current' => __('Current', 'epl-wpimport'), 'withdrawn' => __('Withdrawn', 'epl-wpimport'), 'offmarket' => __('Off Market', 'epl-wpimport'), 'sold' => array('label' => apply_filters('epl_sold_label_status_filter', __('Sold', 'epl-wpimport')), 'exclude' => array('rental')), 'leased' => array('label' => apply_filters('epl_leased_label_status_filter', __('Leased', 'epl-wpimport')), 'include' => array('rental', 'commercial', 'commercial_land', 'business'))));
    $opts_property_authority = apply_filters('epl_property_authority_filter', array('exclusive' => __('Exclusive', 'epl-wpimport'), 'auction' => __('Auction', 'epl-wpimport'), 'multilist' => __('Multilist', 'epl-wpimport'), 'conjunctional' => __('Conjunctional', 'epl-wpimport'), 'open' => __('Open', 'epl-wpimport'), 'sale' => __('Sale', 'epl-wpimport'), 'setsale' => __('Set Sale', 'epl-wpimport')));
    $opts_property_exclusivity = apply_filters('epl_opts_property_exclusivity_filter', array('exclusive' => __('Exclusive', 'epl-wpimport'), 'open' => __('Open', 'epl-wpimport')));
    $opts_property_com_authority = apply_filters('epl_opts_property_com_authority_filter', array('Forsale' => __('For Sale', 'epl-wpimport'), 'auction' => __('Auction', 'epl-wpimport'), 'tender' => __('Tender', 'epl-wpimport'), 'eoi' => __('EOI', 'epl-wpimport'), 'Sale' => __('Sale', 'epl-wpimport'), 'offers' => __('Offers', 'epl-wpimport')));
    $opts_area_unit = apply_filters('epl_opts_area_unit_filter', array('square' => __('Square', 'epl-wpimport'), 'squareMeter' => __('Square Meter', 'epl-wpimport'), 'acre' => __('Acre', 'epl-wpimport'), 'hectare' => __('Hectare', 'epl-wpimport'), 'sqft' => __('Square Feet', 'epl-wpimport')));
    $opts_rent_period = apply_filters('epl_opts_rent_period_filter', array('day' => __('Day', 'epl-wpimport'), 'daily' => __('Daily', 'epl-wpimport'), 'week' => __('Week', 'epl-wpimport'), 'weekly' => __('Weekly', 'epl-wpimport'), 'month' => __('Month', 'epl-wpimport'), 'monthly' => __('Monthly', 'epl-wpimport')));
    $opts_property_com_listing_type = apply_filters('epl_opts_property_com_listing_type_filter', array('sale' => __('Sale', 'epl-wpimport'), 'lease' => __('Lease', 'epl-wpimport'), 'both' => __('Both', 'epl-wpimport')));
    $opts_property_com_tenancy = apply_filters('epl_opts_property_com_tenancy_filter', array('unknown' => __('Unknown', 'epl-wpimport'), 'vacant' => __('Vacant', 'epl-wpimport'), 'tenanted' => __('Tenanted', 'epl-wpimport')));
    $opts_property_com_property_extent = apply_filters('epl_opts_property_com_property_extent_filter', array('whole' => __('Whole', 'epl-wpimport'), 'part' => __('Part', 'epl-wpimport')));
    global $epl_allimport_meta_boxes;
    $epl_allimport_meta_boxes = array(array('id' => 'epl-property-listing-section-id', 'label' => __('Listing Details', 'epl-wpimport'), 'post_type' => array('property', 'rural', 'rental', 'land', 'commercial', 'commercial_land', 'business'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'property_heading', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_heading', 'label' => __('Heading', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '200'))), array('id' => 'listing_agents', 'columns' => '1', 'label' => __('Listing Agent(s)', 'epl-wpimport'), 'fields' => array(array('name' => 'property_office_id', 'label' => __('Office ID', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_agent', 'label' => __('Listing Agent', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_second_agent', 'label' => __('Second Listing Agent', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40', 'help' => __('Search for secondary agent.', 'epl-wpimport')), array('name' => 'property_agent_hide_author_box', 'label' => __('Hide Author Box', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Hide Author Box', 'epl-wpimport'))))), array('id' => 'listing_type', 'columns' => '2', 'label' => __('Listing Type', 'epl-wpimport'), 'fields' => array(array('name' => 'property_status', 'label' => __('Property Status', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_property_status), array('name' => 'property_list_date', 'label' => __('Date Listed', 'epl-wpimport'), 'type' => 'date', 'maxlength' => '100'), array('name' => 'property_authority', 'label' => __('Authority', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_property_authority, 'exclude' => array('rental', 'commercial', 'commercial_land')), array('name' => 'property_category', 'label' => __('House Category', 'epl-wpimport'), 'type' => 'select', 'opts' => epl_listing_load_meta_property_category(), 'exclude' => array('land', 'commercial', 'commercial_land', 'business', 'rural')), array('name' => 'property_rural_category', 'label' => __('Rural Category', 'epl-wpimport'), 'type' => 'select', 'opts' => epl_listing_load_meta_rural_category(), 'include' => array('rural')), array('name' => 'property_unique_id', 'label' => __('Unique ID', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_mod_date', 'label' => __('XML Importer Mod Date', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '60'), array('name' => 'property_images_mod_date', 'label' => '', 'type' => 'hidden', 'maxlength' => '60'), array('name' => 'property_com_authority', 'label' => __('Commercial Authority', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_property_com_authority, 'include' => array('commercial', 'commercial_land', 'business')), array('name' => 'property_com_exclusivity', 'label' => __('Exclusivity', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_property_exclusivity, 'include' => array('commercial', 'commercial_land', 'business')), array('name' => 'property_com_listing_type', 'label' => __('Commercial Listing Type', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_property_com_listing_type, 'include' => array('commercial', 'commercial_land', 'business')), array('name' => 'property_commercial_category', 'label' => __('Commercial Category', 'epl-wpimport'), 'type' => 'select', 'opts' => epl_listing_load_meta_commercial_category(), 'include' => array('commercial', 'commercial_land')))), array('id' => 'display_details', 'columns' => '2', 'label' => __('Display Details', 'epl-wpimport'), 'fields' => array(array('name' => 'property_featured', 'label' => __('Featured', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_inspection_times', 'label' => __('Inspection Times ( one per line )', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '500'))))), array('id' => 'epl-features-section-id', 'label' => __('Listing Features', 'epl-wpimport'), 'post_type' => array('property', 'rural', 'rental'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'house_features', 'columns' => '2', 'label' => __('House Features', 'epl-wpimport'), 'fields' => array(array('name' => 'property_bedrooms', 'label' => __('Bedrooms', 'epl-wpimport'), 'type' => 'text', 'class' => 'validate[custom[bedroom]]'), array('name' => 'property_bathrooms', 'label' => __('Bathrooms', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '4'), array('name' => 'property_rooms', 'label' => __('Rooms', 'epl-wpimport'), 'type' => 'number', 'maxlength' => '3'), array('name' => 'property_ensuite', 'label' => __('Ensuite', 'epl-wpimport'), 'type' => 'number', 'maxlength' => '2'), array('name' => 'property_toilet', 'label' => __('Toilet', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '4'), array('name' => 'property_garage', 'label' => __('Garage', 'epl-wpimport'), 'type' => 'number', 'maxlength' => '2'), array('name' => 'property_carport', 'label' => __('Carport', 'epl-wpimport'), 'type' => 'number', 'maxlength' => '2'), array('name' => 'property_open_spaces', 'label' => __('Open Spaces', 'epl-wpimport'), 'type' => 'number', 'maxlength' => '2'), array('name' => 'property_year_built', 'label' => __('Year Built', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '4'), array('name' => 'property_new_construction', 'label' => __('New Construction', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport')), 'include' => array('property', 'rental')), array('name' => 'property_pool', 'label' => __('Pool', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_air_conditioning', 'label' => __('Air Conditioning', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_security_system', 'label' => __('Security System', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_pet_friendly', 'label' => __('Pet Friendly', 'epl-wpimport'), 'type' => 'radio', 'include' => array('rental'), 'opts' => array('yes' => __('Yes', 'epl-wpimport'))))), array('id' => 'land_details', 'columns' => '2', 'label' => __('Land Details', 'epl-wpimport'), 'fields' => array(array('name' => 'property_land_area', 'label' => __('Land Area', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_land_area_unit', 'label' => __('Land Unit', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_area_unit), array('name' => 'property_building_area', 'label' => __('Building Area', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_building_area_unit', 'label' => __('Building Unit', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_area_unit), array('name' => 'property_land_fully_fenced', 'label' => __('Fully Fenced', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))))))), array('id' => 'epl-additional-features-section-id', 'label' => __('Additional Features', 'epl-wpimport'), 'post_type' => array('property', 'rural', 'rental'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'internal', 'columns' => '3', 'label' => __('Internal', 'epl-wpimport'), 'fields' => array(array('name' => 'property_remote_garage', 'label' => __('Remote Garage', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_secure_parking', 'label' => __('Secure Parking', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_study', 'label' => __('Study', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_dishwasher', 'label' => __('Dishwasher', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_built_in_robes', 'label' => __('Built In Robes', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_gym', 'label' => __('Gym', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_workshop', 'label' => __('Workshop', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_rumpus_room', 'label' => __('Rumpus Room', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_floor_boards', 'label' => __('Floor Boards', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_broadband', 'label' => __('Broadband', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_pay_tv', 'label' => __('Pay TV', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_vacuum_system', 'label' => __('Vacuum System', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_intercom', 'label' => __('Intercom', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_spa', 'label' => __('Spa', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))))), array('id' => 'external', 'columns' => '3', 'label' => __('External', 'epl-wpimport'), 'fields' => array(array('name' => 'property_tennis_court', 'label' => __('Tennis Court', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_balcony', 'label' => __('Balcony', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_deck', 'label' => __('Deck', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_courtyard', 'label' => __('Courtyard', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_outdoor_entertaining', 'label' => __('Outdoor Entertaining', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_shed', 'label' => __('Shed', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))))), array('id' => 'heating_cooling', 'columns' => '3', 'label' => __('Heating & Cooling', 'epl-wpimport'), 'fields' => array(array('name' => 'property_ducted_heating', 'label' => __('Ducted Heating', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_ducted_cooling', 'label' => __('Ducted Cooling', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_split_system_heating', 'label' => __('Split System Heating', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_hydronic_heating', 'label' => __('Hydronic Heating', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_split_system_aircon', 'label' => __('Split System Aircon', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_gas_heating', 'label' => __('Gas Heating', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_reverse_cycle_aircon', 'label' => __('Reverse Cycle Aircon', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_evaporative_cooling', 'label' => __('Evaporative Cooling', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_open_fire_place', 'label' => __('Open Fire Place', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))))))), array('id' => 'epl-features-section-id-single-column', 'label' => __('Land Details', 'epl-wpimport'), 'post_type' => array('land', 'commercial', 'business'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'land_details', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_land_area', 'label' => __('Land Area', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_land_area_unit', 'label' => __('Land Unit', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_area_unit), array('name' => 'property_building_area', 'label' => __('Building Area', 'epl-wpimport'), 'type' => 'number', 'include' => array('commercial', 'business'), 'maxlength' => '40'), array('name' => 'property_building_area_unit', 'label' => __('Building Unit', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_area_unit, 'include' => array('commercial', 'business')), array('name' => 'property_land_category', 'label' => __('Land Category', 'epl-wpimport'), 'type' => 'select', 'opts' => epl_listing_load_meta_land_category(), 'include' => array('land')), array('name' => 'property_land_fully_fenced', 'label' => __('Fully Fenced', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport')), 'include' => array('land')))))), array('id' => 'epl-property-address-section-id', 'label' => __('Property Address', 'epl-wpimport'), 'post_type' => array('property', 'rural', 'rental', 'commercial', 'commercial_land', 'business', 'land', 'contact_listing'), 'context' => 'side', 'priority' => 'core', 'groups' => array(apply_filters('epl_listing_meta_address_block', array('id' => 'address_block', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_address_display', 'label' => __('Display Street Address?', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_address_lot_number', 'label' => __('Lot', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40', 'include' => array('land', 'commercial_land')), array('name' => 'property_address_sub_number', 'label' => __('Unit', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40', 'exclude' => array('land', 'commercial_land')), array('name' => 'property_address_street_number', 'label' => __('Street Number', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_address_street', 'label' => __('Street Name', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '80'), array('name' => 'property_address_suburb', 'label' => epl_labels('label_suburb'), 'type' => 'text', 'maxlength' => '80'), array('name' => 'property_com_display_suburb', 'label' => __('Display', 'epl-wpimport') . ' ' . epl_labels('label_suburb'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport')), 'include' => array('commercial', 'commercial_land', 'business')), isset($epl_settings['epl_enable_city_field']) && $epl_settings['epl_enable_city_field'] == 'yes' ? array('name' => 'property_address_city', 'label' => epl_labels('label_city'), 'type' => 'text', 'maxlength' => '80') : array(), array('name' => 'property_address_state', 'label' => epl_labels('label_state'), 'type' => 'text', 'maxlength' => '80'), array('name' => 'property_address_postal_code', 'label' => epl_labels('label_postcode'), 'type' => 'text', 'maxlength' => '30'), array('name' => 'property_address_country', 'label' => __('Country', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_address_coordinates', 'label' => __('Coordinates', 'epl-wpimport'), 'type' => 'text', 'help' => __('Drag the pin to manually set listing coordinates', 'epl-wpimport'), 'geocoder' => 'true', 'maxlength' => '40'), array('name' => 'property_address_hide_map', 'label' => __('Hide Map', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport')))))))), array('id' => 'epl-pricing-section-id', 'label' => __('Pricing', 'epl-wpimport'), 'post_type' => array('property', 'rural', 'commercial', 'commercial_land', 'business', 'land'), 'context' => 'side', 'priority' => 'core', 'groups' => array(array('id' => 'pricing', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_price', 'label' => __('Search Price', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_price_view', 'label' => __('Price Text', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_auction', 'label' => __('Auction Date', 'epl-wpimport'), 'type' => 'auction-date', 'maxlength' => '100'), array('name' => 'property_price_display', 'label' => __('Display Price?', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_under_offer', 'label' => epl_meta_under_offer_label(), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_is_home_land_package', 'label' => __('House and Land Package', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport')), 'exclude' => array('land', 'rural', 'commercial', 'commercial_land', 'business')))), array('id' => 'sale_details', 'columns' => '1', 'label' => __('Sale Details', 'epl-wpimport'), 'fields' => array(array('name' => 'property_sold_price', 'label' => __('Sale Price', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_sold_date', 'label' => __('Sale Date', 'epl-wpimport'), 'type' => 'sold-date', 'maxlength' => '100'), array('name' => 'property_sold_price_display', 'label' => __('Display Sale Price', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))))))), array('id' => 'epl-property-rent-id', 'label' => __('Rental Pricing', 'epl-wpimport'), 'post_type' => array('rental'), 'context' => 'side', 'priority' => 'core', 'groups' => array(array('id' => 'rental_pricing', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_rent', 'label' => __('Rent Amount', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_rent_period', 'label' => __('Rent Period', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_rent_period), array('name' => 'property_rent_view', 'label' => __('Rent Text', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_rent_display', 'label' => __('Display Rent?', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_bond', 'label' => epl_labels('label_bond'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_date_available', 'label' => __('Date Available', 'epl-wpimport'), 'type' => 'date', 'maxlength' => '100'), array('name' => 'property_furnished', 'label' => __('Furnished', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))), array('name' => 'property_holiday_rental', 'label' => __('Holiday Rental', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport')), 'exclude' => array('rental')))))), array('id' => 'epl-rural-features-id', 'label' => __('Rural Features', 'epl-wpimport'), 'post_type' => array('rural'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'rural_features', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_rural_fencing', 'label' => __('Fencing', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_annual_rainfall', 'label' => __('Annual Rainfall', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_soil_types', 'label' => __('Soil Types', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_improvements', 'label' => __('Improvements', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_council_rates', 'label' => __('Council Rates', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_irrigation', 'label' => __('Irrigation', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_carrying_capacity', 'label' => __('Carrying Capacity', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_services', 'label' => __('Services', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '65535'))))), array('id' => 'epl-commercial-leasing-id', 'label' => __('Leasing', 'epl-wpimport'), 'post_type' => array('commercial', 'commercial_land', 'business'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'commercial_leasing', 'columns' => '2', 'label' => '', 'fields' => array(array('name' => 'property_com_rent', 'label' => __('Commercial Rent', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40', 'help' => __('Price Text in Pricing box over-rides displayed price', 'epl-wpimport')), array('name' => 'property_com_rent_period', 'label' => __('Lease Period', 'epl-wpimport'), 'type' => 'select', 'opts' => epl_listing_load_meta_commercial_rent_period()), array('name' => 'property_com_rent_range_min', 'label' => __('Rent Range Min', 'epl-wpimport'), 'type' => 'number', 'maxlength' => '40'), array('name' => 'property_com_rent_range_max', 'label' => __('Rent Range Max', 'epl-wpimport'), 'type' => 'number', 'maxlength' => '40'), array('name' => 'property_com_lease_end_date', 'label' => __('Lease End Date', 'epl-wpimport'), 'type' => 'date', 'maxlength' => '100'), array('name' => 'property_com_property_extent', 'label' => __('Property Extent', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_property_com_property_extent))), array('id' => 'tenant_n_outgoings', 'columns' => '2', 'label' => '', 'fields' => array(array('name' => 'property_com_tenancy', 'label' => __('Tenant Status', 'epl-wpimport'), 'type' => 'select', 'opts' => $opts_property_com_tenancy, 'include' => array('commercial')), array('name' => 'property_com_outgoings', 'label' => __('Commercial Outgoings', 'epl-wpimport'), 'type' => 'number', 'maxlength' => '40', 'exclude' => array('business')), array('name' => 'property_com_plus_outgoings', 'label' => __('Plus Outgoings', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport')), 'exclude' => array('business')), array('name' => 'property_bus_takings', 'label' => __('Takings', 'epl-wpimport'), 'type' => 'number', 'maxlength' => '40', 'include' => array('business')), array('name' => 'property_bus_franchise', 'label' => __('Franchise', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport')), 'include' => array('business')), array('name' => 'property_com_return', 'label' => __('Return', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '6'), array('name' => 'property_bus_terms', 'label' => __('Terms', 'epl-wpimport'), 'type' => 'textarea'))))), array('id' => 'epl-commercial-features-id', 'label' => __('Commercial Features', 'epl-wpimport'), 'post_type' => array('commercial'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'commerial_features', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_com_further_options', 'label' => __('Further Options', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_com_zone', 'label' => __('Zone', 'epl-wpimport'), 'type' => 'textarea', 'maxlength' => '150'), array('name' => 'property_com_car_spaces', 'label' => __('Car Spaces', 'epl-wpimport'), 'type' => 'number', 'type' => 'textarea', 'maxlength' => '5'), array('name' => 'property_com_highlight_1', 'label' => __('Highlight 1', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_com_highlight_2', 'label' => __('Highlight 2', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_com_highlight_3', 'label' => __('Highlight 3', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_com_parking_comments', 'label' => __('Parking Comments', 'epl-wpimport'), 'type' => 'text', 'maxlength' => '150'), array('name' => 'property_com_is_multiple', 'label' => __('Is Multiple', 'epl-wpimport'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl-wpimport'))))))), array('id' => 'epl-business-features-id', 'label' => __('Business Categories', 'epl-wpimport'), 'post_type' => array('business'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'business_categories', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_bus_category', 'label' => __('Business Category', 'epl-wpimport'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing')), array('name' => 'property_bus_sub_category', 'label' => __('Business Sub Category', 'epl-wpimport'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing', 'parent' => 'property_bus_category')), array('name' => 'property_bus_category_2', 'label' => __('Business Category 2', 'epl-wpimport'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing')), array('name' => 'property_bus_sub_category_2', 'label' => __('Business Sub Category 2', 'epl-wpimport'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing', 'parent' => 'property_bus_category_2')), array('name' => 'property_bus_category_3', 'label' => __('Business Category 3', 'epl-wpimport'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing')), array('name' => 'property_bus_sub_category_3', 'label' => __('Business Sub Category 3', 'epl-wpimport'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing', 'parent' => 'property_bus_category_3')))))), array('id' => 'epl-attachments-section-id', 'label' => __('Files and Links', 'epl-wpimport'), 'post_type' => array('property', 'rural', 'commercial', 'commercial_land', 'business', 'rental', 'land'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'filen_n_links', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_video_url', 'label' => __('Video URL', 'epl-wpimport'), 'type' => 'url'), array('name' => 'property_floorplan', 'label' => __('Floorplan', 'epl-wpimport'), 'type' => 'url'), array('name' => 'property_floorplan_2', 'label' => __('Floorplan 2', 'epl-wpimport'), 'type' => 'url'), array('name' => 'property_external_link', 'label' => __('External Link', 'epl-wpimport'), 'type' => 'url'), array('name' => 'property_external_link_2', 'label' => __('External Link 2', 'epl-wpimport'), 'type' => 'url'), array('name' => 'property_external_link_3', 'label' => __('External Link 3', 'epl-wpimport'), 'type' => 'url', 'include' => array('commercial', 'business', 'commercial_land')), array('name' => 'property_com_mini_web', 'label' => __('Mini Website URL', 'epl-wpimport'), 'type' => 'url', 'include' => array('commercial', 'business', 'commercial_land')), array('name' => 'property_com_mini_web_2', 'label' => __('Mini Website URL 2', 'epl-wpimport'), 'type' => 'url', 'include' => array('commercial', 'business', 'commercial_land')), array('name' => 'property_com_mini_web_3', 'label' => __('Mini Website URL 3', 'epl-wpimport'), 'type' => 'url', 'include' => array('commercial', 'business', 'commercial_land')))))), array('id' => 'epl-owner-listings-section-id', 'label' => __('Linked Contact', 'epl-wpimport'), 'post_type' => array('property', 'rural', 'commercial', 'commercial_land', 'business', 'rental', 'land'), 'context' => 'side', 'priority' => 'default', 'groups' => array(array('id' => 'owner_details', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_owner', 'label' => __('Contact ID', 'epl-wpimport'), 'type' => 'text', 'help' => __('Search for contact and update to save.', 'epl-wpimport')))))));
    if (!empty($epl_allimport_meta_boxes)) {
        foreach ($epl_allimport_meta_boxes as &$epl_meta_box) {
            $meta_box_block_id = str_replace("-", "_", $epl_meta_box['id']);
            $epl_meta_box = apply_filters('epl_meta_box_block_' . $meta_box_block_id, $epl_meta_box);
            if (!empty($epl_meta_box['groups'])) {
                foreach ($epl_meta_box['groups'] as &$group) {
                    $group = apply_filters('epl_meta_groups_' . $group['id'], $group);
                    if (!empty($group['fields'])) {
                        $group['fields'] = array_filter($group['fields']);
                        foreach ($group['fields'] as &$fieldvalue) {
                            $fieldvalue = apply_filters('epl_meta_' . $fieldvalue['name'], $fieldvalue);
                        }
                    }
                }
            }
        }
        return $epl_allimport_meta_boxes = apply_filters('epl_listing_meta_boxes', $epl_allimport_meta_boxes);
    }
}
/**
 * search widget form fields for search widget - frontend 
 * @since 2.2
 */
function epl_search_widget_fields_frontend($post_type = '', $property_status = '')
{
    if ($post_type == 'rental' || $post_type == 'holiday_rental') {
        $price_array = array_combine(range(50, 5000, 50), array_map('epl_currency_formatted_amount', range(50, 5000, 50)));
        $price_array = apply_filters('epl_listing_search_price_rental', $price_array);
    } else {
        $price_array = array_combine(range(50000, 10000000, 50000), array_map('epl_currency_formatted_amount', range(50000, 10000000, 50000)));
        $price_array = apply_filters('epl_listing_search_price_sale', $price_array);
    }
    if (isset($post_type) && ($post_type == 'rental' || $post_type == 'holiday_rental')) {
        $price_meta_key = 'property_rent';
    } else {
        $price_meta_key = 'property_price';
    }
    $fields = apply_filters('epl_search_widget_fields_frontend', array(array('key' => 'post_type', 'meta_key' => 'post_type', 'type' => 'hidden'), array('key' => 'property_status', 'meta_key' => 'property_status', 'type' => 'hidden', 'query' => array('query' => 'meta')), array('key' => 'search_id', 'meta_key' => 'property_id', 'label' => __('Search by Property ID / Address', 'epl'), 'type' => 'text', 'class' => 'epl-search-row-full', 'query' => array('query' => 'meta', 'key' => 'property_unique_id')), array('key' => 'search_location', 'meta_key' => 'property_location', 'label' => epl_tax_location_label(), 'type' => 'select', 'option_filter' => 'location', 'options' => epl_get_available_locations($post_type, $property_status), 'query' => array('query' => 'tax'), 'class' => 'epl-search-row-full'), array('key' => 'search_city', 'meta_key' => 'property_address_city', 'label' => epl_labels('label_city'), 'type' => 'select', 'option_filter' => 'city', 'options' => epl_get_unique_post_meta_values('property_address_city', $post_type), 'query' => array('query' => 'meta'), 'class' => 'epl-search-row-half'), array('key' => 'search_state', 'meta_key' => 'property_address_state', 'label' => epl_labels('label_state'), 'type' => 'select', 'option_filter' => 'state', 'options' => epl_get_unique_post_meta_values('property_address_state', $post_type), 'query' => array('query' => 'meta'), 'class' => 'epl-search-row-half'), array('key' => 'search_postcode', 'meta_key' => 'property_address_postal_code', 'label' => epl_labels('label_postcode'), 'type' => 'select', 'option_filter' => 'postcode', 'options' => epl_get_unique_post_meta_values('property_address_postal_code', $post_type), 'query' => array('query' => 'meta'), 'class' => 'epl-search-row-half'), array('key' => 'search_country', 'meta_key' => 'property_address_country', 'label' => __('Country', 'epl'), 'type' => 'select', 'option_filter' => 'country', 'options' => epl_get_unique_post_meta_values('property_address_country', $post_type), 'query' => array('query' => 'meta'), 'class' => 'epl-search-row-half'), array('key' => 'search_house_category', 'meta_key' => 'property_category', 'label' => __('House Category', 'epl'), 'option_filter' => 'category', 'options' => epl_get_meta_values('property_category', $post_type), 'type' => 'select', 'query' => array('query' => 'meta'), 'class' => 'epl-search-row-full', 'exclude' => array('rural', 'land', 'commercial', 'commercial_land', 'business')), array('key' => 'search_house_category', 'meta_key' => 'property_rural_category', 'label' => __('Rural Category', 'epl'), 'option_filter' => 'category', 'options' => epl_get_meta_values('property_rural_category', $post_type), 'type' => 'select', 'query' => array('query' => 'meta'), 'class' => 'epl-search-row-full', 'exclude' => array('property', 'rental', 'land', 'commercial', 'commercial_land', 'business')), array('key' => 'search_house_category', 'meta_key' => 'property_land_category', 'label' => __('Land Category', 'epl'), 'option_filter' => 'category', 'options' => epl_get_meta_values('property_land_category', $post_type), 'type' => 'select', 'query' => array('query' => 'meta'), 'class' => 'epl-search-row-full', 'exclude' => array('property', 'rental', 'rural', 'commercial', 'commercial_land', 'business')), array('key' => 'search_house_category', 'meta_key' => 'property_commercial_category', 'label' => __('Commercial Category', 'epl'), 'option_filter' => 'category', 'options' => epl_get_meta_values('property_commercial_category', $post_type), 'type' => 'select', 'query' => array('query' => 'meta'), 'class' => 'epl-search-row-full', 'exclude' => array('property', 'rental', 'land', 'rural', 'business')), array('key' => 'search_house_category', 'meta_key' => 'property_business_category', 'label' => __('Business Category', 'epl'), 'option_filter' => 'category', 'options' => epl_get_meta_values('property_business_category', $post_type), 'type' => 'select', 'query' => array('query' => 'meta'), 'class' => 'epl-search-row-full', 'exclude' => array('property', 'rental', 'land', 'rural', 'commercial', 'commercial_land')), array('key' => 'search_price', 'meta_key' => 'property_price_from', 'label' => __('Price From', 'epl'), 'type' => 'select', 'option_filter' => 'price_from', 'options' => $price_array, 'type' => 'select', 'query' => array('query' => 'meta', 'key' => $price_meta_key, 'type' => 'numeric', 'compare' => '>='), 'class' => 'epl-search-row-half'), array('key' => 'search_price', 'meta_key' => 'property_price_to', 'label' => __('Price To', 'epl'), 'type' => 'select', 'option_filter' => 'price_to', 'options' => $price_array, 'type' => 'select', 'query' => array('query' => 'meta', 'key' => $price_meta_key, 'type' => 'numeric', 'compare' => '<='), 'class' => 'epl-search-row-half'), array('key' => 'search_bed', 'meta_key' => 'property_bedrooms_min', 'label' => __('Bedrooms Min', 'epl'), 'option_filter' => 'bedrooms_min', 'options' => apply_filters('epl_listing_search_bed_select_min', array_combine(range(1, 10), array_map('epl_number_suffix_callback', range(1, 10)))), 'type' => 'select', 'exclude' => array('land', 'commercial', 'commercial_land', 'business'), 'query' => array('query' => 'meta', 'key' => 'property_bedrooms', 'type' => 'numeric', 'compare' => '>='), 'class' => 'epl-search-row-half'), array('key' => 'search_bed', 'meta_key' => 'property_bedrooms_max', 'label' => __('Bedrooms Max', 'epl'), 'option_filter' => 'bedrooms_max', 'options' => apply_filters('epl_listing_search_bed_select_max', array_combine(range(1, 10), array_map('epl_number_suffix_callback', range(1, 10)))), 'type' => 'select', 'exclude' => array('land', 'commercial', 'commercial_land', 'business'), 'query' => array('query' => 'meta', 'key' => 'property_bedrooms', 'type' => 'numeric', 'compare' => '<='), 'class' => 'epl-search-row-half'), array('key' => 'search_bath', 'meta_key' => 'property_bathrooms', 'label' => __('Bathrooms', 'epl'), 'option_filter' => 'bathrooms', 'options' => apply_filters('epl_listing_search_bath_select', array_combine(range(1, 3), array_map('epl_number_suffix_callback', range(1, 3)))), 'type' => 'select', 'exclude' => array('land', 'commercial', 'commercial_land', 'business'), 'query' => array('query' => 'meta', 'type' => 'numeric', 'compare' => '>='), 'class' => 'epl-search-row-half'), array('key' => 'search_rooms', 'meta_key' => 'property_rooms', 'label' => __('Rooms', 'epl'), 'option_filter' => 'rooms', 'options' => apply_filters('epl_listing_search_room_select', array_combine(range(1, 3), array_map('epl_number_suffix_callback', range(1, 3)))), 'type' => 'select', 'exclude' => array('land', 'commercial', 'commercial_land', 'business'), 'query' => array('query' => 'meta', 'type' => 'numeric', 'compare' => '>='), 'class' => 'epl-search-row-half'), array('key' => 'search_car', 'meta_key' => 'property_carport', 'label' => __('Car Spaces', 'epl'), 'option_filter' => 'carport', 'options' => apply_filters('epl_listing_search_parking_select', array_combine(range(1, 3), array_map('epl_number_suffix_callback', range(1, 3)))), 'type' => 'select', 'class' => 'epl-search-row-half', 'exclude' => array('land', 'commercial', 'commercial_land', 'business'), 'query' => array('multiple' => true, 'query' => 'meta', 'relation' => 'OR', 'sub_queries' => array(array('key' => 'property_carport', 'type' => 'numeric', 'compare' => '>='), array('key' => 'property_garage', 'type' => 'numeric', 'compare' => '>=')))), array('key' => 'search_land_area', 'meta_key' => 'property_land_area_min', 'label' => __('Land Min', 'epl'), 'type' => has_filter('epl_property_land_area_min') ? apply_filters('epl_property_land_area_min', '') : 'number', 'query' => array('query' => 'meta', 'type' => 'numeric', 'compare' => '>=', 'key' => 'property_land_area'), 'class' => 'epl-search-row-third', 'wrap_start' => 'epl-search-row epl-search-land-area'), array('key' => 'search_land_area', 'meta_key' => 'property_land_area_max', 'label' => __('Land Max', 'epl'), 'class' => 'epl-search-row-third', 'type' => has_filter('epl_property_land_area_max') ? apply_filters('epl_property_land_area_max', '') : 'number', 'query' => array('query' => 'meta', 'type' => 'numeric', 'compare' => '<=', 'key' => 'property_land_area')), array('key' => 'search_land_area', 'meta_key' => 'property_land_area_unit', 'label' => __('Area Unit', 'epl'), 'class' => 'epl-search-row-third', 'type' => 'select', 'option_filter' => 'land_area_unit', 'options' => apply_filters('epl_listing_search_land_unit_label', array('square' => 'Square', 'squareMeter' => 'Square Meter', 'acre' => 'Acre', 'hectare' => 'Hectare', 'sqft' => 'Square Feet')), 'query' => array('query' => 'meta'), 'wrap_end' => true), array('key' => 'search_building_area', 'meta_key' => 'property_building_area_min', 'label' => __('Building Min', 'epl'), 'class' => 'epl-search-row-third', 'type' => has_filter('epl_property_building_area_min') ? apply_filters('epl_property_building_area_min', '') : 'number', 'exclude' => array('land'), 'query' => array('query' => 'meta', 'type' => 'numeric', 'compare' => '>=', 'key' => 'property_building_area'), 'wrap_start' => 'epl-search-row epl-search-building-area'), array('key' => 'search_building_area', 'meta_key' => 'property_building_area_max', 'label' => __('Building Max', 'epl'), 'class' => 'epl-search-row-third', 'type' => has_filter('epl_property_building_area_max') ? apply_filters('epl_property_building_area_max', '') : 'number', 'exclude' => array('land'), 'query' => array('query' => 'meta', 'type' => 'numeric', 'compare' => '<=', 'key' => 'property_building_area')), array('key' => 'search_building_area', 'meta_key' => 'property_building_area_unit', 'label' => __('Area Unit', 'epl'), 'class' => 'epl-search-row-third', 'type' => 'select', 'option_filter' => 'building_area_unit', 'options' => apply_filters('epl_listing_search_building_unit_label', array('square' => 'Square', 'squareMeter' => 'Square Meter', 'acre' => 'Acre', 'hectare' => 'Hectare', 'sqft' => 'Square Feet')), 'exclude' => array('land'), 'query' => array('query' => 'meta'), 'wrap_end' => true), array('key' => 'search_other', 'meta_key' => 'property_air_conditioning', 'label' => __('Air Conditioning', 'epl'), 'type' => 'checkbox', 'exclude' => array('land', 'commercial', 'commercial_land', 'business'), 'query' => array('query' => 'meta', 'compare' => 'IN', 'value' => array('yes', '1')), 'class' => 'epl-search-row-half', 'wrap_start' => 'epl-search-row epl-search-other'), array('key' => 'search_other', 'meta_key' => 'property_pool', 'label' => __('Pool', 'epl'), 'type' => 'checkbox', 'exclude' => array('land', 'commercial', 'commercial_land', 'business'), 'query' => array('query' => 'meta', 'compare' => 'IN', 'value' => array('yes', '1')), 'class' => 'epl-search-row-half'), array('key' => 'search_other', 'meta_key' => 'property_security_system', 'label' => __('Security', 'epl'), 'type' => 'checkbox', 'exclude' => array('land', 'commercial', 'commercial_land', 'business'), 'query' => array('query' => 'meta', 'compare' => 'IN', 'value' => array('yes', '1')), 'class' => 'epl-search-row-half', 'wrap_end' => true)));
    return $fields;
}
示例#3
0
function epl_meta_box_init()
{
    global $epl_settings;
    $opts_users = array();
    $users = get_users('orderby=display_name&order=ASC');
    if (!empty($users)) {
        foreach ($users as $user) {
            $opts_users[$user->ID] = $user->display_name;
        }
    }
    $opts_property_status = apply_filters('epl_opts_property_status_filter', array('current' => __('Current', 'epl'), 'withdrawn' => __('Withdrawn', 'epl'), 'offmarket' => __('Off Market', 'epl'), 'sold' => array('label' => apply_filters('epl_sold_label_status_filter', __('Sold', 'epl')), 'exclude' => array('rental')), 'leased' => array('label' => apply_filters('epl_leased_label_status_filter', __('Leased', 'epl')), 'include' => array('rental', 'commercial', 'commercial_land', 'business'))));
    $opts_property_authority = apply_filters('epl_property_authority_filter', array('exclusive' => __('Exclusive', 'epl'), 'auction' => __('Auction', 'epl'), 'multilist' => __('Multilist', 'epl'), 'conjunctional' => __('Conjunctional', 'epl'), 'open' => __('Open', 'epl'), 'sale' => __('Sale', 'epl'), 'setsale' => __('Set Sale', 'epl')));
    $opts_property_exclusivity = apply_filters('epl_opts_property_exclusivity_filter', array('exclusive' => __('Exclusive', 'epl'), 'open' => __('Open', 'epl')));
    $opts_property_com_authority = apply_filters('epl_opts_property_com_authority_filter', array('auction' => __('Auction', 'epl'), 'tender' => __('Tender', 'epl'), 'eoi' => __('EOI', 'epl'), 'Sale' => __('Sale', 'epl'), 'Forsale' => __('For Sale', 'epl'), 'offers' => __('Offers', 'epl')));
    $opts_area_unit = apply_filters('epl_opts_area_unit_filter', array('square' => __('Square', 'epl'), 'squareMeter' => __('Square Meter', 'epl'), 'acre' => __('Acre', 'epl'), 'hectare' => __('Hectare', 'epl'), 'sqft' => __('Square Feet', 'epl')));
    $opts_rent_period = apply_filters('epl_opts_rent_period_filter', array('day' => __('Day', 'epl'), 'daily' => __('Daily', 'epl'), 'week' => __('Week', 'epl'), 'weekly' => __('Weekly', 'epl'), 'month' => __('Month', 'epl'), 'monthly' => __('Monthly', 'epl')));
    $opts_property_com_listing_type = apply_filters('epl_opts_property_com_listing_type_filter', array('sale' => __('Sale', 'epl'), 'lease' => __('Lease', 'epl'), 'both' => __('Both', 'epl')));
    $opts_property_com_tenancy = apply_filters('epl_opts_property_com_tenancy_filter', array('unknown' => __('Unknown', 'epl'), 'vacant' => __('Vacant', 'epl'), 'tenanted' => __('Tenanted', 'epl')));
    $opts_property_com_property_extent = apply_filters('epl_opts_property_com_property_extent_filter', array('whole' => __('Whole', 'epl'), 'part' => __('Part', 'epl')));
    global $epl_meta_boxes;
    $epl_meta_boxes = array(array('id' => 'epl-property-listing-section-id', 'label' => __('Listing Details', 'epl'), 'post_type' => array('property', 'rural', 'rental', 'land', 'commercial', 'commercial_land', 'business'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'property_heading', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_heading', 'label' => __('Heading', 'epl'), 'type' => 'text', 'maxlength' => '200'))), array('id' => 'listing_agents', 'columns' => '1', 'label' => __('Listing Agent(s)', 'epl'), 'fields' => array(array('name' => 'property_office_id', 'label' => __('Office ID', 'epl'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_agent', 'label' => __('Listing Agent', 'epl'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_second_agent', 'label' => __('Second Listing Agent', 'epl'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_agent_hide_author_box', 'label' => '', 'type' => 'checkbox_single', 'opts' => array('yes' => __('Hide Author Box', 'epl'))))), array('id' => 'listing_type', 'columns' => '2', 'label' => __('Listing Type', 'epl'), 'fields' => array(array('name' => 'property_status', 'label' => __('Property Status', 'epl'), 'type' => 'select', 'opts' => $opts_property_status), array('name' => 'property_list_date', 'label' => __('Date Listed', 'epl'), 'type' => 'date', 'maxlength' => '100'), array('name' => 'property_authority', 'label' => __('Authority', 'epl'), 'type' => 'select', 'opts' => $opts_property_authority, 'exclude' => array('rental', 'commercial', 'commercial_land')), array('name' => 'property_category', 'label' => __('House Category', 'epl'), 'type' => 'select', 'opts' => epl_listing_load_meta_property_category(), 'exclude' => array('land', 'commercial', 'commercial_land', 'business', 'rural')), array('name' => 'property_rural_category', 'label' => __('Rural Category', 'epl'), 'type' => 'select', 'opts' => epl_listing_load_meta_rural_category(), 'include' => array('rural')), array('name' => 'property_unique_id', 'label' => __('Unique ID', 'epl'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_mod_date', 'label' => __('XML Importer Mod Date', 'epl'), 'type' => 'text', 'maxlength' => '60'), array('name' => 'property_images_mod_date', 'label' => '', 'type' => 'hidden', 'maxlength' => '60'), array('name' => 'property_com_authority', 'label' => __('Commercial Authority', 'epl'), 'type' => 'select', 'opts' => $opts_property_com_authority, 'include' => array('commercial', 'commercial_land', 'business')), array('name' => 'property_com_exclusivity', 'label' => __('Exclusivity', 'epl'), 'type' => 'select', 'opts' => $opts_property_exclusivity, 'include' => array('commercial', 'commercial_land', 'business')), array('name' => 'property_com_listing_type', 'label' => __('Commercial Listing Type', 'epl'), 'type' => 'select', 'opts' => $opts_property_com_listing_type, 'include' => array('commercial', 'commercial_land', 'business')), array('name' => 'property_commercial_category', 'label' => __('Commercial Category', 'epl'), 'type' => 'select', 'opts' => epl_listing_load_meta_commercial_category(), 'include' => array('commercial', 'commercial_land')))), array('id' => 'display_details', 'columns' => '2', 'label' => __('Display Details', 'epl'), 'fields' => array(array('name' => 'property_featured', 'label' => __('Featured', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_inspection_times', 'label' => __('Inspection Times ( one per line )', 'epl'), 'type' => 'textarea', 'maxlength' => '500'))))), array('id' => 'epl-features-section-id', 'label' => __('Listing Features', 'epl'), 'post_type' => array('property', 'rural', 'rental'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'house_features', 'columns' => '2', 'label' => __('House Features', 'epl'), 'fields' => array(array('name' => 'property_bedrooms', 'label' => __('Bedrooms', 'epl'), 'type' => 'number', 'maxlength' => '2'), array('name' => 'property_bathrooms', 'label' => __('Bathrooms', 'epl'), 'type' => 'decimal', 'maxlength' => '4'), array('name' => 'property_rooms', 'label' => __('Rooms', 'epl'), 'type' => 'number', 'maxlength' => '3'), array('name' => 'property_ensuite', 'label' => __('Ensuite', 'epl'), 'type' => 'number', 'maxlength' => '2'), array('name' => 'property_toilet', 'label' => __('Toilet', 'epl'), 'type' => 'number', 'maxlength' => '2'), array('name' => 'property_garage', 'label' => __('Garage', 'epl'), 'type' => 'number', 'maxlength' => '2'), array('name' => 'property_carport', 'label' => __('Carport', 'epl'), 'type' => 'number', 'maxlength' => '2'), array('name' => 'property_year_built', 'label' => __('Year Built', 'epl'), 'type' => 'text', 'maxlength' => '4'), array('name' => 'property_new_construction', 'label' => __('New Construction', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl')), 'include' => array('property', 'rental')), array('name' => 'property_pool', 'label' => __('Pool', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_air_conditioning', 'label' => __('Air Conditioning', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_security_system', 'label' => __('Security System', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))))), array('id' => 'land_details', 'columns' => '2', 'label' => __('Land Details', 'epl'), 'fields' => array(array('name' => 'property_land_area', 'label' => __('Land Area', 'epl'), 'type' => 'decimal', 'maxlength' => '50'), array('name' => 'property_land_area_unit', 'label' => __('Land Unit', 'epl'), 'type' => 'select', 'opts' => $opts_area_unit), array('name' => 'property_building_area', 'label' => __('Building Area', 'epl'), 'type' => 'number', 'maxlength' => '50'), array('name' => 'property_building_area_unit', 'label' => __('Building Unit', 'epl'), 'type' => 'select', 'opts' => $opts_area_unit), array('name' => 'property_land_fully_fenced', 'label' => __('Fully Fenced', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))))))), array('id' => 'epl-additional-features-section-id', 'label' => __('Additional Features', 'epl'), 'post_type' => array('property', 'rural', 'rental'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'internal', 'columns' => '2', 'label' => __('Internal', 'epl'), 'fields' => array(array('name' => 'property_remote_garage', 'label' => __('Remote Garage', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_secure_parking', 'label' => __('Secure Parking', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_study', 'label' => __('Study', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_dishwasher', 'label' => __('Dishwasher', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_built_in_robes', 'label' => __('Built In Robes', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_gym', 'label' => __('Gym', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_workshop', 'label' => __('Workshop', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_rumpus_room', 'label' => __('Rumpus Room', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_floor_boards', 'label' => __('Floor Boards', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_broadband', 'label' => __('Broadband', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_pay_tv', 'label' => __('Pay TV', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_vacuum_system', 'label' => __('Vacuum System', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_intercom', 'label' => __('Intercom', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_spa', 'label' => __('Spa', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))))), array('id' => 'external', 'columns' => '2', 'label' => __('External', 'epl'), 'fields' => array(array('name' => 'property_tennis_court', 'label' => __('Tennis Court', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_balcony', 'label' => __('Balcony', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_deck', 'label' => __('家具', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_courtyard', 'label' => __('Courtyard', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_outdoor_entertaining', 'label' => __('Outdoor Entertaining', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_shed', 'label' => __('Shed', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))))), array('id' => 'heating_cooling', 'columns' => '2', 'label' => __('Heating & Cooling', 'epl'), 'fields' => array(array('name' => 'property_ducted_heating', 'label' => __('Ducted Heating', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_ducted_cooling', 'label' => __('Ducted Cooling', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_split_system_heating', 'label' => __('Split System Heating', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_hydronic_heating', 'label' => __('Hydronic Heating', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_split_system_aircon', 'label' => __('Split System Aircon', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_gas_heating', 'label' => __('Gas Heating', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_reverse_cycle_aircon', 'label' => __('Reverse Cycle Aircon', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_evaporative_cooling', 'label' => __('Evaporative Cooling', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_open_fire_place', 'label' => __('Open Fire Place', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))))))), array('id' => 'epl-features-section-id-single-column', 'label' => __('Land Details', 'epl'), 'post_type' => array('land', 'commercial', 'business'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'land_details', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_land_area', 'label' => __('Land Area', 'epl'), 'type' => 'decimal', 'maxlength' => '50'), array('name' => 'property_land_area_unit', 'label' => __('Land Unit', 'epl'), 'type' => 'select', 'opts' => $opts_area_unit), array('name' => 'property_building_area', 'label' => __('Building Area', 'epl'), 'type' => 'number', 'include' => array('commercial', 'business'), 'maxlength' => '40'), array('name' => 'property_building_area_unit', 'label' => __('Building Unit', 'epl'), 'type' => 'select', 'opts' => $opts_area_unit, 'include' => array('commercial', 'business')), array('name' => 'property_land_category', 'label' => __('Land Category', 'epl'), 'type' => 'select', 'opts' => epl_listing_load_meta_land_category(), 'include' => array('land')), array('name' => 'property_land_fully_fenced', 'label' => __('Fully Fenced', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl')), 'include' => array('land')))))), array('id' => 'epl-property-address-section-id', 'label' => __('Property Address', 'epl'), 'post_type' => array('property', 'rural', 'rental', 'commercial', 'commercial_land', 'business', 'land'), 'context' => 'side', 'priority' => 'core', 'groups' => array(apply_filters('epl_listing_meta_address_block', array('id' => 'address_block', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_address_display', 'label' => __('Display Street Address?', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_address_lot_number', 'label' => __('Lot', 'epl'), 'type' => 'text', 'maxlength' => '40', 'include' => array('land', 'commercial_land')), array('name' => 'property_address_sub_number', 'label' => __('Unit', 'epl'), 'type' => 'text', 'maxlength' => '40', 'exclude' => array('land', 'commercial_land')), array('name' => 'property_address_street_number', 'label' => __('Street Number', 'epl'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_address_street', 'label' => __('Street Name', 'epl'), 'type' => 'text', 'maxlength' => '80'), array('name' => 'property_address_suburb', 'label' => epl_labels('label_suburb'), 'type' => 'text', 'maxlength' => '80'), array('name' => 'property_com_display_suburb', 'label' => __('Display', 'epl') . ' ' . epl_labels('label_suburb'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl')), 'include' => array('commercial', 'commercial_land', 'business')), isset($epl_settings['epl_enable_city_field']) && $epl_settings['epl_enable_city_field'] == 'yes' ? array('name' => 'property_address_city', 'label' => epl_labels('label_city'), 'type' => 'text', 'maxlength' => '80') : array(), array('name' => 'property_address_state', 'label' => epl_labels('label_state'), 'type' => 'text', 'maxlength' => '80'), array('name' => 'property_address_postal_code', 'label' => epl_labels('label_postcode'), 'type' => 'text', 'maxlength' => '30'), array('name' => 'property_address_country', 'label' => __('Country', 'epl'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_address_coordinates', 'label' => __('Coordinates', 'epl'), 'type' => 'text', 'geocoder' => 'true', 'maxlength' => '40'), array('name' => 'property_address_hide_map', 'label' => '', 'type' => 'checkbox_single', 'opts' => array('yes' => __('Hide Map', 'epl')))))))), array('id' => 'epl-pricing-section-id', 'label' => __('Pricing', 'epl'), 'post_type' => array('property', 'rural', 'commercial', 'commercial_land', 'business', 'land'), 'context' => 'side', 'priority' => 'core', 'groups' => array(array('id' => 'pricing', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_price', 'label' => __('Search Price', 'epl'), 'type' => 'number', 'maxlength' => '50'), array('name' => 'property_price_view', 'label' => __('Price Text', 'epl'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_auction', 'label' => __('Auction Date', 'epl'), 'type' => 'auction-date', 'maxlength' => '100'), array('name' => 'property_price_display', 'label' => __('Display Price?', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_under_offer', 'label' => epl_meta_under_offer_label(), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_is_home_land_package', 'label' => __('House and Land Package', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl')), 'exclude' => array('land', 'rural', 'commercial', 'commercial_land', 'business')))), array('id' => 'sale_details', 'columns' => '1', 'label' => __('Sale Details', 'epl'), 'fields' => array(array('name' => 'property_sold_price', 'label' => __('Sale Price', 'epl'), 'type' => 'number', 'maxlength' => '50'), array('name' => 'property_sold_date', 'label' => __('Sale Date', 'epl'), 'type' => 'sold-date', 'maxlength' => '100'), array('name' => 'property_sold_price_display', 'label' => __('Display Sale Price', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))))))), array('id' => 'epl-property-rent-id', 'label' => __('Rental Pricing', 'epl'), 'post_type' => array('rental'), 'context' => 'side', 'priority' => 'core', 'groups' => array(array('id' => 'rental_pricing', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_rent', 'label' => __('Rent Amount', 'epl'), 'type' => apply_filters('epl_price_number_format', 'number'), 'maxlength' => '40'), array('name' => 'property_rent_period', 'label' => __('Rent Period', 'epl'), 'type' => 'select', 'opts' => $opts_rent_period), array('name' => 'property_rent_view', 'label' => __('Rent Text', 'epl'), 'type' => 'text', 'maxlength' => '50'), array('name' => 'property_rent_display', 'label' => __('Display Rent?', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_bond', 'label' => epl_labels('label_bond'), 'type' => 'number', 'maxlength' => '40'), array('name' => 'property_date_available', 'label' => __('Date Available', 'epl'), 'type' => 'date', 'maxlength' => '100'), array('name' => 'property_furnished', 'label' => __('Furnished', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))), array('name' => 'property_holiday_rental', 'label' => __('Holiday Rental', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl')), 'exclude' => array('rental')))))), array('id' => 'epl-rural-features-id', 'label' => __('Rural Features', 'epl'), 'post_type' => array('rural'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'rural_features', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_rural_fencing', 'label' => __('Fencing', 'epl'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_annual_rainfall', 'label' => __('Annual Rainfall', 'epl'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_soil_types', 'label' => __('Soil Types', 'epl'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_improvements', 'label' => __('Improvements', 'epl'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_council_rates', 'label' => __('Council Rates', 'epl'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_irrigation', 'label' => __('Irrigation', 'epl'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_carrying_capacity', 'label' => __('Carrying Capacity', 'epl'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_rural_services', 'label' => __('Services', 'epl'), 'type' => 'textarea', 'maxlength' => '65535'))))), array('id' => 'epl-commercial-leasing-id', 'label' => __('Leasing', 'epl'), 'post_type' => array('commercial', 'commercial_land', 'business'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'commercial_leasing', 'columns' => '2', 'label' => '', 'fields' => array(array('name' => 'property_com_rent', 'label' => __('Commercial Rent', 'epl'), 'type' => 'decimal', 'maxlength' => '40', 'help' => __('Price Text in Pricing box over-rides displayed price', 'epl')), array('name' => 'property_com_rent_period', 'label' => __('Lease Period', 'epl'), 'type' => 'select', 'opts' => epl_listing_load_meta_commercial_rent_period()), array('name' => 'property_com_rent_range_min', 'label' => __('Rent Range Min', 'epl'), 'type' => 'number', 'maxlength' => '40'), array('name' => 'property_com_rent_range_max', 'label' => __('Rent Range Max', 'epl'), 'type' => 'number', 'maxlength' => '40'), array('name' => 'property_com_lease_end_date', 'label' => __('Lease End Date', 'epl'), 'type' => 'date', 'maxlength' => '100'), array('name' => 'property_com_property_extent', 'label' => __('Property Extent', 'epl'), 'type' => 'select', 'opts' => $opts_property_com_property_extent))), array('id' => 'tenant_n_outgoings', 'columns' => '2', 'label' => '', 'fields' => array(array('name' => 'property_com_tenancy', 'label' => __('Tenant Status', 'epl'), 'type' => 'select', 'opts' => $opts_property_com_tenancy, 'include' => array('commercial')), array('name' => 'property_com_outgoings', 'label' => __('Commercial Outgoings', 'epl'), 'type' => 'number', 'maxlength' => '40', 'exclude' => array('business')), array('name' => 'property_com_plus_outgoings', 'label' => __('Plus Outgoings', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl')), 'exclude' => array('business')), array('name' => 'property_bus_takings', 'label' => __('Takings', 'epl'), 'type' => 'number', 'maxlength' => '40', 'include' => array('business')), array('name' => 'property_bus_franchise', 'label' => __('Franchise', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl')), 'include' => array('business')), array('name' => 'property_com_return', 'label' => __('Return', 'epl'), 'type' => 'decimal', 'maxlength' => '6'), array('name' => 'property_bus_terms', 'label' => __('Terms', 'epl'), 'type' => 'textarea'))))), array('id' => 'epl-commercial-features-id', 'label' => __('Commercial Features', 'epl'), 'post_type' => array('commercial'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'commerial_features', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_com_further_options', 'label' => __('Further Options', 'epl'), 'type' => 'textarea', 'maxlength' => '65535'), array('name' => 'property_com_zone', 'label' => __('Zone', 'epl'), 'type' => 'textarea', 'maxlength' => '150'), array('name' => 'property_com_car_spaces', 'label' => __('Car Spaces', 'epl'), 'type' => 'number', 'type' => 'textarea', 'maxlength' => '5'), array('name' => 'property_com_highlight_1', 'label' => __('Highlight 1', 'epl'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_com_highlight_2', 'label' => __('Highlight 2', 'epl'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_com_highlight_3', 'label' => __('Highlight 3', 'epl'), 'type' => 'text', 'maxlength' => '40'), array('name' => 'property_com_parking_comments', 'label' => __('Parking Comments', 'epl'), 'type' => 'text', 'maxlength' => '150'), array('name' => 'property_com_is_multiple', 'label' => __('Is Multiple', 'epl'), 'type' => 'radio', 'opts' => array('yes' => __('Yes', 'epl'), 'no' => __('No', 'epl'))))))), array('id' => 'epl-business-features-id', 'label' => __('Business Categories', 'epl'), 'post_type' => array('business'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'business_categories', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_bus_category', 'label' => __('Business Category', 'epl'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing')), array('name' => 'property_bus_sub_category', 'label' => __('Business Sub Category', 'epl'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing', 'parent' => 'property_bus_category')), array('name' => 'property_bus_category_2', 'label' => __('Business Category 2', 'epl'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing')), array('name' => 'property_bus_sub_category_2', 'label' => __('Business Sub Category 2', 'epl'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing', 'parent' => 'property_bus_category_2')), array('name' => 'property_bus_category_3', 'label' => __('Business Category 3', 'epl'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing')), array('name' => 'property_bus_sub_category_3', 'label' => __('Business Sub Category 3', 'epl'), 'type' => 'select', 'opt_args' => array('type' => 'taxonomy', 'slug' => 'tax_business_listing', 'parent' => 'property_bus_category_3')))))), array('id' => 'epl-attachments-section-id', 'label' => __('Files and Links', 'epl'), 'post_type' => array('property', 'rural', 'commercial', 'commercial_land', 'business', 'rental', 'land'), 'context' => 'normal', 'priority' => 'default', 'groups' => array(array('id' => 'filen_n_links', 'columns' => '1', 'label' => '', 'fields' => array(array('name' => 'property_video_url', 'label' => __('Video URL', 'epl'), 'type' => 'url'), array('name' => 'property_floorplan', 'label' => __('Floorplan', 'epl'), 'type' => 'url'), array('name' => 'property_floorplan_2', 'label' => __('Floorplan 2', 'epl'), 'type' => 'url'), array('name' => 'property_external_link', 'label' => __('External Link', 'epl'), 'type' => 'url'), array('name' => 'property_external_link_2', 'label' => __('External Link 2', 'epl'), 'type' => 'url'), array('name' => 'property_external_link_3', 'label' => __('External Link 3', 'epl'), 'type' => 'url', 'include' => array('commercial', 'business', 'commercial_land')), array('name' => 'property_com_mini_web', 'label' => __('Mini Website URL', 'epl'), 'type' => 'url', 'include' => array('commercial', 'business', 'commercial_land')), array('name' => 'property_com_mini_web_2', 'label' => __('Mini Website URL 2', 'epl'), 'type' => 'url', 'include' => array('commercial', 'business', 'commercial_land')), array('name' => 'property_com_mini_web_3', 'label' => __('Mini Website URL 3', 'epl'), 'type' => 'url', 'include' => array('commercial', 'business', 'commercial_land')))))));
    if (!empty($epl_meta_boxes)) {
        foreach ($epl_meta_boxes as &$epl_meta_box) {
            $meta_box_block_id = str_replace("-", "_", $epl_meta_box['id']);
            $epl_meta_box = apply_filters('epl_meta_box_block_' . $meta_box_block_id, $epl_meta_box);
            if (!empty($epl_meta_box['groups'])) {
                foreach ($epl_meta_box['groups'] as &$group) {
                    $group = apply_filters('epl_meta_groups_' . $group['id'], $group);
                    if (!empty($group['fields'])) {
                        $group['fields'] = array_filter($group['fields']);
                        foreach ($group['fields'] as &$fieldvalue) {
                            $fieldvalue = apply_filters('epl_meta_' . $fieldvalue['name'], $fieldvalue);
                        }
                    }
                }
            }
        }
    }
    $epl_meta_boxes = apply_filters('epl_listing_meta_boxes', $epl_meta_boxes);
    /**
     * Add meta boxes to the post-edit page
     *
     * @since 1.0
     */
    function epl_add_meta_boxes()
    {
        global $epl_meta_boxes;
        if (!empty($epl_meta_boxes)) {
            foreach ($epl_meta_boxes as $epl_meta_box) {
                if (is_array($epl_meta_box['post_type'])) {
                    foreach ($epl_meta_box['post_type'] as $post_type) {
                        add_meta_box($epl_meta_box['id'], __($epl_meta_box['label'], 'epl'), 'epl_meta_box_inner_custom_box', $post_type, $epl_meta_box['context'], $epl_meta_box['priority'], $epl_meta_box);
                    }
                } else {
                    add_meta_box($epl_meta_box['id'], __($epl_meta_box['label'], 'epl'), 'epl_meta_box_inner_custom_box', $epl_meta_box['post_type'], $epl_meta_box['context'], $epl_meta_box['priority'], $epl_meta_box);
                }
            }
        }
    }
    /**
     * Add sub meta boxes to the post-edit page
     *
     * @since 1.0
     */
    function epl_meta_box_inner_custom_box($post, $args)
    {
        $groups = $args['args']['groups'];
        $groups = array_filter($groups);
        if (!empty($groups)) {
            wp_nonce_field('epl_inner_custom_box', 'epl_inner_custom_box_nonce');
            foreach ($groups as $group) {
                ?>
				<div class="epl-inner-div col-<?php 
                echo $group['columns'];
                ?>
 table-<?php 
                echo $args['args']['context'];
                ?>
">
					<?php 
                $group['label'] = trim($group['label']);
                if (!empty($group['label'])) {
                    echo '<h3>' . __($group['label'], 'epl') . '</h3>';
                }
                ?>
					<table class="form-table epl-form-table">
						<tbody>
							<?php 
                $fields = $group['fields'];
                $fields = array_filter($fields);
                if (!empty($fields)) {
                    foreach ($fields as $field) {
                        if (isset($field['exclude']) && !empty($field['exclude'])) {
                            if (in_array($post->post_type, $field['exclude'])) {
                                continue;
                            }
                        }
                        if (isset($field['include']) && !empty($field['include'])) {
                            if (!in_array($post->post_type, $field['include'])) {
                                continue;
                            }
                        }
                        ?>
										<tr class="form-field">
											<th valign="top" scope="row">
												<label for="<?php 
                        echo $field['name'];
                        ?>
"><?php 
                        _e($field['label'], 'epl');
                        ?>
</label>
											</th>
										
											<?php 
                        if ($group['columns'] > 1) {
                            ?>
												</tr><tr class="form-field">
											<?php 
                        }
                        ?>
										
											<td>
												<?php 
                        $val = get_post_meta($post->ID, $field['name'], true);
                        epl_render_html_fields($field, $val);
                        ?>
											</td>
										</tr>
									<?php 
                    }
                }
                ?>
						</tbody>
					</table>
				</div>
				<?php 
            }
            ?>
			<input type="hidden" name="epl_meta_box_ids[]" value="<?php 
            echo $args['id'];
            ?>
" />
			<div class="epl-clear"></div>
			<?php 
        }
    }
    add_action('add_meta_boxes', 'epl_add_meta_boxes');
    /**
     * Save and update meta box values to the post-edit page
     *
     * @since 1.0
     */
    function epl_save_meta_boxes($post_ID)
    {
        if (!isset($_POST['epl_inner_custom_box_nonce'])) {
            return $post_ID;
        }
        $nonce = $_POST['epl_inner_custom_box_nonce'];
        if (!wp_verify_nonce($nonce, 'epl_inner_custom_box')) {
            return $post_ID;
        }
        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
            return $post_ID;
        }
        if ('page' == $_POST['post_type']) {
            if (!current_user_can('edit_page', $post_ID)) {
                return $post_ID;
            }
        } else {
            if (!current_user_can('edit_post', $post_ID)) {
                return $post_ID;
            }
        }
        $epl_meta_box_ids = '';
        if (isset($_POST['epl_meta_box_ids'])) {
            $epl_meta_box_ids = $_POST['epl_meta_box_ids'];
        }
        if (!empty($epl_meta_box_ids)) {
            global $epl_meta_boxes;
            if (!empty($epl_meta_boxes)) {
                $epl_enable_import_geocode = get_option('epl_enable_import_geocode');
                foreach ($epl_meta_box_ids as $epl_meta_box_id) {
                    foreach ($epl_meta_boxes as $epl_meta_box) {
                        if ($epl_meta_box['id'] == $epl_meta_box_id) {
                            if (!empty($epl_meta_box['groups'])) {
                                foreach ($epl_meta_box['groups'] as $group) {
                                    $fields = $group['fields'];
                                    if (!empty($fields)) {
                                        foreach ($fields as $field) {
                                            if (isset($field['exclude']) && !empty($field['exclude'])) {
                                                if (in_array($_POST['post_type'], $field['exclude'])) {
                                                    continue;
                                                }
                                            }
                                            if (isset($field['include']) && !empty($field['include'])) {
                                                if (!in_array($_POST['post_type'], $field['include'])) {
                                                    continue;
                                                }
                                            }
                                            if ($field['type'] == 'radio') {
                                                if (!isset($_POST[$field['name']])) {
                                                    continue;
                                                }
                                            } else {
                                                if ($field['type'] == 'checkbox_single') {
                                                    if (!isset($_POST[$field['name']])) {
                                                        $_POST[$field['name']] = '';
                                                    }
                                                } else {
                                                    if ($field['type'] == 'auction-date' && $_POST[$field['name']] != '') {
                                                        $epl_date = $_POST[$field['name']];
                                                        if (strpos($epl_date, 'T') !== FALSE) {
                                                            $epl_date = date("Y-m-d\\TH:i", strtotime($epl_date));
                                                        } else {
                                                            $epl_date = DateTime::createFromFormat('Y-m-d-H:i:s', $epl_date);
                                                            if ($epl_date) {
                                                                $epl_date = $epl_date->format('Y-m-d\\TH:i');
                                                            }
                                                        }
                                                        $_POST[$field['name']] = $epl_date;
                                                    } else {
                                                        if ($field['type'] == 'sold-date' && $_POST[$field['name']] != '') {
                                                            $epl_date = $_POST[$field['name']];
                                                            if (strpos($epl_date, 'T') !== FALSE) {
                                                                $epl_date = date("Y-m-d\\TH:i", strtotime($epl_date));
                                                            } else {
                                                                $epl_date = DateTime::createFromFormat('Y-m-d', $epl_date);
                                                                if ($epl_date) {
                                                                    $epl_date = $epl_date->format('Y-m-d');
                                                                }
                                                            }
                                                            $_POST[$field['name']] = $epl_date;
                                                        }
                                                    }
                                                }
                                            }
                                            update_post_meta($post_ID, $field['name'], $_POST[$field['name']]);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    add_action('save_post', 'epl_save_meta_boxes');
    /**
     * Adds geo-coordinate button to the address meta box
     * If you are importing from XML you can use FeedSync 
     * to pre-geocode the property elements
     *
     * @since 1.0
     */
    function epl_get_geocoordinates()
    {
        $address = '';
        if (trim($_POST['property_address_sub_number']) != '') {
            $address .= $_POST['property_address_sub_number'] . '/';
        }
        $address .= $_POST['property_address_street_number'] . ' ' . $_POST['property_address_street'] . ' ' . $_POST['property_address_suburb'] . ' ' . $_POST['property_address_state'] . ' ' . $_POST['property_address_postal_code'];
        $address = urlencode(strtolower(trim($address)));
        $geourl = "http://maps.google.com/maps/api/geocode/json?address=" . urlencode($address) . "&sensor=false";
        $response = epl_remote_url_get($geourl);
        if (!empty($response)) {
            $geocoordinates = $response[0]->geometry->location->lat . ',' . $response[0]->geometry->location->lng;
            echo $geocoordinates;
        }
        exit;
    }
    add_action('wp_ajax_epl_get_geocoordinates', 'epl_get_geocoordinates');
    /**
     * Returns a dropdown list for terms
     *
     * @since 1.0
     */
    function epl_get_terms_drop_list()
    {
        $_POST = array_map('trim', $_POST);
        extract($_POST);
        $parent_id = (int) $parent_id;
        $terms = get_terms($type_name, array('hide_empty' => 0, 'parent' => $parent_id));
        if (!empty($terms) && !is_wp_error($terms)) {
            $arr = array('' => '');
            foreach ($terms as $term) {
                $arr[$term->term_id] = $term->name;
            }
            if (!empty($arr)) {
                foreach ($arr as $k => $v) {
                    $selected = '';
                    if ($default_value == $k) {
                        $selected = 'selected="selected"';
                    }
                    echo '<option value="' . $k . '" ' . $selected . '>' . __($v, 'epl') . '</option>';
                }
            }
        }
    }
    add_action('wp_ajax_epl_get_terms_drop_list', 'epl_get_terms_drop_list');
}
    function form($instance)
    {
        $defaults = array('title' => '', 'types' => 'property', 'featured' => 0, 'status' => 'any', 'display' => 'image', 'image' => 'thumbnail', 'archive' => 0, 'order_rand' => 0, 'd_title' => 0, 'more_text' => __('Read More', 'epl'), 'd_excerpt' => 'off', 'd_suburb' => 'on', 'd_street' => 'on', 'd_price' => 'on', 'd_more' => 'on', 'd_icons' => 'none', 'p_number' => 1, 'p_skip' => 0);
        $instance = wp_parse_args((array) $instance, $defaults);
        $title = esc_attr($instance['title']);
        $types = esc_attr($instance['types']);
        $featured = esc_attr($instance['featured']);
        $status = esc_attr($instance['status']);
        $display = esc_attr($instance['display']);
        $image = esc_attr($instance['image']);
        $archive = esc_attr($instance['archive']);
        $d_title = esc_attr($instance['d_title']);
        $more_text = esc_attr($instance['more_text']);
        $d_excerpt = esc_attr($instance['d_excerpt']);
        $d_suburb = esc_attr($instance['d_suburb']);
        $d_street = esc_attr($instance['d_street']);
        $d_price = esc_attr($instance['d_price']);
        $d_more = esc_attr($instance['d_more']);
        $d_icons = esc_attr($instance['d_icons']);
        $p_number = esc_attr($instance['p_number']);
        $p_skip = esc_attr($instance['p_skip']);
        $order_rand = esc_attr($instance['order_rand']);
        ?>
		
		<p>
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        _e('Title', 'epl');
        ?>
</label>
			<input class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" type="text" value="<?php 
        echo $title;
        ?>
" />
		</p>
		
		<p>
			<label for="<?php 
        echo $this->get_field_id('types');
        ?>
"><?php 
        _e('Property Type', 'epl');
        ?>
</label>
			<select class="widefat" id="<?php 
        echo $this->get_field_id('types');
        ?>
" name="<?php 
        echo $this->get_field_name('types');
        ?>
 ">
				<?php 
        $options = epl_get_active_post_types();
        if (!empty($options)) {
            foreach ($options as $k => $v) {
                echo '<option value="' . $k . '" id="' . $k . '"', $instance['types'] == $k ? ' selected="selected"' : '', '>', __($v, 'epl'), '</option>';
            }
        }
        ?>
			</select>
		</p>
		
		<p>
			<label for="<?php 
        echo $this->get_field_id('status');
        ?>
"><?php 
        _e('Property Status', 'epl');
        ?>
</label>
			<select class="widefat" id="<?php 
        echo $this->get_field_id('status');
        ?>
" name="<?php 
        echo $this->get_field_name('status');
        ?>
 ">
				<?php 
        $options = array('Any', 'Current', 'Sold', 'Leased');
        foreach ($options as $option) {
            echo '<option value="' . $option . '" id="' . $option . '"', $instance['status'] == $option ? ' selected="selected"' : '', '>', __($option, 'epl'), '</option>';
        }
        ?>
			</select>
		</p>
		
		<p>
			<label for="<?php 
        echo $this->get_field_id('display');
        ?>
"><?php 
        _e('Display Style', 'epl');
        ?>
</label>
			<select class="widefat" id="<?php 
        echo $this->get_field_id('display');
        ?>
" name="<?php 
        echo $this->get_field_name('display');
        ?>
">
				<?php 
        /** usage **
         *
         *  add more templates to this by add key pair values to this array,
         *  key will be name of template example 'my-custom-widget-template.php' and value will be label for tpl, example 'My Template'
         */
        $options = apply_filters('epl_listing_widget_templates', array('image' => __('Image', 'epl'), 'image-only' => __('Image Only', 'epl'), 'list' => __('List', 'epl')));
        foreach ($options as $option_key => $option_label) {
            echo '<option value="' . $option_key . '" id="' . $option_key . '"', $instance['display'] == $option_key ? ' selected="selected"' : '', '>', __($option_label, 'epl'), '</option>';
        }
        ?>
			</select>
		</p>
		
		<p>
			<label for="<?php 
        echo $this->get_field_id('image');
        ?>
"><?php 
        _e('Image Size', 'epl');
        ?>
</label>
			<select class="widefat" id="<?php 
        echo $this->get_field_id('image');
        ?>
" name="<?php 
        echo $this->get_field_name('image');
        ?>
">
				<?php 
        $sizes = epl_get_thumbnail_sizes();
        foreach ($sizes as $k => $v) {
            $v = implode(" x ", $v);
            echo '<option class="widefat" value="' . $k . '" id="' . $k . '"', $instance['image'] == $k ? ' selected="selected"' : '', '>', __($k, 'epl') . ' (' . __($v, 'epl') . ' )', '</option>';
        }
        ?>
			</select>
		</p>
		
		<p>
			<label for="<?php 
        echo $this->get_field_id('d_icons');
        ?>
"><?php 
        _e('Icon Style', 'epl');
        ?>
</label>
			<select class="widefat" id="<?php 
        echo $this->get_field_id('d_icons');
        ?>
" name="<?php 
        echo $this->get_field_name('d_icons');
        ?>
">
				<?php 
        $options = array('none', 'all', 'beds/baths');
        foreach ($options as $option) {
            echo '<option value="' . $option . '" id="' . $option . '"', $instance['d_icons'] == $option ? ' selected="selected"' : '', '>', __($option, 'epl'), '</option>';
        }
        ?>
			</select>
		</p>
		
		<p>
			<select id="<?php 
        echo $this->get_field_id('p_number');
        ?>
" name="<?php 
        echo $this->get_field_name('p_number');
        ?>
">
				<?php 
        for ($i = 1; $i <= 20; $i++) {
            echo '<option value="' . $i . '"';
            if ($i == $instance['p_number']) {
                echo ' selected="selected"';
            }
            echo '>' . __($i, 'epl') . '</option>';
        }
        ?>
			</select>
			<label for="<?php 
        echo $this->get_field_id('p_number');
        ?>
"><?php 
        _e('Number of Properties', 'epl');
        ?>
</label>
		</p>
		
		<p>
			<select id="<?php 
        echo $this->get_field_id('p_skip');
        ?>
" name="<?php 
        echo $this->get_field_name('p_skip');
        ?>
">
				<?php 
        for ($i = 0; $i <= 20; $i++) {
            echo '<option value="' . $i . '"';
            if ($i == $instance['p_skip']) {
                echo ' selected="selected"';
            }
            echo '>' . __($i, 'epl') . '</option>';
        }
        ?>
			</select>
			<label for="<?php 
        echo $this->get_field_id('p_skip');
        ?>
"><?php 
        _e('Properties to Skip', 'epl');
        ?>
</label>
		</p>
		
		<p>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('featured');
        ?>
" name="<?php 
        echo $this->get_field_name('featured');
        ?>
" <?php 
        if ($instance['featured']) {
            echo 'checked="checked"';
        }
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('featured');
        ?>
"><?php 
        _e('Only Show Featured Properties', 'epl');
        ?>
</label>
		</p>
		
		<p>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('d_title');
        ?>
" name="<?php 
        echo $this->get_field_name('d_title');
        ?>
" <?php 
        if ($instance['d_title']) {
            echo 'checked="checked"';
        }
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('d_title');
        ?>
"><?php 
        _e('Property Headline', 'epl');
        ?>
</label>
		</p>

		<p>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('d_excerpt');
        ?>
" name="<?php 
        echo $this->get_field_name('d_excerpt');
        ?>
" <?php 
        if ($instance['d_excerpt']) {
            echo 'checked="checked"';
        }
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('d_excerpt');
        ?>
"><?php 
        _e('Excerpt', 'epl');
        ?>
</label>
		</p>
		
		<p>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('d_suburb');
        ?>
" name="<?php 
        echo $this->get_field_name('d_suburb');
        ?>
" <?php 
        if ($instance['d_suburb']) {
            echo 'checked="checked"';
        }
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('d_suburb');
        ?>
"><?php 
        echo epl_labels('label_suburb');
        ?>
</label>
		</p>
		
		<p>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('d_street');
        ?>
" name="<?php 
        echo $this->get_field_name('d_street');
        ?>
" <?php 
        if ($instance['d_street']) {
            echo 'checked="checked"';
        }
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('d_street');
        ?>
"><?php 
        _e('Street Address', 'epl');
        ?>
</label>
		</p>
		
		<p>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('d_price');
        ?>
" name="<?php 
        echo $this->get_field_name('d_price');
        ?>
" <?php 
        if ($instance['d_price']) {
            echo 'checked="checked"';
        }
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('d_price');
        ?>
"><?php 
        _e('Price', 'epl');
        ?>
</label>
		</p>
		
		<p>
			<label for="<?php 
        echo $this->get_field_id('more_text');
        ?>
"><?php 
        _e('Read More Label', 'epl');
        ?>
</label>
			<input class="widefat" id="<?php 
        echo $this->get_field_id('more_text');
        ?>
" name="<?php 
        echo $this->get_field_name('more_text');
        ?>
" type="text" value="<?php 
        echo $more_text;
        ?>
" />
		</p>
		
		<p>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('d_more');
        ?>
" name="<?php 
        echo $this->get_field_name('d_more');
        ?>
" <?php 
        if ($instance['d_more']) {
            echo 'checked="checked"';
        }
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('d_more');
        ?>
"><?php 
        _e('Read More Button', 'epl');
        ?>
</label>
		</p>

		<p>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('archive');
        ?>
" name="<?php 
        echo $this->get_field_name('archive');
        ?>
" <?php 
        if ($instance['archive']) {
            echo 'checked="checked"';
        }
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('archive');
        ?>
"><?php 
        _e('Dynamic', 'epl');
        ?>
</label>
		</p>
		
		<p>
			<input type="checkbox" id="<?php 
        echo $this->get_field_id('order_rand');
        ?>
" name="<?php 
        echo $this->get_field_name('order_rand');
        ?>
" <?php 
        if ($instance['order_rand']) {
            echo 'checked="checked"';
        }
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('order_rand');
        ?>
"><?php 
        _e('Random Order', 'epl');
        ?>
</label>
		</p>
        <?php 
    }
示例#5
0
function epl_manage_listing_column_price_callback()
{
    global $post, $property, $epl_settings;
    $price = get_post_meta($post->ID, 'property_price', true);
    $view = get_post_meta($post->ID, 'property_price_view', true);
    $property_status = ucfirst(get_post_meta($post->ID, 'property_status', true));
    $property_authority = get_post_meta($post->ID, 'property_authority', true);
    $sold_price = get_post_meta($post->ID, 'property_sold_price', true);
    $property_under_offer = get_post_meta($post->ID, 'property_under_offer', true);
    $lease = get_post_meta($post->ID, 'property_com_rent', true);
    $lease_period = get_post_meta($post->ID, 'property_com_rent_period', true);
    $lease_date = get_post_meta($post->ID, 'property_com_lease_end_date', true);
    $d_bond = '';
    $bond = '';
    $max_price = '2000000';
    if (isset($epl_settings['epl_max_graph_sales_price'])) {
        $max_price = (int) $epl_settings['epl_max_graph_sales_price'];
    }
    /* Rental Listing Type Custom Values */
    if ('rental' == $post->post_type) {
        $price = get_post_meta($post->ID, 'property_rent', true);
        $view = get_post_meta($post->ID, 'property_rent_view', true);
        $d_bond = $epl_settings['display_bond'];
        $bond = get_post_meta($post->ID, 'property_bond', true);
        $max_price = '2000';
        if (isset($epl_settings['epl_max_graph_rent_price'])) {
            $max_price = (int) $epl_settings['epl_max_graph_rent_price'];
        }
    }
    if (!empty($property_under_offer) && 'yes' == $property_under_offer) {
        $class = 'bar-under-offer';
    } elseif ($property_status == 'Current') {
        $class = 'bar-home-open';
    } elseif ($property_status == 'Sold') {
        $class = 'bar-home-sold';
    } elseif ($property_status == 'Leased') {
        $class = 'bar-home-sold';
    } else {
        $class = '';
    }
    if ($sold_price != '') {
        $barwidth = $max_price == 0 ? 0 : $sold_price / $max_price * 100;
    } else {
        $barwidth = $max_price == 0 ? 0 : $price / $max_price * 100;
    }
    echo '<div class="epl-price-bar ' . $class . '">
			<span style="width:' . $barwidth . '%"></span>
		</div>';
    if (!empty($property_under_offer) && 'yes' == $property_under_offer) {
        echo '<div class="type_under_offer">' . $property->label_under_offer . '</div>';
    }
    if (empty($view)) {
        echo '<div class="epl_meta_search_price">' . $property->get_price_plain_value() . ' ';
        echo $property_status == 'Sold' ? epl_currency_formatted_amount($sold_price) : '';
        echo '</div>';
    } else {
        echo '<div class="epl_meta_price">' . $property->get_price_plain_value() . '</div>';
    }
    /* Rental Listing Type */
    if ($d_bond == 1) {
        echo '<div class="epl_meta_bond">', epl_labels('label_bond'), ' ', epl_currency_formatted_amount($bond), '</div>';
    }
    /* Commercial Listing Type */
    if (!empty($lease_date)) {
        echo '<div class="epl_meta_lease_date">Lease End: ', $lease_date, '</div>';
    }
    if ($property_authority == 'auction') {
        _e('Auction ', 'epl');
        echo '<br>' . $property->get_property_auction(true);
    }
}