Returning to the sitenews_send_action()
action we are defining in the sitenews
module, let's continue with the line after the hook processing:
// Execute hook_sitenews() $content = module_invoke_all('sitenews'); // Build params $params = array( 'node' => $object, 'to' => implode(', ', $addresses), 'subject' => $object->title, 'context' => $context, 'additional content' => $content, ); $message = _sitenews_do_message($object, $params); watchdog( 'actions', 'Site News "Send" action fired. Sending to !mail', array('!mail' => $params['to']) );
Our call to module_invoke_all('sitenews')
returns an array of content. Assuming that only the two hooks we created above were called, our returned array will contain an entry for philquotes_sitenews()
and an entry for biography_sitenews()
.