Commit 33272e59 authored by yched's avatar yched

remove hook_field('view') for core field modules (default 'view' op is now handled

 in content.module)
parent 8dc0dd37
......@@ -104,15 +104,10 @@ function nodereference_field_settings($op, $field) {
/**
* Implementation of hook_field().
*/
function nodereference_field($op, &$node, $field, &$items, $teaser, $page) {
switch ($op) {
case 'view':
foreach ($items as $delta => $item) {
$items[$delta]['view'] = content_format($field, $item, 'default', $node);
}
return theme('field', $node, $field, $items, $teaser, $page);
}
}
//function nodereference_field($op, &$node, $field, &$items, $teaser, $page) {
// switch ($op) {
// }
//}
/**
* Implementation of hook_field_formatter_info().
......
......@@ -118,12 +118,6 @@ function number_field_settings($op, $field) {
*/
function number_field($op, &$node, $field, &$items, $teaser, $page) {
switch ($op) {
case 'view':
foreach ($items as $delta => $item) {
$items[$delta]['view'] = content_format($field, $item, 'default', $node);
}
return theme('field', $node, $field, $items, $teaser, $page);
case 'validate':
$allowed_values = number_allowed_values($field);
......
......@@ -117,12 +117,6 @@ function text_field_settings($op, $field) {
*/
function text_field($op, &$node, $field, &$items, $teaser, $page) {
switch ($op) {
case 'view':
foreach ($items as $delta => $item) {
$items[$delta]['view'] = content_format($field, $item, 'default', $node);
}
return theme('field', $node, $field, $items, $teaser, $page);
case 'validate':
$allowed_values = text_allowed_values($field);
......
......@@ -66,15 +66,10 @@ function userreference_field_settings($op, $field) {
/**
* Implementation of hook_field().
*/
function userreference_field($op, &$node, $field, &$items, $teaser, $page) {
switch ($op) {
case 'view':
foreach ($items as $delta => $item) {
$items[$delta]['view'] = content_format($field, $item, 'default', $node);
}
return theme('field', $node, $field, $items, $teaser, $page);
}
}
//function userreference_field($op, &$node, $field, &$items, $teaser, $page) {
// switch ($op) {
// }
//}
/**
* Implementation of hook_field_formatter_info().
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment