function img_assist_properties in Image Assist 6
Same name and namespace in other branches
- 5.3 img_assist.module \img_assist_properties()
- 5 img_assist.module \img_assist_properties()
- 5.2 img_assist.module \img_assist_properties()
- 6.2 img_assist.module \img_assist_properties()
Load the image properties pane.
Related topics
2 string references to 'img_assist_properties'
- img_assist_menu in ./
img_assist.module - Implementation of hook_menu().
- img_assist_properties_form in ./
img_assist.module - Construct the image properties form.
File
- ./
img_assist.module, line 758 - Image Assist module
Code
function img_assist_properties() {
$nid = arg(2);
// Update is put into a hidden field so the javascript can see it.
$update = arg(3) ? 1 : 0;
if (is_numeric($nid) && ($node = node_load($nid)) && $node->type == 'image' && node_access('view', $node)) {
// Setup a default caption & description.
$node->title = str_replace("\r", ' ', strip_tags($node->title));
$node->title = str_replace("\n", ' ', trim($node->title));
$node->body = str_replace("\r", ' ', strip_tags($node->body));
$node->body = str_replace("\n", ' ', trim($node->body));
$output = drupal_get_form('img_assist_properties_form', $node, $update);
}
else {
$output = t('Image ID not found');
}
echo theme('img_assist_page', $output, array(
'id' => 'img_assist_properties',
'onload' => 'parent.initProperties();',
'class' => 'img_assist',
));
}