Changeset 2765374
- Timestamp:
- 08/02/2022 07:41:09 PM (4 years ago)
- Location:
- expan-pro
- Files:
-
- 13 added
- 2 edited
-
tags/1.5 (added)
-
tags/1.5/arrow_left.svg (added)
-
tags/1.5/arrow_right.svg (added)
-
tags/1.5/index.php (added)
-
tags/1.5/languages (added)
-
tags/1.5/languages/expanpro-es_ES.mo (added)
-
tags/1.5/languages/expanpro-es_ES.po (added)
-
tags/1.5/languages/expanpro.pot (added)
-
tags/1.5/owl (added)
-
tags/1.5/owl/owl.carousel.min.css (added)
-
tags/1.5/owl/owl.carousel.min.js (added)
-
tags/1.5/readme.txt (added)
-
tags/1.5/style.css (added)
-
trunk/index.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
expan-pro/trunk/index.php
r2628749 r2765374 4 4 * Plugin URI: https://www.expan.cl 5 5 * Description: This plugin is designed to use the Expan Pro service associated with your user account created by Expan Tours. 6 * Version: 1. 56 * Version: 1.6 7 7 * Author: Expan Team 8 8 * Text Domain: expanpro … … 34 34 ); 35 35 36 $url = "https://api.expan.pro"; 37 //$url = "https://expanpro.test"; 38 39 $response = wp_remote_get($url . '/api/share/trip_plan_api', $args); 40 41 //echo '<h1>'.get_option('expanpro_token').'</h1>'; 36 //$url = "https://api.expan.pro"; 37 $url = "https://expanpro.test"; 38 39 $attsstring = implode("-",$atts); 40 41 if(( $response = get_transient('expanpro-'.$attsstring)) === false) 42 { 43 $remote = wp_remote_get($url . '/api/share/trip_plan_api', $args); 44 set_transient('expanpro-'.$attsstring, $remote, 360); 45 } 46 42 47 43 48 if ( is_array( $response ) && ! is_wp_error( $response ) ) : … … 101 106 102 107 if($d['media']): 103 $idmedia = $d['media'][0]['id']; 104 $medios = $APIjson['media']['TripPlan'][$idmedia]; 105 106 if($medios){ 107 $mediaurl = $medios['conversions']['md']; 108 $medianame = $medios['name']; 109 $mediaid = $medios['id']; 110 111 if(!$mediaurl){ 112 $imgurl = $medios['fullUrl']; 113 }else { 114 $imgurl = $mediaurl; 115 } 116 117 } 118 else{ 119 $mediaurl = ''; 120 $medianame = ''; 121 $mediaid = ''; 122 $imgurl = ''; 123 } 124 125 $d['medios']['mediaurl'] = $mediaurl; 126 $d['medios']['medianame'] = $medianame; 127 $d['medios']['mediaid'] = $mediaid; 128 $d['medios']['imgurl'] = $imgurl; 108 129 109 $d['paises'] = $paises; 130 110 $d['daynights'] = $daynights; … … 328 308 329 309 <?php 330 $url = "https://api.expan.pro";331 //$url = "https://expanpro.test";310 //$url = "https://api.expan.pro"; 311 $url = "https://expanpro.test"; 332 312 $response = wp_remote_post( $url . '/api/auth/loginweb/?email='.esc_attr( get_option('expanpro_email') ).'&password='.esc_attr( get_option('expanpro_password') ) , array() ) ; 333 313 314 // echo '<h1>'.get_option('expanpro_token').'</h1>'; 315 334 316 if ( is_array( $response ) && ! is_wp_error( $response ) ) : 335 317 $headers = $response['headers']; // array of http header lines … … 348 330 }else{ 349 331 echo '<div class="notice notice-error"> 350 <p> '.__("Failed to connect, try another password", "expanpro").'</p>332 <p> Fallo al ingresar contraseña, intente nuevamente </p> 351 333 </div>'; 352 334 } … … 356 338 357 339 echo '<div class="notice notice-error"> 358 <p> '.__("Failed to connect, try another password", "expanpro").'</p>340 <p> Fallo al conectar, intente nuevamente </p> 359 341 </div>'; 360 342 } 361 343 }else{ 362 344 echo '<div class="notice notice-error"> 363 <p> '.__("Failed to connect, try another password", "expanpro").'</p>345 <p>Fallo al conectar, intente nuevamente </p> 364 346 </div>'; 365 347 } -
expan-pro/trunk/readme.txt
r2628749 r2765374 75 75 == Changelog == 76 76 77 = 1.6 = 78 * Cached API Call. 79 77 80 = 1.5 = 78 81 * New custom domain option.
Note: See TracChangeset
for help on using the changeset viewer.