Since 4.9.3 filename template not showing icon

[ad_1]

Plugin Author
Razvan

(@raldea89)

Hello @superpuru,

Seems to be a bug from our part. We’ll address this is our next update, until then please use the following snippet:

add_filter( 'dlm_template_attributes', 'superpuru_filetype', 30, 3 ); 

function superpuru_filetype( $attributes, $download, $template ) {  
if ( 'filename' === $template ) {   $attributes['link_attributes']['class'][] = 'filetype-icon filetype-' . esc_html( $download->get_version()->get_filetype() ); 
 }   
return $attributes; 
}

Please let me know if the problem is solved in your case.

Warmly,
Razvan

  • This reply was modified 2 hours, 21 minutes ago by Razvan. Reason: redo code
  • This reply was modified 2 hours, 20 minutes ago by Razvan. Reason: redo code

Thanks for the reply. Yes, that fixes it!

  • This reply was modified 8 seconds ago by superpuru.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer