예제 #1
0
<?php

$properties_per_page = (int) estetico_get_setting('properties_per_page');
$start_page = isset($_GET['start_page']) ? (int) $_GET['start_page'] : 1;
$sort_by = !empty($_GET['sort_by']) ? $_GET['sort_by'] : '';
$list_style = !empty($_GET['list_style']) ? $_GET['list_style'] : estetico_get_setting('properties_default_listing_type');
// Do the properties query
$properties = PropertiesManager::getFiltered($_GET);
$found_posts = PropertiesManager::getLastQueryFoundItemsCount();
?>
<div class="main-content">

	<div class="filterbar">
		<div class="listing-view-change">
			<a href="<?php 
echo estetico_preserve_url(array('list_style' => 'grid'));
?>
" class="grid<?php 
if ($list_style != 'grid') {
    ?>
 active<?php 
}
?>
"><?php 
echo __('Grid', THEME_NAME);
?>
</a>
			<a href="<?php 
echo estetico_preserve_url(array('list_style' => 'list'));
?>
" class="list<?php 
 public static function searchProperties($args = array())
 {
     $key = md5(serialize($args));
     if (!isset($args['ignore_sticky_posts'])) {
         $args['ignore_sticky_posts'] = true;
     }
     $_properties = wp_cache_get($key, THEME_NAME);
     $found_posts = 0;
     if (!$_properties) {
         $curr_lang = estetico_surpress_wpml_query_before();
         $properties = new WP_Query($args);
         if (isset($args['debug'])) {
             var_dump($properties);
         }
         estetico_surpress_wpml_query_after($curr_lang);
         $found_posts = $properties->found_posts;
         $_properties = array();
         foreach ($properties->posts as $property) {
             $p = new Property();
             $p->setData($property);
             if (!empty($args['custom'])) {
                 if (!empty($args['custom']['lat']) && !empty($args['custom']['lng'])) {
                     $distance = estetico_distance($args['custom']['lat'], $args['custom']['lng'], (double) $p->getLatitude(), (double) $p->getLongitude());
                     $desired_distance = estetico_get_setting('default_distance');
                     if (isset($args['custom']['distance'])) {
                         $desired_distance = $args['custom']['distance'];
                     }
                     if ($distance > $desired_distance) {
                         $found_posts--;
                         continue;
                     }
                 }
             }
             $_properties[] = $p;
         }
         wp_cache_set($key, $_properties, THEME_NAME);
     }
     self::$last_query_found_items_count = $found_posts;
     return $_properties;
 }
예제 #3
0
/**
 * @param $unit_name The name of the unit needed
 * @param $format "full" or "short"
 * 
 * @return The name of the unit in the correct system (us or metric)
 */
function estetico_get_unit($unit_name, $format = 'full')
{
    $unit_base = estetico_get_setting('measuring_units');
    if ($unit_base == '') {
        $unit_base = 'metric';
    }
    $units = array('area' => array('us' => array('full' => 'Square feet', 'short' => 'Sq. ft.'), 'metric' => array('full' => 'Square meters', 'short' => 'Sq. met.')));
    return isset($units[$unit_name][$unit_base][$format]) ? $units[$unit_name][$unit_base][$format] : null;
}
예제 #4
0
 public function sendMessage($name, $email, $phone, $person_message = null)
 {
     $property_id = (int) $_POST['property_id'];
     $property = new Property($property_id);
     $property->fetch();
     $message_format = estetico_get_setting('agent_message_format');
     $message = str_replace('%person_name%', $name, $message_format);
     $message = str_replace('%person_email%', $email, $message);
     $message = str_replace('%person_phone%', $phone, $message);
     $message = str_replace('%person_message%', $person_message, $message);
     $message = str_replace('%agent_name%', $this->getName(), $message);
     $message = str_replace('%property_name%', $property->getTitle(), $message);
     $message = str_replace('%property_link%', '<a href="' . $property->getLink() . '">' . $property->getLink() . '</a>', $message);
     $message = nl2br($message);
     $headers = "Content-Type:text/html;charset=utf-8\r\n";
     $headers .= "From: " . $name . ' <' . $email . '>' . "\r\n";
     $success = false;
     $recipient = $this->getEmail();
     if (mail($recipient, __('Contact message about a property', THEME_NAME), $message, $headers)) {
         $success = true;
     }
     return $success;
 }
예제 #5
0
if (!$at_least_one) {
    $quick_search_items = $default_quick_search_items;
    $quick_search_items_selected = count($default_quick_search_items);
}
?>
<div class="quick-search">
	<form method="get" action="<?php 
echo $action;
?>
" role="search">

		<div class="clearfix"></div>
		<div class="train-railing tmobile">
			<div class="railing"></div>
			<h3 class="train"><?php 
echo estetico_get_setting('quick_search_heading');
?>
</h3>
			<div class="railing"></div>
		</div>

		<div class="table">
			<div class="row">
				<div class="cell cell-1">

		<ul class="filters filters-<?php 
echo $quick_search_items_selected;
?>
">
			<?php 
foreach ($quick_search_items as $key => $value) {
예제 #6
0
    echo estetico_get_setting('contacts_email_1');
    ?>
"><?php 
    echo estetico_get_setting('contacts_email_1');
    ?>
</a>
				<a href="mailto:<?php 
    echo estetico_get_setting('contacts_email_2');
    ?>
"><?php 
    echo estetico_get_setting('contacts_email_2');
    ?>
</a>
			</div>
			<?php 
    $address = estetico_get_setting('contacts_address');
    ?>
			<?php 
    if (!empty($address)) {
        ?>
			<div class="col omega type address">
				<?php 
        echo $address;
        $latlng = estetico_get_latlng_by_address($address, true);
        ?>
			</div>
			<?php 
    }
    ?>
		</div>
		
예제 #7
0
" alt="">
			</div>
			<?php 
}
?>
		</div>

		<?php 
if (is_front_page() || isset($template_name) && $template_name == 'home') {
    ?>
			<?php 
    estetico_load_component('quick_search');
    ?>
		<?php 
}
?>

	</div>
	<!-- /.container -->

</header>
<!-- /#header -->

<section id="main" data-role="main">

	<div class="container">

    <?php 
