コード例 #1
0
ファイル: car.php プロジェクト: VadimSid/thinkgreek
 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());
 }
コード例 #2
0
ファイル: theme-head.php プロジェクト: VadimSid/thinkgreek
    function shandora_print_tracking_code()
    {
        $scripts = bon_get_option('google_analytics');
        if (!empty($scripts)) {
            ?>
			
				<?php 
            echo $scripts;
            ?>


			<?php 
        }
    }
コード例 #3
0
 /**
  * Register available menu option fields to the wp menu backend
  * 
  *
  * @access public
  * @since 1.0 
  * @return void
  */
 function register_options_key()
 {
     global $wp_registered_sidebars;
     $widget_options = array('' => __('Select One', 'bon'));
     $sidebars_opt = bon_get_option('sidebars_generator');
     if (!empty($sidebars_opt) && is_array($sidebars_opt)) {
         foreach ($sidebars_opt as $sidebar) {
             if (!empty($sidebar['sidebar_name']) && isset($sidebar['is_menu'])) {
                 $id = strtolower(str_replace(" ", "-", $sidebar['sidebar_name']));
                 // Check whether sidebar already registered or not
                 if (array_key_exists($id, $wp_registered_sidebars)) {
                     $widget_options[$id] = $sidebar['sidebar_name'];
                 }
             }
         }
     }
     $this->default_keys = array('separator' => array('id' => 'separator', 'level' => '1-plus', 'desc' => __('Turn this menu into a separator, any options will be ignored, unless there is a custom content / widget had been set', 'bon'), 'label' => __('Use As Divider', 'bon'), 'type' => 'checkbox', 'std' => 0), 'ismega' => array('id' => 'ismega', 'level' => '0', 'desc' => __('Make this item\'s submenu a mega menu. Leave unchecked to use a normal menu. Note: if the menu location doesn\'t supporting mega menu this setting will be ignored.', 'bon'), 'label' => __('Activate Mega Menu', 'bon'), 'type' => 'checkbox', 'std' => 1), 'fullwidth' => array('id' => 'fullwidth', 'level' => '0', 'desc' => __('Set the submenu to take full width of the menu bar', 'bon'), 'label' => __('Full Width Submenu', 'bon'), 'type' => 'checkbox', 'std' => 0), 'notext' => array('id' => 'notext', 'level' => '0-plus', 'desc' => __('Remove the text/label from the menu item, very useful for image only menu.', 'bon'), 'label' => __('Disable Text', 'bon'), 'type' => 'checkbox', 'std' => 0), 'nolink' => array('id' => 'nolink', 'level' => '0-plus', 'desc' => __('Remove link from this menu item, Can be useful when using widget or content.', 'bon'), 'label' => __('Disable Link', 'bon'), 'type' => 'checkbox', 'std' => 0), 'newrow' => array('id' => 'newrow', 'level' => '1', 'desc' => __('Start a new row with this item. Always check this for the first item in your new row. Do not check this on fullwidth with defined number of column', 'bon'), 'label' => __('New Row', 'bon'), 'type' => 'checkbox', 'std' => 0), 'align' => array('id' => 'align', 'level' => '0-plus', 'desc' => __('Set the label alignment.', 'bon'), 'label' => __('Alignment', 'bon'), 'type' => 'select', 'std' => '', 'options' => array('left' => __('Left', 'bon'), 'center' => __('Center', 'bon'), 'right' => __('Right', 'bon'))), 'trigger' => array('id' => 'trigger', 'level' => '0-plus', 'desc' => __('Set which action will trigger submenu display. Note: <strong>On click</strong> will prevent the link (if exists) to trigger.', 'bon'), 'label' => __('Event Trigger', 'bon'), 'type' => 'select', 'options' => array('hover' => __('On Hover', 'bon'), 'click' => __('On Click', 'bon')), 'std' => 'hover'), 'numcols' => array('id' => 'numcols', 'level' => '0', 'desc' => __('Set number or column to be calculated for each row. Only work if Full Width Submenu is checked', 'bon'), 'label' => __('Submenu Column (Full Width Only)', 'bon'), 'type' => 'select', 'options' => array('auto' => __('Auto', 'bon'), '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8'), 'std' => 'auto'), 'icon' => array('id' => 'icon', 'level' => '0-plus', 'label' => __('Use Icon', 'bon'), 'desc' => __('Set a predefined icon from icon lists.', 'bon'), 'type' => 'icon', 'std' => ''), 'iconsize' => array('id' => 'iconsize', 'level' => '0-plus', 'label' => __('Icon Size', 'bon'), 'desc' => __('Set the icon size.', 'bon'), 'type' => 'select', 'std' => '1x', 'options' => array('tiny' => '1/2x', 'sml' => '3/4x', '1x' => '1x', '2x' => '2x', '3x' => '3x', '4x' => '4x', '5x' => '5x', '6x' => '6x', '7x' => '7x', '8x' => '8x', '9x' => '9x', '10x' => '10x')), 'thumbnail' => array('id' => 'thumbnail', 'level' => '0-plus', 'desc' => __('Set a thumbnail/image to be displayed.', 'bon'), 'label' => __('Set Thumbnail', 'bon'), 'type' => 'upload', 'std' => ''), 'thumbpos' => array('id' => 'thumbpos', 'level' => '0-plus', 'desc' => __('Set the thumbnail/icon position.', 'bon'), 'label' => __('Thumbnail/Icon Position', 'bon'), 'type' => 'select', 'std' => '', 'options' => array('left' => __('Before Text', 'bon'), 'top' => __('Above Text', 'bon'), 'bottom' => __('Below Text', 'bon'), 'right' => __('After Text', 'bon'))), 'widget' => array('id' => 'widget', 'level' => '1-plus', 'desc' => __('Choose a widget slot to display widget based content.', 'bon'), 'label' => __('Select Sidebar', 'bon'), 'type' => 'select', 'options' => $widget_options, 'std' => ''), 'widgetcol' => array('id' => 'widgetcol', 'level' => '1-plus', 'desc' => __('Select the widget column.', 'bon'), 'label' => __('Widget Column', 'bon'), 'type' => 'select', 'options' => array('auto' => __('Auto (Depend on widget length)', 'bon'), 'parent' => __('Same as parent', 'bon'), '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12'), 'std' => ''), 'content' => array('id' => 'content', 'level' => '1-plus', 'desc' => __('Display a custom content. Input accept shortcodes and allowed html tags.', 'bon'), 'label' => __('Custom Content', 'bon'), 'type' => 'editor', 'std' => ''));
     $this->default_keys = apply_filters('bon_nav_menu_option_key_defaults', $this->default_keys);
 }
コード例 #4
0
 function __construct()
 {
     add_action('template_redirect', array($this, 'save_account_details'));
     add_action('bon_before_login_form', array($this, 'process_login'));
     add_action('bon_before_login_form', array($this, 'process_registration'));
     add_action('bon_before_lost_password_form', array($this, 'process_reset_password'));
     add_action('bon_before_login_form', 'bon_show_error');
     add_action('bon_before_lost_password_form', 'bon_show_error');
     add_action('bon_before_edit_account_form', 'bon_show_error');
     add_action('bon_before_account', 'bon_show_error');
     add_filter('bon_shortcode_lists', array($this, 'shortcode_filter'));
     add_filter('user_contactmethods', array($this, 'filter_contact_method'));
     add_filter('comments_open', array($this, 'remove_comments'), 10, 2);
     add_filter('pings_open', array($this, 'remove_comments'), 10, 2);
     $this->my_account_page_id = apply_filters('bon_my_account_page_id', bon_get_option('my_account_page', ''));
     add_action('init', array($this, 'add_endpoints'));
     if (!is_admin()) {
         add_filter('query_vars', array($this, 'add_query_vars'), 0);
         add_action('parse_request', array($this, 'parse_request'), 0);
     }
     $this->init_query_vars();
 }
