function theme_fupload_create_filename in Image FUpload 6.3
Same name and namespace in other branches
- 6 image_fupload.module \theme_fupload_create_filename()
- 6.2 image_fupload.module \theme_fupload_create_filename()
2 theme calls to theme_fupload_create_filename()
- image_fupload_imagefield_node_create in image_fupload_imagefield/
image_fupload_imagefield.module - image_fupload_image_node_create in image_fupload_image/
image_fupload_image.module
File
- ./
image_fupload.module, line 226
Code
function theme_fupload_create_filename($image, $replacements = NULL) {
// Get filename out of filepath
$filename = trim(basename($image->filepath), ' ');
$length1 = drupal_strlen(strrchr($filename, '.'));
$length2 = drupal_strlen($filename);
$image_name = drupal_ucfirst(drupal_substr($filename, 0, $length2 - $length1));
// Remove some given (userdefined) elements
if (is_null($replacements)) {
$replacements = variable_get('fupload_title_replacements', '_;{;}');
}
$image_name = str_replace(explode(';', $replacements), ' ', $image_name);
return $image_name;
}