Exemplo n.º 1
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;
 }