コード例 #5
0
ファイル: theme-options.php プロジェクト: VadimSid/thinkgreek
 function bon_set_theme_options()
 {
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/assets/css/colors/';
     $alt_stylesheets = array();
     if (is_dir($alt_stylesheet_path)) {
         if ($alt_stylesheet_dir = opendir($alt_stylesheet_path)) {
             while (($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false) {
                 if (stristr($alt_stylesheet_file, '.css') !== false) {
                     $stylesheet = str_replace('.css', '', $alt_stylesheet_file);
                     $alt_stylesheets[$stylesheet] = trailingslashit(BON_THEME_URI) . 'assets/images/colors/' . $stylesheet . '.png';
                 }
             }
         }
     }
     $color_options = apply_filters('bon_color_options', array('blue' => __('Blue', 'bon'), 'red' => __('Red', 'bon'), 'green' => __('Green', 'bon'), 'orange' => __('Orange', 'bon'), 'purple' => __('Purple', 'bon')));
     $search_fields = apply_filters('bon_search_field_options', array('none' => __('Disable', 'bon'), 'title' => __('Post Title Field (Real Estate / Car Dealer)', 'bon'), 'mls' => __('MLS Text Field', 'bon'), 'zip' => __('Zip Text Field', 'bon'), 'status' => __('Status Dropdown', 'bon'), 'location' => __('Location Dropdown', 'bon'), 'location_level1' => __('Level 1 Location Only', 'bon'), 'location_level2' => __('Level 2 Location Only', 'bon'), 'location_level3' => __('Level 3 Location Only', 'bon'), 'feature' => __('Feature Dropdown', 'bon'), 'lotsize' => __('Lot Size Slider', 'bon'), 'buildingsize' => __('Building Size Slider', 'bon'), 'floor' => __('Floor Slider', 'bon'), 'agent' => __('Agent Dropdown', 'bon'), 'garage' => __('Garage Slider', 'bon'), 'basement' => __('Basement Slider', 'bon'), 'mortgage' => __('Mortgage Availability Dropdown', 'bon'), 'type' => __('Property Type Dropdown', 'bon'), 'price' => __('Price Range Slider', 'bon'), 'bed' => __('Beds Slider', 'bon'), 'bath' => __('Baths Slider', 'bon'), 'room' => __('Total Room Slider', 'bon')));
     $car_search_fields = apply_filters('bon_car_search_field_options', array('reg' => __('Reg Number Field **Car Listing**', 'bon'), 'car_status' => __('Car Status Dropdown **Car Listing**', 'bon'), 'mileage' => __('Mileage Slider **Car Listing**', 'bon'), 'exterior_color' => __('Exterior Color Field **Car Listing**', 'bon'), 'interior_color' => __('Interior Color Field **Car Listing**', 'bon'), 'fuel_type' => __('Fuel Type Field **Car Listing**', 'bon'), 'transmission' => __('Transmission Dropdown **Car Listing**', 'bon'), 'car_price' => __('Price Range Slider **Car Listing**', 'bon'), 'ancap' => __('ANCAP or Safety Slider **Car Listing**', 'bon'), 'dealer_location' => __('Dealer Location Dropdown **Car Listing**', 'bon'), 'car_feature' => __('Car Feature Dropdown **Car Listing**', 'bon'), 'body_type' => __('Body Type Dropdown **Car Listing**', 'bon'), 'manufacturer' => __('Manufacturer Dropdown **Car Listing**', 'bon'), 'manufacturer_level1' => __('Manufacturer Dropdown Level 1 **Car Listing**', 'bon'), 'manufacturer_level2' => __('Manufacturer Dropdown Level 2 **Car Listing**', 'bon'), 'manufacturer_level3' => __('Manufacturer Dropdown Level 3 **Car Listing**', 'bon'), 'dealer_location_level1' => __('Level 1 Dealer Location Only **Car Listing**', 'bon'), 'dealer_location_level2' => __('Level 2 Dealer Location Only **Car Listing**', 'bon'), 'dealer_location_level3' => __('Level 3 Dealer Location Only **Car Listing**', 'bon'), 'yearbuilt' => __('Year Built', 'bon')));
     $boat_search_fields = apply_filters('bon_boat_search_field_options', array('boat_reg' => __('Boat Reg Number Field', 'bon'), 'boat_status' => __('Boat Condition Dropdown', 'bon'), 'boat_make' => __('Boat Make', 'bon'), 'boat_model' => __('Boat Model', 'bon'), 'boat_submodel' => __('Boat Sub Model', 'bon'), 'boat_engine_make' => __('Boat Engine Make', 'bon'), 'boat_engine_model' => __('Boat Engine Model', 'bon'), 'boat_engine_submodel' => __('Boat Engine Sub Model', 'bon'), 'boat_location' => __('Boat Dealer Location Dropdown ', 'bon'), 'boat_location_level1' => __('Boat Level 1 Dealer Location Only ', 'bon'), 'boat_location_level2' => __('Boat Level 2 Dealer Location Only ', 'bon'), 'boat_location_level3' => __('Boat Level 3 Dealer Location Only ', 'bon'), 'boat_feature' => __('Boat Boat Feature Dropdown', 'bon'), 'boat_yearbuilt' => __('Boat Year Built', 'bon'), 'boat_hull' => __('Boat Hull Material', 'bon'), 'boat_fuel' => __('Boat Fuel Type', 'bon'), 'boat_price' => __('Boat Price Range Slider', 'bon')));
     $orderby_options = apply_filters('bon_orderby_options', array('date' => __('Date', 'bon'), 'price' => __('Price', 'bon'), 'title' => __('Title', 'bon'), 'buildingsize' => __('Size', 'bon')));
     $order_options = array('ASC' => __('Ascending', 'bon'), 'DESC' => __('Descending', 'bon'));
     if (bon_get_option('enable_car_listing') == 'yes') {
         $search_fields = array_merge($search_fields, $car_search_fields);
     }
     if (bon_get_option('enable_boat_listing') == 'yes') {
         $search_fields = array_merge($search_fields, $boat_search_fields);
     }
     $layouts = get_theme_support('theme-layouts');
     $args = theme_layouts_get_args();
     /* Set up an array for the layout choices and add in the 'default' layout. */
     $layout_choices = array();
     /* Only add 'default' if it's the actual default layout. */
     if ('default' == $args['default']) {
         $layout_choices['default'] = theme_layouts_get_string('default');
     }
     /* Loop through each of the layouts and add it to the choices array with proper key/value pairs. */
     foreach ($layouts[0] as $layout) {
         $layout_choices[$layout] = theme_layouts_get_image_string($layout);
         if ($layout != '1c') {
             $layout_choices_2[$layout] = theme_layouts_get_image_string($layout);
         }
     }
     // More Options
     $slide_options = array();
     $total_possible_slides = 10;
     for ($i = 1; $i <= $total_possible_slides; $i++) {
         $slide_options[] = $i;
     }
     // Setup an array of numbers.
     $numbers = array();
     for ($i = 1; $i <= 20; $i++) {
         $numbers[$i] = $i;
     }
     $options = array();
     /* General */
     $options[] = array('slug' => 'bon_options', 'label' => __('General Settings', 'bon'), 'type' => 'heading', 'icon' => 'dashicons-admin-generic');
     $options[] = array('slug' => 'bon_options', 'label' => __('Quick Start', 'bon'), 'type' => 'subheading');
     $options[] = array('slug' => 'bon_options', 'label' => __('Custom Logo', 'bon'), 'desc' => __('Upload a logo for your theme, or specify an image URL directly. The best size is <strong>270x80 px</strong>', 'bon'), 'id' => 'logo', 'std' => '', 'type' => 'upload');
     $options[] = array('slug' => 'bon_options', 'label' => __('Custom Favicon', 'bon'), 'desc' => __('Upload a Favicon', 'bon'), 'id' => 'favicon', 'std' => '', 'type' => 'upload');
     $options[] = array('slug' => 'bon_options', 'label' => __('Slider Posts Limit', 'bon'), 'desc' => __('How many slideshow to show?', 'bon'), 'id' => 'slider_post_per_page', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Slider Interval', 'bon'), 'desc' => __('Slideshow Interval for each auto slide', 'bon'), 'id' => 'slider_interval', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show BreadCrumb', 'bon'), 'desc' => __('Show or hide breadcrumb page header', 'bon'), 'id' => 'show_page_header', 'std' => 'show', 'options' => array('show' => __('Show', 'bon'), 'hide' => __('Hide', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Previous / Next link on pages', 'bon'), 'desc' => __('If enabled the it will show previous and next link on the page', 'bon'), 'id' => 'show_previous_next', 'type' => 'select', 'options' => array('no' => __('Show', 'bon'), 'yes' => __('Hide', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Image Slider in Home', 'bon'), 'desc' => __('Show or hide image slider in home page template', 'bon'), 'id' => 'show_slider', 'std' => 'show', 'options' => array('show' => __('Show', 'bon'), 'hide' => __('Hide', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Tracking Code', 'bon'), 'desc' => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'bon'), 'id' => 'google_analytics', 'std' => '', 'class' => 'code_mirror', 'type' => 'textarea');
     $options[] = array('slug' => 'bon_options', 'label' => __('Display Options', 'bon'), 'type' => 'subheading');
     $options[] = array('slug' => 'bon_options', 'label' => __('Custom CSS', 'bon'), 'desc' => __('Quickly add some CSS to your theme by adding it to this block. Do not use &lt;style&gt; tag', 'bon'), 'id' => 'custom_css', 'std' => '', 'class' => 'code_mirror', 'type' => 'textarea');
     $options[] = array('slug' => 'bon_options', 'label' => __('Custom JS', 'bon'), 'desc' => __('Quickly add some Javascript to your theme by adding it to this block. Do not use &lt;script&gt; tag ', 'bon'), 'id' => 'custom_js', 'std' => '', 'class' => 'code_mirror', 'type' => 'textarea');
     /**
      * =====================================================================================================
      *
      * Header Settings
      * 
      * @category Header
      *
      * ======================================================================================================
      */
     $options[] = array('slug' => 'bon_options', 'label' => __('Header Settings', 'bon'), 'type' => 'heading', 'icon' => 'dashicons-schedule');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Top Menu', 'bon'), 'desc' => __('Show or hide the top menu navigation', 'bon'), 'id' => 'show_top_menu', 'std' => 'show', 'options' => array('show' => __('Show', 'bon'), 'hide' => __('Hide', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => '', 'desc' => '', 'std' => __('This section will handle the columns in the header, the area beside logo. The "Phone Number" Group and the "Address Group"', 'bon'), 'type' => 'info');
     $options[] = array('slug' => 'bon_options', 'label' => sprintf(__('Show Header Col 1', 'bon'), $i), 'desc' => __('Enable the the heder column 1', 'bon'), 'id' => 'enable_header_col_1', 'std' => 1, 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('slug' => 'bon_options', 'label' => __('Header Column 1 Title', 'bon'), 'desc' => __('The title for header group 1. eq. <strong>Need help from us? Feel free to call us</strong>', 'bon'), 'id' => 'hgroup1_title', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Phone Number', 'bon'), 'desc' => __('The phone number eq. <strong>123-456-789-01</strong>. Separate number by commas (,) if you have more than 1 number. Maximum supported phone number is 3', 'bon'), 'id' => 'hgroup1_content', 'std' => '', 'class' => 'hidden last', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => sprintf(__('Show Header Col 2', 'bon'), $i), 'desc' => __('Enable the the heder column 2', 'bon'), 'id' => 'enable_header_col_2', 'std' => 1, 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('slug' => 'bon_options', 'label' => __('Header Column 2 Title', 'bon'), 'desc' => __('The title for header group 2. eq. <strong>Want to Meet & Talk Directly? Find us here</strong>', 'bon'), 'id' => 'hgroup2_title', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Address', 'bon'), 'desc' => __('The address eq. <strong>999 Folsom Avenue, Suite 1111 - Los Angeles, CA</strong>', 'bon'), 'id' => 'hgroup2_line1', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Opening Hours', 'bon'), 'desc' => __('The opening hour eq. <strong>Monday - Saturday (9AM - 5PM)</strong>', 'bon'), 'id' => 'hgroup2_line2', 'std' => '', 'class' => 'hidden last', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => sprintf(__('Centering Logo', 'bon'), $i), 'desc' => __('Centering the logo if both the header column is disabled.', 'bon'), 'id' => 'centering_logo', 'std' => 0, 'type' => 'checkbox');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Header Search Field', 'bon'), 'desc' => __('Show the search field in the header / menu.', 'bon'), 'id' => 'show_header_search', 'std' => 'yes', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Header Default State', 'bon'), 'desc' => __('Set the header default state to hide or show the main header. Note: this setting will be overriden by cookie setting if header already toggled.', 'bon'), 'id' => 'show_main_header', 'options' => array('show' => __('Show', 'bon'), 'hide' => __('Hide', 'bon')), 'type' => 'select');
     /**
      * =====================================================================================================
      *
      * Color Settings
      * 
      * @category Color
      *
      * ======================================================================================================
      */
     $options[] = array('slug' => 'bon_options', 'label' => __('Color Settings', 'bon'), 'type' => 'heading', 'icon' => 'dashicons-admin-appearance');
     $options[] = array('slug' => 'bon_options', 'label' => __('Main Color Style', 'bon'), 'desc' => __('Choose colorization stylesheet.', 'bon'), 'id' => 'main_color_style', 'std' => 'blue', 'type' => 'radio-img', 'options' => $alt_stylesheets);
     $options[] = array('slug' => 'bon_options', 'label' => __('Main header color Style', 'bon'), 'desc' => __('Choose main header style.', 'bon'), 'id' => 'main_header_style', 'type' => 'select', 'options' => array('dark' => __('Dark', 'bon'), 'light' => __('Light', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Main header navigation color Style', 'bon'), 'desc' => __('Choose main header navigation style.', 'bon'), 'id' => 'main_header_nav_style', 'type' => 'select', 'theme_customizer' => array('customizer_section' => 'nav', 'customizer_section_title' => __('Navigation Color', 'bon'), 'customizer_section_priority' => 100, 'customizer_section_theme' => false), 'options' => array('dark' => __('Dark', 'bon'), 'light' => __('Light', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Search Listing Button Color', 'bon'), 'desc' => __('Choose colorization stylesheet.', 'bon'), 'id' => 'search_button_color', 'type' => 'select', 'options' => $color_options);
     /**
      * =====================================================================================================
      *
      * Listing Settings
      * 
      * @category Listing
      *
      * ======================================================================================================
      */
     $options[] = array('slug' => 'bon_options', 'label' => __('Listing Settings', 'bon'), 'type' => 'heading', 'icon' => 'dashicons-editor-ul');
     $options[] = array('slug' => 'bon_options', 'label' => __('General Options', 'bon'), 'type' => 'subheading');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Search Panel', 'bon'), 'desc' => __('If enable there will show the main search panel in all listing related page', 'bon'), 'id' => 'enable_search_panel', 'type' => 'select', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     /*$options[] = array( 'slug' => 'bon_options',
     		'label' => __( 'Multi Search Panel', 'bon' ),
                      'desc' => __('Choose which search bar you want to show.','bon'),
                      'id' => 'search_panel_tab',
                      'std' => array(
                      	'property' => true,
                      	'car' => false,
                      	'boat' => false
                      ),
                      'type' => 'multicheck',
                      'options' => array(
                      	'property' => __('Real Estate', 'bon'),
                      	'car' => __('Car Dealer', 'bon'),
                      	'boat' => __('Boat Dealer', 'bon')
                      )
                      );
                      */
     $options[] = array('slug' => 'bon_options', 'label' => __('Enable Real Estate Listing', 'bon'), 'desc' => __('If enable there will be new menu in admin', 'bon'), 'id' => 'enable_property_listing', 'type' => 'select', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Enable Car Dealership Listing', 'bon'), 'desc' => __('If enable there will be new menu in admin', 'bon'), 'id' => 'enable_car_listing', 'type' => 'select', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     /*
     		$options[] = array( 'slug' => 'bon_options',
     							'label' => __( 'Enable Boat Dealership Listing', 'bon' ),
     'desc' => __('If enable there will be new menu in admin','bon'),
     'id' => 'enable_boat_listing',
     'type' => 'select',
     'options' => array(
     	'yes' => __('Yes','bon'),
     	'no' => __('No','bon')
     	),
     );
     */
     $options[] = array('slug' => 'bon_options', 'label' => __('Default Order By', 'bon'), 'desc' => __('Select default listing order by', 'bon'), 'id' => 'listing_orderby', 'type' => 'select', 'options' => $orderby_options);
     $options[] = array('slug' => 'bon_options', 'label' => __('Default Order', 'bon'), 'desc' => __('Select default listing order', 'bon'), 'id' => 'listing_order', 'type' => 'select', 'options' => $order_options);
     $options[] = array('slug' => 'bon_options', 'label' => __('Exclude sold / rented listing', 'bon'), 'desc' => __('If enabled the listing with sold / rented status will not included in the post lists display', 'bon'), 'id' => 'exclude_sold_rented', 'type' => 'select', 'options' => array('no' => __('No', 'bon'), 'yes' => __('Yes', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Front End Post Page', 'bon'), 'desc' => __('The page that hold the front end editor shortcode <code>[bon-fee]</code>. This page will be use as the edit and add new post container.', 'bon'), 'id' => 'fee_post_page', 'type' => 'page_select');
     $options[] = array('slug' => 'bon_options', 'label' => __('My Account Page', 'bon'), 'desc' => __('The page that hold the myaccount shortcode <code>[bon-account]</code>.', 'bon'), 'id' => 'my_account_page', 'type' => 'page_select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Compare Page', 'bon'), 'desc' => __('Page where the listing compare result will be.', 'bon'), 'id' => 'compare_page', 'type' => 'page_select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Search Result Page', 'bon'), 'desc' => __('Page where the listing search result will be.', 'bon'), 'id' => 'search_listing_page', 'type' => 'page_select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Number of Listings to Show', 'bon'), 'desc' => __('How many of listing you want to show for search listing page and browse listing page.', 'bon'), 'id' => 'listing_per_page', 'type' => 'text', 'std' => '8');
     $options[] = array('slug' => 'bon_options', 'label' => __('Price As Text Label', 'bon'), 'desc' => __('Use this as text placeholder for place you want to set as text only', 'bon'), 'id' => 'price_text', 'std' => __('Call For Quote', 'bon'), 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Price Currency', 'bon'), 'desc' => __('Input the size currency that will be used in listing price.', 'bon'), 'id' => 'currency', 'type' => 'text', 'std' => '$');
     $options[] = array('slug' => 'bon_options', 'label' => __('Currency symbol placement', 'bon'), 'desc' => __('Choose which format of the currency symbol placement.', 'bon'), 'id' => 'currency_placement', 'type' => 'select', 'options' => array('left' => '$1,234,567', 'left-space' => '$ 1,234,567 (with space)', 'right' => '1,234,567$', 'right-space' => '1,234,567 $ (with space)'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Price Format', 'bon'), 'desc' => __('Choose the price format.', 'bon'), 'id' => 'price_format', 'type' => 'select', 'options' => array('comma' => '$1,234,567.00 (with comma)', 'dot' => '$1.234.567.00 (with dot)'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Enable DPE / GES', 'bon'), 'desc' => __('Some European Real Estate required DPE / GES, select yes to enable DPE / GES Graph', 'bon'), 'id' => 'enable_dpe_ges', 'type' => 'select', 'options' => array('no' => __('No', 'bon'), 'yes' => __('Yes', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Secondary Price end text', 'bon'), 'desc' => __('Additional text for the secondary price end, eq: without tax.', 'bon'), 'id' => 'secondary_price_end', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Template Options', 'bon'), 'type' => 'subheading');
     $options[] = array('slug' => 'bon_options', 'label' => '', 'desc' => '', 'std' => __('The section below will handle the listing map view for the listing generated by page template or the archive and category page for listing.', 'bon'), 'type' => 'info');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Map', 'bon'), 'desc' => __('Show map browse on listings page.', 'bon'), 'id' => 'show_listings_map', 'type' => 'select', 'std' => 'show', 'options' => array('hide' => __('No', 'bon'), 'show' => __('Yes', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Map Zoom Button', 'bon'), 'desc' => __('Show map zoom button on listings page.', 'bon'), 'id' => 'show_listings_map_zoom', 'type' => 'select', 'options' => array('hide' => __('No', 'bon'), 'show' => __('Yes', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Map Type Button', 'bon'), 'desc' => __('Show map type button on listings page.', 'bon'), 'id' => 'show_listings_map_type', 'type' => 'select', 'options' => array('hide' => __('No', 'bon'), 'show' => __('Yes', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Listing Count in Listing Page', 'bon'), 'desc' => __('Show the listing count before the listing list', 'bon'), 'id' => 'show_listing_count', 'type' => 'select', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => '', 'desc' => '', 'std' => __('The section below will handle the listing details view.', 'bon'), 'type' => 'info');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Listing Gallery Thumbnail', 'bon'), 'desc' => __('Show the listing gallery thumbnail', 'bon'), 'id' => 'listing_gallery_thumbnail', 'type' => 'select', 'std' => 'yes', 'options' => array('yes' => __('Thumbnail Only', 'bon'), 'no' => __('Controller Only', 'bon'), 'both' => __('Both Controller and Thumbnail', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Image Caption in Gallery', 'bon'), 'desc' => __('Show the image caption in gallery image slider.', 'bon'), 'id' => 'show_gallery_caption', 'type' => 'select', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Listing Meta Data Icons', 'bon'), 'desc' => __('Show the meta data boxes with icons and details.', 'bon'), 'id' => 'show_listing_meta', 'type' => 'select', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Related Listings', 'bon'), 'desc' => __('Show Related Listings in Single Listing Detail Page', 'bon'), 'id' => 'show_related', 'type' => 'select', 'options' => array('no' => __('No', 'bon'), 'yes' => __('Yes', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Agent Detail', 'bon'), 'desc' => __('Show the agent details in the listing footer / beside the contact form.', 'bon'), 'id' => 'show_agent_details', 'type' => 'select', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Contact Form', 'bon'), 'desc' => __('Show the contact form in the listing footer.', 'bon'), 'id' => 'show_contact_form', 'type' => 'select', 'std' => 'yes', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => '', 'desc' => '', 'std' => __('The section below will handle the view of the listing lists.', 'bon'), 'type' => 'info');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Mouse Hover overlay', 'bon'), 'desc' => __('Show the overlay ( the stuff with permalink, gallery, compare button ) on mouse over ', 'bon'), 'id' => 'show_overlay', 'type' => 'select', 'std' => 'yes', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Listing box Item', 'bon'), 'desc' => __('Choose which one of the button you want to show in the listing overlay and listing box item if enabled.', 'bon'), 'id' => 'overlay_buttons', 'std' => array('link' => true, 'gallery' => true, 'compare' => true, 'icon' => true, 'thumbnail' => true), 'type' => 'multicheck', 'options' => array('link' => __('Permalink Button', 'bon'), 'gallery' => __('Gallery Button', 'bon'), 'compare' => __('Compare Button', 'bon'), 'icon' => __('Meta Icon', 'bon'), 'thumbnail' => __('Thumbnail', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Measurement Options', 'bon'), 'type' => 'subheading');
     $options[] = array('slug' => 'bon_options', 'label' => __('Size Measurement', 'bon'), 'desc' => __('The size measurement that will be used in lot size and building size.', 'bon'), 'id' => 'measurement', 'type' => 'text', 'std' => 'Sq Ft');
     $options[] = array('slug' => 'bon_options', 'label' => __('Volume Measurement', 'bon'), 'desc' => __('The length measurement that will be used capacity.', 'bon'), 'id' => 'volume_measure', 'type' => 'text', 'std' => 'litres');
     $options[] = array('slug' => 'bon_options', 'label' => __('Speed Measurement', 'bon'), 'desc' => __('The speed measurement.', 'bon'), 'id' => 'speed_measure', 'type' => 'text', 'std' => 'knots');
     $options[] = array('slug' => 'bon_options', 'label' => __('Height Measurement', 'bon'), 'desc' => __('The height measurement that will be used in dimension.', 'bon'), 'id' => 'height_measure', 'type' => 'text', 'std' => 'feet');
     $options[] = array('slug' => 'bon_options', 'label' => __('Width Measurement', 'bon'), 'desc' => __('The width measurement that will be used in dimension.', 'bon'), 'id' => 'width_measure', 'type' => 'text', 'std' => 'feet');
     $options[] = array('slug' => 'bon_options', 'label' => __('Length Measurement', 'bon'), 'desc' => __('The length measurement that will be used in dimension.', 'bon'), 'id' => 'length_measure', 'type' => 'text', 'std' => 'in.');
     $options[] = array('slug' => 'bon_options', 'label' => __('Mileage Measurement', 'bon'), 'desc' => __('The mileage measurement that will be used in mileage.', 'bon'), 'id' => 'mileage_measure', 'type' => 'text', 'std' => 'miles');
     $options[] = array('slug' => 'bon_options', 'label' => __('Search Panel Options', 'bon'), 'type' => 'subheading');
     $options[] = array('slug' => 'bon_options', 'label' => __('Price Slider Minimum Value', 'bon'), 'desc' => __('Minimum Value for the Price Range slider in the Search Listing Options', 'bon'), 'id' => 'price_range_min', 'std' => '0', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Price Slider Maximum Value', 'bon'), 'desc' => __('Maximum Value for the Price Range slider in the Search Listing Options', 'bon'), 'id' => 'price_range_max', 'std' => '1000000', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Price Slider Minimum Value (Rent Only)', 'bon'), 'desc' => __('Minimum Value for the Price Range slider in the Search Listing Options when user choosing For Rent Status.', 'bon'), 'id' => 'price_range_min_rent', 'std' => '0', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Price Slider Maximum Value (Rent Only)', 'bon'), 'desc' => __('Maximum Value for the Price Range slider in the Search Listing Options when user choosing For Rent Status.', 'bon'), 'id' => 'price_range_max_rent', 'std' => '10000', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Price Slider Step Value', 'bon'), 'desc' => __('Step Value for the Price Range slider when the Slide Event fired', 'bon'), 'id' => 'price_range_step', 'std' => '5000', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Price Slider Step Value (Rent Only)', 'bon'), 'desc' => __('Step Value for the Price Range slider when the Slide Event fired, for when user choosing Rent Status only.', 'bon'), 'id' => 'price_range_step_rent', 'std' => '50', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Maximum Bed Options', 'bon'), 'desc' => __('The maximum bed available for user to select', 'bon'), 'id' => 'maximum_bed', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Maximum Bath Options', 'bon'), 'desc' => __('The maximum bath available for user to select', 'bon'), 'id' => 'maximum_bath', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Maximum Total Room Options', 'bon'), 'desc' => __('The maximum total room available for user to select in search field.', 'bon'), 'id' => 'maximum_room', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Minimum Lot Size Options', 'bon'), 'desc' => __('The minimum lot size available for user to select', 'bon'), 'id' => 'minimum_lotsize', 'std' => '0', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Maximum Lot Size Options', 'bon'), 'desc' => __('The maximum lot size available for user to select', 'bon'), 'id' => 'maximum_lotsize', 'std' => '10000', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Lot Size Slider Step', 'bon'), 'desc' => __('The step for lot size slider', 'bon'), 'id' => 'step_lotsize', 'std' => '100', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Minimum Building Size Options', 'bon'), 'desc' => __('The minimum building size available for user to select', 'bon'), 'id' => 'minimum_buildingsize', 'std' => '0', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Maximum Building Size Options', 'bon'), 'desc' => __('The maximum building size available for user to select', 'bon'), 'id' => 'maximum_buildingsize', 'std' => '10000', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Building Size Slider Step', 'bon'), 'desc' => __('The step for building size slider', 'bon'), 'id' => 'step_buildingsize', 'std' => '100', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Maximum Floor Options', 'bon'), 'desc' => __('The maximum floor available for user to select', 'bon'), 'id' => 'maximum_floor', 'std' => '5', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Maximum Garage Options', 'bon'), 'desc' => __('The maximum garage available for user to select', 'bon'), 'id' => 'maximum_garage', 'std' => '5', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Maximum Basement Options', 'bon'), 'desc' => __('The maximum basement available for user to select', 'bon'), 'id' => 'maximum_basement', 'std' => '5', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Minimum Mileage Options', 'bon'), 'desc' => __('The minimum mileage available for user to select', 'bon'), 'id' => 'minimum_mileage', 'std' => '0', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Maximum Mileage Options', 'bon'), 'desc' => __('The maximum mileage available for user to select', 'bon'), 'id' => 'maximum_mileage', 'std' => '10000', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Mileage Slider Step', 'bon'), 'desc' => __('The step for mileage slider', 'bon'), 'id' => 'step_mileage', 'std' => '100', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Minimum Year Built value', 'bon'), 'desc' => __('Minimum Value for the year built dropdown in the Search Listing Options', 'bon'), 'id' => 'min_year_range', 'std' => '2011', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Search Button Label', 'bon'), 'desc' => __('The search button label', 'bon'), 'id' => 'search_button_label', 'std' => 'Find Property', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Custom Search Field', 'bon'), 'type' => 'subheading');
     for ($i = 1; $i < 4; $i++) {
         $std = 0;
         $options[] = array('slug' => 'bon_options', 'label' => sprintf(__('Enable Search Row %s', 'bon'), $i), 'desc' => __('Enable the search row', 'bon'), 'id' => 'search_row_' . $i, 'std' => $std, 'class' => 'collapsed', 'type' => 'checkbox');
         for ($j = 1; $j < 4; $j++) {
             $class = 'hidden';
             if ($j == 3) {
                 $class = 'hidden last';
             }
             $options[] = array('slug' => 'bon_options', 'label' => sprintf(__('Row %1s Column %2s Field', 'bon'), $i, $j), 'desc' => __('Choose the field for the search panel', 'bon'), 'id' => 'search_row_' . $i . '_col_' . $j, 'type' => 'select', 'class' => $class, 'options' => $search_fields);
         }
     }
     $options[] = array('slug' => 'bon_options', 'label' => __('Location Level 1 Label', 'bon'), 'desc' => __('If you are using multilevel location define the label here.', 'bon'), 'id' => 'location_level1_label', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Location Level 2 Label', 'bon'), 'desc' => __('If you are using multilevel location define the label here.', 'bon'), 'id' => 'location_level2_label', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Location Level 3 Label', 'bon'), 'desc' => __('If you are using multilevel location define the label here.', 'bon'), 'id' => 'location_level3_label', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Manufacturer Level 1 Label', 'bon'), 'desc' => __('If you are using multilevel manufacturer define the label here. eq: Make', 'bon'), 'id' => 'manufacturer_level1_label', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Manufacturer Level 2 Label', 'bon'), 'desc' => __('If you are using multilevel manufacturer define the label here. eq: Model', 'bon'), 'id' => 'manufacturer_level2_label', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Manufacturer Level 3 Label', 'bon'), 'desc' => __('If you are using multilevel manufacturer define the label here. eq: Sub Model', 'bon'), 'id' => 'manufacturer_level3_label', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('IDX Search Options', 'bon'), 'type' => 'subheading');
     $options[] = array('slug' => 'bon_options', 'label' => __('Use IDX Search Form', 'bon'), 'desc' => __('If dsIDXpress Plugin is installed, use the searchform instead.', 'bon'), 'id' => 'use_idx_search', 'std' => 'no', 'options' => array('no' => __('No', 'bon'), 'yes' => __('Yes', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Enabled autoload options from IDX', 'bon'), 'desc' => __('If you do not want to specify the city please set this to yes. If set to no you need to specify the city.', 'bon'), 'id' => 'idx_enable_search_autoload', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => __('IDX Search Options Limit', 'bon'), 'desc' => __('If auto load options is enabled the idx will automatically query the city, zip, tract, community options by default. Set the limit for the options. This is to prevent resource overload since the queried city can be more than 1000. Default is set to 100', 'bon'), 'id' => 'idx_search_option_limit', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Manual IDX City Options (one per line)', 'bon'), 'desc' => __('The list of idx city for the search options panel.', 'bon'), 'id' => 'idx_manual_city', 'type' => 'textarea');
     $options[] = array('slug' => 'bon_options', 'label' => __('Manual IDX Tract Options (one per line)', 'bon'), 'desc' => __('The list of idx tract for the search options panel.', 'bon'), 'id' => 'idx_manual_tract', 'type' => 'textarea');
     $options[] = array('slug' => 'bon_options', 'label' => __('Manual IDX Zip Options (one per line)', 'bon'), 'desc' => __('The list of idx zip for the search options panel.', 'bon'), 'id' => 'idx_manual_zip', 'type' => 'textarea');
     $options[] = array('slug' => 'bon_options', 'label' => __('Manual IDX Community Options (one per line)', 'bon'), 'desc' => __('The list of idx community for the search options panel.', 'bon'), 'id' => 'idx_manual_community', 'type' => 'textarea');
     $options[] = array('slug' => 'bon_options', 'label' => __('Agent Options', 'bon'), 'type' => 'subheading');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Contact Form in Agent Page', 'bon'), 'desc' => __('Show Contact form when viewing agent page?', 'bon'), 'id' => 'show_agent_form', 'type' => 'select', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Agent Latest Listings', 'bon'), 'desc' => __('Show Agent Latest Listings in Single Agent Page', 'bon'), 'id' => 'show_agent_listing', 'type' => 'select', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Set 1 agent for all Real Estate listings', 'bon'), 'desc' => __('Set a global agent to connected in all real estate listings', 'bon'), 'id' => 'global_agent', 'type' => 'old_post_select', 'post_type' => 'agent');
     $options[] = array('slug' => 'bon_options', 'label' => __('Set 1 Sales Rep for all Car listings', 'bon'), 'desc' => __('Set a global agent to connected in all car dealer listings', 'bon'), 'id' => 'global_sales_rep', 'type' => 'old_post_select', 'post_type' => 'sales-representative');
     /**
      * =====================================================================================================
      *
      * Layout Settings
      * 
      * @category Layout
      *
      * ======================================================================================================
      */
     $options[] = array('slug' => 'bon_options', 'label' => __('Layout Settings', 'bon'), 'type' => 'heading', 'icon' => 'dashicons-align-center');
     $options[] = array('slug' => 'bon_options', 'label' => __('How many listing per row in mobile view?', 'bon'), 'desc' => __('Set the listing per row in mobile view.', 'bon'), 'id' => 'mobile_layout', 'std' => '2', 'type' => 'select', 'options' => array('1' => '1', '2' => '2'));
     $options[] = array('slug' => 'bon_options', 'label' => '', 'desc' => '', 'std' => __('This section will handle the layout for categories, archives and post type taxonomy archives layout. Layout for page and single post can be set in the post/page edit page.', 'bon'), 'type' => 'info');
     $options[] = array('slug' => 'bon_options', 'label' => __('Archive Layout', 'bon'), 'desc' => __('Layout for archive page.', 'bon'), 'id' => 'archive_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('Category Layout', 'bon'), 'desc' => __('Layout for category archive page.', 'bon'), 'id' => 'category_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('Tags Archive Layout', 'bon'), 'desc' => __('Layout for tags archive page.', 'bon'), 'id' => 'tag_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('Property Type Archive Layout', 'bon'), 'desc' => __('Layout for property-type listing archive page.', 'bon'), 'id' => 'property_type_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('Property Location Archive Layout', 'bon'), 'desc' => __('Layout for property-location listing archive page.', 'bon'), 'id' => 'property_location_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('Property Feature Archive Layout', 'bon'), 'desc' => __('Layout for property-feaure listing archive page.', 'bon'), 'id' => 'property_feature_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('Car Feature Archive Layout', 'bon'), 'desc' => __('Layout for car-feature listing archive page.', 'bon'), 'id' => 'car_feature_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('Dealer Location Archive Layout', 'bon'), 'desc' => __('Layout for dealer-location listing archive page.', 'bon'), 'id' => 'dealer_location_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('Body Type Archive Layout', 'bon'), 'desc' => __('Layout for body-type listing archive page.', 'bon'), 'id' => 'body_type_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('Manufactuere Archive Layout', 'bon'), 'desc' => __('Layout for manufacturer listing archive page.', 'bon'), 'id' => 'manufacturer_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('IDX Page Layout', 'bon'), 'desc' => __('Layout for idx page.', 'bon'), 'id' => 'idx_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices);
     $options[] = array('slug' => 'bon_options', 'label' => __('IDX Details page Layout', 'bon'), 'desc' => __('Layout for idx details page.', 'bon'), 'id' => 'idx_details_layout', 'std' => '2c-l', 'type' => 'radio-img', 'options' => $layout_choices_2);
     /**
      * =====================================================================================================
      *
      * Footer Settings
      * 
      * @category Footer
      *
      * ======================================================================================================
      */
     $options[] = array('slug' => 'bon_options', 'label' => __('Footer Settings', 'bon'), 'type' => 'heading', 'icon' => 'dashicons-format-aside');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Footer Widgets', 'bon'), 'desc' => __('Show or hide the footer widgets area', 'bon'), 'id' => 'show_footer_widget', 'std' => 'show', 'options' => array('show' => __('Show', 'bon'), 'hide' => __('Hide', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Show Footer Copyright', 'bon'), 'desc' => __('Show or hide the footer copyright', 'bon'), 'id' => 'show_footer_copyright', 'std' => 'show', 'options' => array('show' => __('Show', 'bon'), 'hide' => __('Hide', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Custom Copyright Text', 'bon'), 'desc' => __('Custom HTML and Text that will appear in the footer of your theme.', 'bon'), 'id' => 'footer_copyright', 'std' => '', 'settings' => array('media_buttons' => false, 'tinymce' => false, 'teeny' => true), 'type' => 'editor');
     /**
      * =====================================================================================================
      *
      * Social Settings
      * 
      * @category Social
      *
      * ======================================================================================================
      */
     $options[] = array('slug' => 'bon_options', 'label' => __('Social Settings', 'bon'), 'type' => 'heading', 'icon' => 'dashicons-share');
     $options[] = array('slug' => 'bon_options', 'label' => __('Enable Header Social', 'bon'), 'desc' => __('Enable Social Icons in Header.', 'bon'), 'id' => 'enable_header_social', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Enable Footer Social', 'bon'), 'desc' => __('Enable Social Icons in Footer.', 'bon'), 'id' => 'enable_footer_social', 'options' => array('yes' => __('Yes', 'bon'), 'no' => __('No', 'bon')), 'type' => 'select');
     $options[] = array('slug' => 'bon_options', 'label' => __('Facebook Username', 'bon'), 'desc' => __('Your Facebook username.', 'bon'), 'id' => 'social_facebook', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Twitter Username', 'bon'), 'desc' => __('Your Twitter username.', 'bon'), 'id' => 'social_twitter', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('YouTube Username', 'bon'), 'desc' => __('Your YouTube username.', 'bon'), 'id' => 'social_youtube', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Vimeo Username', 'bon'), 'desc' => __('Your Vimeo username.', 'bon'), 'id' => 'social_vimeo', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Google Plus Username', 'bon'), 'desc' => __('Your Google Plus username.', 'bon'), 'id' => 'social_google_plus', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Flickr Username', 'bon'), 'desc' => __('Your Flickr username.', 'bon'), 'id' => 'social_flickr', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Pinterest Username', 'bon'), 'desc' => __('Your Pinterest username.', 'bon'), 'id' => 'social_pinterest', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('LinkedIn Username', 'bon'), 'desc' => __('Your LinkedIn username.', 'bon'), 'id' => 'social_linkedin', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Instagram Username', 'bon'), 'desc' => __('Your Instagram username.', 'bon'), 'id' => 'social_instagram', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Yelp User ID', 'bon'), 'desc' => __('Your Yelp user id.', 'bon'), 'id' => 'social_yelp', 'std' => '', 'type' => 'text');
     $options[] = array('slug' => 'bon_options', 'label' => __('Sidebar Generator', 'bon'), 'type' => 'heading', 'icon' => 'dashicons-welcome-widgets-menus');
     $options[] = array('slug' => 'bon_options', 'label' => __('Generate Custom Sidebar', 'bon'), 'id' => 'sidebars_generator', 'type' => 'repeatable', 'sanitize' => array('sidebar_name' => 'sanitize_text_field', 'is_menu' => 'sanitize_checkbox'), 'repeatable_fields' => array(array('type' => 'text', 'label' => __('Sidebar Name', 'bon'), 'id' => 'sidebar_name', 'std' => ''), array('type' => 'checkbox', 'label' => __('Use in Menu', 'bon'), 'id' => 'is_menu', 'std' => 0)));
     $options[] = array('slug' => 'bon_options', 'label' => __('URL Rewrite', 'bon'), 'type' => 'heading', 'icon' => 'dashicons-admin-links');
     $options[] = array('slug' => 'bon_options', 'label' => '', 'desc' => '', 'std' => __('This section will handle Custom URL Rewrite for the Listing. Default url for real estate is "http://yourdomain.com/listing/post-title" and for car listing is "http://yourdomain.com/car-listing/post-title" you can rewrite it into something else in here.', 'bon'), 'type' => 'info');
     $options[] = array('slug' => 'bon_options', 'label' => '', 'desc' => '', 'std' => __('Please note that you are required to flush your permalink after enable this feature by going to Settings > Permalink and hit save', 'bon'), 'type' => 'info');
     $options[] = array('slug' => 'bon_options', 'label' => __('Enable Custom Url Rewrite', 'bon'), 'id' => 'use_rewrite', 'type' => 'select', 'options' => array('no' => __('No', 'bon'), 'yes' => __('Yes', 'bon')));
     $options[] = array('slug' => 'bon_options', 'label' => __('Rewrite Root', 'bon'), 'id' => 'rewrite_root', 'type' => 'text', 'desc' => __('The Global listing URL base /listing/real-estate/ (non-required), if not empty will use %rewrite_root%/%real_estate_or_car_base%', 'bon'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Real Estate Listing Base', 'bon'), 'id' => 'realestate_root', 'type' => 'text', 'desc' => __('The Property Feature URL base /listing/ (required)', 'bon'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Real Estate Property Type Base', 'bon'), 'id' => 'realestate_property_type_root', 'type' => 'text', 'desc' => __('The Property Type URL base /property-type/ (required)', 'bon'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Real Estate Property Location Base', 'bon'), 'id' => 'realestate_property_location_root', 'type' => 'text', 'desc' => __('The Property Location URL base /property-location/ (required)', 'bon'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Real Estate Property Feature Base', 'bon'), 'id' => 'realestate_property_feature_root', 'type' => 'text', 'desc' => __('The Property Feature URL base /property-feature/ (required)', 'bon'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Car Listing Base', 'bon'), 'id' => 'car_root', 'type' => 'text', 'desc' => __('The Global Car Listing URL base /car-listing/ (required)', 'bon'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Car Manufacturer Base', 'bon'), 'id' => 'car_manufacturer_root', 'type' => 'text', 'desc' => __('The Manufacturer URL base /manufacturer/ (required)', 'bon'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Car Body Type Base', 'bon'), 'id' => 'car_body_type_root', 'type' => 'text', 'desc' => __('The Body Type URL base /body-type/ (required)', 'bon'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Car Dealer Location Base', 'bon'), 'id' => 'car_dealer_location_root', 'type' => 'text', 'desc' => __('The Dealer Location URL base /dealer-location/ (required)', 'bon'));
     $options[] = array('slug' => 'bon_options', 'label' => __('Car Feature Base', 'bon'), 'id' => 'car_feature_root', 'type' => 'text', 'desc' => __('The Car Feature URL base /car-feature/ (required)', 'bon'));
     return apply_filters('bon_theme_options', $options);
 }
