You are here

function auto_nodetitle_is_needed in Automatic Nodetitles 6

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. 7 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_nodeapi in ./auto_nodetitle.module
Implementation of hook_nodeapi().
auto_nodetitle_operations_update in ./auto_nodetitle.module
Callback function for updating node titles.

File

./auto_nodetitle.module, line 72
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));
}