Last active
May 30, 2018 14:40
-
-
Save anthonysbrown/6e00f6fdaafced694bf0f7e5b4e63fa1 to your computer and use it in GitHub Desktop.
CDM change image icon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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