function shandora_setup_car_dealer_post_type() { global $bon; $prefix = bon_get_prefix(); $suffix = SHANDORA_MB_SUFFIX; $cpt = $bon->cpt(); $use_rewrite = bon_get_option('use_rewrite', 'no'); $settings = array(); $slug = ''; $settings['rewrite_root'] = bon_get_option('rewrite_root'); $settings['car_root'] = bon_get_option('car_root', 'car'); $settings['car_manufacturer_root'] = bon_get_option('car_manufacturer_root', 'manufacturer'); $settings['car_body_type_root'] = bon_get_option('car_body_type_root', 'body-type'); $settings['car_dealer_location_root'] = bon_get_option('car_dealer_location_root', 'dealer-location'); $settings['car_feature_root'] = bon_get_option('car_feature_root', 'feature'); if (!empty($settings['rewrite_root'])) { $slug = "{$settings['rewrite_root']}/{$settings['car_root']}"; } else { $slug = "{$settings['car_root']}"; } $manufacturer_slug = "{$settings['car_root']}/{$settings['car_manufacturer_root']}"; $body_type_slug = "{$settings['car_root']}/{$settings['car_body_type_root']}"; $dealer_location_slug = "{$settings['car_root']}/{$settings['car_dealer_location_root']}"; $feature_slug = "{$settings['car_root']}/{$settings['car_feature_root']}"; $has_archive = $use_rewrite == 'no' ? false : $slug; $rewrite_var = array('slug' => $slug, 'with_front' => false, 'pages' => true, 'feeds' => true, 'ep_mask' => EP_PERMALINK); $rewrite = $use_rewrite == 'no' ? true : $rewrite_var; $name = __('Car Listing', 'bon'); $plural = __('Car Listings', 'bon'); $cpt->create('Car Listing', array('has_archive' => $has_archive, 'rewrite' => $rewrite, 'supports' => array('editor', 'title', 'excerpt', 'thumbnail', 'front-end-editor'), 'menu_position' => 8), array(), $name, $plural); $gallery_opts = array(array('label' => __('Listings Gallery', 'bon'), 'desc' => __('Choose image to use in this listing gallery.', 'bon'), 'id' => $prefix . $suffix . 'gallery', 'type' => 'gallery')); $prop_options = array(array('label' => __('Reg Number', 'bon'), 'desc' => __('The Car Registry Number #', 'bon'), 'id' => $prefix . $suffix . 'reg', 'type' => 'text'), array('label' => __('Badge', 'bon'), 'desc' => __('badge text to show in listings view', 'bon'), 'id' => $prefix . $suffix . 'badge', 'type' => 'text'), array('label' => __('Badge color', 'bon'), 'desc' => __('badge text to show in listings view', 'bon'), 'id' => $prefix . $suffix . 'badge_color', 'type' => 'select', 'options' => array('none' => __('None', 'bon'), 'badge-red' => __('Red', 'bon'), 'badge-orange' => __('Orange', 'bon'), 'badge-green' => __('Green', 'bon'), 'badge-blue' => __('Blue', 'bon'), 'badge-purple' => __('Purple', 'bon'), 'badge-gray' => __('Gray', 'bon'))), array('label' => __('Car Status', 'bon'), 'desc' => __('Car sale status', 'bon'), 'id' => $prefix . $suffix . 'status', 'type' => 'select', 'options' => shandora_get_car_search_option('status')), array('label' => __('Mileage', 'bon'), 'desc' => __('Car mileage', 'bon'), 'id' => $prefix . $suffix . 'mileage', 'type' => 'text'), array('label' => __('Exterior Color', 'bon'), 'desc' => __('Car exterior color', 'bon'), 'id' => $prefix . $suffix . 'extcolor', 'type' => 'text'), array('label' => __('Interior Color', 'bon'), 'desc' => __('Car interior color', 'bon'), 'id' => $prefix . $suffix . 'intcolor', 'type' => 'text'), array('label' => __('Fuel Type', 'bon'), 'desc' => __('Car fuel type', 'bon'), 'id' => $prefix . $suffix . 'fueltype', 'type' => 'select', 'options' => shandora_get_car_search_option('fuel')), array('label' => __('Transmission', 'bon'), 'desc' => __('Car transmission', 'bon'), 'id' => $prefix . $suffix . 'transmission', 'type' => 'select', 'options' => shandora_get_car_search_option('transmission')), array('label' => __('Price', 'bon'), 'desc' => __('The Car Price. Fill with numeric only, eq: 123456', 'bon'), 'id' => $prefix . $suffix . 'price', 'type' => 'text'), array('label' => __('Secondary Price', 'bon'), 'desc' => __('The Car Secondary Price eq. price without Tax. Fill with numeric only, eq: 123456', 'bon'), 'id' => $prefix . $suffix . 'price_sec', 'type' => 'text'), array('label' => __('Price as Text', 'bon'), 'desc' => __('Set price to use text. Text Options can be filled in theme Options, Shandora > Listing Settings > Price as Text.', 'bon'), 'id' => $prefix . $suffix . 'pricetext', 'type' => 'checkbox'), array('label' => __('Engine Type', 'bon'), 'desc' => __('Car engine type', 'bon'), 'id' => $prefix . $suffix . 'enginetype', 'type' => 'text'), array('label' => __('Engine Size', 'bon'), 'desc' => __('Car engine size', 'bon'), 'id' => $prefix . $suffix . 'enginesize', 'type' => 'text'), array('label' => __('Overall Height', 'bon'), 'desc' => __('The overall car height', 'bon'), 'id' => $prefix . $suffix . 'height', 'type' => 'text'), array('label' => __('Overall Width', 'bon'), 'desc' => __('The overall car width', 'bon'), 'id' => $prefix . $suffix . 'width', 'type' => 'text'), array('label' => __('Overall Length', 'bon'), 'desc' => __('The overall car length', 'bon'), 'id' => $prefix . $suffix . 'length', 'type' => 'text'), array('label' => __('Wheelbase', 'bon'), 'desc' => __('The wheelbase size', 'bon'), 'id' => $prefix . $suffix . 'wheelbase', 'type' => 'text'), array('label' => __('Track Front', 'bon'), 'desc' => __('The track front size', 'bon'), 'id' => $prefix . $suffix . 'trackfront', 'type' => 'text'), array('label' => __('Track Rear', 'bon'), 'desc' => __('The track front size', 'bon'), 'id' => $prefix . $suffix . 'trackrear', 'type' => 'text'), array('label' => __('Ground Clearance', 'bon'), 'desc' => __('The ground clearance size', 'bon'), 'id' => $prefix . $suffix . 'ground', 'type' => 'text'), array('label' => __('Standard Seating', 'bon'), 'desc' => __('How many standard seating available', 'bon'), 'id' => $prefix . $suffix . 'seating', 'type' => 'text'), array('label' => __('Steering Type', 'bon'), 'desc' => __('The car steering type', 'bon'), 'id' => $prefix . $suffix . 'steering', 'type' => 'text'), array('label' => __('ANCAP Rating / Safety Rating', 'bon'), 'desc' => __('Australasian New Car Assessment Program Rating. see http://ancap.com.au', 'bon'), 'id' => $prefix . $suffix . 'ancap', 'type' => 'slider', 'step' => '1', 'min' => '0', 'max' => '5'), array('label' => __('Year Built', 'bon'), 'desc' => __('When is the car year build? eq: 2013', 'bon'), 'id' => $prefix . $suffix . 'yearbuild', 'type' => 'text'), array('label' => __('Featured Car', 'bon'), 'desc' => __('Make the listing featured for featured listing widget', 'bon'), 'id' => $prefix . $suffix . 'featured', 'type' => 'checkbox'), array('label' => __('Sales Representative for this listing', 'bon'), 'desc' => __('The sales rep pointed for this car listing', 'bon'), 'id' => $prefix . $suffix . 'agentpointed', 'type' => 'old_post_select', 'post_type' => 'sales-representative')); /* The rewrite handles the URL structure. */ $manufacturer_rewrite_var = array('slug' => $manufacturer_slug, 'with_front' => false, 'hierarchical' => true, 'ep_mask' => EP_NONE); /* The rewrite handles the URL structure. */ $body_type_rewrite_var = array('slug' => $body_type_slug, 'with_front' => false, 'hierarchical' => false, 'ep_mask' => EP_NONE); /* The rewrite handles the URL structure. */ $dealer_location_rewrite_var = array('slug' => $dealer_location_slug, 'with_front' => false, 'hierarchical' => true, 'ep_mask' => EP_NONE); /* The rewrite handles the URL structure. */ $feature_rewrite_var = array('slug' => $feature_slug, 'with_front' => false, 'hierarchical' => false, 'ep_mask' => EP_NONE); if ($use_rewrite == 'no') { $feature_rewrite = true; $dealer_location_rewrite = true; $body_type_rewrite = true; $manufacturer_rewrite = true; } else { $feature_rewrite = $feature_rewrite_var; $dealer_location_rewrite = $dealer_location_rewrite_var; $body_type_rewrite = $body_type_rewrite_var; $manufacturer_rewrite = $manufacturer_rewrite_var; } $cpt->add_taxonomy("Manufacturer", array('rewrite' => $manufacturer_rewrite, 'label' => __('Manufacturers', 'bon'), 'labels' => array('menu_name' => __('Manufacturers', 'bon')), 'hierarchical' => true)); $cpt->add_taxonomy("Body Type", array('rewrite' => $body_type_rewrite, 'label' => __('Body Types', 'bon'), 'labels' => array('menu_name' => __('Body Types', 'bon')), 'hierarchical' => true)); $cpt->add_taxonomy("Dealer Location", array('rewrite' => $dealer_location_rewrite, 'label' => __('Dealer Locations', 'bon'), 'labels' => array('menu_name' => __('Dealer Locations', 'bon')), 'hierarchical' => true)); $cpt->add_taxonomy("Car Feature", array('rewrite' => $feature_rewrite, 'label' => __('Car Features', 'bon'), 'labels' => array('menu_name' => __('Features', 'bon')))); $cpt->add_meta_box('gallery-options', __('Gallery Options', 'bon'), $gallery_opts); $cpt->add_meta_box('car-options', __('Detail Options', 'bon'), $prop_options); $cpt->add_meta_box('video-options', __('Video Options', 'bon'), shandora_video_metabox_args()); }
$trackrear = shandora_get_meta($post->ID, 'listing_trackrear'); $trackfront = shandora_get_meta($post->ID, 'listing_trackfront'); $ground = shandora_get_meta($post->ID, 'listing_ground'); $seating = shandora_get_meta($post->ID, 'listing_seating'); $steering = shandora_get_meta($post->ID, 'listing_steering'); $length_measure = bon_get_option('length_measure', 'in.'); $mileage_measure = bon_get_option('mileage_measure', 'in.'); $trans_opt = shandora_get_car_search_option('transmission'); if (array_key_exists($transmission, $trans_opt)) { $transmission = $trans_opt[$transmission]; } $status_opt = shandora_get_car_search_option('status'); if (array_key_exists($status, $status_opt)) { $status = $status_opt[$status]; } $fuel_opt = shandora_get_car_search_option('fuel'); if (array_key_exists($fuel, $fuel_opt)) { $fuel = $fuel_opt[$fuel]; } $bodytype = get_the_term_list($post->ID, 'body-type', '', ', ', ''); $location = get_the_term_list($post->ID, 'dealer-location', '', ', ', ''); $terms = get_the_terms($post->ID, 'manufacturer'); $manufacturer = array(); if ($terms && !is_wp_error($terms)) { foreach ($terms as $term) { if ($term->parent == '0') { $manufacturer[] = '<a href="' . get_term_link($term->term_id, 'manufacturer') . '" title="' . $term->name . '">' . $term->name . '</a>'; } } } $manufacturer = implode(', ', $manufacturer);
function shandora_entry_meta() { global $post; $suffix = 'listing_'; $html = apply_atomic('entry_meta_icon', ''); if ($html != '') { return $html; } $view = isset($_GET['view']) ? $_GET['view'] : 'grid'; if (get_post_type() === 'listing') { $sizemeasurement = bon_get_option('measurement'); $bed = shandora_get_meta($post->ID, 'listing_bed'); $bath = shandora_get_meta($post->ID, 'listing_bath'); $lotsize = shandora_get_meta($post->ID, 'listing_buildingsize'); $rooms = shandora_get_meta($post->ID, 'listing_totalroom'); $garage = shandora_get_meta($post->ID, 'listing_garage'); $html = '<div class="entry-meta">'; if ($bed) { $html .= '<div class="icon bed"><i class="' . apply_atomic('bed_icon', 'sha-bed') . '"></i>'; $html .= '<span>'; $html .= sprintf(_n('%s Bed', '%s Beds', $bed, 'bon'), $bed); $html .= '</span>'; $html .= '</div>'; } if ($bath) { $html .= '<div class="icon bath"><i class="' . apply_atomic('bath_icon', 'sha-bath') . '"></i>'; $html .= '<span>'; $html .= sprintf(_n('%s Bath', '%s Baths', $bath, 'bon'), $bath); $html .= '</span>'; $html .= '</div>'; } if ($view == 'list') { if ($garage) { $html .= '<div class="icon garage"><i class="' . apply_atomic('garage_icon', 'sha-car') . '"></i>'; $html .= '<span>'; $html .= sprintf(_n('%s Garage', '%s Garages', $garage, 'bon'), $garage); $html .= '</span>'; $html .= '</div>'; } if ($rooms) { $html .= '<div class="icon room"><i class="' . apply_atomic('room_icon', 'sha-building') . '"></i>'; $html .= '<span>'; $html .= sprintf(_n('%s Room', '%s Rooms', $rooms, 'bon'), $rooms); $html .= '</span>'; $html .= '</div>'; } } if ($lotsize) { $html .= '<div class="icon size"><i class="' . apply_atomic('size_icon', 'sha-ruler') . '"></i>'; $html .= '<span>'; $html .= $lotsize ? $lotsize . ' ' . $sizemeasurement : __('Unspecified', 'bon'); $html .= '</span>'; $html .= '</div>'; } $html .= '</div>'; } else { if (get_post_type() == 'car-listing') { $transmission = shandora_get_meta($post->ID, $suffix . 'transmission'); $engine = shandora_get_meta($post->ID, $suffix . 'enginesize'); $mileage = shandora_get_meta($post->ID, $suffix . 'mileage'); $trans_opt = shandora_get_car_search_option('transmission'); if (array_key_exists($transmission, $trans_opt)) { $transmission = $trans_opt[$transmission]; } $html = '<div class="entry-meta">'; $html .= '<div class="icon engine"><i class="' . apply_atomic('engine_icon', 'sha-engine') . '"></i>'; $html .= '<span>'; $html .= $engine ? $engine : __('Unspecified', 'bon'); $html .= '</span>'; $html .= '</div>'; $html .= '<div class="icon transmission"><i class="' . apply_atomic('transmission_icon', 'sha-gear-shifter') . '"></i>'; $html .= '<span>'; $html .= $transmission ? $transmission : __('Unspecified', 'bon'); $html .= '</span>'; $html .= '</div>'; $html .= '<div class="icon mileage"><i class="' . apply_atomic('mileage_icon', 'bonicons bi-dashboard') . '"></i>'; $html .= '<span>'; $html .= $mileage ? $mileage : __('Unspecified', 'bon'); $html .= '</span>'; $html .= '</div>'; $html .= '</div>'; } else { if (get_post_type() == 'boat-listing') { $length = shandora_get_meta($post->ID, 'listing_length'); $speed = shandora_get_meta($post->ID, 'listing_speed'); $fuel = shandora_get_meta($post->ID, 'listing_fuelcaps'); $people = shandora_get_meta($post->ID, 'listing_people_cap'); $terms = get_the_terms($post->ID, 'boat-engine'); $engine_types = array(); $engine_type = ''; if ($terms && !is_wp_error($terms)) { foreach ($terms as $term) { $engine_types[] = $term->name; break; } } if (count($engine_types) > 0) { $engine_type = join(' ', $engine_types); } $html = '<div class="entry-meta">'; if ($engine_type) { $html .= '<div class="icon engine"><i class="' . apply_atomic('engine_icon', 'sha-engine') . '"></i> '; $html .= '<span>'; $html .= $engine_type; $html .= '</span>'; $html .= '</div>'; } if ($length) { $html .= '<div class="icon transmission"><i class="' . apply_atomic('length_icon', 'sha-ruler') . '"></i> '; $html .= '<span>'; $html .= $length . ' ' . bon_get_option('length_measure'); $html .= '</span>'; $html .= '</div>'; } if ($speed) { $html .= '<div class="icon speed"><i class="' . apply_atomic('speed_icon', 'bonicons bi-dashboard') . '"></i>'; $html .= '<span>'; $html .= $speed . ' ' . bon_get_option('speed_measure'); $html .= '</span>'; $html .= '</div>'; } if ($view == 'list') { if ($people) { $html .= '<div class="icon people"><i class="' . apply_atomic('people_icon', 'sha-users') . '"></i>'; $html .= '<span>'; $html .= $people . ' ' . __('People', 'bon'); $html .= '</span>'; $html .= '</div>'; } if ($fuel) { $html .= '<div class="icon room"><i class="' . apply_atomic('fuel_icon', 'sha-tint') . '"></i>'; $html .= '<span>'; $html .= $fuel . ' ' . bon_get_option('volume_measure'); $html .= '</span>'; $html .= '</div>'; } } $html .= '</div>'; } } } return $html; }
<?php $engine = shandora_get_meta($post->ID, 'listing_enginesize'); $transmission = shandora_get_meta($post->ID, 'listing_transmission'); $ancap = shandora_get_meta($post->ID, 'listing_ancap'); $mileage = shandora_get_meta($post->ID, 'listing_mileage'); $trans_opt = shandora_get_car_search_option('transmission'); if (array_key_exists($transmission, $trans_opt)) { $transmission = $trans_opt[$transmission]; } $terms = get_the_terms($post->ID, 'body-type'); if ($terms && !is_wp_error($terms)) { foreach ($terms as $term) { $bodytype = $term->name; break; // to display only one body type } } ?> <ul class="large-custom-grid-5 small-custom-grid-3"> <?php if (!empty($engine)) { ?> <li class="bed"><div class="meta-wrap"> <i class="sha-engine"></i> <span class="meta-value"> <?php echo $engine; ?> </span></div> </li>
<?php $suffix = 'listing_'; $status = shandora_get_meta($post->ID, $suffix . 'status'); $status_key = shandora_get_meta($post->ID, $suffix . 'status'); $badge = shandora_get_meta($post->ID, $suffix . 'badge'); $badgeclr = shandora_get_meta($post->ID, $suffix . 'badge_color'); $status_opt = shandora_get_car_search_option('status'); if (array_key_exists($status, $status_opt)) { $status = $status_opt[$status]; } if (is_singular(get_post_type())) { ?> <article id="post-<?php the_ID(); ?> " <?php post_class($status_key . ' listing'); ?> itemscope itemtype="http://schema.org/AutoDealer"> <header class="entry-header clear"> <?php echo apply_atomic_shortcode('entry_title', the_title('<h1 class="entry-title" itemprop="name">', '</h1>', false)); ?> <a class="print" href="javascript:window.print()"><i class="sha-printer"></i></a> <?php echo apply_atomic_shortcode('entry_fav', '[bon-fav]'); ?> <?php echo apply_atomic_shortcode('listing_published', '[entry-published before="<div class=\'show-for-large\'>" after="</div>" text="' . __('Published on ', 'bon') . '"]');
function shandora_manage_columns($name) { global $post; switch ($name) { case 'status': $s_opt = shandora_get_search_option('status'); $status = shandora_get_meta($post->ID, 'listing_status'); if (array_key_exists($status, $s_opt)) { $status = $s_opt[$status]; } echo $status; break; case 'car_status': $s_opt = shandora_get_car_search_option('status'); $status = shandora_get_meta($post->ID, 'listing_status'); if (array_key_exists($status, $s_opt)) { $status = $s_opt[$status]; } echo $status; break; case 'yearbuilt': $year = shandora_get_meta($post->ID, 'listing_yearbuild'); echo $year; break; case 'price': $price = shandora_get_meta($post->ID, 'listing_price', true); echo $price; break; case 'propertylocation': $location = get_the_term_list($post->ID, 'property-location', '', ', ', ''); echo $location; break; case 'propertytype': $type = get_the_term_list($post->ID, 'property-type', '', ', ', ''); echo $type; break; case 'bodytype': $type = get_the_term_list($post->ID, 'body-type', '', ', ', ''); echo $type; break; } }
/** * Used to output car manufacturer field in search panel * * @since 1.2.4 * @return string * @param string $value * */ function shandora_search_manufacturer_level1_field($value = array(), $class, $is_widget = false) { $o = apply_atomic('search_manufacturer_level1_field', '', $value, $class, $is_widget); if ($o != '') { return $o; } global $bon; $form = $bon->form(); $o = $form->form_label(bon_get_option('manufacturer_level1_label'), 'manufacturer_level1'); $o .= $form->form_dropdown('manufacturer_level1', shandora_get_car_search_option('manufacturer1'), $value['manufacturer_level1'], 'class=" ' . $class . '"'); return apply_atomic('search_manufacturer_level1_field_output', $o); }
function shandora_builder_options_filter($args) { $prefix = bon_get_prefix(); if (function_exists('bon_toolkit_get_builder_suffix')) { $suffix = bon_toolkit_get_builder_suffix(); } else { $suffix = ''; } $options_car = bon_get_option('enable_car_listing', 'no'); $agentopt = bon_get_post_id_lists('agent'); $salesopt = bon_get_post_id_lists('sales-representative'); $list_property_type = bon_get_categories('property-type'); $list_body = bon_get_categories('body-type'); $list_dealer_loc = bon_get_categories('dealer-location'); $list_manufacturer = bon_get_categories('manufacturer'); $list_car_feature = bon_get_categories('car-feature'); $list_loc = bon_get_categories('property-location'); $list_features = bon_get_categories('property-feature'); if (isset($args['elements']['post'])) { unset($args['elements']['post']); } $prop_query = array('latest' => __('Latest', 'bon'), 'featured' => __('Featured', 'bon')); $list_cat = bon_get_categories('category'); $prop_query = array_merge($prop_query, shandora_get_search_option('status')); $args['elements']['post_carousel'] = array('header' => array('title' => __('Title', 'bon'), 'name' => $prefix . 'builder_post_carousel_text', 'type' => 'text'), 'numberposts' => array('title' => __('Number of Posts to Fetch', 'bon'), 'name' => $prefix . 'builder_post_carousel_numberposts', 'type' => 'text'), 'category' => array('title' => __('Category', 'bon'), 'name' => $prefix . 'builder_post_carousel_category', 'type' => 'select', 'options' => $list_cat), 'button_color' => array('title' => __('Button Color', 'bon'), 'name' => $prefix . 'builder_button_color', 'type' => 'select', 'options' => array('red' => __('Red', 'bon'), 'blue' => __('Blue', 'bon'), 'green' => __('Green', 'bon'), 'purple' => __('Purple', 'bon'), 'orange' => __('Orange', 'bon'))), 'margin' => array('title' => __('Bottom Margin', 'bon'), 'name' => $prefix . 'builder_post_carousel_margin', 'std' => '0', 'hr' => 'none', 'type' => 'text'), 'default_size' => 'span12', 'allowed_size' => array('span12' => '1/1')); $args['elements']['listings'] = array('numberposts' => array('title' => __('Number of Posts to Fetch', 'bon'), 'name' => $prefix . 'builder_listings_numberposts', 'type' => 'text'), 'property_id' => array('title' => __('Query by ID (Separate by comma eq. 1,2,3)', 'bon'), 'name' => $prefix . 'builder_listings_id', 'type' => 'text'), 'property_type' => array('title' => __('Property Type', 'bon'), 'name' => $prefix . 'builder_listings_cat', 'type' => 'select', 'options' => $list_property_type), 'property_location' => array('title' => __('Property Location', 'bon'), 'name' => $prefix . 'builder_listings_location', 'type' => 'select', 'options' => $list_loc), 'property_feature' => array('title' => __('Property Feature', 'bon'), 'name' => $prefix . 'builder_listings_features', 'type' => 'select', 'options' => $list_features), 'property_query' => array('title' => __('Property Query', 'bon'), 'name' => $prefix . 'builder_listings_query', 'type' => 'select', 'options' => $prop_query), 'show_map' => array('title' => __('Show Map', 'bon'), 'name' => $prefix . 'builder_listings_map', 'type' => 'select', 'options' => array('no' => __('No', 'bon'), 'yes' => __('Yes', 'bon'))), 'margin' => array('title' => __('Bottom Margin', 'bon'), 'name' => $prefix . 'builder_listings_margin', 'std' => '0', 'hr' => 'none', 'type' => 'text'), 'default_size' => 'span12', 'allowed_size' => array('span12' => '1/1')); $args['elements']['agent'] = array('header' => array('title' => __('Title', 'bon'), 'name' => $prefix . 'builder_agent_title', 'type' => 'text'), 'agent_id' => array('title' => __('Pick Agent', 'bon'), 'name' => $prefix . 'builder_agent_id', 'type' => 'select', 'options' => $agentopt), 'color' => array('title' => __('Background Color', 'bon'), 'name' => $prefix . 'builder_agent_color', 'type' => 'select', 'options' => array('blue' => __('Blue', 'bon'), 'red' => __('Red', 'bon'), 'green' => __('Green', 'bon'), 'orange' => __('Orange', 'bon'), 'yellow' => __('Yellow', 'bon'), 'purple' => __('Purple', 'bon'))), 'margin' => array('title' => __('Bottom Margin', 'bon'), 'name' => $prefix . 'builder_agent_margin', 'std' => '0', 'hr' => 'none', 'type' => 'text'), 'default_size' => 'span3', 'allowed_size' => array('span3' => '1/4', 'span4' => '1/3', 'span6' => '1/2', 'span8' => '2/3', 'span9' => '3/4', 'span12' => '1/1')); if ($options_car == 'yes') { $car_query = array('latest' => __('Latest', 'bon'), 'featured' => __('Featured', 'bon')); $car_query = array_merge($car_query, shandora_get_car_search_option('status')); $args['elements']['car_listings'] = array('numberposts' => array('title' => __('Number of Posts to Fetch', 'bon'), 'name' => $prefix . 'builder_car_listings_numberposts', 'type' => 'text'), 'car_id' => array('title' => __('Query by ID (Separate by comma eq. 1,2,3)', 'bon'), 'name' => $prefix . 'builder_car_listings_id', 'type' => 'text'), 'body_type' => array('title' => __('Body Type', 'bon'), 'name' => $prefix . 'builder_car_listings_cat', 'type' => 'select', 'options' => $list_body), 'dealer_location' => array('title' => __('Dealer Location', 'bon'), 'name' => $prefix . 'builder_car_listings_location', 'type' => 'select', 'options' => $list_dealer_loc), 'car_feature' => array('title' => __('Car Feature', 'bon'), 'name' => $prefix . 'builder_car_listings_features', 'type' => 'select', 'options' => $list_car_feature), 'car_query' => array('title' => __('Car Query', 'bon'), 'name' => $prefix . 'builder_car_listings_query', 'type' => 'select', 'options' => $car_query), 'manufacturer' => array('title' => __('Manufacturer', 'bon'), 'name' => $prefix . 'builder_car_listings_manufacturers', 'type' => 'select', 'options' => $list_manufacturer), 'margin' => array('title' => __('Bottom Margin', 'bon'), 'name' => $prefix . 'builder_car_listings_margin', 'std' => '0', 'hr' => 'none', 'type' => 'text'), 'default_size' => 'span12', 'allowed_size' => array('span12' => '1/1')); $args['elements']['sales_rep'] = array('header' => array('title' => __('Title', 'bon'), 'name' => $prefix . 'builder_sales_rep_title', 'type' => 'text'), 'agent_id' => array('title' => __('Pick Sales Rep', 'bon'), 'name' => $prefix . 'builder_sales_rep_id', 'type' => 'select', 'options' => $salesopt), 'color' => array('title' => __('Background Color', 'bon'), 'name' => $prefix . 'builder_sales_rep_color', 'type' => 'select', 'options' => array('blue' => __('Blue', 'bon'), 'red' => __('Red', 'bon'), 'green' => __('Green', 'bon'), 'orange' => __('Orange', 'bon'))), 'margin' => array('title' => __('Bottom Margin', 'bon'), 'name' => $prefix . 'builder_sales_rep_margin', 'std' => '0', 'hr' => 'none', 'type' => 'text'), 'default_size' => 'span3', 'allowed_size' => array('span3' => '1/4', 'span4' => '1/3', 'span6' => '1/2', 'span8' => '2/3', 'span9' => '3/4', 'span12' => '1/1')); } return $args; }