$count_activity = STLocation::get_info_by_post_type(get_the_ID(), 'st_activity');
$count_rental = STLocation::get_info_by_post_type(get_the_ID(), 'st_rental');
$array_s = array('st_cars' => array('count' => $count_car['offers'], "from" => $count_car['min_max_price']['price_min'], "item_has_min" => $count_car['min_max_price']['detail']['item_has_min_price']), 'st_tours' => array('count' => $count_tours['offers'], "from" => $count_tours['min_max_price']['price_min'], "item_has_min" => $count_tours['min_max_price']['detail']['item_has_min_price']), 'st_hotel' => array('count' => $count_hotel['offers'], "from" => $count_hotel['min_max_price']['price_min'], "item_has_min" => $count_hotel['min_max_price']['detail']['item_has_min_price']), 'st_activity' => array('count' => $count_activity['offers'], "from" => $count_activity['min_max_price']['price_min'], "item_has_min" => $count_activity['min_max_price']['detail']['item_has_min_price']), 'st_rental' => array('count' => $count_rental['offers'], "from" => $count_rental['min_max_price']['price_min'], "item_has_min" => $count_rental['min_max_price']['detail']['item_has_min_price']));
$custom = $st_location_header_rate_count_custom;
$html = $st_location_header_rate_count_item_custom;
$list_post_type = $st_location_header_rate_count_post_type;
$list_post_type = explode(",", $list_post_type);
?>
	<ul class="icon-list text-white bgr-opacity" id='location_header_rate_count'>
		<?php 
if (is_array($array_s) and !empty($array_s)) {
    foreach ($array_s as $key => $value) {
        if (in_array($key, $list_post_type)) {
            ?>
					<li><a href='<?php 
            echo STLocation::get_link_search($key);
            ?>
'>
						<?php 
            echo esc_attr($value['count']);
            ?>
 
						<?php 
            echo esc_html($text);
            if ($key == "st_cars") {
                echo st_get_language('cars');
            }
            if ($key == "st_tours") {
                echo st_get_language('tours');
            }
            if ($key == "st_hotel") {
Exemplo n.º 2
0
 /**
  * @since 1.1.3
  * text in footer location element
  *
  */
 static function get_total_text_footer($post_type)
 {
     /* Example 10 cars in paris*/
     $link = STLocation::get_link_search($post_type);
     $count_post_type = STLocation::get_count_post_type($post_type);
     if ($post_type == "st_cars") {
         $post_type_names = __(' cars ', ST_TEXTDOMAIN);
         $post_type_name = __(' car ', ST_TEXTDOMAIN);
     }
     if ($post_type == "st_hotel") {
         $post_type_names = __(' hotels ', ST_TEXTDOMAIN);
         $post_type_name = __(' hotel ', ST_TEXTDOMAIN);
     }
     if ($post_type == "st_rental") {
         $post_type_names = __(' rentals ', ST_TEXTDOMAIN);
         $post_type_name = __(' rental ', ST_TEXTDOMAIN);
     }
     if ($post_type == "st_tours") {
         $post_type_names = __(' tours ', ST_TEXTDOMAIN);
         $post_type_name = __(' tour ', ST_TEXTDOMAIN);
     }
     if ($post_type == "st_activity") {
         $post_type_names = __(' activities ', ST_TEXTDOMAIN);
         $post_type_name = __(' activity ', ST_TEXTDOMAIN);
     }
     $text;
     if ($count_post_type > 1) {
         $text .= esc_html($count_post_type) . $post_type_names;
     } else {
         $text .= esc_html($count_post_type) . $post_type_name;
     }
     $text .= __(" in ", ST_TEXTDOMAIN) . get_the_title() . " .";
     $return .= "\r\n                    <div class='text-right'>\r\n                        <span>" . $text . "</span>\r\n                        <a href=" . esc_url($link) . ">" . __("View all", ST_TEXTDOMAIN) . "</a>\r\n                    </div>\r\n                ";
     return $return;
 }