Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CDM change image icon
<?php
add_filter('sp_cdm_viewfile_image', '_cdm_custom_images',10,2);
function _cdm_custom_images($img,$r){
$ext = preg_replace('/^.*\./', '', $r['file']);
if ($ext == 'pdf') {
$img = '<img src="path/to/your/new/images/adobe.png">';
}
return $img;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment