You are here

function hook_node_import_fields_alter in Node import 6

Change the list of available fields for given content type.

A typical example for use of this function is in supported/auto_nodetitle.inc where the 'title' field that is supplied in supported/node.inc is altered to change whether it is required and what the default value for it is.

Parameters

$fields: Array of fields as returned by hook_node_import_fields().

$type: String. The content type as returned as a key by hook_node_import_types().

Return value

Just like with any Drupal drupal_alter() hook, you need to change the array passed to this function directly and not return anything.

Related topics

7 functions implement hook_node_import_fields_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

auto_nodetitle_node_import_fields_alter in supported/auto_nodetitle/auto_nodetitle.inc
Implementation of hook_node_import_fields_alter().
book_node_import_fields_alter in supported/book.inc
Implementation of hook_node_import_fields_alter().
imagefield_node_import_fields_alter in supported/imagefield/imagefield.inc
Implementation of hook_node_import_fields_alter().
locale_node_import_fields_alter in supported/locale.inc
Implementation of hook_node_import_fields_alter().
og_node_import_fields_alter in supported/og/og.inc
Implementation of hook_node_import_fields_alter().

... See full list

File

./node_import.api.php, line 322
Explanation of the Node import hooks.

Code

function hook_node_import_fields_alter(&$fields, $type) {
}