Commit 63f61838 authored by catch's avatar catch
Browse files

Issue #1333346 by claudiu.cristea: Fixed hook_field_extra_fields_alter() example code.

parent b1d41a52
...@@ -74,8 +74,8 @@ function hook_field_extra_fields() { ...@@ -74,8 +74,8 @@ function hook_field_extra_fields() {
function hook_field_extra_fields_alter(&$info) { function hook_field_extra_fields_alter(&$info) {
// Force node title to always be at the top of the list by default. // Force node title to always be at the top of the list by default.
foreach (node_type_get_types() as $bundle) { foreach (node_type_get_types() as $bundle) {
if (isset($info['node'][$bundle->type]['title'])) { if (isset($info['node'][$bundle->type]['form']['title'])) {
$info['node'][$bundle->type]['title']['weight'] = -20; $info['node'][$bundle->type]['form']['title']['weight'] = -20;
} }
} }
} }
......
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