Plugin Directory

Changeset 1771613


Ignore:
Timestamp:
11/20/2017 04:28:24 PM (8 years ago)
Author:
webilop
Message:

Release 1.7.8. See changelog for details.

Location:
woocommerce-html5-video/trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-html5-video/trunk/WooCommerceHTML5Video.php

    r1576844 r1771613  
    66 * Author: Webilop
    77 * Author URI: http://www.webilop.com
    8  * Version: 1.7.7
     8 * Version: 1.7.8
    99 * License: GPLv2 or later
    1010 */
  • woocommerce-html5-video/trunk/WooCommerceIntegrationBackend.php

    r1576844 r1771613  
    33
    44class WooCommerceIntegrationBackend {
     5
     6  public static $supportedVideoFormats = array('mp4', 'ogg', 'webm');
    57
    68  /**
     
    1113    ?>
    1214    <li class='html5_video'>
    13       <a href='#video_tab'><?= __('Video','html5_video') ?></a>
     15      <a href='#video_tab'><span><?= __('Video','html5_video') ?></span></a>
    1416    </li>
    1517    <?php
     
    308310       
    309311        //check if extension is valid
    310         if(in_array($extension, array('mp4', 'ogg', 'webm'))):
     312        if(in_array($extension, self::$supportedVideoFormats)):
    311313          ob_start();
    312314          ?>
     
    408410          $dimension = $height .' X ' . $width;
    409411        }
     412        if(empty($width))
     413          $width = 'auto';
     414        if(empty($height))
     415          $height = 'auto';
    410416
    411417        $class = "class=''";
     
    461467         
    462468          //check if extension is valid
    463           if(in_array($extension, array('mp4', 'ogg', 'webm'))):
     469          if(in_array($extension, self::$supportedVideoFormats)):
    464470            ob_start();
    465471            ?>
  • woocommerce-html5-video/trunk/WooCommerceIntegrationFrontend.php

    r1576844 r1771613  
    9898    if (self::product_has_video_tabs($product)):
    9999      $videos = json_decode(get_post_meta($product->id, 'wo_di_video_product_videos', true));
    100       if (!is_null($videos)):
     100      if (!is_null($videos) && is_array($videos)):
    101101        $width_config = get_option('wo_di_config_video_width');
    102102        $height_config = get_option('wo_di_config_video_height');
     
    160160                 
    161161                  //check if extension is valid
    162                   if(in_array($extension, array('mp4', 'ogg', 'webm'))):
     162                  if(in_array($extension, WooCommerceIntegrationBackend::$supportedVideoFormats)):
    163163                    ?>
    164164                    <video width="<?= $width ?>" height="<?= $height ?>" controls>
     
    223223    if ($number_videos > 0) {
    224224      $videos = json_decode(get_post_meta($product->id, 'wo_di_video_product_videos', true));
    225       foreach ($videos as $video) {
    226         if ($video->active == 1) {
    227           return true;
    228         }
    229       }
     225      if(is_array($videos))
     226        foreach ($videos as $video)
     227          if ($video->active == 1)
     228            return true;
     229         
    230230      return false;
    231231    }
  • woocommerce-html5-video/trunk/readme.txt

    r1576844 r1771613  
    44Tags: woocommerce, woocommerce video, woocommerce add-on, online store, product video, html5 video, mp4, ogg
    55Requires at least: 4.0
    6 Tested up to: 4.5
    7 Stable tag: 1.7.7
     6Tested up to: 4.9
     7Stable tag: 1.7.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3232
    3333The plugin has [documentation available in English](http://www.webilop.com/products/woocommerce-html5-video/) and the [documentation in Spanish](http://www.webilop.com/es_ES/productos/woocommerce-html5-video-2/) is also available.
     34
     35= Collaboration =
     36[The plugin is available in Github](https://wordpress.org/plugins/woocommerce-html5-video/). We receive patches to fix bugs and translation files.
     37You can also add bug reports in [Github issues page](https://github.com/Webilop/woocommerce-html5-video/issues).
    3438
    3539== Installation ==
     
    145149* Fix loading videos when direct to video URLs are used without the media library.
    146150
     151= 1.7.8 =
     152* Fixes on warning log messages. Thanks to an user's report.
     153* Fix on preview of videos with no dimensions.
     154* Fix on video icon in edition page of products.
     155
Note: See TracChangeset for help on using the changeset viewer.