Commit 1d2e7683 authored by webchick's avatar webchick

#433454 by sun: Only hardcode node title's weight if it's not otherwise specified.

parent 156dec00
......@@ -144,7 +144,9 @@ function node_form($form, &$form_state, $node) {
if (function_exists($function) && ($extra = $function($node, $form_state))) {
$form = array_merge_recursive($form, $extra);
}
if (!isset($form['title']['#weight'])) {
// If the node type has a title, and the node type form defined no special
// weight for it, we default to a weight of -5 for consistency.
if (isset($form['title']) && !isset($form['title']['#weight'])) {
$form['title']['#weight'] = -5;
}
// @todo D8: Remove. Modules should access the node using $form_state['node'].
......
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