You are here

function auto_nodetitle_eval in Automatic Nodetitles 6

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

Evaluates php code and passes $node to it

1 call to auto_nodetitle_eval()
_auto_nodetitle_patternprocessor in ./auto_nodetitle.module
Helper function to generate the title according to the PHP code. Right now its only a wrapper, but if this is to be expanded, here is the place to be.

File

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

Code

function auto_nodetitle_eval($code, $node) {
  ob_start();
  print eval('?>' . $code);
  $output = ob_get_contents();
  ob_end_clean();
  return $output;
}