コード例 #6
0
    function widget($args, $instance)
    {
        extract($args);
        extract($instance);
        $title = apply_filters("widget_title", $title);
        $options = get_option(DSIDXPRESS_OPTION_NAME);
        if (!$options["Activated"]) {
            return;
        }
        $pluginUrl = plugins_url() . '/dsidxpress/';
        wp_enqueue_script('dsidxpress_widget_search_view', $pluginUrl . 'js/widget-client.js', array('jquery'), DSIDXPRESS_PLUGIN_VERSION, true);
        $formAction = get_home_url() . "/idx/";
        $defaultSearchPanels = dsSearchAgent_ApiRequest::FetchData("AccountSearchPanelsDefault", array(), false, 60 * 60 * 24);
        $defaultSearchPanels = $defaultSearchPanels["response"]["code"] == "200" ? json_decode($defaultSearchPanels["body"]) : null;
        $propertyTypes = dsSearchAgent_ApiRequest::FetchData("AccountSearchSetupFilteredPropertyTypes", array(), false, 60 * 60 * 24);
        $propertyTypes = $propertyTypes["response"]["code"] == "200" ? json_decode($propertyTypes["body"]) : null;
        $account_options = dsSearchAgent_ApiRequest::FetchData("AccountOptions", array(), false);
        $account_options = $account_options["response"]["code"] == "200" ? json_decode($account_options["body"]) : null;
        $num_location_dropdowns = 0;
        $autoload_options = bon_get_option('idx_enable_search_autoload', 'yes');
        if ($searchOptions["show_cities"] == "yes" || !isset($instance["searchOptions"]["show_cities"])) {
            $num_location_dropdowns++;
        }
        if ($searchOptions["show_cities"] == "yes") {
            if ($autoload_options == 'no') {
                $manual_city = explode("\n", trim(bon_get_option('idx_manual_city')));
                sort($manual_city);
                $searchOptions['cities'] = $manual_city;
            } else {
                $searchOptions['cities'] = shandora_get_idx_options('City', true);
            }
        }
        if ($searchOptions["show_communities"] == "yes") {
            $num_location_dropdowns++;
            if ($autoload_options == 'no') {
                $manual_community = explode("\n", trim(bon_get_option('idx_manual_community')));
                sort($manual_community);
                $searchOptions['communities'] = $manual_community;
            } else {
                $searchOptions['communities'] = shandora_get_idx_options('Community', true);
            }
        }
        if ($searchOptions["show_tracts"] == "yes") {
            $num_location_dropdowns++;
            if ($autoload_options == 'no') {
                $manual_tract = explode("\n", trim(bon_get_option('idx_manual_tract')));
                sort($manual_tract);
                $searchOptions['tracts'] = $manual_tract;
            } else {
                $searchOptions['tracts'] = shandora_get_idx_options('Tract', true);
            }
        }
        if ($searchOptions["show_zips"] == "yes") {
            $num_location_dropdowns++;
            if ($autoload_options == 'no') {
                $manual_zip = explode("\n", trim(bon_get_option('idx_manual_zip')));
                sort($manual_zip);
                $searchOptions['zips'] = $manual_zip;
            } else {
                $searchOptions['zips'] = shandora_get_idx_options('Zip', true);
            }
        }
        if ($searchOptions["show_mlsnumber"] == "yes") {
            $num_location_dropdowns++;
        }
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
			<div class="dsidx-search-widget dsidx-widget search-listing">
			<form action="<?php 
        echo $formAction;
        ?>
" method="get" class="custom" onsubmit="return dsidx_w.searchWidget.validate();" >
				<div class="fieldset">
				<label for="idx-q-PropertyTypes"><?php 
        _e('Property Type', 'bon');
        ?>
</label>
				<select name="idx-q-PropertyTypes" class="dsidx-search-widget-propertyTypes">
								<option value=""><?php 
        _e('All Property Types', 'bon');
        ?>
</option>

		<?php 
        if (is_array($propertyTypes)) {
            foreach ($propertyTypes as $propertyType) {
                $name = htmlentities($propertyType->DisplayName);
                ?>
				<option value="<?php 
                echo $propertyType->SearchSetupPropertyTypeID;
                ?>
"><?php 
                echo $name;
                ?>
</option>
			<?php 
            }
        }
        ?>
				</select>

				<label id="idx-search-invalid-msg" style="color:red"></label>
        		</div>


        		
        <?php 
        if ($searchOptions["show_cities"] == "yes" || !isset($instance["searchOptions"]["show_cities"])) {
            ?>
        		<div class="fieldset">
					<label for="idx-q-Cities"><?php 
            _e('City', 'bon');
            ?>
</label>
					<select id="idx-q-Cities" name="idx-q-Cities" class="idx-q-Location-Filter">
						<?php 
            if ($num_location_dropdowns > 1) {
                ?>
								<option value=""><?php 
                _e('Any', 'bon');
                ?>
</option>
						<?php 
            }
            if (!empty($searchOptions['cities'])) {
                foreach ($searchOptions["cities"] as $city) {
                    $city = htmlentities(trim($city));
                    ?>
						<option value="<?php 
                    echo $city;
                    ?>
"><?php 
                    echo $city;
                    ?>
</option>
						<?php 
                }
            }
            ?>
					</select>

				</div>
		<?php 
        }
        // end show_citites
        if ($searchOptions["show_communities"] == "yes") {
            ?>
				<div class="fieldset">
					<label for="idx-q-Communities"><?php 
            _e('Community', 'bon');
            ?>
</label>
					<select id="idx-q-Communities" name="idx-q-Communities" class="idx-q-Location-Filter">
						<?php 
            if ($num_location_dropdowns > 1) {
                ?>
								<option value=""><?php 
                _e('Any', 'bon');
                ?>
</option>
						<?php 
            }
            foreach ($searchOptions["communities"] as $community) {
                // there's an extra trim here in case the data was corrupted before the trim was added in the update code below
                $community = htmlentities(trim($community));
                ?>
							<option value="<?php 
                echo $community;
                ?>
"><?php 
                echo $community;
                ?>
</option>
						<?php 
            }
            ?>
					</select>
				</div>
		<?php 
        }
        // end show_communtities
        ?>



		<?php 
        if ($searchOptions["show_tracts"] == "yes") {
            ?>
			<div class="fieldset">
				<label for="idx-q-TractIdentifiers"><?php 
            _e('Tract', 'bon');
            ?>
</label>
				<select id="idx-q-TractIdentifiers" name="idx-q-TractIdentifiers" class="idx-q-Location-Filter">
				<?php 
            if ($num_location_dropdowns > 1) {
                ?>
						<option value=""><?php 
                _e('Any', 'bon');
                ?>
</option>
				<?php 
            }
            foreach ($searchOptions["tracts"] as $tract) {
                // there's an extra trim here in case the data was corrupted before the trim was added in the update code below
                $tract = htmlentities(trim($tract));
                ?>
						<option value="<?php 
                echo $tract;
                ?>
"><?php 
                echo $tract;
                ?>
</option>
					<?php 
            }
            ?>
				</select>
			</div>
		<?php 
        }
        // end show_tracts
        ?>


		<?php 
        if ($searchOptions["show_zips"] == "yes") {
            ?>
			<div class="fieldset">
				<label for="idx-q-ZipCodes"><?php 
            _e('Zip', 'bon');
            ?>
</label>
				<select id="idx-q-ZipCodes" name="idx-q-ZipCodes" class="idx-q-Location-Filter">

				<?php 
            if ($num_location_dropdowns > 1) {
                ?>
						<option value=""><?php 
                _e('Any', 'bon');
                ?>
</option>
				<?php 
            }
            foreach ($searchOptions["zips"] as $zip) {
                // there's an extra trim here in case the data was corrupted before the trim was added in the update code below
                $zip = htmlentities(trim($zip));
                ?>
					<option value="<?php 
                echo $zip;
                ?>
"><?php 
                echo $zip;
                ?>
</option>
					<?php 
            }
            ?>
				</select>
			</div>
		<?php 
        }
        // end show_zips
        ?>


		<?php 
        if ($searchOptions["show_mlsnumber"] == "yes") {
            ?>
		<div class="fieldset">
			<label for="idx-q-MlsNumbers"><?php 
            _e('MLS #', 'bon');
            ?>
</label>
			<input id="idx-q-MlsNumbers" name="idx-q-MlsNumbers" type="text" class="dsidx-mlsnumber" />
		</div>
		<?php 
        }
        if ($searchOptions["show_pricerange"] == "yes") {
            ?>
		<div class="fieldset">
			<label for="idx-q-PriceMin"><?php 
            _e('Price Range', 'bon');
            ?>
				<span class="price-text text-min" id="idx-min-price-text-widget"></span>
				<span class="price-text text-max" id="idx-max-price-text-widget"></span>
			</label>
			<div class="price-slider-wrapper ui-slider-wrapper-custom">
				<div id="idx-slider-range-widget"></div>
			</div>
			<input id="idx-q-PriceMin-widget" name="idx-q-PriceMin" type="hidden" class="dsidx-price" placeholder="min price" />
			<input id="idx-q-PriceMax-widget" name="idx-q-PriceMax" type="hidden" class="dsidx-price" placeholder="max price" />
		</div>

		<?php 
        }
        if ($searchOptions["show_size"] == "yes") {
            ?>

		<?php 
            if (isset($defaultSearchPanels)) {
                foreach ($defaultSearchPanels as $key => $value) {
                    if ($value->DomIdentifier == "search-input-home-size") {
                        ?>
				<div class="fieldset">
					<label for="idx-q-ImprovedSqFtMin"><?php 
                        _e('Size', 'bon');
                        ?>
</label>
					<input id="idx-q-ImprovedSqFtMin" name="idx-q-ImprovedSqFtMin" type="text" class="dsidx-improvedsqft" placeholder="min sqft" />
				</div>	
		<?php 
                        break;
                    }
                }
            }
            ?>

		<?php 
        }
        if ($searchOptions["show_beds"] == "yes") {
            ?>

					<div class="fieldset">
						<label for="idx-q-BedsMin-widget"><?php 
            _e('Beds', 'bon');
            ?>
</label>
						<div class="ui-slider-wrapper-custom beds-wrapper">
						<select name="idx-q-BedsMin" id="idx-q-BedsMin-widget" class="bon-dsidx-beds dsidx-beds no-custom select-slider">
							<option value=""><?php 
            _e('Any', 'bon');
            ?>
</option>
							<?php 
            for ($i = 1; $i <= 10; $i++) {
                ?>
								<option value="<?php 
                echo $i;
                ?>
"><?php 
                echo $i;
                ?>
</option>
							<?php 
            }
            ?>
						</select>
						</div>
					</div>
			<?php 
        }
        if ($searchOptions["show_bath"] == "yes") {
            ?>

					<div class="fieldset">
						<label for="idx-q-BathsMin-widget"><?php 
            _e('Baths', 'bon');
            ?>
</label>
						<div class="ui-slider-wrapper-custom baths-wrapper">
						<select name="idx-q-BathsMin" id="idx-q-BathsMin-widget" class="bon-dsidx-baths dsidx-baths no-custom select-slider">
							<option value=""><?php 
            _e('Any', 'bon');
            ?>
</option>
							<?php 
            for ($i = 1; $i <= 10; $i++) {
                ?>
								<option value="<?php 
                echo $i;
                ?>
"><?php 
                echo $i;
                ?>
</option>
							<?php 
            }
            ?>
						</select>
						</div>
					</div>
					
			<?php 
        }
        ?>
					<?php 
        $button_color = bon_get_option('search_button_color', 'red');
        ?>
					<input type="submit" class="button flat blue <?php 
        echo $button_color;
        ?>
 radius submit" value="<?php 
        _e('Search for Properties', 'bon');
        ?>
" />

		<?php 
        if ($options["HasSearchAgentPro"] == "yes" && $searchOptions["show_advanced"] == "yes") {
            ?>
		
					<?php 
            _e('try our ', 'bon');
            ?>
<a href="<?php 
            echo $formAction;
            ?>
advanced/"><img src="<?php 
            echo $pluginUrl;
            ?>
assets/adv_search-16.png" /><?php 
            _e('Advanced Search', 'bon');
            ?>
</a>
		<?php 
        }
        ?>
		
		<?php 
        if ($account_options->EulaLink) {
            $eula_url = $account_options->EulaLink;
            ?>
		
		<p><?php 
            _e('By searching, you agree to the', 'bon');
            ?>
 <a href="<?php 
            echo $eula_url;
            ?>
" target="_blank"><?php 
            _e('EULA', 'bon');
            ?>
</a></p>

		<?php 
        }
        ?>
		
		
				
			</form>
			</div>

		<?php 
        echo $after_widget;
        dsidx_footer::ensure_disclaimer_exists("search");
    }
