function user_badges_image_selects in User Badges 5
Same name and namespace in other branches
- 6.2 user_badges.admin.inc \user_badges_image_selects()
- 6 user_badges.admin.inc \user_badges_image_selects()
2 calls to user_badges_image_selects()
- user_badges_edit_form in ./
user_badges.module - Define the edit form for userbadges.
- user_badges_images_form in ./
user_badges.module - Define a form to upload the badge images.
File
- ./
user_badges.module, line 712 - @brief User Badges module file
Code
function user_badges_image_selects() {
$selects = array();
$dir = file_create_path('badges');
$files = file_scan_directory($dir, '.*\\.(gif|jpg|jpeg|png)', array(
'.',
'..',
'CVS',
), 0, FALSE);
foreach ($files as $file) {
$selects[$file->filename] = theme('image', $file->filename, $file->filename, $file->filename);
}
return $selects;
}