You are here

function theme_fupload_create_filename in Image FUpload 6.2

Same name and namespace in other branches
  1. 6.3 image_fupload.module \theme_fupload_create_filename()
  2. 6 image_fupload.module \theme_fupload_create_filename()
2 theme calls to theme_fupload_create_filename()
fupload_node_create in ./image_fupload.module
image_fupload_image_node_create in image_fupload_image/image_fupload_image.module

File

./image_fupload.module, line 272

Code

function theme_fupload_create_filename($image) {

  // Get filename out of filepath
  $filename = trim(basename($image->filepath), ' ');
  $length1 = strlen(strrchr($filename, '.'));
  $length2 = strlen($filename);
  $image_name = ucwords(substr($filename, 0, $length2 - $length1));

  // Remove some given (userdefined) elements
  $replacements = explode(';', variable_get('fupload_title_replacements', '_;{;}'));
  $image_name = str_replace($replacements, ' ', $image_name);
  return $image_name;
}