function node_gallery_get_current_widget_type in Node Gallery 6.3
Given an image type, return the name of the widget used on it's imagefield
Parameters
$image_type: A string that is the name of the image content type
File
- ./
node_gallery.inc, line 1002 - Shared functions for node_gallery
Code
function node_gallery_get_current_widget_type($image_type) {
module_load_include('inc', 'content', 'includes/content.crud');
$rel = node_gallery_get_relationship(NULL, $image_type);
$param = array(
'type_name' => $image_type,
'field_name' => $rel['imagefield_name'],
);
$image_field = array_pop(content_field_instance_read($param));
return $image_field['widget']['type'];
}