You are here

function auto_nodetitle_is_needed in Automatic Nodetitles 7

Same name and namespace in other branches
  1. 8 auto_nodetitle.module \auto_nodetitle_is_needed()
  2. 5 auto_nodetitle.module \auto_nodetitle_is_needed()
  3. 6 auto_nodetitle.module \auto_nodetitle_is_needed()

Returns whether the auto nodetitle has to be set.

2 calls to auto_nodetitle_is_needed()
auto_nodetitle_node_presave in ./auto_nodetitle.module
Implements hook_node_presave().
auto_nodetitle_operations_update in ./auto_nodetitle.module
Callback function for updating node titles.

File

./auto_nodetitle.module, line 116
Allows hiding of the node title field and automatic title creation.

Code

function auto_nodetitle_is_needed($node) {
  return empty($node->auto_nodetitle_applied) && ($setting = auto_nodetitle_get_setting($node->type)) && !($setting == AUTO_NODETITLE_OPTIONAL && !empty($node->title));
}