You are here

function hook_auto_nodetitle_alter in Automatic Nodetitles 7

Implements hook_auto_nodetitle_alter().

1 invocation of hook_auto_nodetitle_alter()
auto_nodetitle_set_title in ./auto_nodetitle.module
Sets the automatically generated nodetitle for the node.

File

./auto_nodetitle.api.php, line 11
Automatic node titles api file.

Code

function hook_auto_nodetitle_alter(&$node) {

  // Alter node title here.
  if (strpos($node->title, 'world') !== false) {
    $node->title = 'Hello world!';
  }
}