Changeset 2020056
- Timestamp:
- 01/27/2019 10:15:16 PM (7 years ago)
- File:
-
- 1 edited
-
file-download/trunk/download-widget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
file-download/trunk/download-widget.php
r2020045 r2020056 33 33 */ 34 34 public function widget( $args, $instance ) { 35 $firstPart = strtok( $instance['the_file'], '.' ); 36 $allTheRest = strtok( '' ); 37 if($allTheRest == 'docx' || $allTheRest == 'doc'){ 35 $type = @end(explode('.', $instance['the_file'])); 36 if($type == 'docx' || $type == 'doc'){ 38 37 $icon_src = plugins_url('docx-file-icon.svg', __FILE__); 39 }else if ($ allTheRest== 'pdf'){38 }else if ($type == 'pdf'){ 40 39 $icon_src = plugins_url('pdf-file-icon.svg', __FILE__); 41 40 }else{
Note: See TracChangeset
for help on using the changeset viewer.