'.$response['HotelInformationResponse']['HotelDetails']['propertyInformation'].'

'.htmlspecialchars_decode($propertyDescription).' '; return $html; } add_shortcode('adivaha_ds_HotelDescription','adivaha_ds_HotelDescription'); function adivaha_ds_HotelRating ($atts, $content = null) { $post_ID =get_the_ID(); $ds_hotelAPIData = get_post_meta($post_ID, 'ds_hotelAPIData', true ); $ds_hotelAPIData = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $ds_hotelAPIData); $ds_hotelAPIData = str_replace('"', '"', $ds_hotelAPIData); $response =json_decode( stripslashes($ds_hotelAPIData) , true ); $hotelRating =$response['HotelInformationResponse']['HotelSummary']['hotelRating']; return $hotelRating; } add_shortcode('adivaha_ds_HotelRating','adivaha_ds_HotelRating'); function adivaha_ds_HotelReview ($atts, $content = null) { $post_ID =get_the_ID(); $ds_hotelAPIData = get_post_meta($post_ID, 'ds_hotelAPIData', true ); $ds_hotelAPIData = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $ds_hotelAPIData); $ds_hotelAPIData = str_replace('"', '"', $ds_hotelAPIData); $response =json_decode( stripslashes($ds_hotelAPIData) , true ); $tripAdvisorRatingUrl =$response['HotelInformationResponse']['HotelSummary']['tripAdvisorRatingUrl']; return ''; } add_shortcode('adivaha_ds_HotelReview','adivaha_ds_HotelReview'); function adivaha_ds_HotelPointofInterest ($atts, $content = null) { $post_ID =get_the_ID(); $ds_hotelAPIData = get_post_meta($post_ID, 'ds_hotelAPIData', true ); $ds_hotelAPIData = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $ds_hotelAPIData); $ds_hotelAPIData = str_replace('"', '"', $ds_hotelAPIData); $response =json_decode( stripslashes($ds_hotelAPIData) , true ); $areaInforamtion =$response['HotelInformationResponse']['HotelDetails']['areaInformation']; return '

'.htmlspecialchars_decode($areaInforamtion).'

'; } add_shortcode('adivaha_ds_HotelPointofInterest','adivaha_ds_HotelPointofInterest'); function adivaha_ds_HotelCheckInInstructions ($atts, $content = null) { $post_ID =get_the_ID(); $ds_hotelAPIData = get_post_meta($post_ID, 'ds_hotelAPIData', true ); $ds_hotelAPIData = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $ds_hotelAPIData); $ds_hotelAPIData = str_replace('"', '"', $ds_hotelAPIData); $response =json_decode( stripslashes($ds_hotelAPIData) , true ); $checkInInstructions =$response['HotelInformationResponse']['HotelDetails']['checkInInstructions']; return '

'.htmlspecialchars_decode($checkInInstructions).'

'; } add_shortcode('adivaha_ds_HotelCheckInInstructions','adivaha_ds_HotelCheckInInstructions'); function adivaha_ds_HotelAmeneties(){ $post_ID =get_the_ID(); $ds_hotelAPIData = get_post_meta($post_ID, 'ds_hotelAPIData', true ); $ds_hotelAPIData = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $ds_hotelAPIData); $ds_hotelAPIData = str_replace('"', '"', $ds_hotelAPIData); $response =json_decode( stripslashes($ds_hotelAPIData) , true ); $PropertyAmenities =$response['HotelInformationResponse']['PropertyAmenities']; if($PropertyAmenities['size']>1){ $HotelAmenities =$PropertyAmenities['PropertyAmenity']; }else{ $HotelAmenities[] =$PropertyAmenities['PropertyAmenity']; } $html=''; return $html; } add_shortcode('adivaha_ds_HotelAmeneties','adivaha_ds_HotelAmeneties'); function adivaha_ds_HotelImages(){ $post_ID =get_the_ID(); $ds_hotelAPIData = get_post_meta($post_ID, 'ds_hotelAPIData', true ); $ds_hotelAPIData = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $ds_hotelAPIData); $ds_hotelAPIData = str_replace('"', '"', $ds_hotelAPIData); $response =json_decode( stripslashes($ds_hotelAPIData) , true ); $HotelImages =$response['HotelInformationResponse']['HotelImages']; if($HotelImages['size']>1){ $Images =$HotelImages['HotelImage']; }else{ $Images[] =$HotelImages['HotelImage']; } $html='
'; for($i=0;$i
'; } $html.='
prev
next
'; $html.=''; $html.=""; return $html; } add_shortcode('adivaha_ds_HotelImages','adivaha_ds_HotelImages'); function adivaha_ds_HotelMap(){ $post_ID =get_the_ID(); $ds_hotelAPIData = get_post_meta($post_ID, 'ds_hotelAPIData', true ); $ds_hotelAPIData = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $ds_hotelAPIData); $ds_hotelAPIData = str_replace('"', '"', $ds_hotelAPIData); $response =json_decode( stripslashes($ds_hotelAPIData) , true ); $latitude =$response['HotelInformationResponse']['HotelSummary']['latitude']; $longitude =$response['HotelInformationResponse']['HotelSummary']['longitude']; return '
'; } add_shortcode('adivaha_ds_HotelMap','adivaha_ds_HotelMap'); function adivaha_ds_TripAdvisorReview(){ $post_ID =get_the_ID(); $ds_hotelid = get_post_meta($post_ID, 'ds_hotelid', true ); $URLs_Fetch = "https://www.adivaha.com/demo/plugins/api.php?action=Trip_Advisor_Feedback&hotel_id=".$ds_hotelid; $response = wp_remote_get($URLs_Fetch); $Trip_Advisor_Feedback_Long = wp_remote_retrieve_body( $response ); $Trip_Advisor_Feedback_Long = str_replace("#589442", "#d9e4c4", $Trip_Advisor_Feedback_Long); return '

'.$Trip_Advisor_Feedback_Long.'

'; } add_shortcode('adivaha_ds_TripAdvisorReview','adivaha_ds_TripAdvisorReview'); ?>