Plugin Directory

Changeset 3077847


Ignore:
Timestamp:
04/26/2024 10:24:22 PM (2 years ago)
Author:
expantours
Message:

fixed readme

Location:
expan-pro/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • expan-pro/trunk/index.php

    r2955560 r3077847  
    44 * Plugin URI: https://www.expan.cl
    55 * Description: This plugin is designed to use the Expan Pro service associated with your user account created by Expan Tours.
    6  * Version: 2.3
     6 * Version: 2.4
    77 * Author: Expan Team
    88 * Text Domain: expanpro
     
    3434    );
    3535
     36    if(isset($atts['vertical']) && $atts['vertical'] == true){
     37      $vertical = true;
     38    }else{
     39      $vertical = false;
     40    }
     41
    3642     $url = "https://api.expan.pro";
    3743     //$url = "https://expanpro.test";
     
    4652    {
    4753      $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 )){
    4955        set_transient('expanpro-'.$attsstring, $remote, 3600*12);
    5056      }
     
    6066               wp_enqueue_style ( 'owl-carousel-min-css' );
    6167               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{
    6283               wp_add_inline_script( 'owl-carousel-min',
    6384                 'jQuery(document).ready(function(){
    64                    jQuery(".owl-carousel").owlCarousel({
     85                   jQuery(".owl-carousel-normal").owlCarousel({
    6586                         margin : 20,
    6687                         items : 4,
     
    86107                   })
    87108                 });');
     109                } 
    88110               $APIjson = json_decode($response['body'], true);
    89111               ob_start();
    90112           ?>
    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">
    93115                 <?php foreach ($APIjson['trip_plans']['data'] as $d) :
    94116
     
    135157                               Desde <?php echo $d['currency_type'];?>
    136158                               <?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;?>
    139161                               <?php else:?>
    140                                   <?php echo $d['normal_price']; ?>
     162                                <?php echo number_format($d['normal_price']); ?>
    141163                               <?php endif;?>
    142164                             </div>
     
    472494         <td><code>[expanpro quantity="20"]</code></td>
    473495       </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>
    474501     </tbody>
    475502   </table>
  • expan-pro/trunk/readme.txt

    r2955560 r3077847  
    33Tags: travel, travel agency, trip, trip plans
    44Requires at least: 3.4
    5 Tested up to: 6.0.1
     5Tested up to: 6.5.2
    66Requires PHP: 5.6
    77Stable tag: 2.1
     
    5454* plans
    5555      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>             
    5761
    5862
     
    8286
    8387== Changelog ==
     88
     89= 2.4 =
     90* visual improvements (added vertical option)
    8491
    8592= 2.3 =
Note: See TracChangeset for help on using the changeset viewer.