コード例 #7
0
ファイル: results.php プロジェクト: VadimSid/thinkgreek
?>
 <div id="dsidx" class="custom-idx-results">
 <?php 
do_action('bon_idx_results_404_message');
if (self::has_listings()) {
    do_action('bon_idx_results_sorting_control');
    if (bon_get_option('show_listings_map') == 'show') {
        do_action('bon_idx_results_map');
    }
    do_action('bon_idx_results_listings');
    do_action('bon_idx_results_pagination');
} else {
    do_action('bon_idx_no_results');
}
do_action('bon_idx_disclaimer');
if (bon_get_option('show_listings_map') == 'show') {
    do_action('bon_idx_results_map_divs');
}
do_action('bon_idx_after_results_content');
do_action('bon_idx_dsidx_javascript_details');
?>
<script>

jQuery(document).ready(function($){
	if($('#dsidx-map').length > 0) {
        if( ($('#dsidx-map-control').length > 0) && (!$.cookie('dsidx_map_open') || $.cookie('dsidx_map_open') == 0 ) ) {
            $('#dsidx-map-control a').trigger('click');
        }
    }

            if($('#listings-map').length > 0 && typeof dsidx.dataSets.results !== "undefined") {
コード例 #8
0
ファイル: meta.php プロジェクト: VadimSid/thinkgreek
?>
	<?php 
if (!empty($length)) {
    ?>
	<li class="garage"><div class="meta-wrap">
		<i class="sha-ruler"></i>
		<span class="meta-value">
			<?php 
    echo $length . ' ' . bon_get_option('length_measure');
    ?>
		</span></div>
	</li>
	<?php 
}
?>
	<?php 
if (!empty($fuel)) {
    ?>
	<li class="furnish"><div class="meta-wrap">
		<i class="sha-tint"></i>
		<span class="meta-value">
			<?php 
    echo $fuel . ' ' . bon_get_option('volume_measure');
    ?>
		</span>
		</div>
	</li>
	<?php 
}
?>
</ul>
コード例 #9
0
ファイル: theme-hooks.php プロジェクト: VadimSid/thinkgreek
function shandora_filter_body_class($classes)
{
    global $post;
    if (!isset($post->ID)) {
        return $classes;
    }
    $id = $post->ID;
    $class = shandora_get_meta($id, 'slideshow_type');
    if (!empty($class) && shandora_is_home() && bon_get_option('show_slider', 'show') == 'show') {
        $class = 'slider-' . $class;
        $classes[] = $class;
    } else {
        if (shandora_is_home() && bon_get_option('show_slider', 'show') == 'show') {
            $classes[] = 'slider-full';
        }
    }
    return $classes;
}
コード例 #10
0
$extcolor = shandora_get_meta($post->ID, 'listing_extcolor');
$intcolor = shandora_get_meta($post->ID, 'listing_intcolor');
$status = shandora_get_meta($post->ID, 'listing_status');
$fuel = shandora_get_meta($post->ID, 'listing_fueltype');
$year = shandora_get_meta($post->ID, 'listing_yearbuild');
$height = shandora_get_meta($post->ID, 'listing_height');
$width = shandora_get_meta($post->ID, 'listing_width');
$length = shandora_get_meta($post->ID, 'listing_length');
$wheelbase = shandora_get_meta($post->ID, 'listing_wheelbase');
$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');
コード例 #11
0
ファイル: searchform.php プロジェクト: VadimSid/thinkgreek
<div class="search">

	<form method="get" class="search-form" action="<?php 
echo trailingslashit(home_url());
?>
">
		<div class="row collapse">
			<div class="large-9 small-9 column">
			<input class="search-text" type="text" name="s" value="<?php 
if (is_search()) {
    echo esc_attr(get_search_query());
} else {
    esc_attr_e('Enter search terms...', 'bon');
}
?>
" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" />
			</div>
			<div class="large-3 small-3 column">
			<input class="search-submit button expand prefix flat <?php 
echo bon_get_option('search_button_color');
?>
" name="submit" type="submit" value="<?php 
esc_attr_e('Search', 'bon');
?>
" />
			</div>
		</div>
	</form><!-- .search-form -->

</div><!-- .search -->
コード例 #12
0
    /**
     * Outputs the widget based on the arguments input through the widget controls.
     *
     * @since 1.0
     */
    function widget($sidebar, $instance)
    {
        extract($sidebar);
        /* Output the theme's $before_widget wrapper. */
        echo $before_widget;
        /* If a title was input by the user, display it. */
        if (!empty($instance['title'])) {
            echo $before_title . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $after_title;
        }
        ?>
		
		<div class="row">
			<div class="column large-12">
				<?php 
        if ($instance['type'] == "realestate") {
            $currency = bon_get_option('currency', '$');
            ?>


					<script type="text/javascript"> 
					jQuery(document).ready(function($) { $("#bon-calc-<?php 
            echo $this->id_base;
            ?>
").MortgageCalculator({ currency: "<?php 
            echo $currency;
            ?>
", mode: "widget", logo: { path: "", url: "", target: "_blank" } }); });</script>
					<div id="bon-calc-<?php 
            echo $this->id_base;
            ?>
"></div>
				<?php 
        } else {
            $currencysymbol = bon_get_option('currency');
            ?>
				<div id="loancalculator_cars">
					<form action="post">
						<label>
						<?php 
            _e('Loan Amount', 'bon');
            ?>
						(<?php 
            echo $currencysymbol;
            ?>
)</label>
						<input type="text" id="LoanAmount" size="10" name="LoanAmount" value="30000" />
						
						<label>
						<?php 
            _e('Down Payment', 'bon');
            ?>
						(<?php 
            echo $currencysymbol;
            ?>
)</label>
						<input type="text" id="DownPayment" size="10" name="DownPayment" value="0" />

						<label>
						<?php 
            _e('Annual Rate', 'bon');
            ?>
						</label>
						<input id="InterestRate" type="text" size="3" name="InterestRate" value="7.0" />

						<label>
						<?php 
            _e('Loan Terms (Years)', 'bon');
            ?>
						</label>
						<input id="NumberOfYears" type="text" size="3" name="NumberOfYears" value="4" />

						<button class="button flat radius" id="morgcal" name="morgcal" ><?php 
            _e('Calculate', 'bon');
            ?>
</button><br />

						<label>
						<?php 
            _e('Number of Payments', 'bon');
            ?>
						</label>
						<input id="NumberOfPayments" type="text" name="NumberOfPayments" />

						<label>
						<?php 
            _e('Monthly Payment', 'bon');
            ?>
						(<?php 
            echo $currencysymbol;
            ?>
)</label>
						<input id="MonthlyPayment" type="text" name="MonthlyPayment" />
					</form>
				</div>
				<?php 
        }
        ?>
			</div>
		</div>

	<?php 
        /* Close the theme's widget wrapper. */
        echo $after_widget;
    }
コード例 #13
0
ファイル: my-account.php プロジェクト: VadimSid/thinkgreek
}
?>
	</ul>
	<?php 
if (function_exists('bon_fav_get_users_favorites_by_posttype')) {
    $layout = get_theme_mod('theme_layout');
    if (empty($layout)) {
        $layout = get_post_layout(get_queried_object_id());
    }
    $mobile = bon_get_option('mobile_layout', '2');
    $block_cls = '4';
    if ($layout == '2c-l' || $layout == '2c-r') {
        $block_cls = '3';
    }
    $ul_class = "small-block-grid-" . $mobile . " large-block-grid-" . $block_cls;
    $compare_page = bon_get_option('compare_page');
    $fav_post_ids = bon_fav_get_users_favorites_by_posttype($current_user->{$name}, 'listing');
    if (!empty($fav_post_ids)) {
        ?>
 
		<h4 class="bon-form-title"><?php 
        _e('Favorite Properties', 'bon');
        ?>
</h4>
		<?php 
        $loop = array('post_type' => 'listing', 'post__in' => $fav_post_ids, 'posts_per_page' => -1);
        query_posts($loop);
        if (have_posts()) {
            ?>

			<div id="listings-container" class="row">
コード例 #14
0
ファイル: loop-nav.php プロジェクト: VadimSid/thinkgreek
do_atomic('before_pagination');
?>

	<?php 
if (is_attachment()) {
    ?>

		<div class="loop-nav">
			<?php 
    previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">&larr;</span> Return to entry', 'bon') . '</span>');
    ?>
		</div><!-- .loop-nav -->

	<?php 
} elseif (is_singular() && !is_front_page() && bon_get_option('show_previous_next', 'yes') == 'yes') {
    ?>

		<div class="loop-nav">
			<?php 
    previous_post_link('%link', '<span class="previous">' . __('<span class="meta-nav">&larr;</span> Previous', 'bon') . '</span>');
    ?>
			<?php 
    next_post_link('%link', '<span class="next">' . __('Next <span class="meta-nav">&rarr;</span>', 'bon') . '</span>');
    ?>
		</div><!-- .loop-nav -->

	<?php 
} elseif (!is_singular() && current_theme_supports('bon-pagination')) {
    bon_pagination(array('container_class' => 'pagination-centered', 'disabled_class' => 'unavailable', 'current_class' => 'current'));
    ?>
コード例 #15
0
        $key = bon_get_prefix() . 'listing_price';
        break;
    case 'title':
        $orderby = 'title';
        break;
    case 'size':
        $orderby = 'meta_value_num';
        $key = bon_get_prefix() . 'listing_buildingsize';
        break;
    default:
        $orderby = 'date';
        break;
}
$status_key = '';
$status_val = '';
$exclude_sold_rented = bon_get_option('exclude_sold_rented', 'no');
if ($exclude_sold_rented == 'yes') {
    $status_key = bon_get_prefix() . 'listing_status';
    $status_val = array('sold', 'rented');
}
$listing_args = array('post_type' => 'listing', 'posts_per_page' => $numberposts, 'paged' => $paged, 'meta_key' => $key, 'orderby' => $orderby, 'order' => $order, 'meta_key__not_in' => $status_key, 'meta_value__not_in' => $status_val);
$wp_query = new WP_Query($listing_args);
bon_get_template_part('loop', 'listing');
bon_get_template_part('loop', 'nav');
// Loads the loop-nav.php template.
?>
                
            <?php 
/**
 * Shandora After Loop Hook
 *
コード例 #16
0
ファイル: loop-listing.php プロジェクト: VadimSid/thinkgreek
                $bath = shandora_get_meta($post->ID, 'listing_bath');
                $bed = shandora_get_meta($post->ID, 'listing_bed');
                $data_map[] = array('photo' => !empty($image) ? $image : '', 'baths' => !empty($bath) ? sprintf(_n('%s Bath', '%s Baths', $bath, 'bon'), $bath) : __('0 Bath', 'bon'), 'beds' => !empty($bed) ? sprintf(_n('%s Bed', '%s Beds', $bed, 'bon'), $bed) : __('0 Bed', 'bon'), 'lotsize' => shandora_get_meta($post->ID, 'listing_lotsize') != '' ? shandora_get_meta($post->ID, 'listing_lotsize') . ' ' . $sizemeasurement : 'N\\A', 'price' => shandora_get_listing_price(false), 'permalink' => get_permalink(), 'title' => get_the_title(), 'id' => get_the_ID(), 'latitude' => $lat, 'longitude' => $long);
            }
        }
        ?>

        <?php 
        bon_get_template_part('content', 'listing');
        ?>

    <?php 
    }
    $count = $wp_query->found_posts;
    $content_count = sprintf(_n('%s Property Listed', '%s Properties Listed', $count, 'bon'), $count);
    $show_listing_count = bon_get_option('show_listing_count', 'no');
    if ($content_count && $show_listing_count == 'yes') {
        ?>
             <script type="text/javascript">
                /* <![CDATA[ */
                var shandora_data_count = "<?php 
        echo $content_count;
        ?>
";
                /* ]]> */
                </script>
        <?php 
    }
    if (!empty($data_map) && is_array($data_map)) {
        $data_map = json_encode($data_map);
        ?>
コード例 #17
0
ファイル: footer.php プロジェクト: VadimSid/thinkgreek
<?php

$prefix = bon_get_prefix();
$show_agent_details = bon_get_option('show_agent_details', 'yes');
$show_contact_form = bon_get_option('show_contact_form', 'yes');
$agent_ids = get_post_meta($post->ID, $prefix . 'listing_agentpointed', true);
$agent_id = '';
if (is_array($agent_ids) && !empty($agent_ids)) {
    $agent_id = $agent_ids[0];
} else {
    $agent_id = bon_get_option('global_agent');
}
if (!empty($agent_id)) {
    $agent_email = shandora_get_meta($agent_id, 'agentemail');
    if (empty($agent_email)) {
        $agent_email = get_option('admin_email');
    }
    ?>

<footer class="listing-contact row">
	<?php 
    if ($show_agent_details == 'yes') {
        $col_class = 'large-6';
        if ($show_contact_form == 'no') {
            $col_class = 'large-12';
        }
        ?>
		<div class="column <?php 
        echo $col_class;
        ?>
">
コード例 #18
0
            }
        }
        ?>

	<ul class="<?php 
        echo $ul_class;
        ?>
">
	<?php 
        foreach ($attachments as $attachment_id) {
            $meta = wp_get_attachment_metadata($attachment_id);
            $popup = wp_get_attachment_image_src($attachment_id, 'full');
            $popup = $popup[0];
            $args = array('alt' => '');
            $caption = '';
            if (bon_get_option('show_gallery_caption', 'yes') == 'yes') {
                $caption = '<span class="caption">' . get_the_title($attachment_id) . '</span>';
            }
            echo '<li>' . $caption . '<a href="' . $popup . '" class="listing-gallery-popup">' . wp_get_attachment_image($attachment_id, $image_size) . '</a></li>';
        }
        ?>
	</ul>
	<?php 
        if ($with_thumbnail == 'yes' || $with_thumbnail == 'both') {
            ?>
	<ul id="bx-pager" class="large-custom-grid-7 small-custom-grid-6">
	<?php 
            $i = 0;
            foreach ($attachments as $attachment_id) {
                echo '<li><a data-slide-index="' . $i . '" href="">' . wp_get_attachment_image($attachment_id, 'listing_small_box') . '<span class="mask"></span></a></li>';
                $i++;
コード例 #19
0
ファイル: property.php プロジェクト: VadimSid/thinkgreek
/**
 * Used to output property location field in search panel
 * 
 * @since 1.0.6
 * @return string
 * @param string $value
 *
 */
function shandora_search_location_level3_field($value = array(), $class, $is_widget = false)
{
    $o = apply_atomic('search_location_level3_field', '', $value, $class, $is_widget);
    if ($o != '') {
        return $o;
    }
    global $bon;
    $form = $bon->form();
    $loc_opt = array('any' => __('Any', 'bon'));
    if ($value['property_location_level2'] != '') {
        $parent = get_term_by('slug', $value['property_location_level2'], 'property-location');
        if ($parent) {
            $terms = get_terms('property-location', array('parent' => $parent->term_id));
            if ($terms) {
                foreach ($terms as $term) {
                    $loc_opt[$term->slug] = $term->name;
                }
            }
        }
    }
    $o = $form->form_label(bon_get_option('location_level3_label'), 'property_location');
    $o .= $form->form_dropdown('property_location_level3', $loc_opt, $value['property_location_level3'], 'class=" ' . $class . '"');
    return apply_atomic('search_location_level3_field_output', $o);
}
コード例 #20
0
        <?php 
/**
 * Shandora Before Loop Hook
 *
 * @hooked shandora_get_page_header - 1
 * @hooked shandora_search_get_listing - 2
 * @hooked shandora_open_main_content_row - 5
 * @hooked shandora_get_left_sidebar - 10
 * @hooked shandora_open_main_content_column - 15
 *
 */
do_atomic('before_loop');
?>

                <?php 
$numberposts = bon_get_option('listing_per_page') ? bon_get_option('listing_per_page') : 8;
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$status_val = get_post_meta(get_the_ID(), 'shandora_car_status_query', true);
$orderby = '';
$key = '';
if (isset($_GET['search_orderby'])) {
    $orderby = $_GET['search_orderby'];
}
$order = 'DESC';
if (isset($_GET['search_order'])) {
    $order = $_GET['search_order'];
}
if ($orderby == 'price') {
    $key = bon_get_prefix() . 'listing_price';
    $orderby = 'meta_value_num';
}
コード例 #21
0
ファイル: loop-slider.php プロジェクト: VadimSid/thinkgreek
  </div>

</div>

<?php 
} else {
    ?>

    <div id="slider-container" class="container <?php 
    echo $slideshow_type;
    ?>
">
      <div class="slider-inner-container">
          <div id="main-slider" class="flexslider" data-interval="<?php 
    echo bon_get_option('slider_interval', 12000);
    ?>
">
            <ul class="slides">
                <li class="empty-slide">
                  <div class="mask"></div>
                  <div class="flex-caption left">
                    <h2 class="primary-title"><?php 
    _e('No Slider no entries were found', 'bon');
    ?>
</h2>
                  </div>
                </li>
            </ul>
          </div>
      </div>
コード例 #22
0
ファイル: theme-actions.php プロジェクト: VadimSid/thinkgreek
function shandora_get_idx_options($type = '', $r_array = false)
{
    if (empty($type)) {
        return;
    }
    $return = false;
    $limit = bon_get_option('idx_search_option_limit', 100);
    $options = get_option(DSIDXPRESS_OPTION_NAME);
    $setup_id = $options['SearchSetupID'];
    $url = 'http://api-c.idx.diversesolutions.com/api/';
    $results = wp_remote_get($url . 'LocationsByType?searchSetupID=' . $setup_id . '&type=' . $type . '&minListingCount=1', array('decompress' => false));
    if (is_wp_error($results)) {
        $error_message = $results->get_error_message();
        return false;
    }
    $return = $results["response"]["code"] == "200" ? array_slice(json_decode($results["body"]), 0, $limit) : null;
    if ($return) {
        if ($r_array) {
            $new_return = array();
            foreach ($return as $r) {
                $new_return[] = $r->Name;
            }
            return $new_return;
        } else {
            return $return;
        }
    } else {
        return;
    }
}
コード例 #23
0
ファイル: content-agent.php プロジェクト: VadimSid/thinkgreek
					<span class="contact-loader"><img src="<?php 
        echo trailingslashit(BON_THEME_URI);
        ?>
assets/images/loader.gif" alt="loading..." />
				</div>
				<div class="sending-result"><div class="green bon-toolkit-alert"></div></div>
			</form>
		</div>
	</div>
	<?php 
    }
    ?>
</article>

<?php 
    $show_listing = bon_get_option('show_agent_listing', 'yes');
    ?>

<?php 
    if ($show_listing == 'yes') {
        ?>
<div id="agent-listings">
	<h3><?php 
        printf(__('Latest Listings by %s', 'bon'), get_the_title(get_the_ID()));
        ?>
</h3>
	<?php 
        bon_get_template_part('block', 'agentlisting');
        ?>
</div>
<?php 
コード例 #24
0
ファイル: index.php プロジェクト: VadimSid/thinkgreek
<?php

get_header();
?>

<div id="inner-wrap" class="slide ">

    <?php 
if (bon_get_option('show_slider', 'show') == 'show' && is_front_page()) {
    bon_get_template_part('loop', 'slider');
}
?>

    <div id="body-container" class="container">


        <?php 
/**
 * Shandora Before Loop Hook
 *
 * @hooked shandora_get_page_header - 1
 * @hooked shandora_search_get_listing - 2
 * @hooked shandora_open_main_content_row - 5
 * @hooked shandora_get_left_sidebar - 10
 * @hooked shandora_open_main_content_column - 15
 *
 */
do_atomic('before_loop');
?>
   
            <?php 
コード例 #25
0
ファイル: property.php プロジェクト: VadimSid/thinkgreek
 function shandora_setup_listing_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['realestate_root'] = bon_get_option('realestate_root', 'real-estate');
     $settings['realestate_property_type_root'] = bon_get_option('realestate_property_type_root', 'manufacturer');
     $settings['realestate_property_location_root'] = bon_get_option('realestate_property_location_root', 'body-type');
     $settings['realestate_property_feature_root'] = bon_get_option('realestate_property_feature_root', 'dealer-location');
     if (!empty($settings['rewrite_root'])) {
         $slug = "{$settings['rewrite_root']}/{$settings['realestate_root']}";
     } else {
         $slug = "{$settings['realestate_root']}";
     }
     $property_type_slug = "{$settings['realestate_root']}/{$settings['realestate_property_type_root']}";
     $property_location_slug = "{$settings['realestate_root']}/{$settings['realestate_property_location_root']}";
     $property_feature_slug = "{$settings['realestate_root']}/{$settings['realestate_property_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 = __('Listing', 'bon');
     $plural = __('Listings', 'bon');
     $args = array('has_archive' => $has_archive, 'rewrite' => $rewrite, 'supports' => array('editor', 'title', 'excerpt', 'thumbnail', 'front-end-editor'), 'menu_position' => 6);
     $cpt->create('Listing', $args, 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' => __('MLS Number', 'bon'), 'desc' => __('The property MLS Number #', 'bon'), 'id' => $prefix . $suffix . 'mls', 'type' => 'text'), array('label' => __('Property Status', 'bon'), 'desc' => __('The status for the property, used for badge, etc.', 'bon'), 'id' => $prefix . $suffix . 'status', 'type' => 'select', 'options' => shandora_get_search_option()), array('label' => __('For Rent Period', 'bon'), 'desc' => __('Choose the period for the rent. Only show if status is for rent.', 'bon'), 'id' => $prefix . $suffix . 'period', 'type' => 'select', 'options' => shandora_get_search_option('period')), array('label' => __('Show Period on Price', 'bon'), 'desc' => __('Always show the period after price for all property status except sale and sold status.', 'bon'), 'id' => $prefix . $suffix . 'show_period', 'type' => 'select', 'options' => array('no' => __('No', 'bon'), 'yes' => __('Yes', 'bon'))), array('label' => __('Address', 'bon'), 'desc' => __('The Property Address.', 'bon'), 'id' => $prefix . $suffix . 'address', 'type' => 'textarea'), array('label' => __('Zip Postal', 'bon'), 'desc' => __('Address Zip Postal', 'bon'), 'id' => $prefix . $suffix . 'zip', 'type' => 'text'), array('label' => __('Price', 'bon'), 'desc' => __('The Property Price. Fill with numeric only, eq: 123456', 'bon'), 'id' => $prefix . $suffix . 'price', 'type' => 'text'), array('label' => __('Secondary Price', 'bon'), 'desc' => __('The 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' => __('Bed Rooms', 'bon'), 'desc' => __('How Many Bedroom? Fill with numeric only', 'bon'), 'id' => $prefix . $suffix . 'bed', 'type' => 'text'), array('label' => __('Bath Rooms', 'bon'), 'desc' => __('How Many Bathroom? Fill with numeric only', 'bon'), 'id' => $prefix . $suffix . 'bath', 'type' => 'text'), array('label' => __('Garage', 'bon'), 'desc' => __('How Many Garage? Fill with numeric only', 'bon'), 'id' => $prefix . $suffix . 'garage', 'type' => 'text'), array('label' => __('Basement', 'bon'), 'desc' => __('How many basement?', 'bon'), 'id' => $prefix . $suffix . 'basement', 'type' => 'text'), array('label' => __('Floors / Stories', 'bon'), 'desc' => __('The total floors or stories.', 'bon'), 'id' => $prefix . $suffix . 'floor', 'type' => 'text'), array('label' => __('Total Rooms', 'bon'), 'desc' => __('The total rooms. Fill with numeric only', 'bon'), 'id' => $prefix . $suffix . 'totalroom', 'type' => 'text'), array('label' => __('Lot Size', 'bon'), 'desc' => __('The Lot Size', 'bon'), 'id' => $prefix . $suffix . 'lotsize', 'type' => 'text'), array('label' => __('Building Size', 'bon'), 'desc' => __('The Building Size', 'bon'), 'id' => $prefix . $suffix . 'buildingsize', 'type' => 'text'), array('label' => __('Furnishing', 'bon'), 'desc' => __('The Property is Furnished or unfurnised?', 'bon'), 'id' => $prefix . $suffix . 'furnishing', 'type' => 'select', 'options' => shandora_get_search_option('furnishing')), array('label' => __('Mortgage Availability', 'bon'), 'desc' => __('The Property is Available for mortgage or not?', 'bon'), 'id' => $prefix . $suffix . 'mortgage', 'type' => 'select', 'options' => shandora_get_search_option('mortgage')), array('label' => __('Date of Availability', 'bon'), 'desc' => __('When is the property available?', 'bon'), 'id' => $prefix . $suffix . 'dateavail', 'type' => 'date'), array('label' => __('Year Built', 'bon'), 'desc' => __('When is the property build? eq: 2013', 'bon'), 'id' => $prefix . $suffix . 'yearbuild', 'type' => 'text'), array('label' => __('Map Latitude', 'bon'), 'desc' => __('The Map Latitude. You can easily find it <a href="http://www.itouchmap.com/latlong.html">here</a>. Copy and paste the latitude value generated there', 'bon'), 'id' => $prefix . $suffix . 'maplatitude', 'type' => 'text'), array('label' => __('Map Longitude', 'bon'), 'desc' => __('The Map Longitude. You can easily find it <a href="http://www.itouchmap.com/latlong.html">here</a>. Copy and paste the longitude value generated there', 'bon'), 'id' => $prefix . $suffix . 'maplongitude', 'type' => 'text'), array('label' => __('Featured Property', 'bon'), 'desc' => __('Make the property featured for featured property widget', 'bon'), 'id' => $prefix . $suffix . 'featured', 'type' => 'checkbox'), array('label' => __('Agent for this listing', 'bon'), 'desc' => __('The agent pointed for this property listing', 'bon'), 'id' => $prefix . $suffix . 'agentpointed', 'type' => 'old_post_select', 'post_type' => 'agent'));
     $fr_opt = array();
     if (bon_get_option('enable_dpe_ges', false) == 'yes') {
         $fr_opt[] = array('label' => __('DPE', 'bon'), 'desc' => __('Diagnostic de Performance énergétiqueg', 'bon'), 'id' => $prefix . $suffix . 'dpe', 'type' => 'number');
         $fr_opt[] = array('label' => __('GES', 'bon'), 'desc' => __('Gaz à effet de serre', 'bon'), 'id' => $prefix . $suffix . 'ges', 'type' => 'number');
     }
     $prop_options = array_merge($fr_opt, $prop_options);
     /* The rewrite handles the URL structure. */
     $property_type_rewrite_var = array('slug' => $property_type_slug, 'with_front' => false, 'hierarchical' => false, 'ep_mask' => EP_NONE);
     /* The rewrite handles the URL structure. */
     $property_location_rewrite_var = array('slug' => $property_location_slug, 'with_front' => false, 'hierarchical' => true, 'ep_mask' => EP_NONE);
     /* The rewrite handles the URL structure. */
     $property_feature_rewrite_var = array('slug' => $property_feature_slug, 'with_front' => false, 'hierarchical' => false, 'ep_mask' => EP_NONE);
     if ($use_rewrite == 'no') {
         $property_feature_rewrite = true;
         $property_location_rewrite = true;
         $property_type_rewrite = true;
     } else {
         $property_feature_rewrite = $property_feature_rewrite_var;
         $property_location_rewrite = $property_location_rewrite_var;
         $property_type_rewrite = $property_type_rewrite_var;
     }
     $cpt->add_taxonomy("Property Type", array('rewrite' => $property_type_rewrite, 'hierarchical' => true, 'label' => __('Property Types', 'bon'), 'labels' => array('menu_name' => __('Types', 'bon'))));
     $cpt->add_taxonomy("Property Location", array('rewrite' => $property_location_rewrite, 'hierarchical' => true, 'label' => __('Property Locations', 'bon'), 'labels' => array('menu_name' => __('Locations', 'bon'))));
     $cpt->add_taxonomy("Property Feature", array('rewrite' => $property_feature_rewrite, 'label' => __('Property Features', 'bon'), 'labels' => array('menu_name' => __('Features', 'bon'))));
     do_action("shandora_property_taxonomy", $cpt);
     $cpt->add_meta_box('gallery-options', __('Gallery Options', 'bon'), $gallery_opts);
     $cpt->add_meta_box('property-options', __('Property Options', 'bon'), $prop_options);
     $cpt->add_meta_box('video-options', __('Video Options', 'bon'), shandora_video_metabox_args());
     do_action("shandora_property_metabox", $cpt);
 }
コード例 #26
0
<?php

$prefix = bon_get_prefix();
$show_agent_details = bon_get_option('show_agent_details', 'yes');
$show_contact_form = bon_get_option('show_contact_form', 'yes');
$agent_ids = get_post_meta($post->ID, $prefix . 'listing_agentpointed', true);
$agent_id = '';
if (is_array($agent_ids) && !empty($agent_ids)) {
    $agent_id = $agent_ids[0];
} else {
    $agent_id = bon_get_option('global_sales_rep');
}
if (!empty($agent_id)) {
    $agent_email = shandora_get_meta($agent_id, 'agentemail');
    if (empty($agent_email)) {
        $agent_email = get_option('admin_email');
    }
    ?>
<footer class="listing-contact row">
	<?php 
    if ($show_agent_details == 'yes') {
        $col_class = 'large-6';
        if ($show_contact_form == 'no') {
            $col_class = 'large-12';
        }
        ?>
		<div class="column <?php 
        echo $col_class;
        ?>
">
		<div class="agent-detail row">
コード例 #27
0
$options["Activated"] = false;
if (defined("DSIDXPRESS_OPTION_NAME")) {
    $options = get_option(DSIDXPRESS_OPTION_NAME);
}
$show_idx = bon_get_option('use_idx_search', 'no');
$show_multisearch = bon_get_option('search_panel_tab');
if (is_array($show_multisearch)) {
    $show_multisearch = array_filter($show_multisearch);
}
$class = '';
if ($show_idx == 'yes' && $options["Activated"]) {
    $class = 'dsidx-search-listing';
}
$row_1 = bon_get_option('search_row_1');
$row_2 = bon_get_option('search_row_2');
$row_3 = bon_get_option('search_row_3');
if ($row_1 && $row_2 && $row_3) {
    $class = 'dsidx-search-listing';
}
?>
<div id="search-listing" class="search-listing <?php 
echo $class;
?>
">
	<div class="row">
		<div id="zoom-icon" class="column large-1 show-for-medium-up">
			<i class="sha-zoom search-icon"></i>
		</div>
		<div class="column large-11 small-12 small-centered large-uncentered">
			<?php 
shandora_search_listing_form();
コード例 #28
0
}
$meta_count = count($meta_query);
if ($meta_count > 1) {
    $meta_query['relation'] = 'AND';
}
$numberposts = bon_get_option('listing_per_page') ? bon_get_option('listing_per_page') : 8;
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$search_args = array('post_type' => 'boat-listing', 'posts_per_page' => $numberposts, 'paged' => $paged, 'post_title' => isset($_GET['title']) ? $_GET['title'] : '');
if ($tax_count > 0) {
    $search_args['tax_query'] = $tax_query;
}
if ($meta_count > 0) {
    $search_args['meta_query'] = $meta_query;
}
$orderby = bon_get_option('listing_orderby');
$order = bon_get_option('listing_order', 'DESC');
$key = '';
if (isset($_GET['search_orderby'])) {
    $orderby = $_GET['search_orderby'];
}
if (isset($_GET['search_order'])) {
    $order = $_GET['search_order'];
}
switch ($orderby) {
    case 'price':
        $orderby = 'meta_value_num';
        $key = bon_get_prefix() . 'listing_price';
        break;
    case 'title':
        $orderby = 'title';
        break;
コード例 #29
0
ファイル: block-related.php プロジェクト: VadimSid/thinkgreek
<hr />
<ul class="listings related <?php 
    shandora_block_grid_column_class();
    ?>
" data-compareurl="<?php 
    echo get_permalink($compare_page);
    ?>
">
			
<?php 
    foreach ($related_query as $post) {
        $status = shandora_get_meta($post->ID, 'listing_status');
        $bed = shandora_get_meta($post->ID, 'listing_bed');
        $bath = shandora_get_meta($post->ID, 'listing_bath');
        $lotsize = shandora_get_meta($post->ID, 'listing_buildingsize');
        $sizemeasurement = bon_get_option('measurement');
        ?>
<li>
<article id="post-<?php 
        $post->ID;
        ?>
" <?php 
        post_class($status);
        ?>
 itemscope itemtype="http://schema.org/RealEstateAgent">
	<header class="entry-header">
		<div class="listing-hover">
			<span class="mask"></span>
			<?php 
        echo shandora_get_listing_hover_action($post->ID);
        ?>
コード例 #30
0
ファイル: meta.php プロジェクト: VadimSid/thinkgreek
			<?php 
    echo $engine;
    ?>
		</span></div>
	</li>
	<?php 
}
?>
	<?php 
if (!empty($mileage)) {
    ?>
	<li class="bath"><div class="meta-wrap">
		<i class="sha-dashboard"></i>
		<span class="meta-value">
			<?php 
    $mm = bon_get_option('mileage_measure');
    if ($mm == '' || strtolower($mm) == 'mile' || strtolower($mm) == 'miles') {
        $mileage > 0 ? printf(_n('1 Mile', '%s Miles', $mileage, 'bon'), $mileage) : _e('Unspecified', 'bon');
    } else {
        echo $mileage . ' ' . $mm;
    }
    ?>
		</span></div>
	</li>
	<?php 
}
?>
	<?php 
if (!empty($transmission)) {
    ?>
	<li class="lotsize"><div class="meta-wrap">