Changeset 3077847
- Timestamp:
- 04/26/2024 10:24:22 PM (2 years ago)
- Location:
- expan-pro/trunk
- Files:
-
- 2 edited
-
index.php (modified) (7 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
expan-pro/trunk/index.php
r2955560 r3077847 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: 2. 36 * Version: 2.4 7 7 * Author: Expan Team 8 8 * Text Domain: expanpro … … 34 34 ); 35 35 36 if(isset($atts['vertical']) && $atts['vertical'] == true){ 37 $vertical = true; 38 }else{ 39 $vertical = false; 40 } 41 36 42 $url = "https://api.expan.pro"; 37 43 //$url = "https://expanpro.test"; … … 46 52 { 47 53 $remote = wp_remote_get($url . '/api/share/trip_plan_api', $args); 48 if( !is_wp_error($remote)){54 if(is_array( $remote ) && ! is_wp_error( $remote )){ 49 55 set_transient('expanpro-'.$attsstring, $remote, 3600*12); 50 56 } … … 60 66 wp_enqueue_style ( 'owl-carousel-min-css' ); 61 67 wp_enqueue_style ( 'expanpro-css' ); 68 if($vertical){ 69 wp_add_inline_script( 'owl-carousel-min', 70 'jQuery(document).ready(function(){ 71 jQuery(".owl-carousel-vertical").owlCarousel({ 72 margin : 20, 73 items : 1, 74 nav : false, 75 dots: false, 76 loop: true, 77 autoplay:true, 78 autoplayTimeout:4000, 79 autoplayHoverPause:true 80 }) 81 });'); 82 }else{ 62 83 wp_add_inline_script( 'owl-carousel-min', 63 84 'jQuery(document).ready(function(){ 64 jQuery(".owl-carousel ").owlCarousel({85 jQuery(".owl-carousel-normal").owlCarousel({ 65 86 margin : 20, 66 87 items : 4, … … 86 107 }) 87 108 });'); 109 } 88 110 $APIjson = json_decode($response['body'], true); 89 111 ob_start(); 90 112 ?> 91 <section class="carousel-xpan ">92 <div class="programasdest owl-carousel gallery classic four_cols portfolio-content section content clearfix" data-columns="4">113 <section class="carousel-xpan <?php echo $vertical ? 'carousel-vertical': 'carousel-normal' ?>"> 114 <div class="programasdest owl-carousel <?php echo $vertical ? 'owl-carousel-vertical': 'owl-carousel-normal' ?> gallery classic four_cols portfolio-content section content clearfix" data-columns="4"> 93 115 <?php foreach ($APIjson['trip_plans']['data'] as $d) : 94 116 … … 135 157 Desde <?php echo $d['currency_type'];?> 136 158 <?php if($d['offer_price']):?> 137 <?php echo $d['offer_price']; ?>138 <?php if($d['normal_price'] > $d['offer_price']):?><span class="text-subtitle2" style="text-decoration: line-through"><?php echo $d['currency_type'];?> <?php echo $d['normal_price']; ?></span><?php endif;?>159 <?php echo number_format($d['offer_price']); ?> 160 <?php if($d['normal_price'] > $d['offer_price']):?><span class="text-subtitle2" style="text-decoration: line-through"><?php echo $d['currency_type'];?> <?php echo number_format($d['normal_price']); ?></span><?php endif;?> 139 161 <?php else:?> 140 <?php echo $d['normal_price']; ?>162 <?php echo number_format($d['normal_price']); ?> 141 163 <?php endif;?> 142 164 </div> … … 472 494 <td><code>[expanpro quantity="20"]</code></td> 473 495 </tr> 496 <tr> 497 <td>vertical</td> 498 <td><?php echo __('Show vertical banner with programas', 'expanpro');?></td> 499 <td><code>[expanpro vertical="true"]</code></td> 500 </tr> 474 501 </tbody> 475 502 </table> -
expan-pro/trunk/readme.txt
r2955560 r3077847 3 3 Tags: travel, travel agency, trip, trip plans 4 4 Requires at least: 3.4 5 Tested up to: 6. 0.15 Tested up to: 6.5.2 6 6 Requires PHP: 5.6 7 7 Stable tag: 2.1 … … 54 54 * plans 55 55 Show specific trip plans by ID, comma separated 56 <code>[expanpro plans="10,5"]</code> 56 <code>[expanpro plans="10,5"]</code> 57 58 * vertical 59 Show a vertical banner with trip plans 60 <code>[expanpro vertical="true"]</code> 57 61 58 62 … … 82 86 83 87 == Changelog == 88 89 = 2.4 = 90 * visual improvements (added vertical option) 84 91 85 92 = 2.3 =
Note: See TracChangeset
for help on using the changeset viewer.