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
function ph_image_upload_modification( $attachment_ID ) { | |
// set up file name | |
$filename = $_REQUEST['name']; | |
$withoutExt = preg_replace('/\\.[^.\\s]{3,4}$/', '', $filename); | |
$withoutExt = str_replace(array('-','_'), ' ', $withoutExt); | |
// set line endings for csv file | |
ini_set('auto_detect_line_endings',TRUE); |