if (function_exists('breadcrumb_trail') && !is_front_page() && estetico_get_setting('show_breadcrumbs') && $template_name != 'home') {
    breadcrumb_trail(array('show_browse' => false, 'separator' => '&raquo;'));
}
예제 #8
0
 function init_theme()
 {
     require_once "bootstrap/inc/vendor/breadcrumb-trail/breadcrumb-trail.php";
     add_theme_support('post-thumbnails');
     add_theme_support('widgets');
     add_theme_support('automatic-feed-links');
     register_taxonomy('properties-features', 'properties', array('label' => __('Unique features', THEME_NAME), 'show_in_nav_menus' => false, 'rewrite' => false));
     register_taxonomy('properties-types', 'properties', array('label' => __('Property types', THEME_NAME), 'show_in_nav_menus' => true, 'rewrite' => false));
     register_nav_menu('primary', __('Navigation Menu', THEME_NAME));
     register_nav_menu('footer_1', __('Footer Menu 1', THEME_NAME));
     register_nav_menu('footer_2', __('Footer Menu 2', THEME_NAME));
     register_sidebar(array('name' => __('Default sidebar', THEME_NAME), 'id' => 'default_sidebar', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
     register_sidebar(array('name' => __('Properties sidebar', THEME_NAME), 'id' => 'properties_sidebar', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
     register_sidebar(array('name' => __('Property details sidebar', THEME_NAME), 'id' => 'property_details_sidebar', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
     register_sidebar(array('name' => __('Blog sidebar', THEME_NAME), 'id' => 'blog_sidebar', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
     add_image_size('properties-gallery-thumbnail', estetico_get_setting('image_properties_gallery_thumbnail_width'), estetico_get_setting('image_properties_gallery_thumbnail_height'), true);
     add_image_size('properties-featured-thumbnail', estetico_get_setting('image_properties_featured_thumbnail_width'), estetico_get_setting('image_properties_featured_thumbnail_height'), true);
     add_image_size('properties-carousel-thumbnail', estetico_get_setting('image_properties_carousel_thumbnail_width'), estetico_get_setting('image_properties_carousel_thumbnail_height'), true);
     add_image_size('properties-gallery-normal', estetico_get_setting('image_properties_gallery_normal_width'), estetico_get_setting('image_properties_gallery_normal_height'), true);
     add_image_size('properties-listing', estetico_get_setting('image_properties_listing_width'), estetico_get_setting('image_properties_listing_height'), true);
     add_filter('body_class', 'estetico_add_body_class');
     add_filter('wp_nav_menu_objects', 'estetico_walker_nav_menu_start_el_helper', 10, 2);
     // Basic qTranslate support
     if (function_exists('qtrans_convertURL')) {
         add_filter('post_type_link', 'qtrans_convertURL');
     }
     add_shortcodes_post_init();
     require_once 'bootstrap/after_init/release-1_3.php';
     require_once 'bootstrap/after_init/release-1_3_3.php';
     add_filter('wp_nav_menu_items', 'estetico_apply_relative_menu_item', 10, 2);
 }
예제 #9
0
파일: skin.php 프로젝트: pistonsky/taivilla
        return;
    }
} else {
    $scheme = array();
    for ($i = 1; $i <= 24; $i++) {
        $tmp = 'color_' . $i;
        $scheme[$tmp] = estetico_get_setting($tmp);
    }
}
$header_image = estetico_get_setting('header_image');
$header_image_repeat = estetico_get_setting('header_image_repeat');
if (empty($header_image)) {
    $header_image = $color_skin . '/img/header.jpg';
}
$background_image = estetico_get_setting('background_image');
$background_image_repeat = estetico_get_setting('background_image_repeat');
if (empty($background_image)) {
    $background_image = $color_skin . '/img/bg.jpg';
}
?>
h1, h2, h3, h4, h5, h6,
#searchform label {
	color: <?php 
echo $scheme['color_1'];
?>
;
}

html, body {
	background: <?php 
if (!empty($background_image)) {
예제 #10
0
 function of_options()
 {
     //Access the WordPress Categories via an Array
     $of_categories = array();
     $of_categories_obj = get_categories('hide_empty=0');
     foreach ($of_categories_obj as $of_cat) {
         $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;
     }
     $categories_tmp = array_unshift($of_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $of_pages = array();
     $of_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($of_pages_obj as $of_page) {
         $of_pages[$of_page->ID] = $of_page->post_name;
     }
     $of_pages_tmp = array_unshift($of_pages, "Select a page:");
     //Testing
     $of_options_select = array("one", "two", "three", "four", "five");
     $of_options_radio = array("one" => "One", "two" => "Two", "three" => "Three", "four" => "Four", "five" => "Five");
     //Sample Homepage blocks for the layout manager (sorter)
     $of_options_homepage_blocks = array("disabled" => array("placebo" => "placebo", "block_one" => "Block One", "block_two" => "Block Two", "block_three" => "Block Three"), "enabled" => array("placebo" => "placebo", "block_four" => "Block Four"));
     //Stylesheets Reader
     $alt_stylesheet_path = LAYOUT_PATH;
     $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) {
                     $alt_stylesheets[] = $alt_stylesheet_file;
                 }
             }
         }
     }
     //Background Images Reader
     $bg_images_path = get_stylesheet_directory() . '/images/bg/';
     // change this to where you store your bg images
     $bg_images_url = get_template_directory_uri() . '/images/bg/';
     // change this to where you store your bg images
     $bg_images = array();
     if (is_dir($bg_images_path)) {
         if ($bg_images_dir = opendir($bg_images_path)) {
             while (($bg_images_file = readdir($bg_images_dir)) !== false) {
                 if (stristr($bg_images_file, ".png") !== false || stristr($bg_images_file, ".jpg") !== false) {
                     natsort($bg_images);
                     //Sorts the array into a natural order
                     $bg_images[] = $bg_images_url . $bg_images_file;
                 }
             }
         }
     }
     /*-----------------------------------------------------------------------------------*/
     /* TO DO: Add options/functions that use these */
     /*-----------------------------------------------------------------------------------*/
     //More Options
     $uploads_arr = wp_upload_dir();
     $all_uploads_path = $uploads_arr['path'];
     $all_uploads = get_option('of_uploads');
     $other_entries = array("Select a number:", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19");
     $body_repeat = array("no-repeat", "repeat-x", "repeat-y", "repeat");
     $body_pos = array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right");
     // Image Alignment radio box
     $of_options_thumb_align = array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center");
     // Image Links to Options
     $of_options_image_link_to = array("image" => "The Image", "post" => "The Post");
     /*-----------------------------------------------------------------------------------*/
     /* The Options Array */
     /*-----------------------------------------------------------------------------------*/
     // Set the Options Array
     global $of_options;
     $of_options = array();
     $of_options[] = array("name" => __("Agents", THEME_NAME), "type" => "heading");
     $of_options[] = array("name" => __("Enable direct agents contact", THEME_NAME), "desc" => __("Enable direct contact form with your agents on a global level. You can enable/disable this option per agent bases if you edit the specific agent profile.", THEME_NAME), "id" => "enable_direct_agents_contact", "std" => "1", "type" => "checkbox");
     $of_options[] = array("name" => __("Message subject", THEME_NAME), "desc" => __("The subject of the email received by the agent.", THEME_NAME), "id" => "agent_message_subject", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Message format", THEME_NAME), "desc" => __("Available short tags: %property_name%, %property_link%, %person_name%, %person_phone%, %person_email%, %agent_name%, %person_message%", THEME_NAME), "id" => "agent_message_format", "std" => __("Hello %agent_name%,\n\nSomebody named %person_name% wants to contact you about property %property_name% (%property_link%).\n\nTheirs contact details are:\nName: %person_name%\nPhone: %person_phone%\nEmail: %person_email%\n\nMessage: %person_message%", THEME_NAME), "type" => "textarea");
     // Properties settings
     $of_options[] = array("name" => __("Properties", THEME_NAME), "type" => "heading");
     $of_options[] = array("name" => __("Enable schema.org", THEME_NAME), "desc" => __("Add <a href=\"http://www.schema.org/\" target=\"_blank\">schema.org</a> support to improve properties SEO for major seach engines like Google, Bing and Yahoo.", THEME_NAME), "id" => "schemaorg_enabled", "std" => false, "type" => "checkbox");
     $of_options[] = array("name" => __("WPML properties", THEME_NAME), "desc" => __("How to handle missing properties translation if WPML plugin is installed", THEME_NAME), "id" => "handle_missing_wpml_property_translations", "std" => "always_show_original", "type" => "select", "options" => array('always_show_original' => __('Always show original', THEME_NAME), 'show_local_copy' => __('Show localized copy if exists', THEME_NAME)));
     $of_options[] = array("name" => __("Main properties page", THEME_NAME), "desc" => __("Defines the page where properties will be listed. Select only one.", THEME_NAME), "id" => "main_properties_page", "std" => "", "type" => "nested_pages");
     $of_options[] = array("name" => __("Main agents page", THEME_NAME), "desc" => __("The agencies page will go to this page to filter the agents. It should have a valid Agents template.", THEME_NAME), "id" => "main_agents_page", "std" => "", "type" => "nested_pages");
     $of_options[] = array("name" => __("Property address format", THEME_NAME), "desc" => __("Sets the default address format. Available parameters:<br>\n\t\t\t\t\t\t\t%street_address%, %street_number%, %city%, %state%, %county%, %floor%, %country%, %postal_code%, %apartment_number%<br><br>You can use conditional state \n\t\t\t\t\t\t\tif you want to eliminate gaps in the output format.<br><br>Usage:<br><strong>[if %street_address%], %street_adress%[/if]</strong><br><br>or<br><br><strong>[if %street_address%], %street_number%[/if]</strong>", THEME_NAME), "id" => "address_format", "std" => "%street_number% %street_address%, %county%, %city%, %postal_code%", "type" => "textarea");
     $of_options[] = array("name" => __("Default properties listing type", THEME_NAME), "desc" => __("List or Grid layout", THEME_NAME), "id" => "properties_default_listing_type", "std" => "grid", "type" => "select", "options" => array('grid' => __('Grid'), 'list' => __('List')));
     $of_options[] = array("name" => __("Properties not found text", THEME_NAME), "desc" => __("Text customer will see this if no properties are found according to their criteria.", THEME_NAME), "id" => "no_properties_found_text", "std" => __('There are no properties found.', THEME_NAME), "type" => "text");
     $of_options[] = array("name" => __("Google Maps API key", THEME_NAME), "desc" => __("Enter your Google Maps API key. Google allows FREE usage up to 25 000 loads per day. If your site exceeds it, you need to apply for Business license.\n\t\t\t\t\t\t<br><br>If you don't have one, visit <a target=\"_blank\" href=\"https://developers.google.com/maps/documentation/javascript/tutorial#api_key\">Google Maps API page</a> for more information.", THEME_NAME), "id" => "google_maps_api_key", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Google Maps API server key", THEME_NAME), "desc" => __("Enter your Google Maps API server key. This key will be used to give your customer better Google Maps services like geo location auto suggestion. \n\t\t\t\t\t\t\tGoogle allows up to 2 500 calls per day. If your site is exceeding this quota you need to apply for Business license.\n\t\t\t\t\t\t\t<br><br>If you don't have such, visit <a target=\"_blank\" href=\"https://developers.google.com/maps/documentation/javascript/tutorial#api_key\">Google Maps API page</a> for more information.", THEME_NAME), "id" => "google_maps_api_server_key", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Distances", THEME_NAME), "desc" => __("A list of comma separated numbers that represent distances of properties in that radius, available for search options.", THEME_NAME), "id" => "distances", "std" => "1, 2, 3, 4, 5, 10, 20, 30, 50, 100", "type" => "text");
     $of_options[] = array("name" => __("Default distance", THEME_NAME), "desc" => __("If the customer has chosen a location to search for, but without distance within it, this is the default one.", THEME_NAME), "id" => "default_distance", "std" => "20", "type" => "text");
     $of_options[] = array("name" => __("Properties per page", THEME_NAME), "desc" => "", "id" => "properties_per_page", "std" => 9, "type" => "text");
     $of_options[] = array("name" => __("Measuring units", THEME_NAME), "desc" => __("US or Metric", THEME_NAME), "id" => "measuring_units", "type" => "select", "std" => "metric", "options" => array('metric' => __('Metric'), 'us' => __('US')));
     $of_options[] = array("name" => __("Use property address field", THEME_NAME), "desc" => __("Since theme update to version 1.1, the address field is no longer active. If you have properties before version 1.1, you can leave this option to \"yes\". In that case, you will not be able to take full advantage of the new address fields. ", THEME_NAME), "id" => "use_property_address_field", "type" => "select", "std" => "yes", "options" => array('no' => __('No'), 'yes' => __('Yes')));
     $of_options[] = array("name" => __("Type of pets available", THEME_NAME), "desc" => __("List of the pets allowed in the property. Write each type on new line.", THEME_NAME), "id" => "pets_allowed_list", "type" => "textarea", "std" => "");
     $of_options[] = array("name" => __("Mark featured items", THEME_NAME), "desc" => __("Show a flag on each featured item when items are displayed in a list or grid view mode.", THEME_NAME), "id" => "mark_featured_items", "type" => "radio", "std" => "yes", "options" => array('yes' => __('Yes'), 'no' => __('No')));
     $of_options[] = array("name" => __('Show "Recently viewed" block', THEME_NAME), "desc" => __("Show a block of properties that are recently viewed by the customer.", THEME_NAME), "id" => "show_recently_viewed", "type" => "radio", "std" => "no", "options" => array('yes' => __('Yes'), 'no' => __('No')));
     $of_options[] = array("name" => __('Show "Other people also viewed" block', THEME_NAME), "desc" => __("Show a block of properties that are also viewed by other customers.", THEME_NAME), "id" => "show_other_people_also_viewed", "type" => "radio", "std" => "no", "options" => array('yes' => __('Yes'), 'no' => __('No')));
     $of_options[] = array("name" => __('Property details gallery delay', THEME_NAME), "desc" => __("The seconds to wait before the next image appears. Anything but 0 will start an auto slideshow.", THEME_NAME), "id" => "property_details_gallery_delay", "type" => "text", "std" => "0");
     $of_options[] = array("name" => __("Properties images", THEME_NAME), "desc" => "", "id" => "properties_images", "std" => __("<h3 style=\"margin: 0 0 10px;\">Properties images.</h3>\n\t\t\t\t\t\tThis section is to help you upload images faster - straight from your camera, without burdening vistors with the download of huge photos. You can setup all required photo formats. \n\t\t\t\t\t\t<br><br>Please, have in mind that if you change any of the thumb settings, you have to regenerate all thumbnails. \n\t\t\t\t\t\tYou can install <a href=\"http://wordpress.org/plugins/force-regenerate-thumbnails/\" target=\"_blank\">Force regenerate thumbnails</a> plugin.", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("Gallery thumbnail width", THEME_NAME), "desc" => "", "id" => "image_properties_gallery_thumbnail_width", "std" => 80, "type" => "text");
     $of_options[] = array("name" => __("Gallery thumbnail height", THEME_NAME), "desc" => "", "id" => "image_properties_gallery_thumbnail_height", "std" => 60, "type" => "text");
     $of_options[] = array("name" => __("Featured thumbnail width", THEME_NAME), "desc" => "", "id" => "image_properties_featured_thumbnail_width", "std" => 100, "type" => "text");
     $of_options[] = array("name" => __("Featured thumbnail height", THEME_NAME), "desc" => "", "id" => "image_properties_featured_thumbnail_height", "std" => 73, "type" => "text");
     $of_options[] = array("name" => __("Carousel thumbnail width", THEME_NAME), "desc" => "", "id" => "image_properties_carousel_thumbnail_width", "std" => 218, "type" => "text");
     $of_options[] = array("name" => __("Carousel thumbnail height", THEME_NAME), "desc" => "", "id" => "image_properties_carousel_thumbnail_height", "std" => 148, "type" => "text");
     $of_options[] = array("name" => __("Gallery normal width", THEME_NAME), "desc" => "", "id" => "image_properties_gallery_normal_width", "std" => 650, "type" => "text");
     $of_options[] = array("name" => __("Gallery normal height", THEME_NAME), "desc" => "", "id" => "image_properties_gallery_normal_height", "std" => 340, "type" => "text");
     $of_options[] = array("name" => __("Property listing width", THEME_NAME), "desc" => "", "id" => "image_properties_listing_width", "std" => 230, "type" => "text");
     $of_options[] = array("name" => __("Property listing height", THEME_NAME), "desc" => "", "id" => "image_properties_listing_height", "std" => 167, "type" => "text");
     // Price settings
     $of_options[] = array("name" => __("Price", THEME_NAME), "type" => "heading");
     $of_options[] = array("name" => __("Currency", THEME_NAME), "desc" => __("Default currency for properties.<br>Popular currencies: &pound; &euro; \$", THEME_NAME), "id" => "currency", "std" => "\$", "type" => "text");
     $of_options[] = array("name" => __("Currency ISO 4217 code", THEME_NAME), "desc" => __("Not a required field but if you enable schema.org it is good to provide the code here to make your search results more correct.", THEME_NAME), "id" => "currency_iso_code", "std" => "USD", "type" => "text");
     $of_options[] = array("name" => __("Thousands separator", THEME_NAME), "desc" => __("Type \"<strong>s</strong>\" (without commas) if you'd like an empty space.", THEME_NAME), "id" => "thousands_separator", "std" => "s", "type" => "text");
     $of_options[] = array("name" => __("Decimal point", THEME_NAME), "desc" => __("Type \"<strong>s</strong>\" (without commas) if you'd like an empty space.", THEME_NAME), "id" => "decimal_point", "std" => ".", "type" => "text");
     $of_options[] = array("name" => __("Currency position", THEME_NAME), "desc" => __("Where the currency sign should stay. In front of (example: &pound; 12345) or after the end of ( 12345 &pound; ) number", THEME_NAME), "id" => "currency_position", "std" => "front", "type" => "radio", "options" => array('front' => __('Front of number'), 'end' => __('End of number')));
     $of_options[] = array("name" => __("Currency and number separator", THEME_NAME), "desc" => __("The separator between the currency sign and the number.<br>Type \"<strong>s</strong>\" (without commas) if you'd like an empty space.", THEME_NAME), "id" => "currency_number_separator", "std" => "s", "type" => "text");
     $of_options[] = array("name" => __("Show zeros after decimal for natural numbers", THEME_NAME), "desc" => __("If price is just a natural number show or hide .00 after it.<br>Example: 555555 or 555555.00", THEME_NAME), "id" => "show_zeros_natural_numbers", "std" => "no", "type" => "radio", "options" => array('yes' => __('Yes'), 'no' => __('No')));
     // Social media settings
     $of_options[] = array("name" => __("Social media", THEME_NAME), "type" => "heading");
     $of_options[] = array("name" => "Facebook", "desc" => __("Please enter your Facebook identificator", THEME_NAME), "id" => "social_media_facebook", "std" => "", "type" => "text");
     $of_options[] = array("name" => "Twitter", "desc" => __("Please enter your Twitter identificator", THEME_NAME), "id" => "social_media_twitter", "std" => "", "type" => "text");
     $of_options[] = array("name" => "YouTube", "desc" => __("Please enter your Youtube identificator", THEME_NAME), "id" => "social_media_youtube", "std" => "", "type" => "text");
     $of_options[] = array("name" => "Google Plus", "desc" => __("Please enter your Google Plus identificator", THEME_NAME), "id" => "social_media_google_plus", "std" => "", "type" => "text");
     $of_options[] = array("name" => "Pinterest", "desc" => __("Please enter your Pinterest identificator", THEME_NAME), "id" => "social_media_pinterest", "std" => "", "type" => "text");
     $of_options[] = array("name" => "LinkedIn", "desc" => __("Please enter your <strong>full</strong> LinkedIn url address", THEME_NAME), "id" => "social_media_linkedin", "std" => "", "type" => "text");
     // Contacts settings
     $of_options[] = array("name" => __("Contacts", THEME_NAME), "type" => "heading");
     $of_options[] = array("name" => __("Send form to email", THEME_NAME), "desc" => __("Enter the email address to which you want to recieve the contact form's data. If it is left empty, the administrator's email will be used.", THEME_NAME), "id" => "contacts_recipient", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Office address", THEME_NAME), "desc" => __("Your office address.", THEME_NAME), "id" => "contacts_address", "std" => "", "type" => "textarea");
     $of_options[] = array("name" => __("Phone 1", THEME_NAME), "desc" => __("The phone number to contact.", THEME_NAME), "id" => "contacts_phone_1", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Phone 2", THEME_NAME), "desc" => __("The phone number to contact.", THEME_NAME), "id" => "contacts_phone_2", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Email 1", THEME_NAME), "desc" => __("The email to contact. It will be public (visible).", THEME_NAME), "id" => "contacts_email_1", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Email 2", THEME_NAME), "desc" => __("The email to contact. It will be public (visible).", THEME_NAME), "id" => "contacts_email_2", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Contact form subject", THEME_NAME), "desc" => __("The subject of the email", THEME_NAME), "id" => "contacts_subject", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Contact form e-mail format", THEME_NAME), "desc" => __("You can create your own message by using these placeholders: %first_name%, %last_name%, %phone%, %email%, %ip%, %message%", THEME_NAME), "id" => "contacts_message_format", "std" => "A message from: %first_name%: %message%", "type" => "textarea");
     $of_options[] = array("name" => __("Contact form success message", THEME_NAME), "desc" => __("The customer will see this after sending the form successfully.", THEME_NAME), "id" => "contacts_success", "std" => "", "type" => "textarea");
     $of_options[] = array("name" => __("Enable reCAPTCHA", THEME_NAME), "desc" => __("Enable reCAPTCHA service to protect all your contact forms from spammers.", THEME_NAME), "id" => "recaptcha_enabled", "std" => "no", "type" => "radio", "options" => array('yes' => __('Yes', THEME_NAME), 'no' => __('No', THEME_NAME)));
     $of_options[] = array("name" => __("reCAPTCHA public key", THEME_NAME), "desc" => __("Enter your public key generated from <a href='http://recaptcha.net/' target='_blank'>http://recaptcha.net/‎</a>‎", THEME_NAME), "id" => "recaptcha_public_key", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("reCAPTCHA private key", THEME_NAME), "desc" => __("Enter your private key generated from <a href='http://recaptcha.net/' target='_blank'>http://recaptcha.net/‎</a>‎", THEME_NAME), "id" => "recaptcha_private_key", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("reCAPTCHA theme name", THEME_NAME), "desc" => __("reCAPTACHA allows you to use a specific theme. You can see the available options at <a href=\"https://developers.google.com/recaptcha/docs/customization\" target=\"_blank\">https://developers.google.com/recaptcha/docs/customization</a>‎", THEME_NAME), "id" => "recaptcha_theme", "std" => "red", "type" => "select", "options" => array("red" => __('Red', THEME_NAME), 'white' => __('White', THEME_NAME), 'blackglass' => __('Blackglass'), 'clean' => __('Clean', THEME_NAME)));
     // General settings
     $of_options[] = array("name" => __("General", THEME_NAME), "type" => "heading");
     $of_options[] = array("name" => __("Quick search heading", THEME_NAME), "desc" => __("The heading text for the quick search component", THEME_NAME), "id" => "quick_search_heading", "std" => __("Find your dream home today", THEME_NAME), "type" => "text");
     $of_options[] = array("name" => __("Enable footer middle section", THEME_NAME), "desc" => __("By default the footer has three sections. This checkbox controls the middle section.", THEME_NAME), "id" => "enable_footer_middle_section", "std" => false, "type" => "checkbox");
     $of_options[] = array("name" => __("Middle section title", THEME_NAME), "desc" => __("The title that will appear on top of the description.", THEME_NAME), "id" => "footer_middle_section_title", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Middle section text", THEME_NAME), "desc" => __("The footer's middle column free text", THEME_NAME), "id" => "footer_middle_section_text", "std" => "", "type" => "textarea");
     $of_options[] = array("name" => __("Middle section read more link", THEME_NAME), "desc" => __("A link address the customer can go to.", THEME_NAME), "id" => "footer_middle_section_read_more_link", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Middle section read more text", THEME_NAME), "desc" => __("A custom link name. \"Read more\" is fine.", THEME_NAME), "id" => "footer_middle_section_read_more_text", "std" => "", "type" => "text");
     $of_options[] = array("name" => __("Social links title", THEME_NAME), "desc" => __("The title that will appear on top of the description.", THEME_NAME), "id" => "newsletter_title", "std" => __("You can find us also", THEME_NAME), "type" => "text");
     $of_options[] = array("name" => __("Social links description", THEME_NAME), "desc" => __("Describes what customers will get if they go to the social links.", THEME_NAME), "id" => "newsletter_description", "std" => __("Check our awesome domestic cats in Facebook or Twitter", THEME_NAME), "type" => "textarea");
     $of_options[] = array("name" => __("404 page text", THEME_NAME), "desc" => __("The text the customers will see when Not found page appears.", THEME_NAME), "id" => "page_not_found_text", "std" => __("The think you are looking for cannot be found.", THEME_NAME), "type" => "textarea");
     $of_options[] = array("name" => __("404 page jump to links", THEME_NAME), "desc" => __("List the pages your customers can choose to go to from the 404 page", THEME_NAME), "id" => "page_not_found_jump_to_links", "std" => "", "type" => "nested_pages");
     // Styling options
     $of_options[] = array("name" => __("Styling", THEME_NAME), "type" => "heading");
     $template_uri = get_template_directory_uri();
     $desc = __('Pick one of the predefined colour skins.', THEME_NAME) . '<div style="width:500px;overflow:hidden">';
     $desc .= '<div style="float: left;margin-right:5px">' . __('Yellow', THEME_NAME) . '<br><img src="' . $template_uri . '/assets/core/img/wp-admin/colour_skin_thumb_yellow.png" alt="' . __('Yellow', THEME_NAME) . '" title="' . __('Yellow', THEME_NAME) . '"></div>';
     $desc .= '<div style="float: left;margin-right:5px">' . __('Green', THEME_NAME) . '<br><img src="' . $template_uri . '/assets/core/img/wp-admin/colour_skin_thumb_green.png" alt="' . __('Green', THEME_NAME) . '" title="' . __('Green', THEME_NAME) . '"></div>';
     $desc .= '<div style="float: left;margin-right:5px">' . __('Orange', THEME_NAME) . '<br><img src="' . $template_uri . '/assets/core/img/wp-admin/colour_skin_thumb_orange.png" alt="' . __('Orange', THEME_NAME) . '" title="' . __('Orange', THEME_NAME) . '"></div>';
     $desc .= '<div style="float: left;margin-right:5px">' . __('Ocean', THEME_NAME) . '<br><img src="' . $template_uri . '/assets/core/img/wp-admin/colour_skin_thumb_ocean.png" alt="' . __('Ocean', THEME_NAME) . '" title="' . __('Ocean', THEME_NAME) . '"></div>';
     $desc .= '<div style="float: left;margin-right:5px">' . __('Forest', THEME_NAME) . '<br><img src="' . $template_uri . '/assets/core/img/wp-admin/colour_skin_thumb_forest.png" alt="' . __('Forest', THEME_NAME) . '" title="' . __('Forest', THEME_NAME) . '"></div>';
     $desc .= '</div>';
     $of_options[] = array("name" => __("Colour skin", THEME_NAME), "desc" => $desc, "id" => "colour_skin", "std" => "yellow", "type" => "select", "options" => array('yellow' => __('Yellow', THEME_NAME), 'green' => __('Green', THEME_NAME), 'orange' => __('Orange', THEME_NAME), 'ocean' => __('Ocean', THEME_NAME), 'forest' => __('Forest', THEME_NAME)));
     $of_options[] = array("name" => __("Header configuration", THEME_NAME), "desc" => __('Choose header configuration from 4 different configurations. Keep in mind that Revolution slider goes hand in hand with Quick search. See "Flat header image" option below for float image upload.', THEME_NAME), "id" => "header_configuration", "std" => "home_slider_inner_flat", "type" => "radio", "options" => array('home_slider_inner_flat' => __('Homepage: Revolution slider, Inner pages: flat image', THEME_NAME), 'home_flat_inner_flat' => __('Homepage: flat header, Inner page: flat image', THEME_NAME), 'home_slider_inner_slider' => __('Homepage: Revolution slider, Inner pages: Revolution slider', THEME_NAME), 'home_flat_inner_slider' => __('Homepage: flat image, Inner pages: Revolution slider')));
     $of_options[] = array("name" => __("Revolution slider ID", THEME_NAME), "desc" => __('Set the ID of the Revolution slider you want to use.', THEME_NAME), "id" => "revslider_id", "std" => "homeslider", "type" => "text");
     $of_options[] = array("name" => __("Sidebar position", THEME_NAME), "desc" => __('Switch the sidebar and the mainbar positions.', THEME_NAME), "id" => "sidebar_position", "std" => "left", "type" => "radio", "options" => array("left" => __('Left', THEME_NAME), 'right' => __('Right')));
     $of_options[] = array("name" => __("Sidebar position on mobile", THEME_NAME), "desc" => __('The position of the sidebar when the site is visited on a mobile device - before or after the main content.', THEME_NAME), "id" => "sidebar_position_mobile", "std" => "after", "type" => "radio", "options" => array("before" => __('Before', THEME_NAME), 'after' => __('After')));
     /**
      * Returns an array of system fonts
      * Feel free to edit this, update the font fallbacks, etc.
      */
     function options_typography_get_os_fonts()
     {
         // OS Font Defaults
         $os_faces = array('Arial, sans-serif' => 'Arial', '"Avant Garde", sans-serif' => 'Avant Garde', 'Cambria, Georgia, serif' => 'Cambria', 'Copse, sans-serif' => 'Copse', 'Garamond, "Hoefler Text", Times New Roman, Times, serif' => 'Garamond', 'Georgia, serif' => 'Georgia', '"Helvetica Neue", Helvetica, sans-serif' => 'Helvetica Neue', 'Tahoma, Geneva, sans-serif' => 'Tahoma');
         return $os_faces;
     }
     /**
      * Returns a select list of Google fonts
      * Feel free to edit this, update the fallbacks, etc.
      */
     function options_typography_get_google_fonts()
     {
         // Google Font Defaults
         $google_faces = array('Arvo, serif' => 'Arvo', 'Copse, sans-serif' => 'Copse', 'Droid Sans, sans-serif' => 'Droid Sans', 'Droid Serif, serif' => 'Droid Serif', 'Lobster, cursive' => 'Lobster', 'Nobile, sans-serif' => 'Nobile', 'Open Sans, sans-serif' => 'Open Sans', 'Oswald, sans-serif' => 'Oswald', 'Pacifico, cursive' => 'Pacifico', 'Rokkitt, serif' => 'Rokkit', 'PT Sans, sans-serif' => 'PT Sans', 'Quattrocento, serif' => 'Quattrocento', 'Raleway, cursive' => 'Raleway', 'Ubuntu, sans-serif' => 'Ubuntu', 'Yanone Kaffeesatz, sans-serif' => 'Yanone Kaffeesatz');
         return $google_faces;
     }
     $typography_mixed_fonts = array_merge(options_typography_get_os_fonts(), options_typography_get_google_fonts());
     asort($typography_mixed_fonts);
     $of_options[] = array('name' => __('System Fonts and Google Fonts Mixed', THEME_NAME), 'desc' => __('Google fonts mixed with system fonts.', THEME_NAME), 'id' => 'google_mixed', 'std' => array('size' => '12px', 'face' => 'Open Sans, sans-serif', 'color' => '#171717'), 'type' => 'typography', 'options' => array('faces' => $typography_mixed_fonts, 'styles' => false));
     $of_options[] = array("name" => __("Flat header image", THEME_NAME), "desc" => __("940x220 image for inner pages. Image will be auto cropped.", THEME_NAME), "id" => "inner_pages_header", "std" => "", "type" => "media");
     $of_options[] = array("name" => __("Logo", THEME_NAME), "desc" => __("Upload your company's logo", THEME_NAME), "id" => "logo", "std" => "", "type" => "media");
     $of_options[] = array("name" => __("Background", THEME_NAME), "desc" => __("Upload a pattern or image for your main background.", THEME_NAME), "id" => "background_image", "std" => "", "type" => "media");
     $of_options[] = array("name" => __("Background repeat", THEME_NAME), "desc" => __("Choose the \"repeat\" option if you want your pattern to repeat", THEME_NAME), "id" => "background_image_repeat", "std" => "repeat", "type" => "radio", "options" => array('repeat' => __('Repeat', THEME_NAME), 'no-repeat' => __('No repeat', THEME_NAME)));
     $of_options[] = array("name" => __("Header background", THEME_NAME), "desc" => __("Upload a pattern or image for your header background.", THEME_NAME), "id" => "header_image", "std" => "", "type" => "media");
     $of_options[] = array("name" => __("Header background repeat", THEME_NAME), "desc" => __("Choose the \"repeat\" option if you want your pattern to repeat", THEME_NAME), "id" => "header_image_repeat", "std" => "repeat", "type" => "radio", "options" => array('repeat' => __('Repeat', THEME_NAME), 'no-repeat' => __('No repeat', THEME_NAME)));
     $of_options[] = array("name" => __("Show breadcrumbs", THEME_NAME), "desc" => __("Show/hide breadcrumbs on all pages.", THEME_NAME), "id" => "show_breadcrumbs", "std" => "yes", "type" => "radio", "options" => array('yes' => __('Yes', THEME_NAME), 'no' => __('No', THEME_NAME)));
     // Color scheme
     $of_options[] = array("name" => __("Color scheme", THEME_NAME), "type" => "heading");
     $colour_skin = estetico_get_setting('colour_skin');
     require_once get_template_directory() . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'skins' . DIRECTORY_SEPARATOR . $colour_skin . DIRECTORY_SEPARATOR . 'scheme.php';
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_1", "std" => __("<strong>Important:</strong> If you have <strong>just</strong> changed the skin option, please refresh the page. After the refresh is done, please click the reset button to restore the original colours of the skin (if you have any previous changes). If you don't do that, the theme will still use the old colours.", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("Enable color overwrite", THEME_NAME), "desc" => __("The colours of the current skin will be overwritten by the ones you specify here", THEME_NAME), "id" => "enable_color_overwrite", "std" => "no", "type" => "radio", "options" => array('yes' => __('Yes', THEME_NAME), 'no' => __('No', THEME_NAME)));
     $of_options[] = array("name" => "", "type" => 'reset_colors', "desc" => "The colours will be reset to the skin's default ones. All changes will be automatically saved.");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_1", "std" => __("Headings and top navigation hover style", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("", THEME_NAME), "id" => "color_1", "std" => $scheme['color_1'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_1", "std" => __("Links", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("", THEME_NAME), "id" => "color_2", "std" => $scheme['color_2'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_1", "std" => __("General buttons and top navigation buttons states.", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Background colour for old browsers", THEME_NAME), "id" => "color_3", "std" => $scheme['color_3'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient top colour", THEME_NAME), "id" => "color_4", "std" => $scheme['color_4'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient bottom colour", THEME_NAME), "id" => "color_5", "std" => $scheme['color_5'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Top navigation hover colour", THEME_NAME), "id" => "color_6", "std" => $scheme['color_6'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Top navigation sub level hover colour", THEME_NAME), "id" => "color_23", "std" => $scheme['color_23'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_2", "std" => __("Other button styles", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Background colour for old browsers", THEME_NAME), "id" => "color_7", "std" => $scheme['color_7'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient top colour", THEME_NAME), "id" => "color_8", "std" => $scheme['color_8'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient bottom colour", THEME_NAME), "id" => "color_9", "std" => $scheme['color_9'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_2", "std" => __("Other button styles", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient top colour", THEME_NAME), "id" => "color_10", "std" => $scheme['color_10'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient bottom colour", THEME_NAME), "id" => "color_11", "std" => $scheme['color_11'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_2", "std" => __("Other button styles", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient top colour", THEME_NAME), "id" => "color_12", "std" => $scheme['color_12'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient bottom colour", THEME_NAME), "id" => "color_13", "std" => $scheme['color_13'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_2", "std" => __("Header background colour", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("", THEME_NAME), "id" => "color_14", "std" => $scheme['color_14'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_2", "std" => __("Quick search block", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Background colour for old browsers", THEME_NAME), "id" => "color_15", "std" => $scheme['color_15'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient top colour", THEME_NAME), "id" => "color_16", "std" => $scheme['color_16'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Gradient bottom colour", THEME_NAME), "id" => "color_17", "std" => $scheme['color_17'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Border", THEME_NAME), "id" => "color_21", "std" => $scheme['color_21'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Border bottom colour", THEME_NAME), "id" => "color_22", "std" => $scheme['color_22'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_2", "std" => __("Sidebar navigation hover colour", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("", THEME_NAME), "id" => "color_18", "std" => $scheme['color_18'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_2", "std" => __("Footer", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Background", THEME_NAME), "id" => "color_19", "std" => $scheme['color_19'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Columns separator", THEME_NAME), "id" => "color_20", "std" => $scheme['color_20'], "type" => "color");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => "", "id" => "random_id_2", "std" => __("Misc", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("", THEME_NAME), "desc" => __("Icons main colour", THEME_NAME), "id" => "color_24", "std" => $scheme['color_24'], "type" => "color");
     // Search settings
     $of_options[] = array("name" => __("Search", THEME_NAME), "type" => "heading");
     $of_options[] = array("name" => __("Quick search", THEME_NAME), "desc" => "", "id" => "quick_seach_settings_info", "std" => __("<h3 style=\"margin: 0 0 10px;\">Quick search settings.</h3><p>You can set up to 10 search criterias.</p>", THEME_NAME), "icon" => true, "type" => "info");
     $of_options[] = array("name" => __("Show quick search", THEME_NAME), "desc" => __("If you don't want a quick search box to stay over your beautiful revolution slider, you can turn it of.", THEME_NAME), "id" => "show_quick_search", "std" => 'yes', 'options' => array('yes' => __('Yes', THEME_NAME), 'no' => __('No', THEME_NAME)), "type" => "radio");
     $of_options[] = array("name" => __('Which components to use for Quick search', THEME_NAME), "desc" => __("Drag and drop components from the left column to the right one to set the kind of fields that will appear on the quick search form. You can also sort their order.", THEME_NAME), "id" => "quick_search_items", "std" => '', 'options' => array('type' => __('Type', THEME_NAME), 'beds' => __('Beds', THEME_NAME), 'bedrooms' => __('Bedrooms', THEME_NAME), 'bathrooms' => __('Bathrooms', THEME_NAME), 'min_price' => __('Min price', THEME_NAME), 'max_price' => __('Max price', THEME_NAME), 'city' => __('City', THEME_NAME), 'feature' => __('Feature', THEME_NAME), 'for_sale_rent' => __('For sale or rent', THEME_NAME), 'pets_allowed' => __('Pets allowed', THEME_NAME)), "type" => "selectable");
     $of_options[] = array("name" => __('Which components to use for Properties filter', THEME_NAME), "desc" => __("Drag and drop components from the left column to the right one to set the kind of fields that will appear on the properties filter widget. You can also sort their order.", THEME_NAME), "id" => "properties_filter_items", "std" => '', 'options' => array('beds' => __('Beds', THEME_NAME), 'city' => __('City', THEME_NAME), 'for_sale_rent' => __('For sale or rent', THEME_NAME), 'property_status' => __('Property status', THEME_NAME), 'type' => __('Type', THEME_NAME), 'location' => __('Location', THEME_NAME), 'distance' => __('Distance', THEME_NAME), 'keywords' => __('Keywords', THEME_NAME), 'price' => __('Price', THEME_NAME), 'bedrooms' => __('Bedrooms', THEME_NAME), 'bathrooms' => __('Bathrooms', THEME_NAME), 'sq_feet' => __('Sq. Feet', THEME_NAME), 'pets_allowed' => __('Pets allowed', THEME_NAME), 'feature' => __('Feature', THEME_NAME), 'year_built' => __('Year built', THEME_NAME)), "type" => "selectable");
     // Footer settings
     $of_options[] = array("name" => __("Footer", THEME_NAME), "type" => "heading");
     $of_options[] = array("name" => __("Enable footer", THEME_NAME), "desc" => __("If you don't need the footer section of the theme, you can hide it from here.", THEME_NAME), "id" => "enable_footer", "std" => "yes", "type" => "radio", "options" => array('yes' => __('Yes', THEME_NAME), 'no' => __('No', THEME_NAME)));
     $of_options[] = array("name" => __("RSS Icon", THEME_NAME), "desc" => __("Show/hide the rss icon and its functionality. This does not turns off Wordpress RSS sharing. Just removes the icon from footer.", THEME_NAME), "id" => "footer_hide_rss", "std" => "no", "type" => "radio", "options" => array('yes' => __('Yes', THEME_NAME), 'no' => __('No', THEME_NAME)));
     $of_options[] = array("name" => __("Copyright text", THEME_NAME), "desc" => __("The copyright text to appear at the very bottom of the page in the footer section.", THEME_NAME), "id" => "footer_copyright", "std" => "", "type" => "textarea");
     $of_options[] = array("name" => __("Free HTML", THEME_NAME), "desc" => __("Input custom text, html, css or JavaScript. This code will be placed between the main columns and the copyright text.", THEME_NAME), "id" => "footer_free_html", "std" => "", "type" => "textarea");
 }
예제 #11
0
파일: 404.php 프로젝트: pistonsky/taivilla
			<header class="page-header">
				<h1 class="page-title"><?php 
_e('404 page', THEME_NAME);
?>
</h1>
			</header>

			<div class="page-wrapper">
				<div class="page-content">
					<p><?php 
echo nl2br(estetico_get_setting('page_not_found_text'));
?>
</p>
					<p>
					<?php 
$jump_to_pages = estetico_get_setting('page_not_found_jump_to_links');
if (!$jump_to_pages) {
    $jump_to_pages = array();
}
$counter = 1;
foreach ($jump_to_pages as $page_id) {
    $page = get_post($page_id);
    if ($page == null) {
        continue;
    }
    ?>
					<a href="<?php 
    echo get_permalink($page->ID);
    ?>
"><?php 
    echo $page->post_title;
예제 #12
0
	 				<li><a href="<?php 
        echo get_bloginfo('rss2_url');
        ?>
" class="rss"></a></li>
	 				<?php 
    }
    ?>
				</ul>
			</div>
		</div>
		<?php 
    $footer_free_html = estetico_get_setting('footer_free_html');
    echo $footer_free_html;
    ?>
		<?php 
    $copyright = estetico_get_setting('footer_copyright');
    if (!empty($copyright)) {
        ?>
			<div class="copyright"><?php 
        echo $copyright;
        ?>
</div>
		<?php 
    }
    ?>
	</div>
</footer>
<?php 
}
?>
예제 #13
0
<div class="box">
	<div class="search-filters">

		<?php 
$default_properties_filter_items = array('type' => 1, 'bedrooms' => 1, 'bathrooms' => 1, 'min_price' => 1, 'max_price' => 1);
$properties_filter_items = estetico_get_setting('properties_filter_items');
if (!is_array($properties_filter_items) || $properties_filter_items == '') {
    $properties_filter_items = $default_properties_filter_items;
}
$at_least_one = false;
$properties_filter_items_selected = 0;
foreach ($properties_filter_items as $key => $value) {
    if ($value == 1) {
        $at_least_one = true;
        $properties_filter_items_selected++;
    }
}
foreach ($properties_filter_items as $filter => $filter_enable) {
    if ($filter_enable == 0) {
        continue;
    }
    switch ($filter) {
        case 'for_sale_rent':
            ?>

		<div class="filter-group grid-fluid-3">
            <h4><?php 
            echo __('For sale or rent', THEME_NAME);
            ?>
</h4>
            <div class="col float-left">
예제 #14
0
    public function getSchemaOrgMetaTags()
    {
        extract($this->vars());
        ob_start();
        ?>
		<div itemscope itemtype="http://schema.org/Place">
			<meta itemprop="name" content="<?php 
        echo esc_attr($title);
        ?>
">
			<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
				<?php 
        if (!empty($street_address)) {
            ?>
					<meta itemprop="streetAddress" content="<?php 
            echo esc_attr($street_address);
            ?>
">
				<?php 
        }
        ?>

				<?php 
        if (!empty($city)) {
            ?>
					<meta itemprop="addressLocality" content="<?php 
            echo esc_attr($city);
            ?>
">
				<?php 
        }
        ?>

				<?php 
        if (!empty($state)) {
            ?>
					<meta itemprop="addressRegion" content="<?php 
            echo esc_attr($state);
            ?>
">
				<?php 
        }
        ?>

				<?php 
        if (!empty($postal_code)) {
            ?>
					<meta itemprop="postalCode" content="<?php 
            echo esc_attr($postal_code);
            ?>
">
				<?php 
        }
        ?>
			</div>
			<?php 
        if (!empty($thumbnail)) {
            ?>
				<meta content="<?php 
            echo $thumbnail;
            ?>
" alt="" itemprop="photo">	
			<?php 
        }
        ?>
			<meta content="<?php 
        echo $link;
        ?>
" itemprop="url">
			<?php 
        if ($longitude && $latitude) {
            ?>
				<div itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
					<meta itemprop="latitude" content="<?php 
            echo $latitude;
            ?>
" />
					<meta itemprop="longitude" content="<?php 
            echo $longitude;
            ?>
" />
				</div>
			<?php 
        }
        ?>
		</div>

		<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
			<meta itemprop="price" content="<?php 
        echo esc_attr($price);
        ?>
">
			<?php 
        $currency_iso_code = estetico_get_setting('currency_iso_code');
        if (!empty($currency_iso_code)) {
            ?>
			<meta itemprop="priceCurrency" content="<?php 
            echo estetico_get_setting('currency_iso_code');
            ?>
">
		<?php 
        }
        ?>
			<meta itemprop="url" content="<?php 
        echo esc_attr($link);
        ?>
">
		</div>

		<?php 
        $contents = ob_get_contents();
        ob_end_clean();
        return $contents;
    }
예제 #15
0
    if (!empty($properties)) {
        ?>

			<?php 
        include COMPONENTS_PATH . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR . 'properties_view_list_grid.php';
        ?>
			<?php 
        include COMPONENTS_PATH . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR . 'paging.php';
        ?>
		
		<?php 
    } else {
        ?>

			<p><?php 
        echo estetico_get_setting('no_properties_found_text');
        ?>
</p>

		<?php 
    }
    ?>
		
	<?php 
}
?>
</div>
<script type="text/javascript">
(function($) {
    try {		
		var resizeTimeout = null;
예제 #16
0
 function widget($args, $instance)
 {
     $price_min = PropertiesManager::getPriceMin();
     $price_max = PropertiesManager::getPriceMax();
     $types = PropertiesManager::getAllTypes();
     $types_selected = array();
     $types_filtered = array();
     $features = PropertiesManager::getAllFeatures();
     $features_selected = array();
     $features_filtered = array();
     if (isset($_GET['feature'])) {
         $features_selected = explode(',', $_GET['feature']);
     }
     $features_filtered = PropertiesManager::getFeaturesFiltered($_GET);
     if (isset($_GET['type'])) {
         $types_selected = explode(',', $_GET['type']);
     }
     $types_filtered = PropertiesManager::getTypesFiltered($_GET);
     if (isset($_GET['price'])) {
         $price = explode(',', $_GET['price']);
         $price_min_value = $price[0];
         $price_max_value = $price[1];
     } else {
         if (isset($_GET['min_price'])) {
             $price_min_value = $_GET['min_price'];
         } else {
             $price_min_value = $price_min;
         }
         if (isset($_GET['max_price'])) {
             $price_max_value = $_GET['max_price'];
         } else {
             $price_max_value = $price_max;
         }
     }
     $bedrooms_min = $bedrooms_min_value = 0;
     $bedrooms_max = $bedrooms_max_value = 20;
     if (isset($_GET['bedrooms'])) {
         if (strpos($_GET['bedrooms'], ',') !== false) {
             $bedrooms = explode(',', $_GET['bedrooms']);
             $bedrooms_min_value = $bedrooms[0];
             $bedrooms_max_value = $bedrooms[1];
         } else {
             $bedrooms_min_value = $_GET['bedrooms'];
         }
     }
     $bathrooms_min = $bathrooms_min_value = 0;
     $bathrooms_max = $bathrooms_max_value = 20;
     if (isset($_GET['bathrooms'])) {
         if (strpos($_GET['bathrooms'], ',') !== false) {
             $bathrooms = explode(',', $_GET['bathrooms']);
             $bathrooms_min_value = $bathrooms[0];
             $bathrooms_max_value = $bathrooms[1];
         } else {
             $bathrooms_min_value = $_GET['bathrooms'];
         }
     }
     $sq_feet_min = $sq_feet_min_value = 0;
     $sq_feet_max = $sq_feet_max_value = PropertiesManager::getSqFeetMax();
     if (isset($_GET['sq_feet'])) {
         if (strpos($_GET['sq_feet'], ',') !== false) {
             $sq_feet = explode(',', $_GET['sq_feet']);
             $sq_feet_min_value = $sq_feet[0];
             $sq_feet_max_value = $sq_feet[1];
         } else {
             $sq_feet_min_value = $_GET['sq_feet'];
         }
     }
     $year_built_min = $year_built_min_value = PropertiesManager::getYearBuiltMin();
     $year_built_max = $year_built_max_value = date('Y');
     if (isset($_GET['year_built'])) {
         $years = explode(',', $_GET['year_built']);
         $year_built_min_value = $years[0];
         $year_built_max_value = $years[1];
     }
     $main_properties_page = estetico_get_properties_page_id();
     $reset_url = estetico_get_properties_page_url_wpml($main_properties_page);
     $args = array('price_min' => $price_min, 'price_max' => $price_max, 'price_min_value' => $price_min_value, 'price_max_value' => $price_max_value, 'bedrooms_min' => $bedrooms_min, 'bedrooms_max' => $bedrooms_max, 'bedrooms_min_value' => $bedrooms_min_value, 'bedrooms_max_value' => $bedrooms_max_value, 'bathrooms_min' => $bathrooms_min, 'bathrooms_max' => $bathrooms_max, 'bathrooms_min_value' => $bathrooms_min_value, 'bathrooms_max_value' => $bathrooms_max_value, 'year_built_min' => $year_built_min, 'year_built_max' => $year_built_max, 'year_built_min_value' => $year_built_min_value, 'year_built_max_value' => $year_built_max_value, 'sq_feet_min' => $sq_feet_min, 'sq_feet_max' => $sq_feet_max, 'sq_feet_min_value' => $sq_feet_min_value, 'sq_feet_max_value' => $sq_feet_max_value, 'types' => $types, 'types_filtered' => $types_filtered, 'types_selected' => $types_selected, 'features' => $features, 'features_selected' => $features_selected, 'features_filtered' => $features_filtered, 'distance' => isset($_GET['distance']) ? $_GET['distance'] : 0, 'city' => isset($_GET['city']) ? $_GET['city'] : '', 'beds' => isset($_GET['beds']) ? $_GET['beds'] : 0, 'location_latitude' => isset($_GET['lat']) ? $_GET['lat'] : '', 'location_longitude' => isset($_GET['lng']) ? $_GET['lng'] : '', 'location' => isset($_GET['location']) ? $_GET['location'] : '', 'distances_config' => explode(',', estetico_get_setting('distances')), 'keywords' => isset($_GET['keywords']) ? $_GET['keywords'] : '', 'for_sale_rent' => isset($_GET['for_sale_rent']) ? $_GET['for_sale_rent'] : 'both', 'property_status' => isset($_GET['property_status']) ? $_GET['property_status'] : '', 'pets_allowed' => isset($_GET['pets_allowed']) ? $_GET['pets_allowed'] : '', 'reset_url' => $reset_url);
     estetico_load_component('widgets/properties_filter', $args);
 }
예제 #17
0
 function estetico_properties_shortcode($atts)
 {
     extract(shortcode_atts(array(), $atts));
     if ($atts['list_style'] == 'map') {
         $atts['all'] = true;
     }
     if ($atts['list_style'] == 'carousel') {
         extract(shortcode_atts(array('auto_slide' => !empty($atts['auto_slide']) && $atts['auto_slide'] == 'yes', 'infinite_loop' => !empty($atts['infinite_loop']) && $atts['infinite_loop'] == 'yes'), $atts));
     }
     $properties = PropertiesManager::getFiltered($atts);
     $found_posts = PropertiesManager::getLastQueryFoundItemsCount();
     $properties_per_page = (int) estetico_get_setting('properties_per_page');
     $start_page = isset($_GET['start_page']) ? (int) $_GET['start_page'] : 1;
     extract($atts);
     $content = '<div class="properties-shortcode">';
     ob_start();
     require COMPONENTS_PATH . DIRECTORY_SEPARATOR . "common" . DIRECTORY_SEPARATOR . "properties.php";
     $content .= ob_get_contents();
     ob_end_clean();
     $content .= '<div class="clearfix"></div></div>';
     return $content;
 }
예제 #18
0
<?php

$main_properties_page = estetico_get_properties_page_id();
$action = estetico_get_properties_page_url($main_properties_page);
$default_quick_search_items = array('type' => 1, 'bedrooms' => 1, 'bathrooms' => 1, 'min_price' => 1, 'max_price' => 1);
$quick_search_items = estetico_get_setting('quick_search_items');
if (!is_array($quick_search_items) || $quick_search_items == '') {
    $quick_search_items = $default_quick_search_items;
}
$at_least_one = false;
$quick_search_items_selected = 0;
foreach ($quick_search_items as $key => $value) {
    if ($value == 1) {
        $at_least_one = true;
        $quick_search_items_selected++;
    }
}
if (!$at_least_one) {
    $quick_search_items = $default_quick_search_items;
    $quick_search_items_selected = count($default_quick_search_items);
}
?>

<div class="box general quick-search-box">
	<h5 class="title"><?php 
echo __('Search for properties', THEME_NAME);
?>
</h5>

	<?php 
echo $description;
<ul class="<?php 
echo $list_class;
?>
">

	<?php 
$counter = 0;
foreach ($properties as $property) {
    $counter++;
    // Create short variables
    extract($property->vars());
    $show_featured_flag = estetico_get_setting('mark_featured_items') == 'yes';
    ?>

		<?php 
    if ($schemaorg_enabled) {
        ?>
			<?php 
        echo $property->getSchemaOrgMetaTags();
        ?>
		<?php 
    }
    ?>
		
		<?php 
    if ($list_style == 'list' || $list_style == 'list_map') {
        ?>

			<?php 
        include COMPONENTS_PATH . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR . 'offer_list.php';
        ?>
예제 #20
0
    ?>
	</ul>
</div>

<?php 
} else {
    ?>
	<p><?php 
    echo __('There are no agents.', THEME_NAME);
    ?>
</p>
<?php 
}
?>

</div>

<?php 
$sidebar_position_mobile = estetico_get_setting('sidebar_position_mobile');
?>

<?php 
if ($sidebar_position_mobile == 'after') {
    ?>
	<?php 
    get_sidebar();
}
?>

<?php 
get_footer();
예제 #21
0
        ?>
	<div class="property-viewed property-other-people-also-viewed">
		<h4><?php 
        _e('Other people also viewed', THEME_NAME);
        ?>
</h4>
	<?php 
        echo PropertiesManager::getOtherPeopleAlsoViewedHTML($post);
        ?>
	</div>
	<?php 
    }
    ?>
	
	<?php 
    if (estetico_get_setting('show_recently_viewed') == 'yes') {
        $options = array('exclude' => $property->getId());
        if (PropertiesManager::hasRecentlyViewed($options)) {
            ?>
	<div class="property-viewed property-recently-viewed">
		<h4><?php 
            _e('Recently viewed', THEME_NAME);
            ?>
</h4>
		<?php 
            echo PropertiesManager::getRecentlyViewedHTML($options);
            ?>
	</div>
	<?php 
        }
    }