1
<?php
function webformta_init() {
    dsm('hello world');
}

does absolutely nothing.

<?php
   dsm('hello world');

sets an alert message with the text "hello world".

I've tried wrapping this in several hooks. Hook_load, hook_node_load, you name it.

But somehow, oddly, hook_help seems to be working.

function webformta_help($path, $arg) {
  switch ($path) {
    case "admin/help#webformta":
      return '<p>'.  t("Grades quizzes like a TA. Works with Webform.") .'</p>';
      break;
  }
} 

creates a nice little help link in the module list and outputs the text and everything.

What did I screw up?

  • 4
    You need to clear the cache after adding new hooks. – Berdir May 30 '12 at 14:14
4

You need to clear the cache after adding new hooks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.