Plugin Directory

Changeset 2023737


Ignore:
Timestamp:
02/02/2019 12:50:01 PM (7 years ago)
Author:
avneetk
Message:

Version 1.0.2

Location:
file-download/trunk
Files:
10 added
2 edited

Legend:

Unmodified
Added
Removed
  • file-download/trunk/download-widget.php

    r2020155 r2023737  
    44Description: A simple file download widget.
    55Text Domain: download-widget
    6 Version: 1.0.1
     6Version: 1.0.2
    77Author: Fortuner
    88Author URI: https://theaword.com/
     
    3535        $type = @end(explode('.', $instance['the_file']));
    3636        if($type == 'docx' || $type == 'doc'){
    37             $icon_src = plugins_url('docx-file-icon.svg', __FILE__);
     37            $icon_src = plugins_url('svg/docx-file-icon.svg', __FILE__); // dark blue
    3838        }else if ($type == 'pdf'){
    39             $icon_src = plugins_url('pdf-file-icon.svg', __FILE__);
     39            $icon_src = plugins_url('svg/pdf-file-icon.svg', __FILE__); // red
     40        }else if ($type == 'xls' || $type == 'xlsx' ){
     41            $icon_src = plugins_url('svg/xlsx-file-icon.svg', __FILE__); // dark green
     42        }else if ($type == 'mp3'){
     43            $icon_src = plugins_url('svg/mp3-file-icon.svg', __FILE__); // purple
     44        }else if ($type == 'mp4'){
     45            $icon_src = plugins_url('svg/mp4-file-icon.svg', __FILE__); // mauve
     46        }else if ($type == 'txt'){
     47            $icon_src = plugins_url('svg/txt-file-icon.svg', __FILE__); // pink
     48        }else if ($type == 'zip'){
     49            $icon_src = plugins_url('svg/zip-file-icon.svg', __FILE__); // yellow
     50        }else if ($type == 'jpg' || $type == 'jpeg' || $type == 'png' || $type == 'gif'){
     51            $icon_src = plugins_url('svg/photo-file-icon.svg', __FILE__); // violet
     52        }else if ($type == 'exe'){
     53            $icon_src = plugins_url('svg/exe-file-icon.svg', __FILE__); //brown
    4054        }else{
    41             $icon_src = plugins_url('generic-file-icon.svg', __FILE__);
     55            $icon_src = plugins_url('svg/generic-file-icon.svg', __FILE__); //black
    4256        }
    4357        echo "<p><a href='".$instance['the_file']."' download class='file-download-anchor'><img src='".$icon_src."' class='file-download-icon'><span>".$instance['title']."</span></a></p>";
     
    4559
    4660    public static function file_download_css(){
    47         echo "<style>.file-download-anchor{border: 1px solid gainsboro;display: inline-block;padding: 5px 30px 5px 5px;line-height: 31px;}.file-download-anchor:hover{box-shadow: 0px 0px 6px 0px rgba(0,0,0,.125);}.file-download-icon{float: left;margin-right: 5px;width:30px}</style>";
     61        echo "<style>.file-download-anchor{border: 1px solid gainsboro;display: inline-block;padding: 8px 30px 8px 8px;line-height: 31px;}.file-download-anchor:hover{box-shadow: 0px 0px 17px 0px rgba(0,0,0,.125);}.file-download-icon{float: left;margin-right: 5px;width:30px}</style>";
    4862    }
    4963
  • file-download/trunk/readme.txt

    r2023704 r2023737  
    11=== File Download ===
    22Contributors: avneetk
    3 Tags: file, download, brochures, upload, media, docx, pdf
     3Tags: file, download, upload, media, docx, doc, pdf
    44Requires at least: 4.0
    55Tested up to: 5.0.3
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77License: GPLv2 or later
    88
     
    1616Upload the File Download to your blog, Activate it.
    1717And You're done!
     18
     19== Changelog ==
     20
     21= 1.0.2 =
     22*Release Date - 2 Feb 2019*
     23
     24* Added new file extensions.
Note: See TracChangeset for help on using the changeset viewer.